summaryrefslogtreecommitdiff
path: root/community-testing/guake/guake-fix-notification.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-17 01:15:52 -0700
committerroot <root@rshg054.dnsready.net>2012-10-17 01:15:52 -0700
commitc84b2cd310f86dc50c4f52a5907cb17652e8c87c (patch)
treeef3dc614b68e1e6f5966a5d29f3970e27bb7c4f9 /community-testing/guake/guake-fix-notification.patch
parent99d0ec7ebad2eda5f3a03098962e3b250e3bef4c (diff)
Wed Oct 17 01:14:52 PDT 2012
Diffstat (limited to 'community-testing/guake/guake-fix-notification.patch')
-rw-r--r--community-testing/guake/guake-fix-notification.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/community-testing/guake/guake-fix-notification.patch b/community-testing/guake/guake-fix-notification.patch
new file mode 100644
index 000000000..847dac10e
--- /dev/null
+++ b/community-testing/guake/guake-fix-notification.patch
@@ -0,0 +1,42 @@
+--- a/src/guake 2011-02-09 20:00:35.000000000 +0100
++++ b/src/guake 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
+