rpms/system-config-printer/F-9 system-config-printer-1.0.x.patch, 1.3, 1.4 system-config-printer.spec, 1.197, 1.198
Tim Waugh
twaugh at fedoraproject.org
Tue Nov 4 16:32:27 UTC 2008
Author: twaugh
Update of /cvs/pkgs/rpms/system-config-printer/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv446
Modified Files:
system-config-printer-1.0.x.patch system-config-printer.spec
Log Message:
* Tue Nov 4 2008 Tim Waugh <twaugh at redhat.com> 1.0.9-4
- Updated patch for 1.0.x changes:
- More job monitoring fixes.
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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- system-config-printer-1.0.x.patch 3 Nov 2008 18:04:59 -0000 1.3
+++ system-config-printer-1.0.x.patch 4 Nov 2008 16:32:27 -0000 1.4
@@ -1,7 +1,36 @@
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 18:00:50.000000000 +0000
-@@ -0,0 +1,130 @@
++++ system-config-printer-1.0.9/ChangeLog 2008-11-04 16:27:58.000000000 +0000
+@@ -0,0 +1,159 @@
++2008-11-04 Tim Waugh <twaugh at redhat.com>
++
++ * monitor.py (Monitor.fetch_jobs): Apply specific_dests filter to
++ fetched jobs.
++
++2008-11-04 Tim Waugh <twaugh at redhat.com>
++
++ * monitor.py (Monitor.update_connecting_devices): Only call
++ still_connecting once, not repeatedly.
++
++2008-11-04 Tim Waugh <twaugh at redhat.com>
++
++ * monitor.py (Monitor.get_notifications): Prevent timer callbacks
++ while we handle client callbacks.
++ (Monitor.refresh): Likewise.
++
++2008-11-04 Tim Waugh <twaugh at redhat.com>
++
++ * monitor.py (Monitor.refresh): Reverted recent change inverting
++ order of calls. The current_printers_and_jobs callback must be
++ called first.
++ (Monitor.set_process_pending): Control whether pending events may
++ be processed.
++ (Monitor.__init__): Initially they can.
++ (Monitor.check_still_connecting): Defer timer callback if pending
++ events are held.
++ (Monitor.get_notifications): Likewise.
++ (Monitor.fetch_jobs): Skip callback if events are held.
++
+2008-11-03 Tim Waugh <twaugh at redhat.com>
+
+ * jobviewer.py (JobViewer.current_printers_and_jobs): Don't
@@ -134,7 +163,7 @@
+
diff -up system-config-printer-1.0.9/cupshelpers/ppds.py.1.0.x system-config-printer-1.0.9/cupshelpers/ppds.py
--- system-config-printer-1.0.9/cupshelpers/ppds.py.1.0.x 2008-10-21 17:21:24.000000000 +0100
-+++ system-config-printer-1.0.9/cupshelpers/ppds.py 2008-11-03 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/cupshelpers/ppds.py 2008-11-04 16:27:58.000000000 +0000
@@ -327,7 +327,7 @@ class PPDs:
particular printer model, given its make and model name.
@@ -146,7 +175,7 @@
try:
diff -up system-config-printer-1.0.9/jobviewer.py.1.0.x system-config-printer-1.0.9/jobviewer.py
--- system-config-printer-1.0.9/jobviewer.py.1.0.x 2008-10-21 10:02:45.000000000 +0100
-+++ system-config-printer-1.0.9/jobviewer.py 2008-11-03 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/jobviewer.py 2008-11-04 16:27:58.000000000 +0000
@@ -296,6 +296,7 @@ class JobViewer (monitor.Watcher):
if bus == None:
bus = dbus.SystemBus ()
@@ -502,22 +531,110 @@
diff -up system-config-printer-1.0.9/monitor.py.1.0.x system-config-printer-1.0.9/monitor.py
--- system-config-printer-1.0.9/monitor.py.1.0.x 2008-10-21 10:02:45.000000000 +0100
-+++ system-config-printer-1.0.9/monitor.py 2008-11-03 18:00:50.000000000 +0000
-@@ -559,11 +559,10 @@ class Monitor:
++++ system-config-printer-1.0.9/monitor.py 2008-11-04 16:27:58.000000000 +0000
+@@ -129,6 +129,7 @@ class Monitor:
+ self.jobs = {}
+ self.printer_state_reasons = {}
+ self.printers = set()
++ self.process_pending_events = True
+
+ if host:
+ cups.setServer (host)
+@@ -186,8 +187,18 @@ class Monitor:
+
+ self.watcher.monitor_exited (self)
+
++ def set_process_pending (self, whether):
++ self.process_pending_events = whether
++
+ def check_still_connecting(self, printer):
+ """Timer callback to check on connecting-to-device reasons."""
++ if not self.process_pending_events:
++ # Defer the timer by setting a new one.
++ timer = gobject.timeout_add (200, self.check_still_connecting,
++ printer)
++ self.connecting_timers[printer] = timer
++ return False
++
+ del self.connecting_timers[printer]
+ debugprint ("Still-connecting timer fired for `%s'" % printer)
+ (printer_jobs, my_printers) = self.sort_jobs_by_printer ()
+@@ -226,8 +237,9 @@ class Monitor:
+ debugprint ("Connecting time: %d" % (time_now - t))
+ if time_now - t >= CONNECTING_TIMEOUT:
+ if have_processing_job:
+- self.still_connecting.add (printer)
+- self.watcher.still_connecting (self, reason)
++ if printer not in self.still_connecting:
++ self.still_connecting.add (printer)
++ self.watcher.still_connecting (self, reason)
+ if self.connecting_timers.has_key (printer):
+ gobject.source_remove (self.connecting_timers
+ [printer])
+@@ -308,6 +320,13 @@ class Monitor:
+ self.watcher.state_reason_removed (self, reason)
+
+ def get_notifications(self):
++ if not self.process_pending_events:
++ # Defer the timer callback.
++ gobject.source_remove (self.update_timer)
++ self.update_timer = gobject.timeout_add (200,
++ self.get_notifications)
++ return False
++
+ debugprint ("get_notifications")
+ try:
+ try:
+@@ -449,11 +468,13 @@ class Monitor:
+ deferred_calls.append ((self.watcher.job_event,
+ (self, jobid, nse, event, job.copy ())))
+
++ self.set_process_pending (False)
+ self.update (jobs)
+ self.jobs = jobs
+
+ for (fn, args) in deferred_calls:
+ fn (*args)
++ self.set_process_pending (True)
+
+ # Update again when we're told to. If we're getting CUPS
+ # D-Bus signals, however, rely on those instead.
+@@ -559,14 +580,19 @@ class Monitor:
if printer not in self.specific_dests:
del jobs[jobid]
-- self.watcher.current_printers_and_jobs (self, self.printers.copy (),
-- jobs.copy ())
++ self.set_process_pending (False)
+ self.watcher.current_printers_and_jobs (self, self.printers.copy (),
+ jobs.copy ())
self.update (jobs)
-
self.jobs = jobs
-+ self.watcher.current_printers_and_jobs (self, self.printers.copy (),
-+ jobs.copy ())
++ self.set_process_pending (True)
return False
def fetch_jobs (self, refresh_all):
-@@ -626,6 +625,20 @@ class Monitor:
++ if not self.process_pending_events:
++ # Skip this call. We'll get called again soon.
++ return True
++
+ try:
+ try:
+ c = cups.Connection (host=self.host,
+@@ -611,6 +637,13 @@ class Monitor:
+ for jobid in xrange (self.fetch_first_job_id, last_jobid + 1):
+ try:
+ job = fetched[jobid]
++ if self.specific_dests != None:
++ uri = job.get('job-printer-uri', '/')
++ i = uri.rfind ('/')
++ printer = uri[i + 1:]
++ if printer not in self.specific_dests:
++ raise KeyError
++
+ if jobs.has_key (jobid):
+ fn = self.watcher.job_event
+ else:
+@@ -626,6 +659,20 @@ class Monitor:
deferred_calls.append ((self.watcher.job_removed,
(self, jobid, '', {})))
@@ -540,7 +657,7 @@
diff -up system-config-printer-1.0.9/my-default-printer.py.1.0.x system-config-printer-1.0.9/my-default-printer.py
--- system-config-printer-1.0.9/my-default-printer.py.1.0.x 2008-10-21 10:02:45.000000000 +0100
-+++ system-config-printer-1.0.9/my-default-printer.py 2008-11-03 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/my-default-printer.py 2008-11-04 16:27:58.000000000 +0000
@@ -138,6 +138,7 @@ class Server:
class Dialog:
@@ -551,7 +668,7 @@
gtk.DIALOG_MODAL | gtk.DIALOG_NO_SEPARATOR,
diff -up system-config-printer-1.0.9/po/pt_BR.po.1.0.x system-config-printer-1.0.9/po/pt_BR.po
--- system-config-printer-1.0.9/po/pt_BR.po.1.0.x 2008-10-21 10:02:45.000000000 +0100
-+++ system-config-printer-1.0.9/po/pt_BR.po 2008-11-03 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/po/pt_BR.po 2008-11-04 16:27:58.000000000 +0000
@@ -17,7 +17,7 @@ msgstr ""
"Project-Id-Version: system-config-printer\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/bugzilla\n"
@@ -2131,7 +2248,7 @@
+
diff -up system-config-printer-1.0.9/po/sr at latin.po.1.0.x system-config-printer-1.0.9/po/sr at latin.po
--- system-config-printer-1.0.9/po/sr at latin.po.1.0.x 2008-10-21 10:02:45.000000000 +0100
-+++ system-config-printer-1.0.9/po/sr at latin.po 2008-11-03 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/po/sr at latin.po 2008-11-04 16:27:58.000000000 +0000
@@ -1,61 +1,62 @@
# translation of system-config-printer.0.7.82.x.sr.po to Serbian
-# Serbian(Latin) translations for system-config-printer
@@ -3108,7 +3225,7 @@
#~ msgstr "Lozinka je neophodna"
diff -up system-config-printer-1.0.9/po/sr.po.1.0.x system-config-printer-1.0.9/po/sr.po
--- system-config-printer-1.0.9/po/sr.po.1.0.x 2008-10-21 10:02:52.000000000 +0100
-+++ system-config-printer-1.0.9/po/sr.po 2008-11-03 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/po/sr.po 2008-11-04 16:27:58.000000000 +0000
@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: system-config-printer.0.7.82.x.sr\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/bugzilla\n"
@@ -3180,7 +3297,7 @@
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 18:00:50.000000000 +0000
++++ system-config-printer-1.0.9/system-config-printer.py 2008-11-04 16:27:58.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.
Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-9/system-config-printer.spec,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -r1.197 -r1.198
--- system-config-printer.spec 3 Nov 2008 18:05:04 -0000 1.197
+++ system-config-printer.spec 4 Nov 2008 16:32:27 -0000 1.198
@@ -7,7 +7,7 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.0.9
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
@@ -151,6 +151,10 @@
exit 0
%changelog
+* Tue Nov 4 2008 Tim Waugh <twaugh at redhat.com> 1.0.9-4
+- Updated patch for 1.0.x changes:
+ - More job monitoring fixes.
+
* Mon Nov 3 2008 Tim Waugh <twaugh at redhat.com> 1.0.9-3
- Updated patch for 1.0.x changes:
- More job monitoring fixes.
More information about the fedora-extras-commits
mailing list