Description: Cope with system-config-printer split (now depends only on python-cupshelpers)
Thanks to Josselin Mouette for the orginal patch.
Origin: vendor: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525558#21
Bug-Debian: http://bugs.debian.org/525558
Bug-Debian: http://bugs.debian.org/597071
Author: Didier Raboud <didier@raboud.com>
Author: Modestas Vainius <modax@debian.org>
Last-Update: 2010-09-16
--- a/system-config-printer-kde/system-config-printer-kde.py
+++ b/system-config-printer-kde/system-config-printer-kde.py
@@ -33,11 +33,6 @@ import locale
import sys, os, time, traceback, re, tempfile, httplib, thread
-#load modules from system-config-printer-common (debug, smburi), change path here if you have it installed elsewhere
-SYSTEM_CONFIG_PRINTER_DIR = "/usr/share/system-config-printer"
-if os.path.exists(SYSTEM_CONFIG_PRINTER_DIR + "/debug.py"):
- sys.path.append(SYSTEM_CONFIG_PRINTER_DIR)
-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import uic
@@ -65,12 +60,11 @@ uic.properties.Properties._string = tran
import cups
cups.require ("1.9.27")
-# These come from system-config-printer
-import config
+# These come from python-cupsutils
import cupshelpers, options
from optionwidgets import OptionWidget
-from smburi import SMBURI
-from debug import *
+from cupshelpers.smburi import SMBURI
+from cupshelpers.debug import *
import dbus
import dbus.mainloop.qt
@@ -898,10 +892,6 @@ class GUI(QWidget):
# otherwise use cups' default one
custom_testpage = None
opt = self.ppd.findOption ("PageSize")
- if opt:
- print opt
- custom_testpage = os.path.join(SYSTEM_CONFIG_PRINTER_DIR, 'testpage-%s.ps' % opt.defchoice.lower())
- print custom_testpage
if custom_testpage and os.path.exists(custom_testpage):
debugprint ('Printing custom test page ' + custom_testpage)
@@ -2083,11 +2073,9 @@ class NewPrinterGUI(QDialog):
#self.connect(self.btnNCAddMember, SIGNAL("clicked()"), self.slot_btnNCAddMember_clicked)
#self.connect(self.btnNCDelMember, SIGNAL("clicked()"), self.slot_btnNCDelMember_clicked)
- # Optionally disable downloadable driver support.
- #if not config.DOWNLOADABLE_DRIVER_SUPPORT:
- if True:
- self.rbtnNPDownloadableDriverSearch.setEnabled(False)
- self.downloadableDriverSearchFrame.hide()
+ # Disable downloadable driver support.
+ self.rbtnNPDownloadableDriverSearch.setEnabled(False)
+ self.downloadableDriverSearchFrame.hide()
"""
# Set up OpenPrinting widgets.