tag 525714 + pending tag 525558 + patch thanks Le dimanche 26 avril 2009 à 20:03 +0200, Sune Vuorela a écrit : > Hi system-config-printer people > > KDE has started using parts of system-config-printer for printintg > configuration. > > It wolud be nice to get the package split so that teh kde frontend doesn't > have to pull in half of gnome. > > They have done the split in ubuntu, that could be a source of inspiration There are a lot of changes that need to be done in system-config-printer, but I understand this is important for you so I’ve finished to split the parts that system-config-printer-kde needs. You’ll only have to depend on python-cupsutils (>= 1.0.0-6). I’m attaching a patch for system-config-printer-kde that should make it work now and remain compatible with the changes that will be needed in system-config-printer. Cheers, -- .''`. Josselin Mouette : :' : `. `' “I recommend you to learn English in hope that you in `- future understand things” -- Jörg Schilling
--- system-config-printer-kde.py.orig 2009-06-17 10:36:23.593776754 +0200
+++ system-config-printer-kde.py 2009-06-17 10:45:18.665774521 +0200
@@ -32,11 +32,6 @@
#tempfile
import 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
@@ -64,10 +59,12 @@
cups.require ("1.9.27")
# These come from system-config-printer
-import config
-import cupshelpers #, options
-from smburi import SMBURI
-from debug import *
+try:
+ import cupshelpers
+except ImportError:
+ from cupsutils import cupshelpers
+from cupsutils.smburi import SMBURI
+from cupsutils.debug import *
import dbus
import dbus.mainloop.qt
@@ -705,8 +702,6 @@
# otherwise use cups' default one
custom_testpage = None
opt = self.ppd.findOption ("PageSize")
- if opt:
- custom_testpage = os.path.join(SYSTEM_CONFIG_PRINTER_DIR, 'testpage-%s.ps' % opt.defchoice.lower())
if custom_testpage and os.path.exists(custom_testpage):
debugprint ('Printing custom test page ' + custom_testpage)
@@ -1480,9 +1475,8 @@
"""
# Optionally disable downloadable driver support.
- if not config.DOWNLOADABLE_DRIVER_SUPPORT:
- self.rbtnNPDownloadableDriverSearch.setEnabled(False)
- self.downloadableDriverSearchFrame.hide()
+ self.rbtnNPDownloadableDriverSearch.setEnabled(False)
+ self.downloadableDriverSearchFrame.hide()
"""
# Set up OpenPrinting widgets.
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=