~ubuntu-branches/ubuntu/natty/kdeadmin/natty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/01_system_config_printer_kde_cupsutils.diff

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-05-19 21:09:38 UTC
  • mfrom: (1.2.42 upstream) (3.1.8 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100519210938-g94qt97lywsy98gm
Tags: 4:4.4.3-1ubuntu1
* Merge with Debian unstable, remaining changes:
  - Don't ship knetworkconf, it is utterly busted
  - kdeadmin doesn't depend on knetworkconf
  - kde-config-cron conflicts/replaces on kcron (<< 4:4.4.60)
  - system-config-printer-kde depends on system-printer-common
  - system-config-printer-kde doesn't depend on python-cupsutils
  - kdeadmin-dbg depends on kdeadmin
  - Keep Kubuntu docs path in kde/HTML
  - Don't keep kpackage.sgml

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Cope with system-config-printer split (now depends only on python-cupsutils)
 
2
 Thanks to Josselin Mouette for the orginal patch.
 
3
Origin: vendor: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525558#21
 
4
Bug-Debian: http://bugs.debian.org/525558
 
5
Author: Didier Raboud <didier@raboud.com>
 
6
Last-Update: 2009-08-09
 
7
 
 
8
Index: kdeadmin-4.3.0/system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py
 
9
===================================================================
 
10
--- kdeadmin-4.3.0.orig/system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py      2009-08-09 00:36:41.000000000 +0200
 
11
+++ kdeadmin-4.3.0/system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py   2009-08-09 11:25:52.000000000 +0200
 
12
@@ -8,7 +8,7 @@
 
13
 sys.path.append (SYSTEM_CONFIG_PRINTER_DIR)
 
14
 
 
15
 try:
 
16
-    import cupshelpers.ppds, cupshelpers.cupshelpers
 
17
+    import cupsutils.ppds, cupsutils.cupshelpers
 
18
 except:
 
19
     exit(1)
 
20
 print "Groovy"
 
21
Index: kdeadmin-4.3.0/system-config-printer-kde/system-config-printer-kde.py
 
22
===================================================================
 
23
--- kdeadmin-4.3.0.orig/system-config-printer-kde/system-config-printer-kde.py  2009-08-09 00:36:41.000000000 +0200
 
24
+++ kdeadmin-4.3.0/system-config-printer-kde/system-config-printer-kde.py       2009-08-09 12:00:54.000000000 +0200
 
25
@@ -33,11 +33,6 @@
 
26
 
 
27
 import sys, os, time, traceback, re, tempfile, httplib, thread
 
28
 
 
29
-#load modules from system-config-printer-common (debug, smburi), change path here if you have it installed elsewhere
 
30
-SYSTEM_CONFIG_PRINTER_DIR = "/usr/share/system-config-printer"
 
31
-if os.path.exists(SYSTEM_CONFIG_PRINTER_DIR + "/debug.py"):
 
32
-    sys.path.append(SYSTEM_CONFIG_PRINTER_DIR)
 
33
-
 
34
 from PyQt4.QtCore import *
 
35
 from PyQt4.QtGui import *
 
36
 from PyQt4 import uic
 
37
@@ -65,12 +60,16 @@
 
38
 import cups
 
39
 cups.require ("1.9.27")
 
40
 
 
41
-# These come from system-config-printer
 
42
-import config
 
43
-import cupshelpers, options
 
44
+# These come from python-cupsutils
 
45
+import cupsutils.ppds
 
46
+try:
 
47
+    import cupshelpers
 
48
+except ImportError:
 
49
+    from cupsutils import cupshelpers
 
50
+import options
 
51
 from optionwidgets import OptionWidget
 
52
-from smburi import SMBURI
 
53
-from debug import *
 
54
+from cupsutils.smburi import SMBURI
 
55
+from cupsutils.debug import *
 
56
 
 
57
 import dbus
 
58
 import dbus.mainloop.qt
 
59
@@ -898,10 +897,6 @@
 
60
             # otherwise use cups' default one
 
61
             custom_testpage = None
 
62
             opt = self.ppd.findOption ("PageSize")
 
63
-            if opt:
 
64
-                print opt
 
65
-                custom_testpage = os.path.join(SYSTEM_CONFIG_PRINTER_DIR, 'testpage-%s.ps' % opt.defchoice.lower())
 
66
-                print custom_testpage
 
67
 
 
68
             if custom_testpage and os.path.exists(custom_testpage):
 
69
                 debugprint ('Printing custom test page ' + custom_testpage)
 
70
@@ -2083,11 +2078,9 @@
 
71
         #self.connect(self.btnNCAddMember, SIGNAL("clicked()"), self.slot_btnNCAddMember_clicked)
 
72
         #self.connect(self.btnNCDelMember, SIGNAL("clicked()"), self.slot_btnNCDelMember_clicked)
 
73
 
 
74
-        # Optionally disable downloadable driver support.
 
75
-        #if not config.DOWNLOADABLE_DRIVER_SUPPORT:
 
76
-        if True:
 
77
-            self.rbtnNPDownloadableDriverSearch.setEnabled(False)
 
78
-            self.downloadableDriverSearchFrame.hide()
 
79
+        # Disable downloadable driver support.
 
80
+        self.rbtnNPDownloadableDriverSearch.setEnabled(False)
 
81
+        self.downloadableDriverSearchFrame.hide()
 
82
 
 
83
         """
 
84
         # Set up OpenPrinting widgets.
 
85
@@ -2297,7 +2290,7 @@
 
86
             c = cups.Connection ()
 
87
             debugprint ("Fetching PPDs")
 
88
             ppds_dict = c.getPPDs()
 
89
-            self.ppds_result = cupshelpers.ppds.PPDs(ppds_dict,
 
90
+            self.ppds_result = cupsutils.ppds.PPDs(ppds_dict,
 
91
                                                      language=language)
 
92
             debugprint ("Closing connection (PPDs)")
 
93
             del c
 
94
@@ -2523,7 +2516,7 @@
 
95
                         ppddict = self.ppds.getInfoFromPPDName (ppdname)
 
96
                         make_model = ppddict['ppd-make-and-model']
 
97
                         (make, model) = \
 
98
-                            cupshelpers.ppds.ppdMakeModelSplit (make_model)
 
99
+                            cupsutils.ppds.ppdMakeModelSplit (make_model)
 
100
                         self.auto_make = make
 
101
                         self.auto_model = model
 
102
                 except:
 
103
@@ -2892,7 +2885,7 @@
 
104
         if make_and_model and not device.id:
 
105
             mk = None
 
106
             md = None
 
107
-            (mk, md) = cupshelpers.ppds.ppdMakeModelSplit (make_and_model)
 
108
+            (mk, md) = cupsutils.ppds.ppdMakeModelSplit (make_and_model)
 
109
             device.id = "MFG:" + mk + ";MDL:" + md + ";DES:" + mk + " " + md + ";"
 
110
             device.id_dict = cupshelpers.parseDeviceID (device.id)
 
111
         # Check whether the device is supported by HPLIP and replace