[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdegraphics/kpdf
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2005-03-02 18:32:46
Message-ID: 20050302183246.58D2316EF1 () office ! kde ! org
[Download RAW message or body]

CVS commit by aacid: 

Make what i really said yesterday.
--enable-force-kpdf-drm is a configure option, it defaults to NO, if YES DRM is \
ALLWAYS obeyed skip_drm is a kiosk option, it defaults to YES, if NO, means the user \
is not authorized to skip DRM and DRM is ALLWAYS obeyed if previous options are no \
and yes, the user sees a GUI option called Obey DRM limitations that defaults to YES \
but the user can set to NO from the GUI


  M +6 -6      configure.in.in   1.20
  M +7 -0      conf/dlggeneral.ui.h   1.2
  M +0 -5      core/generator.h   1.7
  M +4 -0      core/generator_pdf/generator_pdf.cpp   1.25


--- kdegraphics/kpdf/configure.in.in  #1.19:1.20
@@ -98,20 +98,20 @@
 
 dnl #### Enable the user to decide if he wants to force drm or not
-AC_ARG_ENABLE(kpdf-drm,
-              AC_HELP_STRING([--enable-kpdf-drm],[Forces kpdf to check for DRM to \
decide if you can copy/print protected pdf. (default=no)]), \
+AC_ARG_ENABLE(force-kpdf-drm, +              \
AC_HELP_STRING([--enable-force-kpdf-drm],[Forces kpdf to check for DRM to decide if \
you can copy/print protected pdf. (default=no)]),  [
     case $enableval in
         yes)
-                AC_DEFINE(KPDF_HAVE_DRM, 1, [Defines if use DRM in kpdf])
+                AC_DEFINE(KPDF_FORCE_DRM, 1, [Defines if force the use DRM in kpdf])
                 ;;
         no)
-                AC_DEFINE(KPDF_HAVE_DRM, 0, [Defines if use DRM in kpdf])
+                AC_DEFINE(KPDF_FORCE_DRM, 0, [Defines if force the use DRM in kpdf])
                 ;;
         *)
-                AC_DEFINE(KPDF_HAVE_DRM, 1, [Defines if use DRM in kpdf])
+                AC_DEFINE(KPDF_FORCE_DRM, 1, [Defines if force the use DRM in kpdf])
                 ;;
  esac
 ]
-, AC_DEFINE(KPDF_HAVE_DRM, 0, [Defines if use DRM in kpdf])
+, AC_DEFINE(KPDF_FORCE_DRM, 0, [Defines if force the use DRM in kpdf])
 )
 

--- kdegraphics/kpdf/conf/dlggeneral.ui.h  #1.1:1.2
@@ -13,7 +13,14 @@
 #include <kapplication.h>
 
+#include <config.h>
+
 void DlgGeneral::showEvent( QShowEvent * )
 {
+#if KPDF_FORCE_DRM
+    kcfg_ObeyDRM->hide();
+#else
     if (kapp->authorize("skip_drm")) kcfg_ObeyDRM->show();
     else kcfg_ObeyDRM->hide();
+#endif
 }
+

--- kdegraphics/kpdf/core/generator.h  #1.6:1.7
@@ -11,5 +11,4 @@
 #define _KPDF_GENERATOR_H_
 
-#include <config.h>
 #include <qobject.h>
 #include <qvaluevector.h>
@@ -53,9 +52,5 @@ class Generator : public QObject
 
         // DRM handling
-#if KPDF_HAVE_DRM
         virtual bool isAllowed( int /*Document::Permisison(s)*/ ) { return true; }
-#else
-        bool isAllowed( int /*Document::Permisison(s)*/ ) { return true; }
-#endif
 
         // page contents generation

--- kdegraphics/kpdf/core/generator_pdf/generator_pdf.cpp  #1.24:1.25
@@ -41,4 +41,6 @@
 #include "conf/settings.h"
 
+#include <config.h>
+
 // id for DATA_READY PDFPixmapGeneratorThread Event
 #define TGE_DATAREADY_ID 6969
@@ -215,5 +217,7 @@ const DocumentSynopsis * PDFGenerator::g
 bool PDFGenerator::isAllowed( int permissions )
 {
+#if !KPDF_FORCE_DRM
     if (kapp->authorize("skip_drm") && !Settings::obeyDRM()) return true;
+#endif
 
     bool b = true;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic