diff --git a/hplip-notification-exception.patch b/hplip-notification-exception.patch new file mode 100644 index 0000000..f0a7fb8 --- /dev/null +++ b/hplip-notification-exception.patch @@ -0,0 +1,23 @@ +diff -up hplip-3.10.9/ui4/systemtray.py.notification-exception hplip-3.10.9/ui4/systemtray.py +--- hplip-3.10.9/ui4/systemtray.py.notification-exception 2011-01-05 10:45:57.000000000 +0100 ++++ hplip-3.10.9/ui4/systemtray.py 2011-01-05 12:34:18.000000000 +0100 +@@ -27,6 +27,7 @@ import os + import signal + import os.path + import time ++import gobject + + + # Local +@@ -662,7 +663,10 @@ class SystemTrayApp(QApplication): + else: + n.set_timeout(TRAY_MESSAGE_DELAY) + +- n.show() ++ try: ++ n.show() ++ except gobject.GError: ++ log.error("Failed to show notification!") + + else: # Use "standard" message bubbles + icon = ERROR_STATE_TO_ICON.get(error_state, QSystemTrayIcon.Information) diff --git a/hplip.spec b/hplip.spec index ae9ed2d..669c8c9 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.10.9 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -44,6 +44,7 @@ Patch30: hplip-dbus-exception.patch Patch31: hplip-hpaio-segfault.patch Patch32: hplip-newline.patch Patch33: hplip-dbus-threads.patch +Patch34: hplip-notification-exception.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -285,6 +286,9 @@ done # Enable D-Bus threading (and require pygobject2) (bug #600932). %patch33 -p1 -b .dbus-threads +# Catch GError exception when notification showing failed (bug #665577). +%patch34 -p1 -b .notification-exception + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -511,6 +515,9 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Wed Jan 05 2011 Jiri Popelka 3.10.9-10 +- Catch GError exception when notification showing failed (bug #665577). + * Wed Dec 15 2010 Tim Waugh - 3.10.9-9 - Enable D-Bus threading (and require pygobject2) (bug #600932). - Fixed incorrect signal name in setup dialog (bug #653626).