[guake] Add patch for notification issues
Pierre-YvesChibon
pingou at fedoraproject.org
Mon Feb 27 08:16:13 UTC 2012
commit 01ff0cae271debca00c30f3a86ee127f3ebade6a
Author: Pierre-Yves Chibon <pingou at pingoured.fr>
Date: Mon Feb 27 09:16:00 2012 +0100
Add patch for notification issues
guake.fix.notification.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
guake.spec | 9 +++++++--
2 files changed, 49 insertions(+), 2 deletions(-)
---
diff --git a/guake.fix.notification.patch b/guake.fix.notification.patch
new file mode 100644
index 0000000..df0c461
--- /dev/null
+++ b/guake.fix.notification.patch
@@ -0,0 +1,42 @@
+--- a/src/guake.py 2011-02-09 20:00:35.000000000 +0100
++++ b/src/guake.py 2012-02-25 00:55:28.513075769 +0100
+@@ -46,7 +46,10 @@
+ TERMINAL_MATCH_EXPRS, TERMINAL_MATCH_TAGS, \
+ ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER
+
+-pynotify.init('Guake!')
++popup_works = True
++if not pynotify.init('Guake!') or pynotify.get_server_info() == None :
++ popup_works = False
++ print "WARNING: could not use popup notification"
+
+ GNOME_FONT_PATH = '/desktop/gnome/interface/monospace_font_name'
+
+@@ -637,7 +640,12 @@
+ 'Please use Guake Preferences dialog to choose another '
+ 'key (The trayicon was enabled)') % label, filename)
+ self.client.set_bool(KEY('/general/use_trayicon'), True)
+- notification.show()
++ if popup_works :
++ notification.show()
++ else :
++ print _('A problem happened when binding <b>%s</b> key.\n'
++ 'Please use Guake Preferences dialog to choose another '
++ 'key (The trayicon was enabled)') % label
+
+ elif self.client.get_bool(KEY('/general/use_popup')):
+ # Pop-up that shows that guake is working properly (if not
+@@ -646,7 +654,11 @@
+ _('Guake!'),
+ _('Guake is now running,\n'
+ 'press <b>%s</b> to use it.') % label, filename)
+- notification.show()
++ if popup_works :
++ notification.show()
++ else :
++ print _('Guake is now running,\n'
++ 'press <b>%s</b> to use it.') % label
+
+ def execute_command(self, command, tab=None):
+ """Execute the `command' in the `tab'. If tab is None, the
+
diff --git a/guake.spec b/guake.spec
index f0823d5..6df764a 100644
--- a/guake.spec
+++ b/guake.spec
@@ -1,13 +1,14 @@
Name: guake
Version: 0.4.2
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Drop-down terminal for GNOME
Group: Applications/System
License: GPLv2+
URL: http://www.guake.org/
Source0: http://guake.org/files/%{name}-%{version}.tar.gz
-Patch0: 0001-Retrieve-port-as-int.patch
+Patch0: 0001-Retrieve-port-as-int.patch
+Patch1: guake.fix.notification.patch
# Not used here -- official release --
#Source0: %{name}-%{version}.20090321git.tar.gz
@@ -42,6 +43,7 @@ and press again to hide.
sed -i -e 's|if test -z "$ac_pvte_result"; then|if test -z "" ; then|g' configure
%patch0 -p1 -b .
+%patch1 -p1 -b .
sed -i -e "s|include <glib/gtypes.h>|include <glib.h>|" src/globalhotkeys/keybinder.h
@@ -101,6 +103,9 @@ killall -HUP gconfd-2 > /dev/null || :
%{_sysconfdir}/xdg/autostart/%{name}.desktop
%changelog
+* Mon Feb 27 2012 Pierre-Yves Chibon <pingou at pingoured.fr> - 0.4.2-7
+- Fix notifications for non-GNOME DE not having the right library RHBZ#710586
+
* Sat Jan 14 2012 Pierre-Yves Chibon <pingou at pingoured.fr> - 0.4.2-6
- Fix FTBFS by remove some includes in the file keybinder.c
More information about the scm-commits
mailing list