Merge lp:~turl/specto/no-window into lp:specto

Proposed by Emilio
Status: Merged
Merged at revision: 157
Proposed branch: lp:~turl/specto/no-window
Merge into: lp:specto
Diff against target: 50 lines (+9/-5)
2 files modified
spectlib/main.py (+8/-4)
spectlib/notifier.py (+1/-1)
To merge this branch: bzr merge lp:~turl/specto/no-window
Reviewer Review Type Date Requested Status
Specto development Pending
Review via email: mp+43031@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'spectlib/main.py'
2--- spectlib/main.py 2010-11-18 10:10:17 +0000
3+++ spectlib/main.py 2010-12-07 23:50:25 +0000
4@@ -56,7 +56,7 @@
5 GTK = False
6 else:
7 GTK = True
8- from spectlib.notifier import Notifier
9+ from spectlib.notifier import Notifier, INDICATOR
10
11
12 class Specto:
13@@ -103,17 +103,21 @@
14 self.GTK = True
15 self.CONSOLE = False
16 self.icon_theme = gtk.icon_theme_get_default()
17- self.notifier = Notifier(self)
18
19- if self.specto_gconf.get_entry("always_show_icon") == False:
20+ #allow users to hide the window on startup
21+ if sys.argv[1:] and "--no-window" in sys.argv[1:][0]:
22+ self.notifier_hide = True
23+ #always show if there's no icon and no indicator support
24+ elif self.specto_gconf.get_entry("always_show_icon") == False and not INDICATOR:
25 self.notifier_hide = False
26 elif self.specto_gconf.get_entry("show_notifier")==True:
27 self.notifier_hide = False
28- self.toggle_notifier()
29 elif self.specto_gconf.get_entry("show_notifier")==False:
30 self.notifier_hide = True
31 else:#just in case the entry was never created in gconf
32 self.notifier_keep_hidden = False
33+
34+ self.notifier = Notifier(self)
35 else:
36 sys.exit(0)
37
38
39=== modified file 'spectlib/notifier.py'
40--- spectlib/notifier.py 2010-11-18 10:13:31 +0000
41+++ spectlib/notifier.py 2010-12-07 23:50:25 +0000
42@@ -716,7 +716,7 @@
43 self.builder.get_object("display_all_watches").set_active(False)
44 self.startup = False
45
46- if self.specto.specto_gconf.get_entry("show_notifier") == True:
47+ if not self.specto.notifier_hide:
48 self.notifier.show()
49
50 ### Checkbox

Subscribers

People subscribed via source and target branches