rpms/system-config-printer/devel system-config-printer-arrows.patch, NONE, 1.1 system-config-printer-gutenprint.patch, NONE, 1.1 system-config-printer-packagekit.patch, NONE, 1.1 system-config-printer-stopped-jobs.patch, NONE, 1.1 system-config-printer.spec, 1.266, 1.267

Tim Waugh twaugh at fedoraproject.org
Fri Jul 3 17:31:46 UTC 2009


Author: twaugh

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

Modified Files:
	system-config-printer.spec 
Added Files:
	system-config-printer-arrows.patch 
	system-config-printer-gutenprint.patch 
	system-config-printer-packagekit.patch 
	system-config-printer-stopped-jobs.patch 
Log Message:
* Fri Jul  3 2009 Tim Waugh <twaugh at redhat.com> 1.1.8-5
- Use gpk-install-package-name instead of trying to use the D-Bus API.
- Spot stopped jobs with CUPS 1.4 as well (trac #177).  This, along
  with the previous fix, addresses bug #509177.
- Map gutenprint filenames to the package name.
- Fixed sensitivity of class member selection arrows (bug #508653).


system-config-printer-arrows.patch:

--- NEW FILE system-config-printer-arrows.patch ---
diff -up system-config-printer-1.1.8/glade/NewPrinterWindow.glade.arrows system-config-printer-1.1.8/glade/NewPrinterWindow.glade
--- system-config-printer-1.1.8/glade/NewPrinterWindow.glade.arrows	2009-06-03 09:20:26.000000000 +0100
+++ system-config-printer-1.1.8/glade/NewPrinterWindow.glade	2009-07-03 18:18:50.640997051 +0100
@@ -3662,6 +3662,7 @@ DTR/DSR (Hardware)</property>
 			  <property name="fixed_height_mode">False</property>
 			  <property name="hover_selection">False</property>
 			  <property name="hover_expand">False</property>
+			  <signal name="cursor_changed" handler="on_tvNCMembers_cursor_changed" last_modification_time="Tue, 30 Jun 2009 15:15:42 GMT"/>
 			</widget>
 		      </child>
 		    </widget>
@@ -3693,6 +3694,7 @@ DTR/DSR (Hardware)</property>
 			  <child>
 			    <widget class="GtkButton" id="btnNCAddMember">
 			      <property name="visible">True</property>
+			      <property name="sensitive">False</property>
 			      <property name="can_default">True</property>
 			      <property name="can_focus">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
@@ -3771,6 +3773,7 @@ DTR/DSR (Hardware)</property>
 			  <child>
 			    <widget class="GtkButton" id="btnNCDelMember">
 			      <property name="visible">True</property>
+			      <property name="sensitive">False</property>
 			      <property name="can_default">True</property>
 			      <property name="can_focus">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
@@ -3823,6 +3826,7 @@ DTR/DSR (Hardware)</property>
 			  <property name="fixed_height_mode">False</property>
 			  <property name="hover_selection">False</property>
 			  <property name="hover_expand">False</property>
+			  <signal name="cursor_changed" handler="on_tvNCNotMembers_cursor_changed" last_modification_time="Tue, 30 Jun 2009 15:15:49 GMT"/>
 			</widget>
 		      </child>
 		    </widget>
diff -up system-config-printer-1.1.8/system-config-printer.py.arrows system-config-printer-1.1.8/system-config-printer.py
--- system-config-printer-1.1.8/system-config-printer.py.arrows	2009-07-03 18:18:36.478996538 +0100
+++ system-config-printer-1.1.8/system-config-printer.py	2009-07-03 18:18:50.643996718 +0100
@@ -174,7 +174,6 @@ def moveClassMembers(treeview_from, tree
     for row in rows:
         path = row.get_path()
         iter = model_from.get_iter(path)
-
         row_data = model_from.get(iter, 0)
         model_to.append(row_data)
         model_from.remove(iter)
@@ -3547,6 +3546,8 @@ class NewPrinterGUI(GtkGUI):
                               "entNPTDevice",
                               "tvNCMembers",
                               "tvNCNotMembers",
+                              "btnNCAddMember",
+                              "btnNCDelMember",
                               "ntbkPPDSource",
                               "rbtnNPPPD",
                               "tvNPMakes",
@@ -4089,11 +4090,23 @@ class NewPrinterGUI(GtkGUI):
         moveClassMembers(self.tvNCNotMembers, self.tvNCMembers)
         self.btnNPApply.set_sensitive(
             bool(getCurrentClassMembers(self.tvNCMembers)))
+        button.set_sensitive(False)
 
     def on_btnNCDelMember_clicked(self, button):
         moveClassMembers(self.tvNCMembers, self.tvNCNotMembers)
         self.btnNPApply.set_sensitive(
             bool(getCurrentClassMembers(self.tvNCMembers)))
+        button.set_sensitive(False)
+
+    def on_tvNCMembers_cursor_changed(self, widget):
+        selection = widget.get_selection()
+        model_from, rows = selection.get_selected_rows()
+        self.btnNCDelMember.set_sensitive(rows != [])
+
+    def on_tvNCNotMembers_cursor_changed(self, widget):
+        selection = widget.get_selection()
+        model_from, rows = selection.get_selected_rows()
+        self.btnNCAddMember.set_sensitive(rows != [])
 
     # Navigation buttons
 

system-config-printer-gutenprint.patch:

--- NEW FILE system-config-printer-gutenprint.patch ---
diff -up system-config-printer-1.1.8/cupshelpers/cupshelpers.py.gutenprint system-config-printer-1.1.8/cupshelpers/cupshelpers.py
--- system-config-printer-1.1.8/cupshelpers/cupshelpers.py.gutenprint	2009-06-17 18:39:51.000000000 +0100
+++ system-config-printer-1.1.8/cupshelpers/cupshelpers.py	2009-07-03 18:09:03.598995561 +0100
@@ -736,8 +736,10 @@ def missingPackagesAndExecutables(ppd):
             # IJS servers (used by foomatic)
             'hpijs': 'hpijs',
             'ijsgutenprint.5.0': 'gutenprint',
+            'ijsgutenprint.5.2': 'gutenprint',
             # CUPS filters
             'rastertogutenprint.5.0': 'gutenprint-cups',
+            'rastertogutenprint.5.2': 'gutenprint-cups',
             'commandtoepson': 'gutenprint-cups',
             'commandtocanon': 'gutenprint-cups',
             }

system-config-printer-packagekit.patch:

--- NEW FILE system-config-printer-packagekit.patch ---
diff -up system-config-printer-1.1.8/installpackage.py.packagekit system-config-printer-1.1.8/installpackage.py
--- system-config-printer-1.1.8/installpackage.py.packagekit	2009-05-12 10:36:36.000000000 +0100
+++ system-config-printer-1.1.8/installpackage.py	2009-07-03 18:07:09.560995667 +0100
@@ -2,8 +2,8 @@
 
 ## system-config-printer
 
-## Copyright (C) 2008 Red Hat, Inc.
-## Copyright (C) 2008 Tim Waugh <twaugh at redhat.com>
+## Copyright (C) 2008, 2009 Red Hat, Inc.
+## Copyright (C) 2008, 2009 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
@@ -19,53 +19,18 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-import dbus
-import xml.etree.ElementTree
-from dbus.mainloop.glib import DBusGMainLoop
-DBusGMainLoop (set_as_default=True)
+import os
+import glib
 
 class PackageKit:
     def __init__ (self):
-        bus = dbus.SessionBus ()
-        obj = bus.get_object ("org.freedesktop.PackageKit",
-                              "/org/freedesktop/PackageKit")
-
-        # Find out which API is required.
-        num_args = -1
-        introsp = dbus.Interface (obj, "org.freedesktop.DBus.Introspectable")
-        api = introsp.Introspect ()
-        top = xml.etree.ElementTree.XML (api)
-        for interface in top.findall ("interface"):
-            if interface.attrib.get ("name") != "org.freedesktop.PackageKit":
-                continue
-
-            for method in interface.findall ("method"):
-                if method.attrib.get ("name") != "InstallPackageName":
-                    continue
+        for dir in os.environ.get ("PATH", "").split (":"):
+            path = dir + os.path.sep + "gpk-install-package-name"
+            if os.access (path, os.X_OK):
+                self.gpk_install_package_name = path
+                return
 
-                num_args = len (method.findall ("arg"))
-                break
-
-        if num_args == -1:
-            raise RuntimeError, "Introspection failed for PackageKit"
-
-        self.proxy = dbus.Interface (obj, "org.freedesktop.PackageKit")
-        self.num_args = num_args
+        raise RuntimeError, "No gpk-install-package-name program available"
 
     def InstallPackageName (self, xid, timestamp, name):
-        proxy = self.proxy
-        if self.num_args == 3:
-            return proxy.InstallPackageName (xid, timestamp, name,
-                                             reply_handler=self.reply_handler,
-                                             error_handler=self.error_handler)
-        else:
-            # Old PackageKit interface
-            return proxy.InstallPackageName (name,
-                                             reply_handler=self.reply_handler,
-                                             error_handler=self.error_handler)
-
-    def reply_handler (self, *args):
-        pass
-
-    def error_handler (self, *args):
-        pass
+        glib.spawn_async ([self.gpk_install_package_name, name])

system-config-printer-stopped-jobs.patch:

--- NEW FILE system-config-printer-stopped-jobs.patch ---
diff -up system-config-printer-1.1.8/jobviewer.py.stopped-jobs system-config-printer-1.1.8/jobviewer.py
--- system-config-printer-1.1.8/jobviewer.py.stopped-jobs	2009-06-17 18:39:51.000000000 +0100
+++ system-config-printer-1.1.8/jobviewer.py	2009-07-03 18:08:28.040995881 +0100
@@ -1375,7 +1375,10 @@ class JobViewer (GtkGUI, monitor.Watcher
                 self.notify_completed_job (jobid)
 
         # Look out for stopped jobs.
-        if (self.trayicon and eventname == 'job-stopped' and
+        if (self.trayicon and
+            (eventname == 'job-stopped' or
+             (eventname == 'job-state-changed' and
+              event['job-state'] == cups.IPP_JOB_STOPPED))and
             not jobid in self.stopped_job_prompts):
             # Why has the job stopped?  It might be due to a job error
             # of some sort, or it might be that the backend requires


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/devel/system-config-printer.spec,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -p -r1.266 -r1.267
--- system-config-printer.spec	25 Jun 2009 17:10:34 -0000	1.266
+++ system-config-printer.spec	3 Jul 2009 17:31:46 -0000	1.267
@@ -7,7 +7,7 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.1.8
-Release: 3%{?dist}
+Release: 5%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -21,6 +21,10 @@ Patch4: system-config-printer-remote-loc
 Patch5: system-config-printer-nmblookup-failure.patch
 Patch6: system-config-printer-properties-cancel.patch
 Patch7: system-config-printer-incorrect-auth.patch
+Patch8: system-config-printer-packagekit.patch
+Patch9: system-config-printer-stopped-jobs.patch
+Patch10: system-config-printer-gutenprint.patch
+Patch11: system-config-printer-arrows.patch
 
 BuildRequires: cups-devel >= 1.2
 BuildRequires: python-devel >= 2.4
@@ -77,6 +81,10 @@ the configuration tool.
 %patch5 -p1 -b .nmblookup-failure
 %patch6 -p1 -b .properties-cancel
 %patch7 -p1 -b .incorrect-auth
+%patch8 -p1 -b .packagekit
+%patch9 -p1 -b .stopped-jobs
+%patch10 -p1 -b .gutenprint
+%patch11 -p1 -b .arrows
 
 %build
 %configure
@@ -179,6 +187,13 @@ rm -rf %buildroot
 exit 0
 
 %changelog
+* Fri Jul  3 2009 Tim Waugh <twaugh at redhat.com> 1.1.8-5
+- Use gpk-install-package-name instead of trying to use the D-Bus API.
+- Spot stopped jobs with CUPS 1.4 as well (trac #177).  This, along
+  with the previous fix, addresses bug #509177.
+- Map gutenprint filenames to the package name.
+- Fixed sensitivity of class member selection arrows (bug #508653).
+
 * Thu Jun 25 2009 Tim Waugh <twaugh at redhat.com> 1.1.8-3
 - Use correct 'location' field for printers added remotely.
 - Parse nmblookup failures correctly in troubleshooter.




More information about the fedora-extras-commits mailing list