1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
|