diff options
Diffstat (limited to 'community/guake/guake-fix-notification.patch')
-rw-r--r-- | community/guake/guake-fix-notification.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/community/guake/guake-fix-notification.patch b/community/guake/guake-fix-notification.patch new file mode 100644 index 000000000..847dac10e --- /dev/null +++ b/community/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 + |