[guake] Re-add the fix notification patch and include it in the build
Pierre-YvesChibon
pingou at fedoraproject.org
Fri Jul 27 09:15:11 UTC 2012
commit 4b4a0a1b929c256a93528aaf0d4fe4bf7c887110
Author: Pierre-Yves Chibon <pingou at pingoured.fr>
Date: Fri Jul 27 11:14:38 2012 +0200
Re-add the fix notification patch and include it in the build
0001-Fix-notification.patch | 59 +++++++++++++++++++++++++++++++++++++++++++
guake.spec | 7 ++++-
2 files changed, 65 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-notification.patch b/0001-Fix-notification.patch
new file mode 100644
index 0000000..1d7a11a
--- /dev/null
+++ b/0001-Fix-notification.patch
@@ -0,0 +1,59 @@
+From 855be1063f201a0fcc8c37efe3c59bde17801a32 Mon Sep 17 00:00:00 2001
+From: Pierre-Yves Chibon <pingou at pingoured.fr>
+Date: Fri, 27 Jul 2012 09:40:03 +0200
+Subject: [PATCH] Fix notification
+
+With this commit we prevent guake from using the pynotify module
+if this one does not work or is not properly installed.
+---
+ src/guake | 20 +++++++++++++++++---
+ 1 files changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/src/guake b/src/guake
+index 6d8f9c5..9da941c 100644
+--- a/src/guake
++++ b/src/guake
+@@ -54,7 +54,10 @@ from guake.globals import NAME, VERSION, LOCALE_DIR, KEY, GCONF_PATH, \
+ 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'
+
+@@ -648,7 +651,13 @@ class Guake(SimpleGladeApp):
+ '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
+@@ -657,7 +666,12 @@ class Guake(SimpleGladeApp):
+ _('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
+--
+1.7.7.6
+
diff --git a/guake.spec b/guake.spec
index f0793a6..f0e82f2 100644
--- a/guake.spec
+++ b/guake.spec
@@ -1,6 +1,6 @@
Name: guake
Version: 0.4.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Drop-down terminal for GNOME
Group: Applications/System
@@ -8,6 +8,7 @@ License: GPLv2+
URL: http://www.guake.org/
Source0: http://guake.org/files/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-focus-issue-on-gnome-shell.patch
+Patch1: 0001-Fix-notification.patch
# Not used here -- official release --
#Source0: %{name}-%{version}.20090321git.tar.gz
@@ -43,6 +44,7 @@ sed -i -e 's|if test -z "$ac_pvte_result"; then|if test -z "" ; then|g' configur
sed -i -e "s|include <glib/gtypes.h>|include <glib.h>|" src/globalhotkeys/keybinder.h
%patch0 -p1 -b .
+%patch1 -p1 -b .
%build
%configure --disable-schemas-install --disable-static
@@ -100,6 +102,9 @@ killall -HUP gconfd-2 > /dev/null || :
%{_datadir}/icons/hicolor/*/apps/%{name}*.png
%changelog
+* Fri Jul 27 2012 Pierre-Yves Chibon <pingou at pingoured.fr> - 0.4.4-2
+- Re-add the fix notification patch
+
* Fri Jul 27 2012 Pierre-Yves Chibon <pingou at pingoured.fr> - 0.4.4-1
- Update to 0.4.4
- Clean a little bit the spec according to new guidelines
More information about the scm-commits
mailing list