From 869fd822a983ce4d51a7b3f61c2d02ff95f30ea8 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 27 Nov 2009 18:00:41 +0000 Subject: [PATCH] - 1.1.14: - Retry when reconnection fails (bug #541741). - Prevent traceback with bad marker-levels attribute (bug #541882). --- .cvsignore | 1 + sources | 2 +- system-config-printer-1.1.13.tar.xz.sig | Bin 65 -> 0 bytes system-config-printer-1.1.14.tar.xz.sig | Bin 0 -> 65 bytes system-config-printer-autoselect-raw.patch | 14 -- system-config-printer-cancel-traceback.patch | 11 -- system-config-printer-center.patch | 12 -- ...-config-printer-custom-state-reasons.patch | 124 ------------- system-config-printer-data-button-state.patch | 32 ---- system-config-printer-de.po-typo.patch | 12 -- system-config-printer-editable-ppd.patch | 20 --- system-config-printer-fetchdevices.patch | 51 ------ system-config-printer-find-return-accel.patch | 11 -- system-config-printer-gpk-traceback.patch | 14 -- system-config-printer-iconify.patch | 31 ---- ...fig-printer-install-foomatic-db-ppds.patch | 56 ------ ...onfig-printer-jobs-window-visibility.patch | 11 -- system-config-printer-markers-display.patch | 165 ------------------ system-config-printer-missing-import.patch | 11 -- system-config-printer-network-model.patch | 16 -- ...-printer-no-cancel-properties-dialog.patch | 14 -- ...onfig-printer-notification-traceback.patch | 45 ----- system-config-printer-physdev-traceback.patch | 12 -- system-config-printer-publish-printers.patch | 31 ---- system-config-printer-strip-zjs.patch | 11 -- system-config-printer-strip-zxs-pcl3.patch | 12 -- ...m-config-printer-test-page-traceback.patch | 27 --- ...rinter-troubleshoot-network-printers.patch | 26 --- system-config-printer.spec | 66 ++----- 29 files changed, 14 insertions(+), 824 deletions(-) delete mode 100644 system-config-printer-1.1.13.tar.xz.sig create mode 100644 system-config-printer-1.1.14.tar.xz.sig delete mode 100644 system-config-printer-autoselect-raw.patch delete mode 100644 system-config-printer-cancel-traceback.patch delete mode 100644 system-config-printer-center.patch delete mode 100644 system-config-printer-custom-state-reasons.patch delete mode 100644 system-config-printer-data-button-state.patch delete mode 100644 system-config-printer-de.po-typo.patch delete mode 100644 system-config-printer-editable-ppd.patch delete mode 100644 system-config-printer-fetchdevices.patch delete mode 100644 system-config-printer-find-return-accel.patch delete mode 100644 system-config-printer-gpk-traceback.patch delete mode 100644 system-config-printer-iconify.patch delete mode 100644 system-config-printer-install-foomatic-db-ppds.patch delete mode 100644 system-config-printer-jobs-window-visibility.patch delete mode 100644 system-config-printer-markers-display.patch delete mode 100644 system-config-printer-missing-import.patch delete mode 100644 system-config-printer-network-model.patch delete mode 100644 system-config-printer-no-cancel-properties-dialog.patch delete mode 100644 system-config-printer-notification-traceback.patch delete mode 100644 system-config-printer-physdev-traceback.patch delete mode 100644 system-config-printer-publish-printers.patch delete mode 100644 system-config-printer-strip-zjs.patch delete mode 100644 system-config-printer-strip-zxs-pcl3.patch delete mode 100644 system-config-printer-test-page-traceback.patch delete mode 100644 system-config-printer-troubleshoot-network-printers.patch diff --git a/.cvsignore b/.cvsignore index 18286c0..3884f1c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -205,3 +205,4 @@ system-config-printer-1.1.10.tar.bz2 system-config-printer-1.1.11.tar.xz system-config-printer-1.1.12.tar.xz system-config-printer-1.1.13.tar.xz +system-config-printer-1.1.14.tar.xz diff --git a/sources b/sources index 558c28f..f7807f6 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2 895d4170542ec80c74d41746a9474409 pycups-1.9.46.tar.bz2 -15fec6e2bb9543aa42bf86814855f25c system-config-printer-1.1.13.tar.xz +71c114e997ec0f8d146f3c6586de032e system-config-printer-1.1.14.tar.xz diff --git a/system-config-printer-1.1.13.tar.xz.sig b/system-config-printer-1.1.13.tar.xz.sig deleted file mode 100644 index 1c45265f8fa22a36a483af626620c94a5761ed4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmV-H0KWf-KLZ5-O0HHf1hg7`no8Q&5du^~0HA;`G&Ec5xknQ!jV^`n4LBli>gE8R XKD#E}gsbW3W;HRCV9f0ID`?tN7<(JC diff --git a/system-config-printer-1.1.14.tar.xz.sig b/system-config-printer-1.1.14.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..3a81a18c4b784f08a69d863114627731cc86e945 GIT binary patch literal 65 zcmV-H0KWf-KLZ5-OArjV1hg7`no8Q&5dsMQ0G>E#Gz+YgR|dw8C`NsDS6%u?c{~81 Xi9xCez*e)FGJgPu9>ywxn_87O>lPSj literal 0 HcmV?d00001 diff --git a/system-config-printer-autoselect-raw.patch b/system-config-printer-autoselect-raw.patch deleted file mode 100644 index 1a93e44..0000000 --- a/system-config-printer-autoselect-raw.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.autoselect-raw system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.autoselect-raw 2009-09-30 16:54:07.363635374 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-30 16:54:19.189761633 +0100 -@@ -3948,8 +3948,8 @@ class NewPrinterGUI(GtkGUI): - cupshelpers.ppds.ppdMakeModelSplit (makeandmodel) - else: - # Special CUPS names for a raw queue. -- self.auto_make = 'Raw' -- self.auto_model = 'Queue' -+ self.auto_make = 'Generic' -+ self.auto_model = 'Raw Queue' - - try: - if self.dialog_mode == "ppd": diff --git a/system-config-printer-cancel-traceback.patch b/system-config-printer-cancel-traceback.patch deleted file mode 100644 index 7bc3d02..0000000 --- a/system-config-printer-cancel-traceback.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.cancel-traceback system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.cancel-traceback 2009-09-18 13:10:10.962438215 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-18 13:10:20.041314240 +0100 -@@ -3805,6 +3805,7 @@ class NewPrinterGUI(GtkGUI): - self.options = {} # keyword -> Option object - self.changed = set() - self.conflicts = set() -+ self.fetchDevices_op = None - - combobox = self.cmbNPDownloadableDriverFoundPrinters - combobox.set_model (gtk.ListStore (str, str)) diff --git a/system-config-printer-center.patch b/system-config-printer-center.patch deleted file mode 100644 index 4ae23d8..0000000 --- a/system-config-printer-center.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.1.13/glade/PrintersWindow.glade.center system-config-printer-1.1.13/glade/PrintersWindow.glade ---- system-config-printer-1.1.13/glade/PrintersWindow.glade.center 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/glade/PrintersWindow.glade 2009-11-26 15:36:40.465178836 +0000 -@@ -8,7 +8,7 @@ - False - System-Config-Printer - GTK_WINDOW_TOPLEVEL -- GTK_WIN_POS_NONE -+ GTK_WIN_POS_CENTER - False - 450 - 250 diff --git a/system-config-printer-custom-state-reasons.patch b/system-config-printer-custom-state-reasons.patch deleted file mode 100644 index d5c5577..0000000 --- a/system-config-printer-custom-state-reasons.patch +++ /dev/null @@ -1,124 +0,0 @@ -diff -up system-config-printer-1.1.13/monitor.py.custom-state-reasons system-config-printer-1.1.13/monitor.py ---- system-config-printer-1.1.13/monitor.py.custom-state-reasons 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/monitor.py 2009-10-29 17:18:46.813021287 +0000 -@@ -62,7 +62,7 @@ def collect_printer_state_reasons (conne - continue - if not result.has_key (name): - result[name] = [] -- result[name].append (StateReason (name, reason)) -+ result[name].append (StateReason (connection, name, reason)) - return result - - class Watcher: -@@ -408,7 +408,7 @@ class Monitor: - break - if state_reason_is_harmless (reason): - continue -- reasons.append (StateReason (name, reason)) -+ reasons.append (StateReason (c, name, reason)) - self.printer_state_reasons[name] = reasons - - deferred_calls.append ((self.watcher.printer_event, -diff -up system-config-printer-1.1.13/statereason.py.custom-state-reasons system-config-printer-1.1.13/statereason.py ---- system-config-printer-1.1.13/statereason.py.custom-state-reasons 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/statereason.py 2009-10-29 17:18:46.814020769 +0000 -@@ -17,6 +17,8 @@ - ## along with this program; if not, write to the Free Software - ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -+import cups -+ - _ = lambda x: x - def set_gettext_function (fn): - global _ -@@ -33,11 +35,12 @@ class StateReason: - ERROR: "dialog-error" - } - -- def __init__(self, printer, reason): -+ def __init__(self, connection, printer, reason): - self.printer = printer - self.reason = reason - self.level = None - self.canonical_reason = None -+ self.connection = connection - - def get_printer (self): - return self.printer -@@ -53,6 +56,7 @@ class StateReason: - self.level = self.WARNING - else: - self.level = self.ERROR -+ - return self.level - - def get_reason (self): -@@ -69,6 +73,7 @@ class StateReason: - return self.canonical_reason - - def __repr__ (self): -+ self.get_level() - if self.level == self.REPORT: - level = "REPORT" - elif self.level == self.WARNING: -@@ -119,8 +124,24 @@ class StateReason: - title = _("Printer warning") - elif self.get_level () == self.ERROR: - title = _("Printer error") -- text = _("Printer '%s': '%s'.") % (self.get_printer (), -- self.get_reason ()) -+ -+ try: -+ f = self.connection.getPPD(self.printer) -+ ppd = cups.PPD (f) -+ schemes = ["text", "http", "help", "file"] -+ localized_reason = "" -+ for scheme in schemes: -+ reason = ppd.localizeIPPReason(self.reason, scheme) -+ if reason != None: -+ localized_reason = localized_reason + reason + ", " -+ if localized_reason != "": -+ reason = localized_reason[:-2] -+ else: -+ reason = self.get_reason() -+ except cups.IPPError: -+ reason = self.get_reason() -+ -+ text = _("Printer '%s': '%s'.") % (self.get_printer (), reason) - return (title, text) - - def get_tuple (self): -diff -up system-config-printer-1.1.13/system-config-printer.py.custom-state-reasons system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.custom-state-reasons 2009-10-29 16:51:28.567896668 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-29 17:18:46.816896209 +0000 -@@ -1445,7 +1445,8 @@ class GUI(GtkGUI, monitor.Watcher): - emblem = gtk.STOCK_MEDIA_PAUSE - continue - -- r = statereason.StateReason (object.name, reason) -+ r = statereason.StateReason (object.connection, -+ object.name, reason) - if worst_reason == None: - worst_reason = r - elif r > worst_reason: -@@ -2579,7 +2580,7 @@ class GUI(GtkGUI, monitor.Watcher): - - any = True - iter = store.append (None) -- r = statereason.StateReason (printer.name, reason) -+ r = statereason.StateReason (printer.connection, printer.name, reason) - if r.get_reason () == "paused": - icon = gtk.STOCK_MEDIA_PAUSE - else: -diff -up system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py.custom-state-reasons system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py ---- system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py.custom-state-reasons 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py 2009-10-29 17:18:46.817896728 +0000 -@@ -71,7 +71,7 @@ class PrinterStateReasons(Question): - if reason == "none": - continue - -- r = statereason.StateReason (queue, reason) -+ r = statereason.StateReason (c, queue, reason) - (title, description) = r.get_description () - level = r.get_level () - if level == statereason.StateReason.ERROR: diff --git a/system-config-printer-data-button-state.patch b/system-config-printer-data-button-state.patch deleted file mode 100644 index 08a1dba..0000000 --- a/system-config-printer-data-button-state.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.data-button-state system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.data-button-state 2009-09-04 18:12:11.000000000 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-18 13:04:40.062438371 +0100 -@@ -1907,19 +1907,20 @@ class GUI(GtkGUI, monitor.Watcher): - # set buttons sensitivity - def setDataButtonState(self): - try: -- possible = (self.ppd and -- not bool (self.changed) and -- self.printer.enabled and -- not self.printer.rejecting) -+ printable = (self.ppd and -+ not bool (self.changed) and -+ self.printer.enabled and -+ not self.printer.rejecting) - -- self.btnPrintTestPage.set_sensitive (possible) -+ self.btnPrintTestPage.set_sensitive (printable) -+ adjustable = not (self.discovered or bool (self.changed)) - for button in [self.btnChangePPD, - self.btnSelectDevice]: -- button.set_sensitive (not bool (self.changed)) -+ button.set_sensitive (adjustable) - - commands = (self.printer.type & cups.CUPS_PRINTER_COMMANDS) != 0 -- self.btnSelfTest.set_sensitive (commands and possible) -- self.btnCleanHeads.set_sensitive (commands and possible) -+ self.btnSelfTest.set_sensitive (commands and printable) -+ self.btnCleanHeads.set_sensitive (commands and printable) - except: - pass - diff --git a/system-config-printer-de.po-typo.patch b/system-config-printer-de.po-typo.patch deleted file mode 100644 index e34dcfb..0000000 --- a/system-config-printer-de.po-typo.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.1.13/po/de.po.de.po-typo system-config-printer-1.1.13/po/de.po ---- system-config-printer-1.1.13/po/de.po.de.po-typo 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/po/de.po 2009-11-02 12:54:11.378978411 +0000 -@@ -2204,7 +2204,7 @@ msgstr "Kopien:" - - #: ../glade/PrinterPropertiesDialog.glade.h:34 - msgid "Deny printing for everyone except these users:" --msgstr "Allen Benutzern den Druckern verbieten, außer:" -+msgstr "Allen Benutzern das Drucken verbieten, außer:" - - #: ../glade/PrinterPropertiesDialog.glade.h:36 - msgid "Device URI:" diff --git a/system-config-printer-editable-ppd.patch b/system-config-printer-editable-ppd.patch deleted file mode 100644 index 1daf27a..0000000 --- a/system-config-printer-editable-ppd.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.editable-ppd system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.editable-ppd 2009-11-26 15:27:29.844177855 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-26 15:27:42.803179141 +0000 -@@ -2320,7 +2320,6 @@ class GUI(GtkGUI, monitor.Watcher): - pass - - editable = not self.printer.discovered -- editablePPD = not self.printer.remote - - try: - self.ppd = printer.getPPD() -@@ -2471,7 +2470,7 @@ class GUI(GtkGUI, monitor.Watcher): - self.fillClassMembers(name, editable) - else: - # real Printer -- self.fillPrinterOptions(name, editablePPD) -+ self.fillPrinterOptions(name, editable) - - self.updateMarkerLevels() - self.updateStateReasons() diff --git a/system-config-printer-fetchdevices.patch b/system-config-printer-fetchdevices.patch deleted file mode 100644 index 452b829..0000000 --- a/system-config-printer-fetchdevices.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.fetchdevices system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.fetchdevices 2009-09-22 10:08:54.062669053 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-22 10:10:12.138669093 +0100 -@@ -3855,9 +3855,7 @@ class NewPrinterGUI(GtkGUI): - self.fillDeviceTab() - self.rbtnNPFoomatic.set_active (True) - self.on_rbtnNPFoomatic_toggled(self.rbtnNPFoomatic) -- # Start fetching information from CUPS in the background - self.new_printer_PPDs_loaded = False -- self.queryPPDs () - - elif self.dialog_mode == "class": - self.NewPrinterWindow.set_title(_("New Class")) -@@ -4648,16 +4646,18 @@ class NewPrinterGUI(GtkGUI): - debugprint ("fetchDevices") - - have_polkit_1 = self.mainapp.cups._use_pk and config.WITH_POLKIT_1 -- if not have_polkit_1: -- if network: -- return {} -- -- network = True -- - network_schemes = ["dnssd", "snmp"] - try: -- c = authconn.Connection (host=self.mainapp.connect_server, -- parent=parent, lock=True) -+ try: -+ c = self.fetchDevices_conn -+ except AttributeError: -+ c = authconn.Connection (host=self.mainapp.connect_server, -+ parent=parent, lock=True) -+ if not have_polkit_1: -+ # Use this connection for future calls so that the -+ # username/password is cached. -+ self.fetchDevices_conn = c -+ - debugprint ("in get_devices: connected") - c._begin_operation (_("fetching device list")) - try: -@@ -5049,6 +5049,10 @@ class NewPrinterGUI(GtkGUI): - kwargs={"network": True}, - callback=self.got_devices, - context=context) -+ else: -+ # Now we've fetched both local and network devices, start -+ # querying the available PPDs. -+ gobject.timeout_add (1, self.queryPPDs) - - devices = result - if current_uri: diff --git a/system-config-printer-find-return-accel.patch b/system-config-printer-find-return-accel.patch deleted file mode 100644 index a680e37..0000000 --- a/system-config-printer-find-return-accel.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up system-config-printer-1.1.13/glade/NewPrinterWindow.glade.find-return-accel system-config-printer-1.1.13/glade/NewPrinterWindow.glade ---- system-config-printer-1.1.13/glade/NewPrinterWindow.glade.find-return-accel 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/glade/NewPrinterWindow.glade 2009-09-30 16:50:36.981760810 +0100 -@@ -2580,6 +2580,7 @@ DTR/DSR (Hardware) - GTK_RELIEF_NORMAL - True - -+ - - - 2 diff --git a/system-config-printer-gpk-traceback.patch b/system-config-printer-gpk-traceback.patch deleted file mode 100644 index d2b4225..0000000 --- a/system-config-printer-gpk-traceback.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.gpk-traceback system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.gpk-traceback 2009-11-23 14:11:10.000000000 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-23 14:11:53.000000000 +0100 -@@ -4316,9 +4316,9 @@ class NewPrinterGUI(GtkGUI): - debugprint ("foomatic-db-ppds already installed") - except OSError: - debugprint ("foomatic-db-ppds not yet installed") -- pk = installpackage.PackageKit () - pid = None - try: -+ pk = installpackage.PackageKit () - xid = self.mainapp.PrintersWindow.window.xid - pk.InstallPackageName (xid, 0, "foomatic-db-ppds") - except: diff --git a/system-config-printer-iconify.patch b/system-config-printer-iconify.patch deleted file mode 100644 index dbbfede..0000000 --- a/system-config-printer-iconify.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up system-config-printer-1.1.13/jobviewer.py.iconify system-config-printer-1.1.13/jobviewer.py ---- system-config-printer-1.1.13/jobviewer.py.iconify 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/jobviewer.py 2009-09-18 13:52:20.235314913 +0100 -@@ -389,14 +389,24 @@ class JobViewer (GtkGUI, monitor.Watcher - return errordialogs.show_IPP_Error (exception, message, self.JobsWindow) - - def toggle_window_display(self, icon, force_show=False): -- visible = self.JobsWindow.get_property('visible') -+ visible = self.JobsWindow.get_data('visible') - if force_show: - visible = False - - if visible: -- self.JobsWindow.hide() -+ w = self.JobsWindow.window -+ (s, area, o) = self.statusicon.get_geometry () -+ w.set_skip_taskbar_hint (True) -+ w.property_change ("_NET_WM_ICON_GEOMETRY", -+ "CARDINAL", 32, -+ gtk.gdk.PROP_MODE_REPLACE, -+ list (area)) -+ self.JobsWindow.iconify () - else: -- self.JobsWindow.show() -+ self.JobsWindow.present () -+ self.JobsWindow.window.set_skip_taskbar_hint (False) -+ -+ self.JobsWindow.set_data ('visible', not visible) - - def on_show_completed_jobs_activate(self, menuitem): - if menuitem.get_active(): diff --git a/system-config-printer-install-foomatic-db-ppds.patch b/system-config-printer-install-foomatic-db-ppds.patch deleted file mode 100644 index 96af7e8..0000000 --- a/system-config-printer-install-foomatic-db-ppds.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -up system-config-printer-1.1.13/cupshelpers/cupshelpers.py.install-foomatic-db-ppds system-config-printer-1.1.13/cupshelpers/cupshelpers.py ---- system-config-printer-1.1.13/cupshelpers/cupshelpers.py.install-foomatic-db-ppds 2009-09-04 10:34:16.000000000 +0100 -+++ system-config-printer-1.1.13/cupshelpers/cupshelpers.py 2009-11-11 14:50:51.557767784 +0000 -@@ -473,7 +473,10 @@ def parseDeviceID (id): - id_dict.setdefault("CMD", id_dict["COMMAND SET"]) - for name in ["MFG", "MDL", "CMD", "CLS", "DES", "SN", "S", "P", "J"]: - id_dict.setdefault(name, "") -- id_dict["CMD"] = id_dict["CMD"].split(',') -+ if id_dict["CMD"] == '': -+ id_dict["CMD"] = [] -+ else: -+ id_dict["CMD"] = id_dict["CMD"].split(',') - return id_dict - - class Device: -diff -up system-config-printer-1.1.13/system-config-printer.py.install-foomatic-db-ppds system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.install-foomatic-db-ppds 2009-11-11 14:50:33.835893883 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-11 14:50:51.560768061 +0000 -@@ -4293,6 +4293,37 @@ class NewPrinterGUI(GtkGUI): - except: - nonfatalException () - -+ # Decide whether this might be a PostScript capable -+ # printer. If it might be, check whether -+ # foomatic-db-ppds is installed and suggest installing -+ # it. -+ cmdsets = self.device.id_dict["CMD"] -+ if len (cmdsets) == 0: -+ # No list of command sets available so might be PS capable -+ may_be_ps = True -+ else: -+ # We have the definitive list of command sets supported. -+ # Only PS capable if it says so. -+ may_be_ps = False -+ for cmdset in cmdsets: -+ if cmdset.lower ().startswith ("postscript"): -+ may_be_ps = True -+ -+ if may_be_ps: -+ debugprint ("Printer might support PostScript") -+ try: -+ os.stat ("/usr/share/cups/model/foomatic-db-ppds") -+ debugprint ("foomatic-db-ppds already installed") -+ except OSError: -+ debugprint ("foomatic-db-ppds not yet installed") -+ pk = installpackage.PackageKit () -+ pid = None -+ try: -+ xid = self.mainapp.PrintersWindow.window.xid -+ pk.InstallPackageName (xid, 0, "foomatic-db-ppds") -+ except: -+ pass -+ - if (not self.remotecupsqueue and - not self.new_printer_PPDs_loaded): - try: diff --git a/system-config-printer-jobs-window-visibility.patch b/system-config-printer-jobs-window-visibility.patch deleted file mode 100644 index 96dca6c..0000000 --- a/system-config-printer-jobs-window-visibility.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up system-config-printer-1.1.13/jobviewer.py.jobs-window-visibility system-config-printer-1.1.13/jobviewer.py ---- system-config-printer-1.1.13/jobviewer.py.jobs-window-visibility 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/jobviewer.py 2009-10-28 15:47:52.796015837 +0000 -@@ -378,6 +378,7 @@ class JobViewer (GtkGUI, monitor.Watcher - def on_delete_event(self, *args): - if self.trayicon or not self.loop: - self.JobsWindow.hide () -+ self.JobsWindow.set_data ('visible', False) - if not self.loop: - # Being run from main app, not applet - self.cleanup () diff --git a/system-config-printer-markers-display.patch b/system-config-printer-markers-display.patch deleted file mode 100644 index e3afbc5..0000000 --- a/system-config-printer-markers-display.patch +++ /dev/null @@ -1,165 +0,0 @@ -diff -up system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade.markers-display system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade ---- system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade.markers-display 2009-09-04 10:35:48.000000000 +0100 -+++ system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade 2009-11-26 16:30:46.456177697 +0000 -@@ -4677,27 +4677,84 @@ Reverse portrait (180°) - GTK_SHADOW_NONE - - -- -+ - True -- 0.5 -- 0.5 -- 1 -- 1 -- 6 -- 0 -- 12 -- 0 -+ False -+ 6 - - -- -+ - True -- False -- 6 -+ 0.5 -+ 0.5 -+ 1 -+ 1 -+ 6 -+ 0 -+ 12 -+ 0 - - -- -+ -+ True -+ True -+ GTK_POLICY_NEVER -+ GTK_POLICY_AUTOMATIC -+ GTK_SHADOW_NONE -+ GTK_CORNER_TOP_LEFT -+ -+ -+ -+ True -+ GTK_SHADOW_IN -+ -+ -+ -+ 3 -+ True -+ False -+ 6 -+ -+ -+ -+ -+ -+ -+ -+ -+ - - -+ -+ 0 -+ True -+ True -+ -+ -+ -+ -+ -+ True -+ GTK_BUTTONBOX_END -+ 0 -+ -+ -+ -+ True -+ True -+ True -+ gtk-refresh -+ True -+ GTK_RELIEF_NORMAL -+ True -+ -+ -+ -+ -+ 0 -+ False -+ False -+ - - - -@@ -4727,33 +4784,8 @@ Reverse portrait (180°) - - - 0 -- False -- False -- -- -- -- -- -- True -- GTK_BUTTONBOX_END -- 0 -- -- -- -- True -- True -- True -- gtk-refresh -- True -- GTK_RELIEF_NORMAL -- True -- -- -- -- -- 0 -- False -- False -+ True -+ True - - - -@@ -4913,13 +4945,13 @@ Reverse portrait (180°) - - - 0 -- True -- True -+ False -+ False - - - - -- False -+ True - True - - -diff -up system-config-printer-1.1.13/system-config-printer.py.markers-display system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.markers-display 2009-11-26 16:29:46.758302644 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-26 16:30:46.453177964 +0000 -@@ -2558,6 +2558,7 @@ class GUI(GtkGUI, monitor.Watcher): - subhbox.pack_start (inklevel, True, False, 0) - vbox.pack_start (subhbox, False, False, 0) - label = gtk.Label (name) -+ label.set_width_chars (10) - label.set_line_wrap (True) - vbox.pack_start (label, False, False, 0) - table.attach (vbox, col, col + 1, row, row + 1) diff --git a/system-config-printer-missing-import.patch b/system-config-printer-missing-import.patch deleted file mode 100644 index 03ca31a..0000000 --- a/system-config-printer-missing-import.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up system-config-printer-1.1.13/probe_printer.py.missing-import system-config-printer-1.1.13/probe_printer.py ---- system-config-printer-1.1.13/probe_printer.py.missing-import 2009-09-01 12:08:33.000000000 +0100 -+++ system-config-printer-1.1.13/probe_printer.py 2009-09-22 10:33:18.358546374 +0100 -@@ -20,6 +20,7 @@ - - import cupshelpers - from debug import * -+import errno - import socket, time - import gtk - from timedops import TimedOperation diff --git a/system-config-printer-network-model.patch b/system-config-printer-network-model.patch deleted file mode 100644 index a71d300..0000000 --- a/system-config-printer-network-model.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.network-model system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.network-model 2009-09-30 16:55:46.115760592 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-30 16:55:52.545635754 +0100 -@@ -4217,6 +4217,12 @@ class NewPrinterGUI(GtkGUI): - if not self.install_hplip_plugin(self.device.uri): - self.on_NPCancel(None) - return -+ -+ if not devid and self.device.type in ["socket", "lpd", "ipp"]: -+ # This is a network printer whose model we don't yet know. -+ # Try to discover it. -+ self.getNetworkPrinterMakeModel () -+ - uri = self.device.uri - if uri and uri.startswith ("smb://"): - uri = SMBURI (uri=uri[6:]).sanitize_uri () diff --git a/system-config-printer-no-cancel-properties-dialog.patch b/system-config-printer-no-cancel-properties-dialog.patch deleted file mode 100644 index 9d18ba5..0000000 --- a/system-config-printer-no-cancel-properties-dialog.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.no-cancel-properties-dialog system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.no-cancel-properties-dialog 2009-10-28 14:41:15.654017107 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-28 15:29:53.600140205 +0000 -@@ -6815,8 +6815,9 @@ class NewPrinterGUI(GtkGUI): - response = q.run () - q.destroy () - if response == gtk.RESPONSE_YES: -- # Display the properties dialog. -+ # Load the printer details but hide the properties dialog. - self.mainapp.display_properties_dialog_for (name) -+ self.mainapp.PrinterPropertiesDialog.hide () - - # Click the test button. - self.mainapp.btnPrintTestPage.clicked () diff --git a/system-config-printer-notification-traceback.patch b/system-config-printer-notification-traceback.patch deleted file mode 100644 index fe7882c..0000000 --- a/system-config-printer-notification-traceback.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.notification-traceback system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.notification-traceback 2009-10-30 12:36:24.901645742 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-30 12:36:34.610518996 +0000 -@@ -3494,8 +3494,11 @@ class GUI(GtkGUI, monitor.Watcher): - self.dests_iconview_selection_changed (self.dests_iconview) - gobject.idle_add (deferred_refresh) - if self.PrinterPropertiesDialog.get_property('visible'): -- self.printer.getAttributes () -- self.updatePrinterProperties () -+ try: -+ self.printer.getAttributes () -+ self.updatePrinterProperties () -+ except cups.IPPError: -+ pass - - gtk.gdk.threads_leave () - -@@ -3507,8 +3510,11 @@ class GUI(GtkGUI, monitor.Watcher): - monitor.Watcher.state_reason_added (self, mon, reason) - gtk.gdk.threads_enter () - if self.PrinterPropertiesDialog.get_property('visible'): -- self.printer.getAttributes () -- self.updatePrinterProperties () -+ try: -+ self.printer.getAttributes () -+ self.updatePrinterProperties () -+ except cups.IPPError: -+ pass - - gtk.gdk.threads_leave () - -@@ -3516,8 +3522,11 @@ class GUI(GtkGUI, monitor.Watcher): - monitor.Watcher.state_reason_removed (self, mon, reason) - gtk.gdk.threads_enter () - if self.PrinterPropertiesDialog.get_property('visible'): -- self.printer.getAttributes () -- self.updatePrinterProperties () -+ try: -+ self.printer.getAttributes () -+ self.updatePrinterProperties () -+ except cups.IPPError: -+ pass - - gtk.gdk.threads_leave () - diff --git a/system-config-printer-physdev-traceback.patch b/system-config-printer-physdev-traceback.patch deleted file mode 100644 index fe5f532..0000000 --- a/system-config-printer-physdev-traceback.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.1.13/PhysicalDevice.py.physdev-traceback system-config-printer-1.1.13/PhysicalDevice.py ---- system-config-printer-1.1.13/PhysicalDevice.py.physdev-traceback 2009-09-01 12:08:33.000000000 +0100 -+++ system-config-printer-1.1.13/PhysicalDevice.py 2009-09-30 16:52:24.486760364 +0100 -@@ -48,6 +48,8 @@ class PhysicalDevice: - hostport = ipparam[3:] - else: - return None -+ else: -+ return None - else: - (hostport, rest) = urllib.splithost (rest) - if hostport == None: diff --git a/system-config-printer-publish-printers.patch b/system-config-printer-publish-printers.patch deleted file mode 100644 index fb070ee..0000000 --- a/system-config-printer-publish-printers.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.publish-printers system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.publish-printers 2009-09-18 13:44:41.680437056 +0100 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-18 13:45:30.704315256 +0100 -@@ -220,7 +220,7 @@ class GUI(GtkGUI, monitor.Watcher): - self.changed = set() # of options - - self.servers = set((self.connect_server,)) -- self.server_is_publishing = False -+ self.server_is_publishing = None # not known - self.devid = devid - self.focus_on_map = focus_on_map - -@@ -3158,6 +3158,18 @@ class GUI(GtkGUI, monitor.Watcher): - self.cups._end_operation () - - if success and share: -+ if self.server_is_publishing == None: -+ # We haven't yet seen a server-is-sharing-printers attribute. -+ # Assuming CUPS 1.4, this means we haven't opened a -+ # properties dialog yet. Fetch the attributes now and -+ # look for it. -+ try: -+ printer.getAttributes () -+ p = printer.other_attributes['server-is-sharing-printers'] -+ self.server_is_publishing = p -+ except (cups.IPPError, KeyError): -+ pass -+ - self.advise_publish () - - # For some reason CUPS doesn't give us a notification about diff --git a/system-config-printer-strip-zjs.patch b/system-config-printer-strip-zjs.patch deleted file mode 100644 index 88ec023..0000000 --- a/system-config-printer-strip-zjs.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zjs system-config-printer-1.1.13/cupshelpers/ppds.py ---- system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zjs 2009-10-29 16:51:28.575897013 +0000 -+++ system-config-printer-1.1.13/cupshelpers/ppds.py 2009-10-29 17:18:17.526021102 +0000 -@@ -184,6 +184,7 @@ def ppdMakeModelSplit (ppd_make_and_mode - " ps3", - " pxl", - " series", -+ " zjs", # hpcups - " zxs", # hpcups - " pcl3", # hpcups - "_bt", diff --git a/system-config-printer-strip-zxs-pcl3.patch b/system-config-printer-strip-zxs-pcl3.patch deleted file mode 100644 index 33bc8c5..0000000 --- a/system-config-printer-strip-zxs-pcl3.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zxs-pcl3 system-config-printer-1.1.13/cupshelpers/ppds.py ---- system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zxs-pcl3 2009-09-01 12:08:33.000000000 +0100 -+++ system-config-printer-1.1.13/cupshelpers/ppds.py 2009-10-28 15:53:28.990139713 +0000 -@@ -184,6 +184,8 @@ def ppdMakeModelSplit (ppd_make_and_mode - " ps3", - " pxl", - " series", -+ " zxs", # hpcups -+ " pcl3", # hpcups - "_bt", - ","]: - s = modell.find (suffix) diff --git a/system-config-printer-test-page-traceback.patch b/system-config-printer-test-page-traceback.patch deleted file mode 100644 index 657810d..0000000 --- a/system-config-printer-test-page-traceback.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up system-config-printer-1.1.13/system-config-printer.py.test-page-traceback system-config-printer-1.1.13/system-config-printer.py ---- system-config-printer-1.1.13/system-config-printer.py.test-page-traceback 2009-11-05 10:24:09.782129808 +0000 -+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-05 10:24:22.512254783 +0000 -@@ -6837,12 +6837,19 @@ class NewPrinterGUI(GtkGUI): - response = q.run () - q.destroy () - if response == gtk.RESPONSE_YES: -- # Load the printer details but hide the properties dialog. -- self.mainapp.display_properties_dialog_for (name) - self.mainapp.PrinterPropertiesDialog.hide () - -- # Click the test button. -- self.mainapp.btnPrintTestPage.clicked () -+ properties_shown = False -+ try: -+ # Load the printer details but hide the properties dialog. -+ self.mainapp.display_properties_dialog_for (name) -+ properties_shown = True -+ except RuntimeError: -+ pass -+ -+ if properties_shown: -+ # Click the test button. -+ self.mainapp.btnPrintTestPage.clicked () - - def checkDriverExists(self, name, ppd=None): - """Check that the driver for an existing queue actually diff --git a/system-config-printer-troubleshoot-network-printers.patch b/system-config-printer-troubleshoot-network-printers.patch deleted file mode 100644 index b9c368c..0000000 --- a/system-config-printer-troubleshoot-network-printers.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py.troubleshoot-network-printers system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py ---- system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py.troubleshoot-network-printers 2009-09-01 12:08:33.000000000 +0100 -+++ system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py 2009-10-28 15:57:10.771014583 +0000 -@@ -2,8 +2,8 @@ - - ## Printing troubleshooter - --## Copyright (C) 2008 Red Hat, Inc. --## Copyright (C) 2008 Tim Waugh -+## Copyright (C) 2008, 2009 Red Hat, Inc. -+## Author: Tim Waugh - - ## This program is free software; you can redistribute it and/or modify - ## it under the terms of the GNU General Public License as published by -@@ -77,8 +77,9 @@ class ChooseNetworkPrinter(Question): - parent = self.troubleshooter.get_window () - - try: -- cups.setServer (server) -- self.op = TimedOperation (cups.Connection, parent=parent) -+ self.op = TimedOperation (cups.Connection, -+ kwargs={"host": server}, -+ parent=parent) - c = self.op.run () - self.op = TimedOperation (c.getDests, parent=parent) - dests = self.op.run () diff --git a/system-config-printer.spec b/system-config-printer.spec index ace1e5c..5b5d260 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -6,8 +6,8 @@ Summary: A printer administration tool Name: system-config-printer -Version: 1.1.13 -Release: 12%{?dist} +Version: 1.1.14 +Release: 1%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -15,31 +15,7 @@ Source0: http://cyberelk.net/tim/data/system-config-printer/1.1/system-config-pr Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 -Patch1: system-config-printer-data-button-state.patch -Patch2: system-config-printer-cancel-traceback.patch -Patch3: system-config-printer-publish-printers.patch -Patch4: system-config-printer-iconify.patch -Patch5: system-config-printer-fetchdevices.patch -Patch6: system-config-printer-missing-import.patch -Patch7: system-config-printer-find-return-accel.patch -Patch8: system-config-printer-physdev-traceback.patch -Patch9: system-config-printer-autoselect-raw.patch -Patch10: system-config-printer-network-model.patch -Patch11: system-config-printer-no-cancel-properties-dialog.patch -Patch12: system-config-printer-jobs-window-visibility.patch -Patch13: system-config-printer-strip-zxs-pcl3.patch -Patch14: system-config-printer-troubleshoot-network-printers.patch -Patch15: system-config-printer-strip-zjs.patch -Patch16: system-config-printer-custom-state-reasons.patch -Patch17: system-config-printer-no-epydoc.patch -Patch18: system-config-printer-notification-traceback.patch -Patch19: system-config-printer-de.po-typo.patch -Patch20: system-config-printer-test-page-traceback.patch -Patch21: system-config-printer-install-foomatic-db-ppds.patch -Patch22: system-config-printer-gpk-traceback.patch -Patch23: system-config-printer-editable-ppd.patch -Patch24: system-config-printer-center.patch -Patch25: system-config-printer-markers-display.patch +Patch1: system-config-printer-no-epydoc.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -99,31 +75,7 @@ printers. %prep %setup -q -a 1 -a 2 -%patch1 -p1 -b .data-button-state -%patch2 -p1 -b .cancel-traceback -%patch3 -p1 -b .publish-printers -%patch4 -p1 -b .iconify -%patch5 -p1 -b .fetchdevices -%patch6 -p1 -b .missing-import -%patch7 -p1 -b .find-return-accel -%patch8 -p1 -b .physdev-traceback -%patch9 -p1 -b .autoselect-raw -%patch10 -p1 -b .network-model -%patch11 -p1 -b .no-cancel-properties-dialog -%patch12 -p1 -b .jobs-window-visibility -%patch13 -p1 -b .strip-zxs-pcl3 -%patch14 -p1 -b .troubleshoot-network-printers -%patch15 -p1 -b .strip-zjs -%patch16 -p1 -b .custom-state-reasons -%patch17 -p1 -b .no-epydoc -%patch18 -p1 -b .notification-traceback -%patch19 -p1 -b .de.po-typo -%patch20 -p1 -b .test-page-traceback -%patch21 -p1 -b .install-foomatic-db-ppds -%patch22 -p1 -b .gpk-traceback -%patch23 -p1 -b .editable-ppd -%patch24 -p1 -b .center -%patch25 -p1 -b .markers-display +%patch1 -p1 -b .no-epydoc %build %configure --with-udev-rules --with-polkit-1 @@ -176,8 +128,8 @@ rm -rf %buildroot %files udev %defattr(-,root,root,-) -%{_sysconfdir}/udev/rules.d/*.rules -/lib/udev/* +/lib/udev/rules.d/*.rules +/lib/udev/udev-*-printer %dir %{_localstatedir}/run/udev-configure-printer %verify(not md5 size mtime) %config(noreplace,missingok) %attr(0644,root,root) %{_localstatedir}/run/udev-configure-printer/usb-uris @@ -194,6 +146,7 @@ rm -rf %buildroot %{_datadir}/%{name}/cupspk.py* %{_datadir}/%{name}/debug.py* %{_datadir}/%{name}/errordialogs.py* +%{_datadir}/%{name}/firewall.py* %{_datadir}/%{name}/glade.py* %{_datadir}/%{name}/GroupsPane.py* %{_datadir}/%{name}/GroupsPaneModel.py* @@ -235,6 +188,11 @@ rm -rf %buildroot exit 0 %changelog +* Fri Nov 27 2009 Tim Waugh 1.1.14-1 +- 1.1.14: + - Retry when reconnection fails (bug #541741). + - Prevent traceback with bad marker-levels attribute (bug #541882). + * Thu Nov 26 2009 Tim Waugh 1.1.13-12 - Prevent display of marker levels from making the properties dialog too big (bug #540826).