rpms/system-config-printer/F-9 system-config-printer-1.0.x.patch, 1.1, 1.2 system-config-printer.spec, 1.195, 1.196

Tim Waugh twaugh at fedoraproject.org
Mon Nov 3 15:09:14 UTC 2008


Author: twaugh

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

Modified Files:
	system-config-printer-1.0.x.patch system-config-printer.spec 
Log Message:
* Mon Nov  3 2008 Tim Waugh <twaugh at redhat.com> 1.0.9-2
- Added patch for 1.0.x changes since 1.0.9:
  - Set default window icon for my-default-printer (Ubuntu #290469).
  - Don't continually show notifications for the same state reason.
  - Fixed two job monitor bugs.
  - Close notifications when an associated job is removed, and when the
    applet exits.
  - Set status icon visibility before showing auth notification.
  - Fixed detection of jobs requiring auth.


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

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 system-config-printer-1.0.x.patch
Index: system-config-printer-1.0.x.patch
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-9/system-config-printer-1.0.x.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- system-config-printer-1.0.x.patch	15 Oct 2008 17:24:30 -0000	1.1
+++ system-config-printer-1.0.x.patch	3 Nov 2008 15:09:14 -0000	1.2
@@ -1,276 +1,607 @@
-diff -up system-config-printer-1.0.8/authconn.py.1.0.x system-config-printer-1.0.8/authconn.py
---- system-config-printer-1.0.8/authconn.py.1.0.x	2008-09-29 17:53:53.000000000 +0100
-+++ system-config-printer-1.0.8/authconn.py	2008-10-15 18:07:56.000000000 +0100
-@@ -202,6 +202,7 @@ class Connection:
-             self._forbidden = False
-             self._auth_called = False
-             self._cancel = False
-+            self._dialog_shown = False
-             cups.setPasswordCB (self._password_callback)
-             debugprint ("Authentication: password callback set")
-             return 1
-@@ -248,11 +249,26 @@ class Connection:
-         # Reset the flag indicating whether we were given an auth callback.
-         self._auth_called = False
- 
-+        # If we're previously prompted, explain why we're prompting again.
-+        if self._dialog_shown:
-+            d = gtk.MessageDialog (self._parent,
-+                                   gtk.DIALOG_MODAL |
-+                                   gtk.DIALOG_DESTROY_WITH_PARENT,
-+                                   gtk.MESSAGE_ERROR,
-+                                   gtk.BUTTONS_CLOSE)
-+            d.set_title (_("Not authorized"))
-+            d.set_markup ('<span weight="bold" size="larger">' +
-+                          _("Not authorized") + '</span>\n\n' +
-+                          _("The password may be incorrect."))
-+            d.run ()
-+            d.destroy ()
-+
-         # Prompt.
-         d = AuthDialog (parent=self._parent)
-         d.set_prompt (self._prompt)
-         d.set_auth_info ([self._use_user, ''])
-         d.field_grab_focus ('password')
-+        self._dialog_shown = True
-         response = d.run ()
-         (self._use_user,
-          self._use_password) = d.get_auth_info ()
-diff -U0 system-config-printer-1.0.8/ChangeLog.1.0.x system-config-printer-1.0.8/ChangeLog
---- system-config-printer-1.0.8/ChangeLog.1.0.x	2008-09-29 17:53:53.000000000 +0100
-+++ system-config-printer-1.0.8/ChangeLog	2008-10-15 18:07:56.000000000 +0100
-@@ -0,0 +1,71 @@
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* pysmb.py (AuthContext.perform_authentication): Don't destroy
-+	authentication dialog until after we've fetched the details (bug
-+	#464003).
-+
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* pysmb.py: Import gettext.
-+
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* smburi.py (SMBURI._construct): Don't construct URIs containing
-+	"@/".
-+
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* cupshelpers/ppds.py (PPDs.getInfoFromModel): Restrict URI in
-+	debugging output.
-+
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* pysmb.py (AuthContext.perform_authentication): Show an error
-+	dialog if the password was incorrect (bug #465407).
-+	* po/POTFILES.in: Translate pysmb.py (no new translatable
-+	strings).
-+
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* system-config-printer.py
-+	(NewPrinterGUI.on_btnSMBVerify_clicked): Don't show an error
-+	dialog if the SMB authentication dialog is cancelled by the
-+	user (bug #465407).
-+
-+2008-10-15  Tim Waugh  <twaugh at redhat.com>
-+
-+	* print-applet.desktop.in (NotShowIn): Don't show the applet in
-+	KDE, as that provides its own version (bug #466945).
-+
-+2008-10-10  Tim Waugh  <twaugh at redhat.com>
-+
-+	* system-config-printer.py
-+	(GUI.__init__.UnobtrusiveButton.__init__): Don't use a LinkButton
-+	for the 'Problems?' button (bug #465407).
-+
-+2008-10-10  Tim Waugh  <twaugh at redhat.com>
-+
-+	* system-config-printer.glade: Don't use a separator for the
-+	server settings dialog (bug #465407).
-+
-+2008-10-10  Tim Waugh  <twaugh at redhat.com>
-+
-+	* system-config-printer.glade: Don't set non-zero page size for
-+	SpinButtons.
-+
-+2008-10-10  Tim Waugh  <twaugh at redhat.com>
-+
-+	* errordialogs.py (show_IPP_Error): Don't show an error dialog if
-+	an IPP operation's authentication dialog is cancelled by the
-+	user (bug #465407).
-+	* authconn.py: Show an error dialog if the password was
-+	incorrect (bug #465407).
-+
-+2008-10-09  Tim Waugh  <twaugh at redhat.com>
-+
-+	* system-config-printer.glade: Renamed server_settings to
-+	server_settings_menu_entry to avoid naming collision.
-+	* system-config-printer.py (GUI.setConnected): Set Server
-+	Settings... menu entry sensitive depending on whether we are
-+	connected to a server (Ubuntu #280736).
-+
-diff -up system-config-printer-1.0.8/cupshelpers/ppds.py.1.0.x system-config-printer-1.0.8/cupshelpers/ppds.py
---- system-config-printer-1.0.8/cupshelpers/ppds.py.1.0.x	2008-09-26 08:57:34.000000000 +0100
-+++ system-config-printer-1.0.8/cupshelpers/ppds.py	2008-10-15 18:07:56.000000000 +0100
-@@ -594,7 +594,9 @@ class PPDs:
-         _debugprint (str (ppdnamelist))
- 
-         if not id_matched:
--            print "No ID match for device %s:" % uri
-+            sanitised_uri = re.sub (pattern="//[^@]*@/?", repl="//",
-+                                    string=str (uri))
-+            print "No ID match for device %s:" % sanitised_uri
-             print "  <manufacturer>%s</manufacturer>" % mfg
-             print "  <model>%s</model>" % mdl
-             print "  <description>%s</description>" % description
-diff -up system-config-printer-1.0.8/errordialogs.py.1.0.x system-config-printer-1.0.8/errordialogs.py
---- system-config-printer-1.0.8/errordialogs.py.1.0.x	2008-09-29 17:53:53.000000000 +0100
-+++ system-config-printer-1.0.8/errordialogs.py	2008-10-15 18:07:56.000000000 +0100
-@@ -62,8 +62,8 @@ def show_error_dialog (title, text, pare
- 
- def show_IPP_Error(exception, message, parent=None):
-     if exception == cups.IPP_NOT_AUTHORIZED:
--        title = _('Not authorized')
--        text = _('The password may be incorrect.')
-+        # In this case, the user has canceled an authentication dialog.
+diff -U0 system-config-printer-1.0.9/ChangeLog.1.0.x system-config-printer-1.0.9/ChangeLog
+--- system-config-printer-1.0.9/ChangeLog.1.0.x	2008-10-21 17:26:45.000000000 +0100
++++ system-config-printer-1.0.9/ChangeLog	2008-11-03 14:06:35.000000000 +0000
+@@ -0,0 +1,109 @@
++2008-11-03  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.update_job): Restored compatibility code
++	for pycups < 1.9.40 when connecting to CUPS and requesting
++	specific job attributes.
++
++2008-11-03  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.cleanup): Close open notifications on
++	exit (trac #106).
++
++2008-11-03  Tim Waugh  <twaugh at redhat.com>
++
++	* monitor.py (Monitor.refresh): Fixed race condition causing stale
++	jobs (trac #107).
++
++2008-11-03  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.update_job): Already set status icon
++	visibility here.
++
++2008-11-02  Tim Waugh  <twaugh at redhat.com>
++
++	* monitor.py (Monitor.fetch_jobs): Better logic for job trimming.
++
++2008-10-31  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.current_printers_and_jobs): Better
++	debugging.
++	(JobViewer.job_event): Likewise.
++
++2008-10-31  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.job_event): Remove job-hold-until from
++	provided job data unless it was also provided as part of the
++	notification.  Call update_job earlier to make sure all required
++	attributes are present.
++
++2008-10-31  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.add_job): Use iter while it's fresh.
++
++2008-10-31  Tim Waugh  <twaugh at redhat.com>
++
++	* jobviewer.py (JobViewer.update_job): Delete auth notification
++	after closing it, otherwise we'll never show the notification for
++	this job again.
++
++2008-10-31  Tim Waugh  <twaugh at redhat.com>
++
[...21666 lines suppressed...]
- 						    </widget>
- 						    <packing>
-@@ -9563,7 +9563,7 @@ Reverse portrait (180°)</property>
- 						  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 						  <property name="snap_to_ticks">False</property>
- 						  <property name="wrap">False</property>
--						  <property name="adjustment">1000 1 10000 10 100 10</property>
-+						  <property name="adjustment">1000 1 10000 10 0 0</property>
- 						  <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 13:56:24 GMT"/>
- 						</widget>
- 						<packing>
-@@ -9826,7 +9826,7 @@ Reverse portrait (180°)</property>
- 						  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 						  <property name="snap_to_ticks">False</property>
- 						  <property name="wrap">False</property>
--						  <property name="adjustment">18 0 100 1 10 10</property>
-+						  <property name="adjustment">18 0 100 1 0 0</property>
- 						  <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 15:57:14 GMT"/>
- 						</widget>
- 						<packing>
-@@ -9889,7 +9889,7 @@ Reverse portrait (180°)</property>
- 					      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 					      <property name="snap_to_ticks">False</property>
- 					      <property name="wrap">False</property>
--					      <property name="adjustment">10 1 100 0.10000000149 1 1</property>
-+					      <property name="adjustment">10 1 100 0.10000000149 0 0</property>
- 					      <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 15:54:31 GMT"/>
- 					    </widget>
- 					    <packing>
-@@ -9950,7 +9950,7 @@ Reverse portrait (180°)</property>
- 					      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 					      <property name="snap_to_ticks">False</property>
- 					      <property name="wrap">False</property>
--					      <property name="adjustment">6 1 100 0.10000000149 1 1</property>
-+					      <property name="adjustment">6 1 100 0.10000000149 0 0</property>
- 					      <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 15:55:39 GMT"/>
- 					    </widget>
- 					    <packing>
-@@ -10040,7 +10040,7 @@ Reverse portrait (180°)</property>
- 					      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 					      <property name="snap_to_ticks">False</property>
- 					      <property name="wrap">False</property>
--					      <property name="adjustment">18 0 100 1 10 10</property>
-+					      <property name="adjustment">18 0 100 1 0 0</property>
- 					      <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 15:56:41 GMT"/>
- 					    </widget>
- 					    <packing>
-@@ -10234,7 +10234,7 @@ Reverse portrait (180°)</property>
- 						  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 						  <property name="snap_to_ticks">False</property>
- 						  <property name="wrap">False</property>
--						  <property name="adjustment">1 1 4 1 1 1</property>
-+						  <property name="adjustment">1 1 4 1 0 0</property>
- 						  <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 16:03:08 GMT"/>
- 						</widget>
- 						<packing>
-@@ -10369,7 +10369,7 @@ Reverse portrait (180°)</property>
- 					      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 					      <property name="snap_to_ticks">False</property>
- 					      <property name="wrap">False</property>
--					      <property name="adjustment">36 0 100 1 10 10</property>
-+					      <property name="adjustment">36 0 100 1 0 0</property>
- 					      <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 15:58:06 GMT"/>
- 					    </widget>
- 					    <packing>
-@@ -10459,7 +10459,7 @@ Reverse portrait (180°)</property>
- 					      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- 					      <property name="snap_to_ticks">False</property>
- 					      <property name="wrap">False</property>
--					      <property name="adjustment">36 0 100 1 10 10</property>
-+					      <property name="adjustment">36 0 100 1 0 0</property>
- 					      <signal name="changed" handler="on_job_option_changed" last_modification_time="Mon, 26 Feb 2007 16:01:04 GMT"/>
- 					    </widget>
- 					    <packing>
-diff -up system-config-printer-1.0.8/system-config-printer.py.1.0.x system-config-printer-1.0.8/system-config-printer.py
---- system-config-printer-1.0.8/system-config-printer.py.1.0.x	2008-09-29 17:53:53.000000000 +0100
-+++ system-config-printer-1.0.8/system-config-printer.py	2008-10-15 18:07:56.000000000 +0100
-@@ -209,7 +209,7 @@ class GUI(GtkGUI, monitor.Watcher):
-                         "btnPrinterPropertiesApply",
-                         "btnPrinterPropertiesClose",
-                         "ServerSettingsDialog",
--                        "server_settings",
-+                        "server_settings_menu_entry",
-                         "statusbarMain",
-                         "new_printer", "new_class",
-                         "rename", "copy", "delete",
-@@ -338,9 +338,20 @@ class GUI(GtkGUI, monitor.Watcher):
-         self.AboutDialog.set_icon_name('printer')
- 
-         # Set up "Problems?" link button
--        problems = gtk.LinkButton ('', label=_("Problems?"))
-+        class UnobtrusiveButton(gtk.Button):
-+            def __init__ (self, **args):
-+                gtk.Button.__init__ (self, **args)
-+                self.set_relief (gtk.RELIEF_NONE)
-+                label = self.get_child ()
-+                text = label.get_text ()
-+                label.set_use_markup (True)
-+                label.set_markup ('<span size="small" ' +
-+                                  'underline="single" ' +
-+                                  'color="#0000ee">%s</span>' % text)
+ #: ../system-config-printer.glade.h:204
+ msgid "Provide PPD file"
+diff -up system-config-printer-1.0.9/system-config-printer.py.1.0.x system-config-printer-1.0.9/system-config-printer.py
+--- system-config-printer-1.0.9/system-config-printer.py.1.0.x	2008-10-21 10:02:45.000000000 +0100
++++ system-config-printer-1.0.9/system-config-printer.py	2008-11-03 14:06:35.000000000 +0000
+@@ -3410,9 +3410,12 @@ class NewPrinterGUI(GtkGUI):
+         if step > 0 and next_page_nr == 0: # About to choose a name.
+             # Suggest an appropriate name.
+             name = None
++            descr = None
 +
-+        problems = UnobtrusiveButton (label=_("Problems?"))
-         self.hboxServerBrowse.pack_end (problems, False, False, 0)
--        problems.connect ('clicked', self.on_problems_linkbutton_clicked)
-+        problems.connect ('clicked', self.on_problems_button_clicked)
-         problems.show ()
- 
-         self.static_tabs = 3
-@@ -796,7 +807,8 @@ class GUI(GtkGUI, monitor.Watcher):
-                        self.chkServerBrowse, self.chkServerShare,
-                        self.chkServerRemoteAdmin,
-                        self.chkServerAllowCancelAll,
--                       self.chkServerLogDebug):
-+                       self.chkServerLogDebug,
-+                       self.server_settings_menu_entry):
-             widget.set_sensitive(connected)
- 
-         sharing = self.chkServerShare.get_active ()
-@@ -2487,7 +2499,7 @@ class GUI(GtkGUI, monitor.Watcher):
-             nonfatalException()
- 
-     ### The "Problems?" clickable label
--    def on_problems_linkbutton_clicked (self, *args):
-+    def on_problems_button_clicked (self, *args):
-         if not self.__dict__.has_key ('troubleshooter'):
-             self.troubleshooter = troubleshoot.run (self.on_troubleshoot_quit,
-                                                     parent=self.ServerSettingsDialog)
-@@ -4233,8 +4245,10 @@ class NewPrinterGUI(GtkGUI):
-                                                          group = group,
-                                                          user = user,
-                                                          passwd = passwd)
-+            canceled = False
-         else:
-             accessible = False
-+            canceled = False
-             self.busy ()
              try:
-                 debug = 0
-@@ -4264,6 +4278,9 @@ class NewPrinterGUI(GtkGUI):
-                             accessible = True
-                         except Exception, e:
-                             smbc_auth.failed (e)
-+
-+                    if not accessible:
-+                        canceled = True
-             except RuntimeError, (e, s):
-                 debugprint ("Error accessing share: %s" % repr ((e, s)))
-                 reason = s
-@@ -4277,11 +4294,12 @@ class NewPrinterGUI(GtkGUI):
-                               parent=self.NewPrinterWindow)
-             return
+-                if self.device.id:
++                if self.device.id and not self.device.type in ("socket", "lpd", "ipp", "bluetooth"):
+                     name = self.device.id_dict["MDL"]
++                    descr = "%s %s" % (self.device.id_dict["MFG"], self.device.id_dict["MDL"])
+             except:
+                 nonfatalException ()
+ 
+@@ -3421,6 +3424,7 @@ class NewPrinterGUI(GtkGUI):
+                     mname = self.ppd.findAttr ("modelName").value
+                     make, model = cupshelpers.ppds.ppdMakeModelSplit (mname)
+                     name = "%s %s" % (make, model)
++                    descr = "%s %s" % (make, model)
+             except:
+                 nonfatalException ()
+ 
+@@ -3430,6 +3434,9 @@ class NewPrinterGUI(GtkGUI):
+             name = self.mainapp.makeNameUnique (name)
+             self.entNPName.set_text (name)
  
--        text = _("This print share is not accessible.")
--        if reason:
--            text = reason
--        show_error_dialog (_("Print Share Inaccessible"), text,
--                           parent=self.NewPrinterWindow)
-+        if not canceled:
-+            text = _("This print share is not accessible.")
-+            if reason:
-+                text = reason
-+            show_error_dialog (_("Print Share Inaccessible"), text,
-+                               parent=self.NewPrinterWindow)
++            if self.entNPDescription.get_text () == '' and descr:
++                self.entNPDescription.set_text (descr)
++
+         self.ntbkNewPrinter.set_current_page(next_page_nr)
  
-     ### IPP Browsing
-     def update_IPP_URI_label(self):
+         self.setNPButtons()


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-9/system-config-printer.spec,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -r1.195 -r1.196
--- system-config-printer.spec	21 Oct 2008 17:06:46 -0000	1.195
+++ system-config-printer.spec	3 Nov 2008 15:09:14 -0000	1.196
@@ -7,13 +7,14 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.0.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
 Source0: http://cyberelk.net/tim/data/system-config-printer/1.0.x/system-config-printer-%{version}.tar.bz2
 Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2
 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2
+Patch0: system-config-printer-1.0.x.patch
 
 BuildRequires: cups-devel >= 1.2
 BuildRequires: python-devel >= 2.4
@@ -60,6 +61,7 @@
 
 %prep
 %setup -q -a 1 -a 2
+%patch0 -p1 -b .1.0.x
 
 %build
 %configure
@@ -149,6 +151,16 @@
 exit 0
 
 %changelog
+* Mon Nov  3 2008 Tim Waugh <twaugh at redhat.com> 1.0.9-2
+- Added patch for 1.0.x changes since 1.0.9:
+  - Set default window icon for my-default-printer (Ubuntu #290469).
+  - Don't continually show notifications for the same state reason.
+  - Fixed two job monitor bugs.
+  - Close notifications when an associated job is removed, and when the
+    applet exits.
+  - Set status icon visibility before showing auth notification.
+  - Fixed detection of jobs requiring auth.
+
 * Tue Oct 21 2008 Tim Waugh <twaugh at redhat.com> 1.0.9-1
 - Updated to 1.0.9 for translations.
 




More information about the fedora-extras-commits mailing list