rpms/system-config-printer/F-10 system-config-printer-1.0.x.patch, 1.12, 1.13 system-config-printer.spec, 1.234, 1.235

Tim Waugh twaugh at fedoraproject.org
Thu Jan 8 18:49:32 UTC 2009


Author: twaugh

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

Modified Files:
	system-config-printer-1.0.x.patch system-config-printer.spec 
Log Message:
* Thu Jan  8 2009 Tim Waugh <twaugh at redhat.com> 1.0.12-8
- Updated patch for 1.0.x changes:
  - More cursor/selection fixes.
  - Notification fix.
  - Advertise correct defaults for page-* job options (bug #468553).


system-config-printer-1.0.x.patch:

Index: system-config-printer-1.0.x.patch
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-10/system-config-printer-1.0.x.patch,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- system-config-printer-1.0.x.patch	19 Dec 2008 13:04:13 -0000	1.12
+++ system-config-printer-1.0.x.patch	8 Jan 2009 18:49:01 -0000	1.13
@@ -1,8 +1,33 @@
 diff --git a/ChangeLog b/ChangeLog
-index 2851eeb..db57408 100644
+index 2851eeb..01c8757 100644
 --- a/ChangeLog
 +++ b/ChangeLog
-@@ -1,3 +1,115 @@
+@@ -1,3 +1,140 @@
++2009-01-08  Tim Waugh  <twaugh at redhat.com>
++
++	* system-config-printer.py (GUI.dests_iconview_item_activated):
++	Use set_cursor here to match change introduced when fixing
++	Ubuntu #282634.
++
++2009-01-08  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.now_connected): Handle notification
++	closure for re-connected printers correctly.
++
++2009-01-07  Tim Waugh  <twaugh at redhat.com>
++
++	* system-config-printer.py (GUI.__init__): Advertise correct
++	defaults for page-left, page-right, page-top and page-bottom job
++	options (bug #468553).
++
++2009-01-07  Tim Waugh  <twaugh at redhat.com>
++
++	* system-config-printer.py
++	(NewPrinterGUI.on_tvNPMakes_cursor_changed): Use get_cursor here.
++	(NewPrinterGUI.on_tvNPModels_cursor_changed): Likewise (Ubuntu
++	#299724).
++	(NewPrinterGUI.on_tvNPDevices_cursor_changed): Likewise.
++
 +2008-12-19  Tim Waugh  <twaugh at redhat.com>
 +
 +	* system-config-printer.in: Set prefix environment variable here,
@@ -351,7 +376,7 @@
              modelnumber = 0
              if digits > 0:
 diff --git a/jobviewer.py b/jobviewer.py
-index 5005305..a247a2e 100644
+index 5005305..16ac6c5 100644
 --- a/jobviewer.py
 +++ b/jobviewer.py
 @@ -49,7 +49,7 @@ from statereason import StateReason
@@ -363,6 +388,17 @@
  GLADE="applet.glade"
  ICON="printer"
  SEARCHING_ICON="document-print-preview"
+@@ -1334,7 +1334,9 @@ class JobViewer (monitor.Watcher):
+             debugprint ("Unexpected now_connected signal")
+             return
+ 
+-        notification.close ()
++        if notification.get_data ('closed') != True:
++            notification.close ()
++            notification.set_data ('closed', True)
+ 
+     def printer_event (self, mon, printer, eventname, event):
+         monitor.Watcher.printer_event (self, mon, printer, eventname, event)
 diff --git a/monitor.py b/monitor.py
 index 3748d45..43e151f 100644
 --- a/monitor.py
@@ -4468,9 +4504,21 @@
  #~ msgstr "Okänd"
 +
 diff --git a/system-config-printer.py b/system-config-printer.py
-index 349c6f0..c225b95 100755
+index 349c6f0..966759c 100755
 --- a/system-config-printer.py
 +++ b/system-config-printer.py
+@@ -2,9 +2,9 @@
+ 
+ ## system-config-printer
+ 
+-## Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
++## Copyright (C) 2006, 2007, 2008, 2009 Red Hat, Inc.
++## Copyright (C) 2006, 2007, 2008, 2009 Tim Waugh <twaugh at redhat.com>
+ ## Copyright (C) 2006, 2007 Florian Festi <ffesti at redhat.com>
+-## Copyright (C) 2006, 2007, 2008 Tim Waugh <twaugh at redhat.com>
+ 
+ ## 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
 @@ -87,10 +87,13 @@ from gettext import gettext as _
  monitor.set_gettext_function (_)
  errordialogs.set_gettext_function (_)
@@ -4487,6 +4535,30 @@
  iconpath = os.path.join (pkgdata, 'icons/')
  sys.path.append (pkgdata)
  
+@@ -537,19 +540,19 @@ class GUI(GtkGUI, monitor.Watcher):
+                  options.OptionAlwaysShown ("lpi", float, 6.0,
+                                             self.sbJOLpi, self.btnJOResetLpi),
+ 
+-                 options.OptionAlwaysShown ("page-left", int, 18,
++                 options.OptionAlwaysShown ("page-left", int, 0,
+                                             self.sbJOPageLeft,
+                                             self.btnJOResetPageLeft),
+ 
+-                 options.OptionAlwaysShown ("page-right", int, 18,
++                 options.OptionAlwaysShown ("page-right", int, 0,
+                                             self.sbJOPageRight,
+                                             self.btnJOResetPageRight),
+ 
+-                 options.OptionAlwaysShown ("page-top", int, 36,
++                 options.OptionAlwaysShown ("page-top", int, 0,
+                                             self.sbJOPageTop,
+                                             self.btnJOResetPageTop),
+ 
+-                 options.OptionAlwaysShown ("page-bottom", int, 36,
++                 options.OptionAlwaysShown ("page-bottom", int, 0,
+                                             self.sbJOPageBottom,
+                                             self.btnJOResetPageBottom),
+ 
 @@ -612,7 +615,7 @@ class GUI(GtkGUI, monitor.Watcher):
              model = self.dests_iconview.get_model ()
              iter = model.get_iter_first ()
@@ -4505,7 +4577,19 @@
          object = model.get_value (iter, 0)
          try:
              self.fillPrinterTab (name)
-@@ -692,7 +695,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -653,10 +656,7 @@ class GUI(GtkGUI, monitor.Watcher):
+             self.btnPrinterPropertiesClose.hide ()
+         self.setDataButtonState ()
+         treeview = self.tvPrinterProperties
+-        sel = treeview.get_selection ()
+-        sel.select_path ((0,))
+-        self.on_tvPrinterProperties_selection_changed (sel)
+-        self.on_tvPrinterProperties_cursor_changed (treeview)
++        treeview.set_cursor ((0,))
+         host = CUPS_server_hostname ()
+         self.PrinterPropertiesDialog.set_title (_("Printer Properties - "
+                                                   "`%s' on %s") % (name, host))
+@@ -692,7 +692,7 @@ class GUI(GtkGUI, monitor.Watcher):
              model = iconview.get_model ()
              iter = model.get_iter (paths[i])
              object = model.get_value (iter, 0)
@@ -4514,7 +4598,7 @@
              if object.discovered:
                  any_discovered = True
              if object.enabled:
-@@ -765,6 +768,11 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -765,6 +765,11 @@ class GUI(GtkGUI, monitor.Watcher):
                  AdvancedServerSettingsDialog (self.cups, dialog)
              except:
                  return
@@ -4526,7 +4610,7 @@
          else:
              dialog.hide ()
  
-@@ -834,7 +842,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -834,7 +839,7 @@ class GUI(GtkGUI, monitor.Watcher):
          model = self.dests_iconview.get_model ()
          for path in paths:
              iter = model.get_iter (path)
@@ -4535,7 +4619,7 @@
              selected_printers.add (name)
  
          if self.cups:
-@@ -858,6 +866,8 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -858,6 +863,8 @@ class GUI(GtkGUI, monitor.Watcher):
                  show_IPP_Error(e, m, self.MainWindow)
                  self.printers = {}
                  self.default_printer = None
@@ -4544,7 +4628,7 @@
          else:
              self.printers = {}
              self.default_printer = None
-@@ -987,7 +997,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -987,7 +994,7 @@ class GUI(GtkGUI, monitor.Watcher):
          # Restore selection of printers.
          model = self.dests_iconview.get_model ()
          def maybe_select (model, path, iter):
@@ -4553,7 +4637,7 @@
              if name in selected_printers:
                  self.dests_iconview.select_path (path)
          model.foreach (maybe_select)
-@@ -1593,9 +1603,12 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -1593,9 +1600,12 @@ class GUI(GtkGUI, monitor.Watcher):
  
      def on_tvPrinterProperties_cursor_changed (self, treeview):
          # Adjust notebook to reflect selected item.
@@ -4569,7 +4653,7 @@
  
      # set default printer
      def set_system_or_user_default_printer (self, name):
-@@ -1674,6 +1687,8 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -1674,6 +1684,8 @@ class GUI(GtkGUI, monitor.Watcher):
              show_info_dialog (_("Submitted"),
                                _("Test page submitted as job %d") % job_id,
                                parent=self.MainWindow)
@@ -4578,7 +4662,7 @@
          except cups.IPPError, (e, msg):
              if (e == cups.IPP_NOT_AUTHORIZED and
                  self.connect_server != 'localhost' and
-@@ -1750,6 +1765,8 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -1750,6 +1762,8 @@ class GUI(GtkGUI, monitor.Watcher):
  
          try:
              self.ppd = printer.getPPD()
@@ -4587,7 +4671,7 @@
          except cups.IPPError, (e, m):
              # Some IPP error other than IPP_NOT_FOUND.
              show_IPP_Error(e, m, self.MainWindow)
-@@ -1988,19 +2005,20 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -1988,19 +2002,20 @@ class GUI(GtkGUI, monitor.Watcher):
              return
          ppd = self.ppd
          ppd.markDefaults()
@@ -4612,7 +4696,7 @@
                  tab_label = self.lblPInstallOptions
              else:
                  frame = gtk.Frame("<b>%s</b>" % group.text)
-@@ -2147,7 +2165,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2147,7 +2162,7 @@ class GUI(GtkGUI, monitor.Watcher):
          (path, cell) = tuple
          model = self.dests_iconview.get_model ()
          iter = model.get_iter (path)
@@ -4621,7 +4705,7 @@
          if not self.is_rename_possible (name):
              return
          cell.set_property ('editable', True)
-@@ -2161,7 +2179,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2161,7 +2176,7 @@ class GUI(GtkGUI, monitor.Watcher):
      def printer_name_edited (self, cell, path, newname):
          model = self.dests_iconview.get_model ()
          iter = model.get_iter (path)
@@ -4630,7 +4714,7 @@
          debugprint ("edited: %s -> %s" % (name, newname))
          try:
              self.rename_printer (name, newname)
-@@ -2255,7 +2273,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2255,7 +2270,7 @@ class GUI(GtkGUI, monitor.Watcher):
  
          # ..and select the new printer.
          def select_new_printer (model, path, iter):
@@ -4639,7 +4723,7 @@
              print name, new_name
              if name == new_name:
                  self.dests_iconview.select_path (path)
-@@ -2278,7 +2296,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2278,7 +2293,7 @@ class GUI(GtkGUI, monitor.Watcher):
          paths = iconview.get_selected_items ()
          model = self.dests_iconview.get_model ()
          iter = model.get_iter (paths[0])
@@ -4648,7 +4732,7 @@
          self.entCopyName.set_text(name)
          self.NewPrinterName.set_transient_for (self.MainWindow)
          result = self.NewPrinterName.run()
-@@ -2298,7 +2316,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2298,7 +2313,7 @@ class GUI(GtkGUI, monitor.Watcher):
  
      def on_entCopyName_changed(self, widget):
          # restrict
@@ -4657,7 +4741,7 @@
          new_text = text
          new_text = new_text.replace("/", "")
          new_text = new_text.replace("#", "")
-@@ -2337,7 +2355,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2337,7 +2352,7 @@ class GUI(GtkGUI, monitor.Watcher):
          try:
              for i in range (n):
                  iter = model.get_iter (paths[i])
@@ -4666,7 +4750,7 @@
                  self.cups.deletePrinter (name)
          except cups.IPPError, (e, msg):
              show_IPP_Error(e, msg, self.MainWindow)
-@@ -2402,7 +2420,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2402,7 +2417,7 @@ class GUI(GtkGUI, monitor.Watcher):
          paths = iconview.get_selected_items ()
          model = iconview.get_model ()
          iter = model.get_iter (paths[0])
@@ -4675,7 +4759,7 @@
          self.set_system_or_user_default_printer (name)
  
      def on_troubleshoot_activate(self, widget):
-@@ -2556,7 +2574,7 @@ class GUI(GtkGUI, monitor.Watcher):
+@@ -2556,7 +2571,7 @@ class GUI(GtkGUI, monitor.Watcher):
  
      def checkNPName(self, name):
          if not name: return False
@@ -4684,7 +4768,7 @@
          for printer in self.printers.values():
              if not printer.discovered and printer.name.lower()==name:
                  return False
-@@ -3168,8 +3186,7 @@ class NewPrinterGUI(GtkGUI):
+@@ -3168,8 +3183,7 @@ class NewPrinterGUI(GtkGUI):
                  self.auto_make, self.auto_model = None, None
                  self.device.uri = self.getDeviceURI()
                  if self.device.type in ["socket", "lpd", "ipp"]:
@@ -4694,7 +4778,7 @@
                      faxuri = None
                      if host:
                          faxuri = self.get_hplip_uri_for_network_printer(host,
-@@ -3570,7 +3587,7 @@ class NewPrinterGUI(GtkGUI):
+@@ -3570,7 +3584,7 @@ class NewPrinterGUI(GtkGUI):
              
      def on_entNPName_changed(self, widget):
          # restrict
@@ -4703,7 +4787,7 @@
          new_text = text
          new_text = new_text.replace("/", "")
          new_text = new_text.replace("#", "")
-@@ -3659,6 +3676,12 @@ class NewPrinterGUI(GtkGUI):
+@@ -3659,6 +3673,12 @@ class NewPrinterGUI(GtkGUI):
          return uri
  
      def getNetworkPrinterMakeModel(self):
@@ -4716,7 +4800,7 @@
          device = self.device
          # Determine host name/IP
          host = None
-@@ -3705,6 +3728,8 @@ class NewPrinterGUI(GtkGUI):
+@@ -3705,6 +3725,8 @@ class NewPrinterGUI(GtkGUI):
              device.id = "MFG:" + mk + ";MDL:" + md + ";DES:" + mk + " " + md + ";"
              device.id_dict = cupshelpers.parseDeviceID (device.id)
  
@@ -4725,7 +4809,7 @@
      def fillDeviceTab(self, current_uri=None):
          try:
              devices = self.fetchDevices()
-@@ -4322,6 +4347,7 @@ class NewPrinterGUI(GtkGUI):
+@@ -4322,6 +4344,7 @@ class NewPrinterGUI(GtkGUI):
          thread.start_new_thread(self.browse_ipp_queues_thread, ())
  
      def browse_ipp_queues_thread(self):
@@ -4733,7 +4817,7 @@
          gtk.gdk.threads_enter()
          try:
              store = self.ipp_store
-@@ -4340,12 +4366,19 @@ class NewPrinterGUI(GtkGUI):
+@@ -4340,12 +4363,19 @@ class NewPrinterGUI(GtkGUI):
          oldserver = cups.getServer ()
          printers = classes = {}
          failed = False
@@ -4755,7 +4839,63 @@
                  c = cups.Connection()
  
              printers = c.getPrinters ()
-@@ -5110,7 +5143,6 @@ class NewPrinterGUI(GtkGUI):
+@@ -4435,8 +4465,11 @@ class NewPrinterGUI(GtkGUI):
+                                   padding, pack_type)
+ 
+     def on_tvNPDevices_cursor_changed(self, widget):
+-        model, iter = widget.get_selection ().get_selected()
+-        path = model.get_path (iter)
++        path, column = widget.get_cursor ()
++        if path == None:
++            return
++
++        model = widget.get_model ()
+         physicaldevice = self.devices[path[0]]
+         model = gtk.ListStore (str,                    # printer-info
+                                gobject.TYPE_PYOBJECT)  # cupshelpers.Device
+@@ -4919,14 +4952,12 @@ class NewPrinterGUI(GtkGUI):
+         self.entNPDownloadableDriverSearch.set_text (search)
+ 
+     def on_tvNPMakes_cursor_changed(self, tvNPMakes):
+-        selection = tvNPMakes.get_selection()
+-        model, iter = selection.get_selected()
+-        if not iter:
+-            # Interactively searching.
+-            path, column = tvNPMakes.get_cursor()
++        path, column = tvNPMakes.get_cursor()
++        if path != None:
++            model = tvNPMakes.get_model ()
+             iter = model.get_iter (path)
+-        self.NPMake = model.get(iter, 0)[0]
+-        self.fillModelList()
++            self.NPMake = model.get(iter, 0)[0]
++            self.fillModelList()
+ 
+     def fillModelList(self):
+         models = self.ppds.getModels(self.NPMake)
+@@ -4986,15 +5017,13 @@ class NewPrinterGUI(GtkGUI):
+         return markup
+ 
+     def on_tvNPModels_cursor_changed(self, widget):        
+-        model, iter = widget.get_selection().get_selected()
+-        if not iter:
+-            # Interactively searching.
+-            path, column = widget.get_cursor()
++        path, column = widget.get_cursor()
++        if path != None:
++            model = widget.get_model ()
+             iter = model.get_iter (path)
+-        pmodel = model.get(iter, 0)[0]
+-        self.fillDriverList(self.NPMake, pmodel)
+-
+-        self.on_tvNPDrivers_cursor_changed(self.tvNPDrivers)
++            pmodel = model.get(iter, 0)[0]
++            self.fillDriverList(self.NPMake, pmodel)
++            self.on_tvNPDrivers_cursor_changed(self.tvNPDrivers)
+ 
+     def on_tvNPDrivers_cursor_changed(self, widget):
+         self.setNPButtons()
+@@ -5110,7 +5139,6 @@ class NewPrinterGUI(GtkGUI):
                  ppd = self.NPDrivers[nr]
              elif self.rbtnNPPPD.get_active():
                  ppd = cups.PPD(self.filechooserPPD.get_filename())
@@ -4763,7 +4903,7 @@
              else:
                  # PPD of the driver downloaded from OpenPrinting XXX
                  treeview = self.tvNPDownloadableDrivers
-@@ -5132,7 +5164,6 @@ class NewPrinterGUI(GtkGUI):
+@@ -5132,7 +5160,6 @@ class NewPrinterGUI(GtkGUI):
                              ppdfile.write(ppdcontent)
                              ppdfile.close()
                              ppd = cups.PPD(ppdname)
@@ -4771,7 +4911,7 @@
                              os.unlink(ppdname)
  
          except RuntimeError, e:
-@@ -5188,7 +5219,6 @@ class NewPrinterGUI(GtkGUI):
+@@ -5188,7 +5215,6 @@ class NewPrinterGUI(GtkGUI):
                  if (ppd != "raw"):
                      f = self.mainapp.cups.getServerPPD(ppd)
                      ppd = cups.PPD(f)
@@ -4779,7 +4919,7 @@
                      os.unlink(f)
              except AttributeError:
                  nonfatalException()
-@@ -5262,9 +5292,9 @@ class NewPrinterGUI(GtkGUI):
+@@ -5262,9 +5288,9 @@ class NewPrinterGUI(GtkGUI):
      # Create new Printer
      def on_btnNPApply_clicked(self, widget):
          if self.dialog_mode in ("class", "printer"):
@@ -4792,7 +4932,7 @@
          else:
              name = self.mainapp.printer.name
  
-@@ -5373,7 +5403,6 @@ class NewPrinterGUI(GtkGUI):
+@@ -5373,7 +5399,6 @@ class NewPrinterGUI(GtkGUI):
                  try:
                      filename = self.mainapp.cups.getPPD(name)
                      ppd = cups.PPD(filename)
@@ -4800,7 +4940,7 @@
                      os.unlink(filename)
                  except cups.IPPError, (e, msg):
                      if e == cups.IPP_NOT_FOUND:
-@@ -5383,8 +5412,9 @@ class NewPrinterGUI(GtkGUI):
+@@ -5383,8 +5408,9 @@ class NewPrinterGUI(GtkGUI):
                          return
              else:
                  # We have an actual PPD to upload, not just a name.


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-10/system-config-printer.spec,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -r1.234 -r1.235
--- system-config-printer.spec	8 Jan 2009 18:35:57 -0000	1.234
+++ system-config-printer.spec	8 Jan 2009 18:49:02 -0000	1.235
@@ -7,7 +7,7 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.0.12
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -152,8 +152,12 @@
 exit 0
 
 %changelog
-* Thu Jan  8 2009 Tim Waugh <twaugh at redhat.com>
+* Thu Jan  8 2009 Tim Waugh <twaugh at redhat.com> 1.0.12-8
 - Updated pycups to 1.9.45.
+- Updated patch for 1.0.x changes:
+  - More cursor/selection fixes.
+  - Notification fix.
+  - Advertise correct defaults for page-* job options (bug #468553).
 
 * Fri Dec 19 2008 Tim Waugh <twaugh at redhat.com> 1.0.12-7
 - Updated patch for 1.0.x changes:




More information about the fedora-extras-commits mailing list