Fix Notify.Notification creation (bug #974845).
This commit is contained in:
parent
b00b5e01d3
commit
fde088d6df
73
system-config-printer-notification-new.patch
Normal file
73
system-config-printer-notification-new.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
diff -up system-config-printer-1.4.1/applet.py.notification-new system-config-printer-1.4.1/applet.py
|
||||||
|
--- system-config-printer-1.4.1/applet.py.notification-new 2013-06-20 10:29:22.210332443 +0200
|
||||||
|
+++ system-config-printer-1.4.1/applet.py 2013-06-20 10:31:35.804055082 +0200
|
||||||
|
@@ -80,9 +80,9 @@ class NewPrinterNotification(dbus.servic
|
||||||
|
def GetReady (self):
|
||||||
|
TIMEOUT=1200000
|
||||||
|
if self.getting_ready == 0:
|
||||||
|
- n = Notify.Notification (_("Configuring new printer"),
|
||||||
|
- _("Please wait..."),
|
||||||
|
- 'printer')
|
||||||
|
+ n = Notify.Notification.new (_("Configuring new printer"),
|
||||||
|
+ _("Please wait..."),
|
||||||
|
+ 'printer')
|
||||||
|
n.set_timeout (TIMEOUT + 5000)
|
||||||
|
n.closed = False
|
||||||
|
n.connect ('closed', self.on_notification_closed)
|
||||||
|
@@ -120,7 +120,7 @@ class NewPrinterNotification(dbus.servic
|
||||||
|
text = _("No printer driver for %s.") % device
|
||||||
|
else:
|
||||||
|
text = _("No driver for this printer.")
|
||||||
|
- n = Notify.Notification (title, text, 'printer')
|
||||||
|
+ n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
n.set_urgency (Notify.Urgency.CRITICAL)
|
||||||
|
n.set_timeout (Notify.EXPIRES_NEVER)
|
||||||
|
@@ -169,7 +169,7 @@ class NewPrinterNotification(dbus.servic
|
||||||
|
pkgs = reduce (lambda x,y: x + ", " + y, missing_pkgs)
|
||||||
|
title = _("Install printer driver")
|
||||||
|
text = _("`%s' requires driver installation: %s.") % (name, pkgs)
|
||||||
|
- n = Notify.Notification (title, text)
|
||||||
|
+ n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
import installpackage
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
try:
|
||||||
|
@@ -192,7 +192,7 @@ class NewPrinterNotification(dbus.servic
|
||||||
|
elif status == self.STATUS_SUCCESS:
|
||||||
|
devid = "MFG:%s;MDL:%s;DES:%s;CMD:%s;" % (mfg, mdl, des, cmd)
|
||||||
|
text = _("`%s' is ready for printing.") % name
|
||||||
|
- n = Notify.Notification (title, text)
|
||||||
|
+ n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
n.set_urgency (Notify.Urgency.NORMAL)
|
||||||
|
n.add_action ("test-page", _("Print test page"),
|
||||||
|
@@ -204,7 +204,7 @@ class NewPrinterNotification(dbus.servic
|
||||||
|
devid = "MFG:%s;MDL:%s;DES:%s;CMD:%s;" % (mfg, mdl, des, cmd)
|
||||||
|
text = (_("`%s' has been added, using the `%s' driver.") %
|
||||||
|
(name, driver))
|
||||||
|
- n = Notify.Notification (title, text, 'printer')
|
||||||
|
+ n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
n.set_urgency (Notify.Urgency.CRITICAL)
|
||||||
|
n.add_action ("test-page", _("Print test page"),
|
||||||
|
diff -up system-config-printer-1.4.1/jobviewer.py.notification-new system-config-printer-1.4.1/jobviewer.py
|
||||||
|
--- system-config-printer-1.4.1/jobviewer.py.notification-new 2013-06-20 10:29:22.211332429 +0200
|
||||||
|
+++ system-config-printer-1.4.1/jobviewer.py 2013-06-20 10:29:22.224332252 +0200
|
||||||
|
@@ -1731,7 +1731,7 @@ class JobViewer (GtkGUI):
|
||||||
|
urgency = Notify.Urgency.LOW
|
||||||
|
|
||||||
|
(title, text) = reason.get_description ()
|
||||||
|
- notification = Notify.Notification (title, text, 'printer')
|
||||||
|
+ notification = Notify.Notification.new (title, text, 'printer')
|
||||||
|
reason.user_notified = True
|
||||||
|
notification.set_urgency (urgency)
|
||||||
|
if self.notify_has_actions:
|
||||||
|
@@ -1784,7 +1784,7 @@ class JobViewer (GtkGUI):
|
||||||
|
return
|
||||||
|
|
||||||
|
printer = job.get ('job-printer-name', _("Unknown"))
|
||||||
|
- notification = Notify.Notification (_("Document printed"),
|
||||||
|
+ notification = Notify.Notification.new (_("Document printed"),
|
||||||
|
_("Document `%s' has been sent "
|
||||||
|
"to `%s' for printing.") %
|
||||||
|
(document.encode ('utf-8'),
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A printer administration tool
|
Summary: A printer administration tool
|
||||||
Name: system-config-printer
|
Name: system-config-printer
|
||||||
Version: 1.4.1
|
Version: 1.4.1
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -21,6 +21,7 @@ Patch12: system-config-printer-notify-urgency.patch
|
|||||||
Patch13: system-config-printer-pointer-grab.patch
|
Patch13: system-config-printer-pointer-grab.patch
|
||||||
Patch14: system-config-printer-np-traceback.patch
|
Patch14: system-config-printer-np-traceback.patch
|
||||||
Patch15: system-config-printer-rename.patch
|
Patch15: system-config-printer-rename.patch
|
||||||
|
Patch16: system-config-printer-notification-new.patch
|
||||||
|
|
||||||
BuildRequires: cups-devel >= 1.2
|
BuildRequires: cups-devel >= 1.2
|
||||||
BuildRequires: desktop-file-utils >= 0.2.92
|
BuildRequires: desktop-file-utils >= 0.2.92
|
||||||
@ -108,6 +109,13 @@ printers.
|
|||||||
# Fixed new printer dialog traceback (bug #969916).
|
# Fixed new printer dialog traceback (bug #969916).
|
||||||
%patch14 -p1 -b .np-traceback
|
%patch14 -p1 -b .np-traceback
|
||||||
|
|
||||||
|
# Use the right signal for spotting when editing is done when renaming
|
||||||
|
# a printer (bug #971404).
|
||||||
|
%patch15 -p1 -b .rename
|
||||||
|
|
||||||
|
# Fix Notify.Notification creation (bug #974845).
|
||||||
|
%patch16 -p1 -b .notification-new
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-udev-rules
|
%configure --with-udev-rules
|
||||||
|
|
||||||
@ -207,6 +215,10 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 20 2013 Jiri Popelka <jpopelka@redhat.com> - 1.4.1-7
|
||||||
|
- Fix Notify.Notification creation (bug #974845).
|
||||||
|
- Really apply patch for bug #971404.
|
||||||
|
|
||||||
* Fri Jun 7 2013 Tim Waugh <twaugh@redhat.com> 1.4.1-6
|
* Fri Jun 7 2013 Tim Waugh <twaugh@redhat.com> 1.4.1-6
|
||||||
- Use the right signal for spotting when editing is done when renaming
|
- Use the right signal for spotting when editing is done when renaming
|
||||||
a printer (bug #971404).
|
a printer (bug #971404).
|
||||||
|
Loading…
Reference in New Issue
Block a user