1
From: David Paleino <dapal@debian.org>
2
Subject: implement a -t/--tray switch to only run the tray icon
6
gtk/wicd-client.py | 18 ++++++++++++------
7
other/wicd-tray.desktop | 2 +-
8
2 files changed, 13 insertions(+), 7 deletions(-)
10
--- wicd.orig/gtk/wicd-client.py
11
+++ wicd/gtk/wicd-client.py
12
@@ -913,6 +913,7 @@ wicd %s
13
wireless (and wired) connection daemon front-end.
16
+\t-t\t--tray\tRun the wicd tray icon only.
17
\t-n\t--no-tray\tRun wicd without the tray icon.
18
\t-h\t--help\t\tPrint this help information.
19
\t-a\t--no-animate\tRun the tray without network traffic tray animations.
20
@@ -974,7 +975,8 @@ def main(argv):
24
- opts, args = getopt.getopt(sys.argv[1:], 'nhao', ['help', 'no-tray',
25
+ opts, args = getopt.getopt(sys.argv[1:], 'tnhao', ['help', 'no-tray',
28
'only-notifications'])
29
except getopt.GetoptError:
30
@@ -989,6 +991,9 @@ def main(argv):
31
if opt in ('-h', '--help'):
34
+ elif opt in ('-t', '--tray'):
37
elif opt in ('-n', '--no-tray'):
39
elif opt in ('-a', '--no-animate'):
40
@@ -1005,14 +1010,15 @@ def main(argv):
42
atexit.register(on_exit)
44
- if display_app and not use_tray or not ICON_AVAIL:
46
the_gui = gui.appGui(standalone=True)
47
- mainloop = gobject.MainLoop()
50
+ if not use_tray or not ICON_AVAIL:
51
+ mainloop = gobject.MainLoop()
55
# Set up the tray icon GUI and backend
56
- tray_icon = TrayIcon(animate, displaytray=display_app)
57
+ tray_icon = TrayIcon(animate, displaytray=use_tray)
59
# Check to see if wired profile chooser was called before icon
60
# was launched (typically happens on startup or daemon restart).
61
--- wicd.orig/other/wicd-tray.desktop
62
+++ wicd/other/wicd-tray.desktop
65
Categories=Application;Network;
68
GenericName=Network Manager