rpms/system-config-printer/F-11 system-config-printer-driver-pre-selection.patch, 1.1, 1.2 system-config-printer.spec, 1.328, 1.329

Tim Waugh twaugh at fedoraproject.org
Mon Jan 11 15:41:29 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/system-config-printer/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32016

Modified Files:
	system-config-printer-driver-pre-selection.patch 
	system-config-printer.spec 
Log Message:
* Mon Jan 11 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-6
- Fixed traceback introduced in recent fix (bug #554376).


system-config-printer-driver-pre-selection.patch:
 system-config-printer.py |   66 ++++++++++++++++++++++++++++++++---------------
 1 file changed, 45 insertions(+), 21 deletions(-)

Index: system-config-printer-driver-pre-selection.patch
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-11/system-config-printer-driver-pre-selection.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- system-config-printer-driver-pre-selection.patch	23 Dec 2009 15:02:04 -0000	1.1
+++ system-config-printer-driver-pre-selection.patch	11 Jan 2010 15:41:28 -0000	1.2
@@ -1,7 +1,15 @@
 diff -up system-config-printer-1.1.16/system-config-printer.py.driver-pre-selection system-config-printer-1.1.16/system-config-printer.py
---- system-config-printer-1.1.16/system-config-printer.py.driver-pre-selection	2009-12-23 15:00:02.129814424 +0000
-+++ system-config-printer-1.1.16/system-config-printer.py	2009-12-23 15:00:27.228814932 +0000
-@@ -3968,38 +3968,41 @@ class NewPrinterGUI(GtkGUI):
+--- system-config-printer-1.1.16/system-config-printer.py.driver-pre-selection	2010-01-11 14:58:14.392910996 +0000
++++ system-config-printer-1.1.16/system-config-printer.py	2010-01-11 14:58:23.834909684 +0000
+@@ -3913,6 +3913,7 @@ class NewPrinterGUI(GtkGUI):
+             self.rbtnChangePPDKeepSettings.set_active(True)
+ 
+             self.auto_model = ""
++            self.auto_driver = None
+             ppd = self.mainapp.ppd
+             #self.mainapp.devid = "MFG:Samsung;MDL:ML-3560;DES:;CMD:GDI;"
+             devid = self.mainapp.devid
+@@ -3968,38 +3969,41 @@ class NewPrinterGUI(GtkGUI):
                      else:
                          self.auto_make = devid_dict["MFG"]
                          self.auto_model = devid_dict["MDL"]
@@ -18,23 +26,7 @@ diff -up system-config-printer-1.1.16/sy
 -                attr = ppd.findAttr("Manufacturer")
 -                if attr:
 -                    mfr = attr.value
-+                attr = ppd.findAttr("NickName")
-+                if not attr:
-+                    attr = ppd.findAttr("ModelName")
-+
-+                if attr.value:
-+                    mfgmdl = cupshelpers.ppds.ppdMakeModelSplit (attr.value)
-+                    (self.auto_make, self.auto_model) = mfgmdl
-+
-+                    # Search for ppdname with that make-and-model
-+                    self.loadPPDs ()
-+                    ppds = self.ppds.getInfoFromModel (self.auto_make,
-+                                                       self.auto_model)
-+                    for ppd, info in ppds.iteritems ():
-+                        if info.get ("ppd-make-and-model") == attr.value:
-+                            self.auto_driver = ppd
-+                            break
-                 else:
+-                else:
 -                    mfr = ""
 -                makeandmodel = mfr
 -                attr = ppd.findAttr("ModelName")
@@ -47,10 +39,26 @@ diff -up system-config-printer-1.1.16/sy
 -                        makeandmodel += ' ' + attr.value
 -                else:
 -                    makeandmodel = ''
--
++                attr = ppd.findAttr("NickName")
++                if not attr:
++                    attr = ppd.findAttr("ModelName")
++
++                if attr.value:
++                    mfgmdl = cupshelpers.ppds.ppdMakeModelSplit (attr.value)
++                    (self.auto_make, self.auto_model) = mfgmdl
+ 
 -                (self.auto_make,
 -                 self.auto_model) = \
 -                 cupshelpers.ppds.ppdMakeModelSplit (makeandmodel)
++                    # Search for ppdname with that make-and-model
++                    self.loadPPDs ()
++                    ppds = self.ppds.getInfoFromModel (self.auto_make,
++                                                       self.auto_model)
++                    for ppd, info in ppds.iteritems ():
++                        if info.get ("ppd-make-and-model") == attr.value:
++                            self.auto_driver = ppd
++                            break
++                else:
 +                    self.auto_make = None
 +                    self.auto_model = None
 +                    self.auto_driver = None
@@ -62,7 +70,7 @@ diff -up system-config-printer-1.1.16/sy
  
              try:
                  if self.dialog_mode == "ppd":
-@@ -4249,6 +4252,8 @@ class NewPrinterGUI(GtkGUI):
+@@ -4249,6 +4253,8 @@ class NewPrinterGUI(GtkGUI):
          if self.openprinting_query_handle != None:
              self.openprinting.cancelOperation (self.openprinting_query_handle)
              self.openprinting_query_handle = None
@@ -71,7 +79,7 @@ diff -up system-config-printer-1.1.16/sy
          return True
  
      def on_btnNPBack_clicked(self, widget):
-@@ -4267,6 +4272,7 @@ class NewPrinterGUI(GtkGUI):
+@@ -4267,6 +4273,7 @@ class NewPrinterGUI(GtkGUI):
              self.busy (self.NewPrinterWindow)
              if page_nr == 1: # Device (first page)
                  self.auto_make, self.auto_model = None, None
@@ -79,7 +87,7 @@ diff -up system-config-printer-1.1.16/sy
                  self.device.uri = self.getDeviceURI()
                  if not self.install_hplip_plugin(self.device.uri):
                      self.on_NPCancel(None)
-@@ -4434,6 +4440,7 @@ class NewPrinterGUI(GtkGUI):
+@@ -4434,6 +4441,7 @@ class NewPrinterGUI(GtkGUI):
                              cupshelpers.ppds.ppdMakeModelSplit (make_model)
                          self.auto_make = make
                          self.auto_model = model
@@ -87,7 +95,7 @@ diff -up system-config-printer-1.1.16/sy
                          if (status == self.ppds.STATUS_SUCCESS and \
                              self.dialog_mode != "ppd"):
                              self.exactdrivermatch = True
-@@ -6414,7 +6421,17 @@ class NewPrinterGUI(GtkGUI):
+@@ -6414,7 +6422,17 @@ class NewPrinterGUI(GtkGUI):
          ppds = self.ppds.getInfoFromModel(pmake, pmodel)
  
          self.NPDrivers = self.ppds.orderPPDNamesByPreference(ppds.keys(),
@@ -106,7 +114,7 @@ diff -up system-config-printer-1.1.16/sy
          for i in range (len(self.NPDrivers)):
              ppd = ppds[self.NPDrivers[i]]
              driver = ppd["ppd-make-and-model"]
-@@ -6426,7 +6443,12 @@ class NewPrinterGUI(GtkGUI):
+@@ -6426,7 +6444,12 @@ class NewPrinterGUI(GtkGUI):
              except KeyError:
                  pass
  
@@ -120,7 +128,7 @@ diff -up system-config-printer-1.1.16/sy
                  iter = model.append ((driver + _(" (recommended)"),))
                  path = model.get_path (iter)
                  self.tvNPDrivers.get_selection().select_path(path)
-@@ -6881,6 +6903,7 @@ class NewPrinterGUI(GtkGUI):
+@@ -6881,6 +6904,7 @@ class NewPrinterGUI(GtkGUI):
                  checkppd = ppd
  
          self.NewPrinterWindow.hide()


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-11/system-config-printer.spec,v
retrieving revision 1.328
retrieving revision 1.329
diff -u -p -r1.328 -r1.329
--- system-config-printer.spec	7 Jan 2010 15:48:28 -0000	1.328
+++ system-config-printer.spec	11 Jan 2010 15:41:28 -0000	1.329
@@ -7,7 +7,7 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.1.16
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -193,6 +193,9 @@ rm -rf %buildroot
 exit 0
 
 %changelog
+* Mon Jan 11 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-6
+- Fixed traceback introduced in recent fix (bug #554376).
+
 * Thu Jan  7 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-5
 - Fixed crash when using keyring for auth without password (bug #553141).
 



More information about the scm-commits mailing list