- 1.1.14:

- Retry when reconnection fails (bug #541741).
- Prevent traceback with bad marker-levels attribute (bug #541882).
This commit is contained in:
Tim Waugh 2009-11-27 18:00:41 +00:00
parent c2e929a5aa
commit 869fd822a9
29 changed files with 14 additions and 824 deletions

View File

@ -205,3 +205,4 @@ system-config-printer-1.1.10.tar.bz2
system-config-printer-1.1.11.tar.xz
system-config-printer-1.1.12.tar.xz
system-config-printer-1.1.13.tar.xz
system-config-printer-1.1.14.tar.xz

View File

@ -1,3 +1,3 @@
ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2
895d4170542ec80c74d41746a9474409 pycups-1.9.46.tar.bz2
15fec6e2bb9543aa42bf86814855f25c system-config-printer-1.1.13.tar.xz
71c114e997ec0f8d146f3c6586de032e system-config-printer-1.1.14.tar.xz

Binary file not shown.

View File

@ -1,14 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.autoselect-raw system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.autoselect-raw 2009-09-30 16:54:07.363635374 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-30 16:54:19.189761633 +0100
@@ -3948,8 +3948,8 @@ class NewPrinterGUI(GtkGUI):
cupshelpers.ppds.ppdMakeModelSplit (makeandmodel)
else:
# Special CUPS names for a raw queue.
- self.auto_make = 'Raw'
- self.auto_model = 'Queue'
+ self.auto_make = 'Generic'
+ self.auto_model = 'Raw Queue'
try:
if self.dialog_mode == "ppd":

View File

@ -1,11 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.cancel-traceback system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.cancel-traceback 2009-09-18 13:10:10.962438215 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-18 13:10:20.041314240 +0100
@@ -3805,6 +3805,7 @@ class NewPrinterGUI(GtkGUI):
self.options = {} # keyword -> Option object
self.changed = set()
self.conflicts = set()
+ self.fetchDevices_op = None
combobox = self.cmbNPDownloadableDriverFoundPrinters
combobox.set_model (gtk.ListStore (str, str))

View File

@ -1,12 +0,0 @@
diff -up system-config-printer-1.1.13/glade/PrintersWindow.glade.center system-config-printer-1.1.13/glade/PrintersWindow.glade
--- system-config-printer-1.1.13/glade/PrintersWindow.glade.center 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/glade/PrintersWindow.glade 2009-11-26 15:36:40.465178836 +0000
@@ -8,7 +8,7 @@
<property name="visible">False</property>
<property name="title" translatable="yes">System-Config-Printer</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="modal">False</property>
<property name="default_width">450</property>
<property name="default_height">250</property>

View File

@ -1,124 +0,0 @@
diff -up system-config-printer-1.1.13/monitor.py.custom-state-reasons system-config-printer-1.1.13/monitor.py
--- system-config-printer-1.1.13/monitor.py.custom-state-reasons 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/monitor.py 2009-10-29 17:18:46.813021287 +0000
@@ -62,7 +62,7 @@ def collect_printer_state_reasons (conne
continue
if not result.has_key (name):
result[name] = []
- result[name].append (StateReason (name, reason))
+ result[name].append (StateReason (connection, name, reason))
return result
class Watcher:
@@ -408,7 +408,7 @@ class Monitor:
break
if state_reason_is_harmless (reason):
continue
- reasons.append (StateReason (name, reason))
+ reasons.append (StateReason (c, name, reason))
self.printer_state_reasons[name] = reasons
deferred_calls.append ((self.watcher.printer_event,
diff -up system-config-printer-1.1.13/statereason.py.custom-state-reasons system-config-printer-1.1.13/statereason.py
--- system-config-printer-1.1.13/statereason.py.custom-state-reasons 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/statereason.py 2009-10-29 17:18:46.814020769 +0000
@@ -17,6 +17,8 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+import cups
+
_ = lambda x: x
def set_gettext_function (fn):
global _
@@ -33,11 +35,12 @@ class StateReason:
ERROR: "dialog-error"
}
- def __init__(self, printer, reason):
+ def __init__(self, connection, printer, reason):
self.printer = printer
self.reason = reason
self.level = None
self.canonical_reason = None
+ self.connection = connection
def get_printer (self):
return self.printer
@@ -53,6 +56,7 @@ class StateReason:
self.level = self.WARNING
else:
self.level = self.ERROR
+
return self.level
def get_reason (self):
@@ -69,6 +73,7 @@ class StateReason:
return self.canonical_reason
def __repr__ (self):
+ self.get_level()
if self.level == self.REPORT:
level = "REPORT"
elif self.level == self.WARNING:
@@ -119,8 +124,24 @@ class StateReason:
title = _("Printer warning")
elif self.get_level () == self.ERROR:
title = _("Printer error")
- text = _("Printer '%s': '%s'.") % (self.get_printer (),
- self.get_reason ())
+
+ try:
+ f = self.connection.getPPD(self.printer)
+ ppd = cups.PPD (f)
+ schemes = ["text", "http", "help", "file"]
+ localized_reason = ""
+ for scheme in schemes:
+ reason = ppd.localizeIPPReason(self.reason, scheme)
+ if reason != None:
+ localized_reason = localized_reason + reason + ", "
+ if localized_reason != "":
+ reason = localized_reason[:-2]
+ else:
+ reason = self.get_reason()
+ except cups.IPPError:
+ reason = self.get_reason()
+
+ text = _("Printer '%s': '%s'.") % (self.get_printer (), reason)
return (title, text)
def get_tuple (self):
diff -up system-config-printer-1.1.13/system-config-printer.py.custom-state-reasons system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.custom-state-reasons 2009-10-29 16:51:28.567896668 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-29 17:18:46.816896209 +0000
@@ -1445,7 +1445,8 @@ class GUI(GtkGUI, monitor.Watcher):
emblem = gtk.STOCK_MEDIA_PAUSE
continue
- r = statereason.StateReason (object.name, reason)
+ r = statereason.StateReason (object.connection,
+ object.name, reason)
if worst_reason == None:
worst_reason = r
elif r > worst_reason:
@@ -2579,7 +2580,7 @@ class GUI(GtkGUI, monitor.Watcher):
any = True
iter = store.append (None)
- r = statereason.StateReason (printer.name, reason)
+ r = statereason.StateReason (printer.connection, printer.name, reason)
if r.get_reason () == "paused":
icon = gtk.STOCK_MEDIA_PAUSE
else:
diff -up system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py.custom-state-reasons system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py
--- system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py.custom-state-reasons 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/troubleshoot/PrinterStateReasons.py 2009-10-29 17:18:46.817896728 +0000
@@ -71,7 +71,7 @@ class PrinterStateReasons(Question):
if reason == "none":
continue
- r = statereason.StateReason (queue, reason)
+ r = statereason.StateReason (c, queue, reason)
(title, description) = r.get_description ()
level = r.get_level ()
if level == statereason.StateReason.ERROR:

View File

@ -1,32 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.data-button-state system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.data-button-state 2009-09-04 18:12:11.000000000 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-18 13:04:40.062438371 +0100
@@ -1907,19 +1907,20 @@ class GUI(GtkGUI, monitor.Watcher):
# set buttons sensitivity
def setDataButtonState(self):
try:
- possible = (self.ppd and
- not bool (self.changed) and
- self.printer.enabled and
- not self.printer.rejecting)
+ printable = (self.ppd and
+ not bool (self.changed) and
+ self.printer.enabled and
+ not self.printer.rejecting)
- self.btnPrintTestPage.set_sensitive (possible)
+ self.btnPrintTestPage.set_sensitive (printable)
+ adjustable = not (self.discovered or bool (self.changed))
for button in [self.btnChangePPD,
self.btnSelectDevice]:
- button.set_sensitive (not bool (self.changed))
+ button.set_sensitive (adjustable)
commands = (self.printer.type & cups.CUPS_PRINTER_COMMANDS) != 0
- self.btnSelfTest.set_sensitive (commands and possible)
- self.btnCleanHeads.set_sensitive (commands and possible)
+ self.btnSelfTest.set_sensitive (commands and printable)
+ self.btnCleanHeads.set_sensitive (commands and printable)
except:
pass

View File

@ -1,12 +0,0 @@
diff -up system-config-printer-1.1.13/po/de.po.de.po-typo system-config-printer-1.1.13/po/de.po
--- system-config-printer-1.1.13/po/de.po.de.po-typo 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/po/de.po 2009-11-02 12:54:11.378978411 +0000
@@ -2204,7 +2204,7 @@ msgstr "Kopien:"
#: ../glade/PrinterPropertiesDialog.glade.h:34
msgid "Deny printing for everyone except these users:"
-msgstr "Allen Benutzern den Druckern verbieten, außer:"
+msgstr "Allen Benutzern das Drucken verbieten, außer:"
#: ../glade/PrinterPropertiesDialog.glade.h:36
msgid "Device URI:"

View File

@ -1,20 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.editable-ppd system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.editable-ppd 2009-11-26 15:27:29.844177855 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-26 15:27:42.803179141 +0000
@@ -2320,7 +2320,6 @@ class GUI(GtkGUI, monitor.Watcher):
pass
editable = not self.printer.discovered
- editablePPD = not self.printer.remote
try:
self.ppd = printer.getPPD()
@@ -2471,7 +2470,7 @@ class GUI(GtkGUI, monitor.Watcher):
self.fillClassMembers(name, editable)
else:
# real Printer
- self.fillPrinterOptions(name, editablePPD)
+ self.fillPrinterOptions(name, editable)
self.updateMarkerLevels()
self.updateStateReasons()

View File

@ -1,51 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.fetchdevices system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.fetchdevices 2009-09-22 10:08:54.062669053 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-22 10:10:12.138669093 +0100
@@ -3855,9 +3855,7 @@ class NewPrinterGUI(GtkGUI):
self.fillDeviceTab()
self.rbtnNPFoomatic.set_active (True)
self.on_rbtnNPFoomatic_toggled(self.rbtnNPFoomatic)
- # Start fetching information from CUPS in the background
self.new_printer_PPDs_loaded = False
- self.queryPPDs ()
elif self.dialog_mode == "class":
self.NewPrinterWindow.set_title(_("New Class"))
@@ -4648,16 +4646,18 @@ class NewPrinterGUI(GtkGUI):
debugprint ("fetchDevices")
have_polkit_1 = self.mainapp.cups._use_pk and config.WITH_POLKIT_1
- if not have_polkit_1:
- if network:
- return {}
-
- network = True
-
network_schemes = ["dnssd", "snmp"]
try:
- c = authconn.Connection (host=self.mainapp.connect_server,
- parent=parent, lock=True)
+ try:
+ c = self.fetchDevices_conn
+ except AttributeError:
+ c = authconn.Connection (host=self.mainapp.connect_server,
+ parent=parent, lock=True)
+ if not have_polkit_1:
+ # Use this connection for future calls so that the
+ # username/password is cached.
+ self.fetchDevices_conn = c
+
debugprint ("in get_devices: connected")
c._begin_operation (_("fetching device list"))
try:
@@ -5049,6 +5049,10 @@ class NewPrinterGUI(GtkGUI):
kwargs={"network": True},
callback=self.got_devices,
context=context)
+ else:
+ # Now we've fetched both local and network devices, start
+ # querying the available PPDs.
+ gobject.timeout_add (1, self.queryPPDs)
devices = result
if current_uri:

View File

@ -1,11 +0,0 @@
diff -up system-config-printer-1.1.13/glade/NewPrinterWindow.glade.find-return-accel system-config-printer-1.1.13/glade/NewPrinterWindow.glade
--- system-config-printer-1.1.13/glade/NewPrinterWindow.glade.find-return-accel 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/glade/NewPrinterWindow.glade 2009-09-30 16:50:36.981760810 +0100
@@ -2580,6 +2580,7 @@ DTR/DSR (Hardware)</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_btnNetworkFind_clicked" last_modification_time="Fri, 19 Dec 2008 16:04:53 GMT"/>
+ <accelerator key="Return" modifiers="0" signal="activate"/>
</widget>
<packing>
<property name="left_attach">2</property>

View File

@ -1,14 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.gpk-traceback system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.gpk-traceback 2009-11-23 14:11:10.000000000 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-23 14:11:53.000000000 +0100
@@ -4316,9 +4316,9 @@ class NewPrinterGUI(GtkGUI):
debugprint ("foomatic-db-ppds already installed")
except OSError:
debugprint ("foomatic-db-ppds not yet installed")
- pk = installpackage.PackageKit ()
pid = None
try:
+ pk = installpackage.PackageKit ()
xid = self.mainapp.PrintersWindow.window.xid
pk.InstallPackageName (xid, 0, "foomatic-db-ppds")
except:

View File

@ -1,31 +0,0 @@
diff -up system-config-printer-1.1.13/jobviewer.py.iconify system-config-printer-1.1.13/jobviewer.py
--- system-config-printer-1.1.13/jobviewer.py.iconify 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/jobviewer.py 2009-09-18 13:52:20.235314913 +0100
@@ -389,14 +389,24 @@ class JobViewer (GtkGUI, monitor.Watcher
return errordialogs.show_IPP_Error (exception, message, self.JobsWindow)
def toggle_window_display(self, icon, force_show=False):
- visible = self.JobsWindow.get_property('visible')
+ visible = self.JobsWindow.get_data('visible')
if force_show:
visible = False
if visible:
- self.JobsWindow.hide()
+ w = self.JobsWindow.window
+ (s, area, o) = self.statusicon.get_geometry ()
+ w.set_skip_taskbar_hint (True)
+ w.property_change ("_NET_WM_ICON_GEOMETRY",
+ "CARDINAL", 32,
+ gtk.gdk.PROP_MODE_REPLACE,
+ list (area))
+ self.JobsWindow.iconify ()
else:
- self.JobsWindow.show()
+ self.JobsWindow.present ()
+ self.JobsWindow.window.set_skip_taskbar_hint (False)
+
+ self.JobsWindow.set_data ('visible', not visible)
def on_show_completed_jobs_activate(self, menuitem):
if menuitem.get_active():

View File

@ -1,56 +0,0 @@
diff -up system-config-printer-1.1.13/cupshelpers/cupshelpers.py.install-foomatic-db-ppds system-config-printer-1.1.13/cupshelpers/cupshelpers.py
--- system-config-printer-1.1.13/cupshelpers/cupshelpers.py.install-foomatic-db-ppds 2009-09-04 10:34:16.000000000 +0100
+++ system-config-printer-1.1.13/cupshelpers/cupshelpers.py 2009-11-11 14:50:51.557767784 +0000
@@ -473,7 +473,10 @@ def parseDeviceID (id):
id_dict.setdefault("CMD", id_dict["COMMAND SET"])
for name in ["MFG", "MDL", "CMD", "CLS", "DES", "SN", "S", "P", "J"]:
id_dict.setdefault(name, "")
- id_dict["CMD"] = id_dict["CMD"].split(',')
+ if id_dict["CMD"] == '':
+ id_dict["CMD"] = []
+ else:
+ id_dict["CMD"] = id_dict["CMD"].split(',')
return id_dict
class Device:
diff -up system-config-printer-1.1.13/system-config-printer.py.install-foomatic-db-ppds system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.install-foomatic-db-ppds 2009-11-11 14:50:33.835893883 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-11 14:50:51.560768061 +0000
@@ -4293,6 +4293,37 @@ class NewPrinterGUI(GtkGUI):
except:
nonfatalException ()
+ # Decide whether this might be a PostScript capable
+ # printer. If it might be, check whether
+ # foomatic-db-ppds is installed and suggest installing
+ # it.
+ cmdsets = self.device.id_dict["CMD"]
+ if len (cmdsets) == 0:
+ # No list of command sets available so might be PS capable
+ may_be_ps = True
+ else:
+ # We have the definitive list of command sets supported.
+ # Only PS capable if it says so.
+ may_be_ps = False
+ for cmdset in cmdsets:
+ if cmdset.lower ().startswith ("postscript"):
+ may_be_ps = True
+
+ if may_be_ps:
+ debugprint ("Printer might support PostScript")
+ try:
+ os.stat ("/usr/share/cups/model/foomatic-db-ppds")
+ debugprint ("foomatic-db-ppds already installed")
+ except OSError:
+ debugprint ("foomatic-db-ppds not yet installed")
+ pk = installpackage.PackageKit ()
+ pid = None
+ try:
+ xid = self.mainapp.PrintersWindow.window.xid
+ pk.InstallPackageName (xid, 0, "foomatic-db-ppds")
+ except:
+ pass
+
if (not self.remotecupsqueue and
not self.new_printer_PPDs_loaded):
try:

View File

@ -1,11 +0,0 @@
diff -up system-config-printer-1.1.13/jobviewer.py.jobs-window-visibility system-config-printer-1.1.13/jobviewer.py
--- system-config-printer-1.1.13/jobviewer.py.jobs-window-visibility 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/jobviewer.py 2009-10-28 15:47:52.796015837 +0000
@@ -378,6 +378,7 @@ class JobViewer (GtkGUI, monitor.Watcher
def on_delete_event(self, *args):
if self.trayicon or not self.loop:
self.JobsWindow.hide ()
+ self.JobsWindow.set_data ('visible', False)
if not self.loop:
# Being run from main app, not applet
self.cleanup ()

View File

@ -1,165 +0,0 @@
diff -up system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade.markers-display system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade
--- system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade.markers-display 2009-09-04 10:35:48.000000000 +0100
+++ system-config-printer-1.1.13/glade/PrinterPropertiesDialog.glade 2009-11-26 16:30:46.456177697 +0000
@@ -4677,27 +4677,84 @@ Reverse portrait (180°)</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
- <widget class="GtkAlignment" id="alignment95">
+ <widget class="GtkVBox" id="vbox54">
<property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">6</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkVBox" id="vboxMarkerLevels">
+ <widget class="GtkAlignment" id="alignment95">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
- <placeholder/>
+ <widget class="GtkScrolledWindow" id="scrolledwindow24">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkViewport" id="viewport10">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+
+ <child>
+ <widget class="GtkVBox" id="vboxMarkerLevels">
+ <property name="border_width">3</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
</child>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="btnRefreshMarkerLevels">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-refresh</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
</widget>
</child>
@@ -4727,33 +4784,8 @@ Reverse portrait (180°)</property>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="btnRefreshMarkerLevels">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-refresh</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
@@ -4913,13 +4945,13 @@ Reverse portrait (180°)</property>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="tab_expand">False</property>
+ <property name="tab_expand">True</property>
<property name="tab_fill">True</property>
</packing>
</child>
diff -up system-config-printer-1.1.13/system-config-printer.py.markers-display system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.markers-display 2009-11-26 16:29:46.758302644 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-26 16:30:46.453177964 +0000
@@ -2558,6 +2558,7 @@ class GUI(GtkGUI, monitor.Watcher):
subhbox.pack_start (inklevel, True, False, 0)
vbox.pack_start (subhbox, False, False, 0)
label = gtk.Label (name)
+ label.set_width_chars (10)
label.set_line_wrap (True)
vbox.pack_start (label, False, False, 0)
table.attach (vbox, col, col + 1, row, row + 1)

View File

@ -1,11 +0,0 @@
diff -up system-config-printer-1.1.13/probe_printer.py.missing-import system-config-printer-1.1.13/probe_printer.py
--- system-config-printer-1.1.13/probe_printer.py.missing-import 2009-09-01 12:08:33.000000000 +0100
+++ system-config-printer-1.1.13/probe_printer.py 2009-09-22 10:33:18.358546374 +0100
@@ -20,6 +20,7 @@
import cupshelpers
from debug import *
+import errno
import socket, time
import gtk
from timedops import TimedOperation

View File

@ -1,16 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.network-model system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.network-model 2009-09-30 16:55:46.115760592 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-30 16:55:52.545635754 +0100
@@ -4217,6 +4217,12 @@ class NewPrinterGUI(GtkGUI):
if not self.install_hplip_plugin(self.device.uri):
self.on_NPCancel(None)
return
+
+ if not devid and self.device.type in ["socket", "lpd", "ipp"]:
+ # This is a network printer whose model we don't yet know.
+ # Try to discover it.
+ self.getNetworkPrinterMakeModel ()
+
uri = self.device.uri
if uri and uri.startswith ("smb://"):
uri = SMBURI (uri=uri[6:]).sanitize_uri ()

View File

@ -1,14 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.no-cancel-properties-dialog system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.no-cancel-properties-dialog 2009-10-28 14:41:15.654017107 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-28 15:29:53.600140205 +0000
@@ -6815,8 +6815,9 @@ class NewPrinterGUI(GtkGUI):
response = q.run ()
q.destroy ()
if response == gtk.RESPONSE_YES:
- # Display the properties dialog.
+ # Load the printer details but hide the properties dialog.
self.mainapp.display_properties_dialog_for (name)
+ self.mainapp.PrinterPropertiesDialog.hide ()
# Click the test button.
self.mainapp.btnPrintTestPage.clicked ()

View File

@ -1,45 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.notification-traceback system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.notification-traceback 2009-10-30 12:36:24.901645742 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-30 12:36:34.610518996 +0000
@@ -3494,8 +3494,11 @@ class GUI(GtkGUI, monitor.Watcher):
self.dests_iconview_selection_changed (self.dests_iconview)
gobject.idle_add (deferred_refresh)
if self.PrinterPropertiesDialog.get_property('visible'):
- self.printer.getAttributes ()
- self.updatePrinterProperties ()
+ try:
+ self.printer.getAttributes ()
+ self.updatePrinterProperties ()
+ except cups.IPPError:
+ pass
gtk.gdk.threads_leave ()
@@ -3507,8 +3510,11 @@ class GUI(GtkGUI, monitor.Watcher):
monitor.Watcher.state_reason_added (self, mon, reason)
gtk.gdk.threads_enter ()
if self.PrinterPropertiesDialog.get_property('visible'):
- self.printer.getAttributes ()
- self.updatePrinterProperties ()
+ try:
+ self.printer.getAttributes ()
+ self.updatePrinterProperties ()
+ except cups.IPPError:
+ pass
gtk.gdk.threads_leave ()
@@ -3516,8 +3522,11 @@ class GUI(GtkGUI, monitor.Watcher):
monitor.Watcher.state_reason_removed (self, mon, reason)
gtk.gdk.threads_enter ()
if self.PrinterPropertiesDialog.get_property('visible'):
- self.printer.getAttributes ()
- self.updatePrinterProperties ()
+ try:
+ self.printer.getAttributes ()
+ self.updatePrinterProperties ()
+ except cups.IPPError:
+ pass
gtk.gdk.threads_leave ()

View File

@ -1,12 +0,0 @@
diff -up system-config-printer-1.1.13/PhysicalDevice.py.physdev-traceback system-config-printer-1.1.13/PhysicalDevice.py
--- system-config-printer-1.1.13/PhysicalDevice.py.physdev-traceback 2009-09-01 12:08:33.000000000 +0100
+++ system-config-printer-1.1.13/PhysicalDevice.py 2009-09-30 16:52:24.486760364 +0100
@@ -48,6 +48,8 @@ class PhysicalDevice:
hostport = ipparam[3:]
else:
return None
+ else:
+ return None
else:
(hostport, rest) = urllib.splithost (rest)
if hostport == None:

View File

@ -1,31 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.publish-printers system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.publish-printers 2009-09-18 13:44:41.680437056 +0100
+++ system-config-printer-1.1.13/system-config-printer.py 2009-09-18 13:45:30.704315256 +0100
@@ -220,7 +220,7 @@ class GUI(GtkGUI, monitor.Watcher):
self.changed = set() # of options
self.servers = set((self.connect_server,))
- self.server_is_publishing = False
+ self.server_is_publishing = None # not known
self.devid = devid
self.focus_on_map = focus_on_map
@@ -3158,6 +3158,18 @@ class GUI(GtkGUI, monitor.Watcher):
self.cups._end_operation ()
if success and share:
+ if self.server_is_publishing == None:
+ # We haven't yet seen a server-is-sharing-printers attribute.
+ # Assuming CUPS 1.4, this means we haven't opened a
+ # properties dialog yet. Fetch the attributes now and
+ # look for it.
+ try:
+ printer.getAttributes ()
+ p = printer.other_attributes['server-is-sharing-printers']
+ self.server_is_publishing = p
+ except (cups.IPPError, KeyError):
+ pass
+
self.advise_publish ()
# For some reason CUPS doesn't give us a notification about

View File

@ -1,11 +0,0 @@
diff -up system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zjs system-config-printer-1.1.13/cupshelpers/ppds.py
--- system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zjs 2009-10-29 16:51:28.575897013 +0000
+++ system-config-printer-1.1.13/cupshelpers/ppds.py 2009-10-29 17:18:17.526021102 +0000
@@ -184,6 +184,7 @@ def ppdMakeModelSplit (ppd_make_and_mode
" ps3",
" pxl",
" series",
+ " zjs", # hpcups
" zxs", # hpcups
" pcl3", # hpcups
"_bt",

View File

@ -1,12 +0,0 @@
diff -up system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zxs-pcl3 system-config-printer-1.1.13/cupshelpers/ppds.py
--- system-config-printer-1.1.13/cupshelpers/ppds.py.strip-zxs-pcl3 2009-09-01 12:08:33.000000000 +0100
+++ system-config-printer-1.1.13/cupshelpers/ppds.py 2009-10-28 15:53:28.990139713 +0000
@@ -184,6 +184,8 @@ def ppdMakeModelSplit (ppd_make_and_mode
" ps3",
" pxl",
" series",
+ " zxs", # hpcups
+ " pcl3", # hpcups
"_bt",
","]:
s = modell.find (suffix)

View File

@ -1,27 +0,0 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.test-page-traceback system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.test-page-traceback 2009-11-05 10:24:09.782129808 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-11-05 10:24:22.512254783 +0000
@@ -6837,12 +6837,19 @@ class NewPrinterGUI(GtkGUI):
response = q.run ()
q.destroy ()
if response == gtk.RESPONSE_YES:
- # Load the printer details but hide the properties dialog.
- self.mainapp.display_properties_dialog_for (name)
self.mainapp.PrinterPropertiesDialog.hide ()
- # Click the test button.
- self.mainapp.btnPrintTestPage.clicked ()
+ properties_shown = False
+ try:
+ # Load the printer details but hide the properties dialog.
+ self.mainapp.display_properties_dialog_for (name)
+ properties_shown = True
+ except RuntimeError:
+ pass
+
+ if properties_shown:
+ # Click the test button.
+ self.mainapp.btnPrintTestPage.clicked ()
def checkDriverExists(self, name, ppd=None):
"""Check that the driver for an existing queue actually

View File

@ -1,26 +0,0 @@
diff -up system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py.troubleshoot-network-printers system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py
--- system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py.troubleshoot-network-printers 2009-09-01 12:08:33.000000000 +0100
+++ system-config-printer-1.1.13/troubleshoot/ChooseNetworkPrinter.py 2009-10-28 15:57:10.771014583 +0000
@@ -2,8 +2,8 @@
## Printing troubleshooter
-## Copyright (C) 2008 Red Hat, Inc.
-## Copyright (C) 2008 Tim Waugh <twaugh@redhat.com>
+## Copyright (C) 2008, 2009 Red Hat, Inc.
+## Author: Tim Waugh <twaugh@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
@@ -77,8 +77,9 @@ class ChooseNetworkPrinter(Question):
parent = self.troubleshooter.get_window ()
try:
- cups.setServer (server)
- self.op = TimedOperation (cups.Connection, parent=parent)
+ self.op = TimedOperation (cups.Connection,
+ kwargs={"host": server},
+ parent=parent)
c = self.op.run ()
self.op = TimedOperation (c.getDests, parent=parent)
dests = self.op.run ()

View File

@ -6,8 +6,8 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.1.13
Release: 12%{?dist}
Version: 1.1.14
Release: 1%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
@ -15,31 +15,7 @@ Source0: http://cyberelk.net/tim/data/system-config-printer/1.1/system-config-pr
Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2
Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2
Patch1: system-config-printer-data-button-state.patch
Patch2: system-config-printer-cancel-traceback.patch
Patch3: system-config-printer-publish-printers.patch
Patch4: system-config-printer-iconify.patch
Patch5: system-config-printer-fetchdevices.patch
Patch6: system-config-printer-missing-import.patch
Patch7: system-config-printer-find-return-accel.patch
Patch8: system-config-printer-physdev-traceback.patch
Patch9: system-config-printer-autoselect-raw.patch
Patch10: system-config-printer-network-model.patch
Patch11: system-config-printer-no-cancel-properties-dialog.patch
Patch12: system-config-printer-jobs-window-visibility.patch
Patch13: system-config-printer-strip-zxs-pcl3.patch
Patch14: system-config-printer-troubleshoot-network-printers.patch
Patch15: system-config-printer-strip-zjs.patch
Patch16: system-config-printer-custom-state-reasons.patch
Patch17: system-config-printer-no-epydoc.patch
Patch18: system-config-printer-notification-traceback.patch
Patch19: system-config-printer-de.po-typo.patch
Patch20: system-config-printer-test-page-traceback.patch
Patch21: system-config-printer-install-foomatic-db-ppds.patch
Patch22: system-config-printer-gpk-traceback.patch
Patch23: system-config-printer-editable-ppd.patch
Patch24: system-config-printer-center.patch
Patch25: system-config-printer-markers-display.patch
Patch1: system-config-printer-no-epydoc.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4
@ -99,31 +75,7 @@ printers.
%prep
%setup -q -a 1 -a 2
%patch1 -p1 -b .data-button-state
%patch2 -p1 -b .cancel-traceback
%patch3 -p1 -b .publish-printers
%patch4 -p1 -b .iconify
%patch5 -p1 -b .fetchdevices
%patch6 -p1 -b .missing-import
%patch7 -p1 -b .find-return-accel
%patch8 -p1 -b .physdev-traceback
%patch9 -p1 -b .autoselect-raw
%patch10 -p1 -b .network-model
%patch11 -p1 -b .no-cancel-properties-dialog
%patch12 -p1 -b .jobs-window-visibility
%patch13 -p1 -b .strip-zxs-pcl3
%patch14 -p1 -b .troubleshoot-network-printers
%patch15 -p1 -b .strip-zjs
%patch16 -p1 -b .custom-state-reasons
%patch17 -p1 -b .no-epydoc
%patch18 -p1 -b .notification-traceback
%patch19 -p1 -b .de.po-typo
%patch20 -p1 -b .test-page-traceback
%patch21 -p1 -b .install-foomatic-db-ppds
%patch22 -p1 -b .gpk-traceback
%patch23 -p1 -b .editable-ppd
%patch24 -p1 -b .center
%patch25 -p1 -b .markers-display
%patch1 -p1 -b .no-epydoc
%build
%configure --with-udev-rules --with-polkit-1
@ -176,8 +128,8 @@ rm -rf %buildroot
%files udev
%defattr(-,root,root,-)
%{_sysconfdir}/udev/rules.d/*.rules
/lib/udev/*
/lib/udev/rules.d/*.rules
/lib/udev/udev-*-printer
%dir %{_localstatedir}/run/udev-configure-printer
%verify(not md5 size mtime) %config(noreplace,missingok) %attr(0644,root,root) %{_localstatedir}/run/udev-configure-printer/usb-uris
@ -194,6 +146,7 @@ rm -rf %buildroot
%{_datadir}/%{name}/cupspk.py*
%{_datadir}/%{name}/debug.py*
%{_datadir}/%{name}/errordialogs.py*
%{_datadir}/%{name}/firewall.py*
%{_datadir}/%{name}/glade.py*
%{_datadir}/%{name}/GroupsPane.py*
%{_datadir}/%{name}/GroupsPaneModel.py*
@ -235,6 +188,11 @@ rm -rf %buildroot
exit 0
%changelog
* Fri Nov 27 2009 Tim Waugh <twaugh@redhat.com> 1.1.14-1
- 1.1.14:
- Retry when reconnection fails (bug #541741).
- Prevent traceback with bad marker-levels attribute (bug #541882).
* Thu Nov 26 2009 Tim Waugh <twaugh@redhat.com> 1.1.13-12
- Prevent display of marker levels from making the properties dialog
too big (bug #540826).