Commit 1eed94c3 authored by Albert Astals Cid's avatar Albert Astals Cid

More on the DRM issue.

How it is going to end:
 - Exists a configure option called --enable-kpdf-drm that is DISABLE by default and you can use to FORCE kpdf obeying DRM
 - Exists a kiosk option called skip_drm that is true by default and the admin can set to TRUE to FORCE kdpf obeying DRM
 - Exists a GUI option called Obey pdf limitations that is shown if skip_drm is true, that option is ON by default, that means DRM is obeyed but the user can disable it from the GUI
Hope that will please everyone
Please can somebody with better english than me check that the wording i used is actually correct english? Thanks

svn path=/trunk/kdegraphics/kpdf/; revision=394212
parent 02b3ab70
......@@ -75,6 +75,7 @@ More items (first items will enter 'In progress list' first):
Done (newest features come first):
-- merging from kdpf_annotations branch --
-> ADD: Obey DRM is now a configuration option
-> FIX: leakfix when closing document while thread was running (no more leaks now)
-> FIX: direct hi-performance pixels manipulation for highlighting (instead of the obsoleted setRasterOp)
-> CHG: new search api. supports multiple searches at once, multiple highlighs per page
......@@ -9,7 +9,7 @@
......@@ -32,7 +32,7 @@
<widget class="QLayoutWidget">
<property name="name">
<property name="name">
......@@ -111,6 +111,14 @@
<string>Show &amp;hints and info messages</string>
<widget class="QCheckBox">
<property name="name">
<property name="text">
<string>&amp;Obey DRM limitations</string>
<widget class="QLayoutWidget">
......@@ -194,7 +202,11 @@
<include location="global" impldecl="in implementation">kdialog.h</include>
<include location="global" impldecl="in implementation">kiconloader.h</include>
<include location="local" impldecl="in implementation">dlggeneral.ui.h</include>
<function access="protected" specifier="non virtual">showEvent( QShowEvent * )</function>
<layoutdefaults spacing="6" margin="11"/>
** ui.h extension file, included from the uic-generated form implementation.
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
#include <kapplication.h>
void DlgGeneral::showEvent( QShowEvent * )
if (kapp->authorize("skip_drm")) kcfg_ObeyDRM->show();
else kcfg_ObeyDRM->hide();
......@@ -53,6 +53,9 @@
<entry key="WatchFile" type="Bool" >
<entry key="ObeyDRM" type="Bool" >
<group name="MainView" >
<entry key="ShowLeftPanel" type="Bool" >
......@@ -112,6 +112,6 @@ AC_ARG_ENABLE(kpdf-drm,
, AC_DEFINE(KPDF_HAVE_DRM, 1, [Defines if use DRM in kpdf])
, AC_DEFINE(KPDF_HAVE_DRM, 0, [Defines if use DRM in kpdf])
......@@ -15,6 +15,7 @@
#include <qapplication.h>
#include <qpaintdevicemetrics.h>
#include <qregexp.h>
#include <kapplication.h>
#include <klocale.h>
#include <kpassdlg.h>
#include <kprinter.h>
......@@ -213,6 +214,8 @@ const DocumentSynopsis * PDFGenerator::generateDocumentSynopsis()
bool PDFGenerator::isAllowed( int permissions )
if (kapp->authorize("skip_drm") && !Settings::obeyDRM()) return true;
bool b = true;
if (permissions & KPDFDocument::AllowModify) b = b && pdfdoc->okToChange();
if (permissions & KPDFDocument::AllowCopy) b = b && pdfdoc->okToCopy();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment