- 1.1.90 development release.
This commit is contained in:
parent
81216439bf
commit
dab45d8ae2
@ -210,3 +210,4 @@ system-config-printer-1.1.15.tar.xz
|
||||
pycups-1.9.47.tar.bz2
|
||||
system-config-printer-1.1.16.tar.xz
|
||||
pycups-1.9.48.tar.bz2
|
||||
system-config-printer-1.1.90.tar.xz
|
||||
|
2
sources
2
sources
@ -1,3 +1,3 @@
|
||||
ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2
|
||||
8c2643d8a670eaadc3fa6890149b753b system-config-printer-1.1.16.tar.xz
|
||||
2e9ed692c75328e7fb88f8c230f70990 pycups-1.9.48.tar.bz2
|
||||
3c69710137034450ea9d869b4863e0b8 system-config-printer-1.1.90.tar.xz
|
||||
|
Binary file not shown.
BIN
system-config-printer-1.1.90.tar.xz.sig
Normal file
BIN
system-config-printer-1.1.90.tar.xz.sig
Normal file
Binary file not shown.
@ -1,36 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/asyncpk1.py.async-fallback system-config-printer-1.1.16/asyncpk1.py
|
||||
--- system-config-printer-1.1.16/asyncpk1.py.async-fallback 2009-12-22 14:27:37.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/asyncpk1.py 2010-01-18 16:53:36.820434799 +0000
|
||||
@@ -288,18 +288,24 @@ class PK1Connection:
|
||||
def _call_with_pk (self, use_pycups, pk_method_name, pk_args,
|
||||
reply_handler, error_handler, unpack_fn,
|
||||
fallback_fn, args, kwds):
|
||||
- asyncmethodcall = _PK1AsyncMethodCall (self._system_bus, self,
|
||||
- pk_method_name, pk_args,
|
||||
- reply_handler, error_handler,
|
||||
- unpack_fn, fallback_fn,
|
||||
- args, kwds)
|
||||
+ if not use_pycups:
|
||||
+ try:
|
||||
+ asyncmethodcall = _PK1AsyncMethodCall (self._system_bus, self,
|
||||
+ pk_method_name, pk_args,
|
||||
+ reply_handler,
|
||||
+ error_handler,
|
||||
+ unpack_fn, fallback_fn,
|
||||
+ args, kwds)
|
||||
+
|
||||
+ debugprint ("Calling PK method %s" % pk_method_name)
|
||||
+ asyncmethodcall.call ()
|
||||
+ except dbus.DBusException, e:
|
||||
+ debugprint ("D-Bus call failed: %s" % repr (e))
|
||||
+ use_pycups = True
|
||||
|
||||
if use_pycups:
|
||||
return asyncmethodcall.call_fallback_fn ()
|
||||
|
||||
- debugprint ("Calling PK method %s" % pk_method_name)
|
||||
- asyncmethodcall.call ()
|
||||
-
|
||||
def _nothing_to_unpack (self):
|
||||
return None
|
||||
|
@ -1,27 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/jobviewer.py.auth-no-pw system-config-printer-1.1.16/jobviewer.py
|
||||
--- system-config-printer-1.1.16/jobviewer.py.auth-no-pw 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/jobviewer.py 2010-01-07 15:40:43.517049465 +0000
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
-## Copyright (C) 2007, 2008, 2009 Tim Waugh <twaugh@redhat.com>
|
||||
-## Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
|
||||
+## Copyright (C) 2007, 2008, 2009, 2010 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
|
||||
@@ -599,13 +599,12 @@ class JobViewer (GtkGUI, monitor.Watcher
|
||||
|
||||
# Find out which auth-info is required.
|
||||
try_keyring = USE_KEYRING
|
||||
- keyring_attrs = None
|
||||
+ keyring_attrs = dict()
|
||||
auth_info = None
|
||||
if try_keyring and 'password' in auth_info_required:
|
||||
auth_info_required = data.get ('auth-info-required', [])
|
||||
device_uri = data.get ("device-uri")
|
||||
(scheme, rest) = urllib.splittype (device_uri)
|
||||
- keyring_attrs = dict ()
|
||||
if scheme == 'smb':
|
||||
uri = smburi.SMBURI (uri=device_uri)
|
||||
(group, server, share,
|
@ -1,24 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/monitor.py.check-still-connecting system-config-printer-1.1.16/monitor.py
|
||||
--- system-config-printer-1.1.16/monitor.py.check-still-connecting 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/monitor.py 2010-01-18 16:31:05.664560326 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
-## Copyright (C) 2007, 2008, 2009 Tim Waugh <twaugh@redhat.com>
|
||||
-## Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
|
||||
+## Copyright (C) 2007, 2008, 2009, 2010 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
|
||||
@@ -208,7 +208,9 @@ class Monitor:
|
||||
self.connecting_timers[printer] = timer
|
||||
return False
|
||||
|
||||
- del self.connecting_timers[printer]
|
||||
+ if self.connecting_timers.has_key (printer):
|
||||
+ del self.connecting_timers[printer]
|
||||
+
|
||||
debugprint ("Still-connecting timer fired for `%s'" % printer)
|
||||
(printer_jobs, my_printers) = self.sort_jobs_by_printer ()
|
||||
self.update_connecting_devices (printer_jobs)
|
@ -1,50 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/options.py.copy-crash system-config-printer-1.1.16/options.py
|
||||
--- system-config-printer-1.1.16/options.py.copy-crash 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/options.py 2010-01-11 16:05:04.352909594 +0000
|
||||
@@ -1,8 +1,9 @@
|
||||
## system-config-printer
|
||||
|
||||
-## Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
|
||||
-## Copyright (C) 2008 Tim Waugh <twaugh@redhat.com>
|
||||
-## Copyright (C) 2006 Florian Festi <ffesti@redhat.com>
|
||||
+## Copyright (C) 2006, 2007, 2008, 2010 Red Hat, Inc.
|
||||
+## Authors:
|
||||
+## Tim Waugh <twaugh@redhat.com>
|
||||
+## Florian Festi <ffesti@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
|
||||
@@ -63,6 +64,9 @@ def OptionWidget(name, v, s, on_change):
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
class OptionInterface:
|
||||
+ def get_default(self):
|
||||
+ return None
|
||||
+
|
||||
def get_current_value(self):
|
||||
raise NotImplemented
|
||||
|
||||
@@ -105,6 +109,9 @@ class OptionAlwaysShown(OptionInterface)
|
||||
self.use_supported = use_supported
|
||||
self.reinit (None)
|
||||
|
||||
+ def get_default(self):
|
||||
+ return self.system_default
|
||||
+
|
||||
def set_default(self, system_default):
|
||||
# For the media option, the system default depends on the printer's
|
||||
# PageSize setting. This method allows the main module to tell us
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.copy-crash system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.copy-crash 2010-01-11 16:05:04.342910797 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-11 16:05:22.957910696 +0000
|
||||
@@ -2069,8 +2069,8 @@ class GUI(GtkGUI, monitor.Watcher):
|
||||
printer.unsetOption(option)
|
||||
for option in self.server_side_options.itervalues():
|
||||
if (option.is_changed() or
|
||||
- saveall and
|
||||
- option.get_current_value () != option.system_default):
|
||||
+ (saveall and
|
||||
+ option.get_current_value () != option.get_default())):
|
||||
printer.setOption(option.name, option.get_current_value())
|
||||
|
||||
except cups.IPPError, (e, s):
|
@ -1,138 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.driver-pre-selection system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.driver-pre-selection 2010-01-11 14:58:14.392910996 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-11 14:58:23.834909684 +0000
|
||||
@@ -3913,6 +3913,7 @@ class NewPrinterGUI(GtkGUI):
|
||||
self.rbtnChangePPDKeepSettings.set_active(True)
|
||||
|
||||
self.auto_model = ""
|
||||
+ self.auto_driver = None
|
||||
ppd = self.mainapp.ppd
|
||||
#self.mainapp.devid = "MFG:Samsung;MDL:ML-3560;DES:;CMD:GDI;"
|
||||
devid = self.mainapp.devid
|
||||
@@ -3968,38 +3969,41 @@ class NewPrinterGUI(GtkGUI):
|
||||
else:
|
||||
self.auto_make = devid_dict["MFG"]
|
||||
self.auto_model = devid_dict["MDL"]
|
||||
+ self.auto_driver = None
|
||||
except:
|
||||
self.auto_make = devid_dict["MFG"]
|
||||
self.auto_model = devid_dict["MDL"]
|
||||
+ self.auto_driver = None
|
||||
if not self.device or not self.device.id:
|
||||
self.device.id = devid
|
||||
self.device.id_dict = cupshelpers.parseDeviceID (devid)
|
||||
self.mainapp.devid = ""
|
||||
elif ppd:
|
||||
- attr = ppd.findAttr("Manufacturer")
|
||||
- if attr:
|
||||
- mfr = attr.value
|
||||
- else:
|
||||
- mfr = ""
|
||||
- makeandmodel = mfr
|
||||
- attr = ppd.findAttr("ModelName")
|
||||
- if not attr: attr = ppd.findAttr("ShortNickName")
|
||||
- if not attr: attr = ppd.findAttr("NickName")
|
||||
- if attr:
|
||||
- if attr.value.startswith(mfr):
|
||||
- makeandmodel = attr.value
|
||||
- else:
|
||||
- makeandmodel += ' ' + attr.value
|
||||
- else:
|
||||
- makeandmodel = ''
|
||||
+ attr = ppd.findAttr("NickName")
|
||||
+ if not attr:
|
||||
+ attr = ppd.findAttr("ModelName")
|
||||
+
|
||||
+ if attr.value:
|
||||
+ mfgmdl = cupshelpers.ppds.ppdMakeModelSplit (attr.value)
|
||||
+ (self.auto_make, self.auto_model) = mfgmdl
|
||||
|
||||
- (self.auto_make,
|
||||
- self.auto_model) = \
|
||||
- cupshelpers.ppds.ppdMakeModelSplit (makeandmodel)
|
||||
+ # Search for ppdname with that make-and-model
|
||||
+ self.loadPPDs ()
|
||||
+ ppds = self.ppds.getInfoFromModel (self.auto_make,
|
||||
+ self.auto_model)
|
||||
+ for ppd, info in ppds.iteritems ():
|
||||
+ if info.get ("ppd-make-and-model") == attr.value:
|
||||
+ self.auto_driver = ppd
|
||||
+ break
|
||||
+ else:
|
||||
+ self.auto_make = None
|
||||
+ self.auto_model = None
|
||||
+ self.auto_driver = None
|
||||
else:
|
||||
# Special CUPS names for a raw queue.
|
||||
self.auto_make = 'Generic'
|
||||
self.auto_model = 'Raw Queue'
|
||||
+ self.auto_driver = None
|
||||
|
||||
try:
|
||||
if self.dialog_mode == "ppd":
|
||||
@@ -4249,6 +4253,8 @@ class NewPrinterGUI(GtkGUI):
|
||||
if self.openprinting_query_handle != None:
|
||||
self.openprinting.cancelOperation (self.openprinting_query_handle)
|
||||
self.openprinting_query_handle = None
|
||||
+
|
||||
+ self.device = None
|
||||
return True
|
||||
|
||||
def on_btnNPBack_clicked(self, widget):
|
||||
@@ -4267,6 +4273,7 @@ class NewPrinterGUI(GtkGUI):
|
||||
self.busy (self.NewPrinterWindow)
|
||||
if page_nr == 1: # Device (first page)
|
||||
self.auto_make, self.auto_model = None, None
|
||||
+ self.auto_driver = None
|
||||
self.device.uri = self.getDeviceURI()
|
||||
if not self.install_hplip_plugin(self.device.uri):
|
||||
self.on_NPCancel(None)
|
||||
@@ -4434,6 +4441,7 @@ class NewPrinterGUI(GtkGUI):
|
||||
cupshelpers.ppds.ppdMakeModelSplit (make_model)
|
||||
self.auto_make = make
|
||||
self.auto_model = model
|
||||
+ self.auto_driver = ppdname
|
||||
if (status == self.ppds.STATUS_SUCCESS and \
|
||||
self.dialog_mode != "ppd"):
|
||||
self.exactdrivermatch = True
|
||||
@@ -6414,7 +6422,17 @@ class NewPrinterGUI(GtkGUI):
|
||||
ppds = self.ppds.getInfoFromModel(pmake, pmodel)
|
||||
|
||||
self.NPDrivers = self.ppds.orderPPDNamesByPreference(ppds.keys(),
|
||||
- self.jockey_installed_files)
|
||||
+ self.jockey_installed_files)
|
||||
+ if self.auto_driver and self.device:
|
||||
+ drivers = []
|
||||
+ for driver in self.NPDrivers:
|
||||
+ if driver == self.auto_driver:
|
||||
+ drivers.insert (0, driver)
|
||||
+ else:
|
||||
+ drivers.append (driver)
|
||||
+
|
||||
+ self.NPDrivers = drivers
|
||||
+
|
||||
for i in range (len(self.NPDrivers)):
|
||||
ppd = ppds[self.NPDrivers[i]]
|
||||
driver = ppd["ppd-make-and-model"]
|
||||
@@ -6426,7 +6444,12 @@ class NewPrinterGUI(GtkGUI):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
- if i == 0:
|
||||
+ if not self.device and self.auto_driver == self.NPDrivers[i]:
|
||||
+ iter = model.append ((driver + _(" (Current)"),))
|
||||
+ path = model.get_path (iter)
|
||||
+ self.tvNPDrivers.get_selection().select_path(path)
|
||||
+ self.tvNPDrivers.scroll_to_cell(path, None, True, 0.5, 0.0)
|
||||
+ elif self.device and i == 0:
|
||||
iter = model.append ((driver + _(" (recommended)"),))
|
||||
path = model.get_path (iter)
|
||||
self.tvNPDrivers.get_selection().select_path(path)
|
||||
@@ -6881,6 +6904,7 @@ class NewPrinterGUI(GtkGUI):
|
||||
checkppd = ppd
|
||||
|
||||
self.NewPrinterWindow.hide()
|
||||
+ self.device = None
|
||||
self.mainapp.populateList()
|
||||
|
||||
# Now select it.
|
@ -1,37 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/cupshelpers/ppds.py.foomatic-recommended system-config-printer-1.1.16/cupshelpers/ppds.py
|
||||
--- system-config-printer-1.1.16/cupshelpers/ppds.py.foomatic-recommended 2009-12-22 14:27:37.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/cupshelpers/ppds.py 2009-12-23 16:13:13.234214808 +0000
|
||||
@@ -248,14 +248,25 @@ def _getDriverType (ppdname, ppds=None):
|
||||
# Foomatic (generated) -- but which driver?
|
||||
if ppdname.find ("Generic")!= -1:
|
||||
return DRIVER_TYPE_FOOMATIC_GENERIC
|
||||
- if (ppds != None and
|
||||
- ppds.getInfoFromPPDName (ppdname).\
|
||||
- get ('ppd-make-and-model', '').find ("(recommended)") != -1):
|
||||
- if ppds.getInfoFromPPDName (ppdname).\
|
||||
- get ('ppd-make-and-model', '').find ("Postscript") != -1:
|
||||
- return DRIVER_TYPE_FOOMATIC_RECOMMENDED_POSTSCRIPT
|
||||
- else:
|
||||
- return DRIVER_TYPE_FOOMATIC_RECOMMENDED_NON_POSTSCRIPT
|
||||
+ if ppds != None:
|
||||
+ info = ppds.getInfoFromPPDName (ppdname)
|
||||
+ device_id = info.get ('ppd-device-id', '')
|
||||
+ id_dict = parseDeviceID (device_id)
|
||||
+ drv = id_dict.get ('DRV', '')
|
||||
+ drvfields = dict()
|
||||
+ for field in drv.split (','):
|
||||
+ if len (field) == 0:
|
||||
+ continue
|
||||
+ key = field[0]
|
||||
+ drvfields[key] = field[1:]
|
||||
+
|
||||
+ ppd_make_and_model = info.get ('ppd-make-and-model', '')
|
||||
+ if (drvfields.get ('R', '0') == '1' or
|
||||
+ ppd_make_and_model.find ("(recommended)") != -1):
|
||||
+ if ppd_make_and_model.find ("Postscript") != -1:
|
||||
+ return DRIVER_TYPE_FOOMATIC_RECOMMENDED_POSTSCRIPT
|
||||
+ else:
|
||||
+ return DRIVER_TYPE_FOOMATIC_RECOMMENDED_NON_POSTSCRIPT
|
||||
if ppdname.find ("-Postscript")!= -1:
|
||||
return DRIVER_TYPE_FOOMATIC_PS
|
||||
if ppdname.find ("-hpijs") != -1:
|
@ -1,31 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.ink-levels system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.ink-levels 2010-01-06 15:49:08.433408576 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-06 15:50:54.892284445 +0000
|
||||
@@ -2505,6 +2505,7 @@ class GUI(GtkGUI, monitor.Watcher):
|
||||
self.vboxMarkerLevels.remove (widget)
|
||||
|
||||
marker_info = dict()
|
||||
+ num_markers = 0
|
||||
for (attr, typ) in [('marker-colors', str),
|
||||
('marker-names', str),
|
||||
('marker-types', str),
|
||||
@@ -2521,10 +2522,18 @@ class GUI(GtkGUI, monitor.Watcher):
|
||||
except TypeError, s:
|
||||
debugprint ("%s value not coercible to %s: %s" %
|
||||
(attr, typ, s))
|
||||
- val = []
|
||||
+ val = map (lambda x: 0.0, val)
|
||||
|
||||
marker_info[attr] = val
|
||||
+ if num_markers == 0 or len (val) < num_markers:
|
||||
+ num_markers = len (val)
|
||||
|
||||
+ for attr in ['marker-colors', 'marker-names',
|
||||
+ 'marker-types', 'marker-levels']:
|
||||
+ if len (marker_info[attr]) > num_markers:
|
||||
+ debugprint ("Trimming %s from %s" %
|
||||
+ (marker_info[attr][num_markers:], attr))
|
||||
+ del marker_info[attr][num_markers:]
|
||||
|
||||
markers = map (lambda color, name, type, level:
|
||||
(color, name, type, level),
|
@ -1,13 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.jobviewer-exit system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.jobviewer-exit 2010-01-06 15:25:57.525409643 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-06 15:27:03.767283548 +0000
|
||||
@@ -2837,7 +2837,8 @@ class GUI(GtkGUI, monitor.Watcher):
|
||||
def on_quit_activate(self, widget, event=None):
|
||||
self.monitor.cleanup ()
|
||||
while len (self.jobviewers) > 0:
|
||||
- self.jobviewers[0].cleanup () # this will call on_jobviewer_exit
|
||||
+ # this will call on_jobviewer_exit
|
||||
+ self.jobviewers[0].on_delete_event ()
|
||||
del self.mainlist
|
||||
del self.printers
|
||||
gtk.main_quit()
|
@ -1,19 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/applet.py.notification-timeouts system-config-printer-1.1.16/applet.py
|
||||
--- system-config-printer-1.1.16/applet.py.notification-timeouts 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/applet.py 2010-01-06 15:43:24.219409075 +0000
|
||||
@@ -126,6 +126,7 @@ class NewPrinterNotification(dbus.servic
|
||||
n = pynotify.Notification (title, text, 'printer')
|
||||
if "actions" in pynotify.get_server_caps():
|
||||
n.set_urgency (pynotify.URGENCY_CRITICAL)
|
||||
+ n.set_timeout (pynotify.EXPIRES_NEVER)
|
||||
n.add_action ("setup-printer", _("Search"),
|
||||
lambda x, y:
|
||||
self.setup_printer (x, y, name, devid))
|
||||
@@ -182,6 +183,7 @@ class NewPrinterNotification(dbus.servic
|
||||
if "actions" in pynotify.get_server_caps():
|
||||
try:
|
||||
self.packagekit = installpackage.PackageKit ()
|
||||
+ n.set_timeout (pynotify.EXPIRES_NEVER)
|
||||
n.add_action ("install-driver", _("Install"),
|
||||
lambda x, y:
|
||||
self.install_driver (x, y,
|
@ -1,12 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.npinit-traceback system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.npinit-traceback 2010-01-06 15:38:44.618286232 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-06 15:38:54.800408801 +0000
|
||||
@@ -3974,7 +3974,7 @@ class NewPrinterGUI(GtkGUI):
|
||||
self.auto_make = devid_dict["MFG"]
|
||||
self.auto_model = devid_dict["MDL"]
|
||||
self.auto_driver = None
|
||||
- if not self.device or not self.device.id:
|
||||
+ if self.device and not self.device.id:
|
||||
self.device.id = devid
|
||||
self.device.id_dict = cupshelpers.parseDeviceID (devid)
|
||||
self.mainapp.devid = ""
|
@ -1,24 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.select-nonexistent-printer system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.select-nonexistent-printer 2010-01-07 12:42:21.062047874 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-07 12:42:33.235047115 +0000
|
||||
@@ -6896,6 +6896,8 @@ class NewPrinterGUI(GtkGUI):
|
||||
self.mainapp.cups.addPrinter(name, ppd=ppd)
|
||||
except cups.IPPError, (e, msg):
|
||||
self.show_IPP_Error(e, msg)
|
||||
+ self.mainapp.cups._end_operation ()
|
||||
+ return
|
||||
|
||||
self.mainapp.cups._end_operation ()
|
||||
|
||||
@@ -6923,6 +6925,11 @@ class NewPrinterGUI(GtkGUI):
|
||||
|
||||
iter = model.iter_next (iter)
|
||||
|
||||
+ if not self.mainapp.printers.has_key (name):
|
||||
+ # At this stage the printer has disappeared even though we
|
||||
+ # only added it moments ago.
|
||||
+ return
|
||||
+
|
||||
# Load information about the printer,
|
||||
# e.g. self.mainapp.server_side_options and self.mainapp.ppd
|
||||
# (both used below).
|
@ -1,13 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.serial-widgets system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.serial-widgets 2010-01-18 17:01:04.326559283 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-18 17:01:24.700559444 +0000
|
||||
@@ -5949,6 +5949,9 @@ class NewPrinterGUI(GtkGUI):
|
||||
break
|
||||
iter = model.iter_next(iter)
|
||||
nr += 1
|
||||
+
|
||||
+ if not iter:
|
||||
+ widget.set_active (0)
|
||||
else: # use optionvalues
|
||||
nr = optionvalues.index(
|
||||
option_dict[name])
|
@ -1,75 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/statereason.py.statereason-tmp system-config-printer-1.1.16/statereason.py
|
||||
--- system-config-printer-1.1.16/statereason.py.statereason-tmp 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/statereason.py 2010-01-18 17:24:22.301560654 +0000
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
-## Copyright (C) 2007, 2008, 2009 Tim Waugh <twaugh@redhat.com>
|
||||
-## Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
|
||||
+## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
+## Authors:
|
||||
+## Tim Waugh <twaugh@redhat.com>
|
||||
+## Jiri Popelka <jpopelka@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
|
||||
@@ -18,6 +20,7 @@
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
import cups
|
||||
+import os
|
||||
|
||||
_ = lambda x: x
|
||||
def set_gettext_function (fn):
|
||||
@@ -41,6 +44,7 @@ class StateReason:
|
||||
self.level = None
|
||||
self.canonical_reason = None
|
||||
self.connection = connection
|
||||
+ self._ppd = None
|
||||
|
||||
def get_printer (self):
|
||||
return self.printer
|
||||
@@ -125,21 +129,29 @@ class StateReason:
|
||||
elif self.get_level () == self.ERROR:
|
||||
title = _("Printer error")
|
||||
|
||||
- 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:
|
||||
+ if not self._ppd:
|
||||
+ try:
|
||||
+ f = self.connection.getPPD(self.printer)
|
||||
+ self._ppd = cups.PPD (f)
|
||||
+ os.unlink (f)
|
||||
+ except (cups.IPPError, OSError):
|
||||
+ pass
|
||||
+
|
||||
+ if self._ppd:
|
||||
+ try:
|
||||
+ schemes = ["text", "http", "help", "file"]
|
||||
+ localized_reason = ""
|
||||
+ for scheme in schemes:
|
||||
+ reason = self._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 RuntimeError:
|
||||
reason = self.get_reason()
|
||||
- except (cups.IPPError, RuntimeError):
|
||||
- reason = self.get_reason()
|
||||
|
||||
text = _("Printer '%s': '%s'.") % (self.get_printer (), reason)
|
||||
return (title, text)
|
@ -1,12 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/system-config-printer.py.typo system-config-printer-1.1.16/system-config-printer.py
|
||||
--- system-config-printer-1.1.16/system-config-printer.py.typo 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/system-config-printer.py 2009-12-23 14:54:15.138689711 +0000
|
||||
@@ -4564,7 +4564,7 @@ class NewPrinterGUI(GtkGUI):
|
||||
not self.device.type in ("socket", "lpd", "ipp",
|
||||
"http", "https", "bluetooth")):
|
||||
name = "%s %s" % (self.device.id_dict["MFG"],
|
||||
- elf.device.id_dict["MDL"])
|
||||
+ self.device.id_dict["MDL"])
|
||||
descr = "%s %s" % (self.device.id_dict["MFG"],
|
||||
self.device.id_dict["MDL"])
|
||||
except:
|
@ -1,26 +0,0 @@
|
||||
diff -up system-config-printer-1.1.16/userdefault.py.userdefault-traceback system-config-printer-1.1.16/userdefault.py
|
||||
--- system-config-printer-1.1.16/userdefault.py.userdefault-traceback 2009-09-01 12:08:33.000000000 +0100
|
||||
+++ system-config-printer-1.1.16/userdefault.py 2010-01-18 16:58:17.502559206 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
-## Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
|
||||
-## Copyright (C) 2007, 2008 Tim Waugh <twaugh@redhat.com>
|
||||
+## Copyright (C) 2006, 2007, 2008, 2010 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
|
||||
@@ -161,7 +161,11 @@ class UserDefaultPrompt:
|
||||
self.userdef.clear ()
|
||||
self.set_default_fn (self.name)
|
||||
else:
|
||||
- self.userdef.set (self.name)
|
||||
+ try:
|
||||
+ self.userdef.set (self.name)
|
||||
+ except Exception, e:
|
||||
+ print "Error setting default: %s" % repr (e)
|
||||
+
|
||||
self.refresh_fn ()
|
||||
|
||||
dialog.destroy ()
|
@ -6,31 +6,16 @@
|
||||
|
||||
Summary: A printer administration tool
|
||||
Name: system-config-printer
|
||||
Version: 1.1.16
|
||||
Release: 10%{?dist}
|
||||
Version: 1.1.90
|
||||
Release: 1%{?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.1/system-config-printer-%{version}.tar.xz
|
||||
Source0: http://cyberelk.net/tim/data/system-config-printer/1.2/%{name}-%{version}.tar.xz
|
||||
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-no-epydoc.patch
|
||||
Patch2: system-config-printer-typo.patch
|
||||
Patch3: system-config-printer-driver-pre-selection.patch
|
||||
Patch4: system-config-printer-foomatic-recommended.patch
|
||||
Patch5: system-config-printer-jobviewer-exit.patch
|
||||
Patch6: system-config-printer-npinit-traceback.patch
|
||||
Patch7: system-config-printer-notification-timeouts.patch
|
||||
Patch8: system-config-printer-select-nonexistent-printer.patch
|
||||
Patch9: system-config-printer-ink-levels.patch
|
||||
Patch10: system-config-printer-auth-no-pw.patch
|
||||
Patch11: system-config-printer-copy-crash.patch
|
||||
Patch12: system-config-printer-check-still-connecting.patch
|
||||
Patch13: system-config-printer-async-fallback.patch
|
||||
Patch14: system-config-printer-userdefault-traceback.patch
|
||||
Patch15: system-config-printer-serial-widgets.patch
|
||||
Patch16: system-config-printer-statereason-tmp.patch
|
||||
|
||||
BuildRequires: cups-devel >= 1.2
|
||||
BuildRequires: python-devel >= 2.4
|
||||
@ -91,21 +76,6 @@ printers.
|
||||
%prep
|
||||
%setup -q -a 1 -a 2
|
||||
%patch1 -p1 -b .no-epydoc
|
||||
%patch2 -p1 -b .typo
|
||||
%patch3 -p1 -b .driver-pre-selection
|
||||
%patch4 -p1 -b .foomatic-recommended
|
||||
%patch5 -p1 -b .jobviewer-exit
|
||||
%patch6 -p1 -b .npinit-traceback
|
||||
%patch7 -p1 -b .notification-timeouts
|
||||
%patch8 -p1 -b .select-nonexistent-printer
|
||||
%patch9 -p1 -b .ink-levels
|
||||
%patch10 -p1 -b .auth-no-pw
|
||||
%patch11 -p1 -b .copy-crash
|
||||
%patch12 -p1 -b .check-still-connecting
|
||||
%patch13 -p1 -b .async-fallback
|
||||
%patch14 -p1 -b .userdefault-traceback
|
||||
%patch15 -p1 -b .serial-widgets
|
||||
%patch16 -p1 -b .statereason-tmp
|
||||
|
||||
%build
|
||||
%configure --with-udev-rules --with-polkit-1
|
||||
@ -145,6 +115,7 @@ rm -rf %buildroot
|
||||
%doc --parents pycups-%{pycups_version}/{ChangeLog,README,NEWS,TODO,examples,html}
|
||||
%doc --parents pysmbc-%{pysmbc_version}/{ChangeLog,README,NEWS,TODO,test.py,html}
|
||||
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf
|
||||
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/printerdriversinstaller.conf
|
||||
%{python_sitearch}/cups.so
|
||||
%{python_sitearch}/cups-1.0-py%{pyver}.egg-info
|
||||
%{python_sitearch}/smbc.so
|
||||
@ -168,33 +139,32 @@ rm -rf %buildroot
|
||||
%doc ChangeLog README
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{name}-applet
|
||||
%{_bindir}/my-default-printer
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/AdvancedServerSettings.py*
|
||||
%{_datadir}/%{name}/asyncconn.py*
|
||||
%{_datadir}/%{name}/asyncipp.py*
|
||||
%{_datadir}/%{name}/asyncpk1.py*
|
||||
%{_datadir}/%{name}/asyncpk0.py*
|
||||
%{_datadir}/%{name}/authconn.py*
|
||||
%{_datadir}/%{name}/config.py*
|
||||
%{_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*
|
||||
%{_datadir}/%{name}/gtkinklevel.py*
|
||||
%{_datadir}/%{name}/gtkspinner.py*
|
||||
%{_datadir}/%{name}/gui.py*
|
||||
%{_datadir}/%{name}/HIG.py*
|
||||
%{_datadir}/%{name}/installdriver.py*
|
||||
%{_datadir}/%{name}/installpackage.py*
|
||||
%{_datadir}/%{name}/jobviewer.py*
|
||||
%{_datadir}/%{name}/monitor.py*
|
||||
%{_datadir}/%{name}/my-default-printer.py*
|
||||
%{_datadir}/%{name}/options.py*
|
||||
%{_datadir}/%{name}/optionwidgets.py*
|
||||
%{_datadir}/%{name}/PhysicalDevice.py*
|
||||
%{_datadir}/%{name}/ppdippstr.py*
|
||||
%{_datadir}/%{name}/ppdsloader.py*
|
||||
%{_datadir}/%{name}/probe_printer.py*
|
||||
%{_datadir}/%{name}/pysmb.py*
|
||||
%{_datadir}/%{name}/SearchCriterion.py*
|
||||
@ -209,11 +179,10 @@ rm -rf %buildroot
|
||||
%{_datadir}/%{name}/applet.py*
|
||||
%{_datadir}/%{name}/troubleshoot
|
||||
%{_datadir}/%{name}/icons
|
||||
%dir %{_datadir}/%{name}/glade
|
||||
%{_datadir}/%{name}/glade/*.glade
|
||||
%dir %{_datadir}/%{name}/ui
|
||||
%{_datadir}/%{name}/ui/*.glade
|
||||
%{_datadir}/applications/system-config-printer.desktop
|
||||
%{_datadir}/applications/manage-print-jobs.desktop
|
||||
%{_datadir}/applications/my-default-printer.desktop
|
||||
%{_sysconfdir}/xdg/autostart/print-applet.desktop
|
||||
%{_mandir}/man1/*
|
||||
|
||||
@ -222,6 +191,9 @@ rm -rf %buildroot
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Tue Jan 19 2010 Tim Waugh <twaugh@redhat.com> - 1.1.90-1
|
||||
- 1.1.90 development release.
|
||||
|
||||
* Tue Jan 19 2010 Tim Waugh <twaugh@redhat.com> - 1.1.16-10
|
||||
- Update pycups to 1.9.48.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user