diff --git a/system-config-printer-duplicate-PPDs.patch b/system-config-printer-duplicate-PPDs.patch new file mode 100644 index 0000000..a10e8b5 --- /dev/null +++ b/system-config-printer-duplicate-PPDs.patch @@ -0,0 +1,57 @@ +diff -up system-config-printer-1.2.6/system-config-printer.py.duplicate-PPDs system-config-printer-1.2.6/system-config-printer.py +--- system-config-printer-1.2.6/system-config-printer.py.duplicate-PPDs 2011-01-21 12:23:40.000000000 +0100 ++++ system-config-printer-1.2.6/system-config-printer.py 2011-01-21 12:45:49.000000000 +0100 +@@ -6475,8 +6475,10 @@ class NewPrinterGUI(GtkGUI): + self.NPDrivers = drivers + + driverlist = [] +- for i in range (len(self.NPDrivers)): +- ppd = ppds[self.NPDrivers[i]] ++ NPDrivers = [] ++ i = 0 ++ for ppdname in self.NPDrivers: ++ ppd = ppds[ppdname] + driver = ppd["ppd-make-and-model"] + driver = driver.replace(" (recommended)", "") + +@@ -6486,18 +6488,20 @@ class NewPrinterGUI(GtkGUI): + except KeyError: + pass + +- duplicate = False +- if driver in driverlist: +- duplicate = True +- else: +- driverlist.append (driver) ++ duplicate = driver in driverlist + +- if not self.device and self.auto_driver == self.NPDrivers[i]: ++ if not self.device and self.auto_driver == ppdname: ++ driverlist.append (driver) ++ NPDrivers.append (ppdname) ++ i += 1 + iter = model.append ((driver + _(" (Current)"),)) + path = model.get_path (iter) + self.tvNPDrivers.get_selection().select_path(path) + self.tvNPDrivers.scroll_to_cell(path, None, True, 0.5, 0.0) +- elif self.device and self.recommended_model_selected and i == 0: ++ elif self.device and i == 0: ++ driverlist.append (driver) ++ NPDrivers.append (ppdname) ++ i += 1 + iter = model.append ((driver + _(" (recommended)"),)) + path = model.get_path (iter) + self.tvNPDrivers.get_selection().select_path(path) +@@ -6505,7 +6509,12 @@ class NewPrinterGUI(GtkGUI): + else: + if duplicate: + continue ++ driverlist.append (driver) ++ NPDrivers.append (ppdname) ++ i += 1 + model.append((driver, )) ++ ++ self.NPDrivers = NPDrivers + self.tvNPDrivers.columns_autosize() + + def on_NPDrivers_query_tooltip(self, tv, x, y, keyboard_mode, tooltip): diff --git a/system-config-printer-ungrab-focus.patch b/system-config-printer-ungrab-focus.patch new file mode 100644 index 0000000..dab867d --- /dev/null +++ b/system-config-printer-ungrab-focus.patch @@ -0,0 +1,11 @@ +diff -up system-config-printer-1.2.6/system-config-printer.py.ungrab-focus system-config-printer-1.2.6/system-config-printer.py +--- system-config-printer-1.2.6/system-config-printer.py.ungrab-focus 2011-01-21 12:45:49.000000000 +0100 ++++ system-config-printer-1.2.6/system-config-printer.py 2011-01-21 12:52:37.000000000 +0100 +@@ -3091,7 +3091,6 @@ class GUI(GtkGUI, monitor.Watcher): + self.rename_sigids = ids + self.rename_entry_sigid = None + self.dests_iconview.set_cursor (path, cell, start_editing=True) +- self.dests_iconview.grab_focus () + + def printer_name_edit_start (self, cell, editable, path): + debugprint ("editing-started") diff --git a/system-config-printer.spec b/system-config-printer.spec index d2b94fe..610e7e5 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.2.6 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -17,6 +17,8 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 # Python bindings for libsmbclient Source2: http://pypi.python.org/packages/source/p/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-dnssd-URI.patch +Patch2: system-config-printer-duplicate-PPDs.patch +Patch3: system-config-printer-ungrab-focus.patch Patch101: pysmbc-doczip.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -79,6 +81,12 @@ printers. # allow %,(,) characters in URI %patch1 -p1 -b .dnssd-URI +# Fixed driver selection when there are duplicate PPDs available. (#667571) +%patch2 -p1 -b .duplicate-PPDs + +# Grabbing focus for editing breaks it (bug #650995). +%patch3 -p1 -b .ungrab-focus + pushd pysmbc-%{pysmbc_version} %patch101 -p1 -b .doczip popd @@ -202,6 +210,10 @@ rm -rf %buildroot exit 0 %changelog +* Fri Jan 21 2011 Jiri Popelka 1.2.6-3 +- Fixed driver selection when there are duplicate PPDs available. (#667571) +- Grabbing focus for editing breaks it (bug #650995). + * Tue Jan 18 2011 Jiri Popelka 1.2.6-2 - Allow %, ( and ) characters in dnssd URI (bug #669820).