File system-config-printer-bnc596445-global-notification.patch of Package system-config-printer
Index: system-config-printer-1.0.8/applet.py
===================================================================
--- system-config-printer-1.0.8.orig/applet.py
+++ system-config-printer-1.0.8/applet.py
@@ -255,6 +255,7 @@ class NewPrinterNotificationCupsAutoconf
print >> sys.stderr, "Error in cups-autoconfig integration: %s" % e
def printer_added (self, udi, properties):
+ global n1
if properties.get('printer.configured_existing'):
return
@@ -263,21 +264,21 @@ class NewPrinterNotificationCupsAutoconf
name = properties.get('printer.display_name')
text = _("`%s' is ready for printing.") % name
- n = pynotify.Notification (title, text, 'printer')
- n.set_urgency (pynotify.URGENCY_NORMAL)
- n.add_action ("configure", _("Configure"),
+ n1 = pynotify.Notification (title, text, 'printer')
+ n1.set_urgency (pynotify.URGENCY_NORMAL)
+ n1.add_action ("configure", _("Configure"),
lambda x, y: self.configure (x, y, name))
else:
title = _("Printer plugged")
text = _("The printer could not be automatically configured.") % name
- n = pynotify.Notification (title, text, 'printer')
- n.set_urgency (pynotify.URGENCY_NORMAL)
- n.add_action ("configure", _("Configure"),
+ n1 = pynotify.Notification (title, text, 'printer')
+ n1.set_urgency (pynotify.URGENCY_NORMAL)
+ n1.add_action ("configure", _("Configure"),
lambda x, y: self.launch (x, y))
- n.show ()
+ n1.show ()
def configure (self, notification, action, name):
self.run_config_tool (["--configure-printer", name])