~ubuntu-branches/debian/sid/wicd/sid

« back to all changes in this revision

Viewing changes to debian/patches/36-implement_tray-only.patch

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2011-10-17 22:18:06 UTC
  • Revision ID: package-import@ubuntu.com-20111017221806-99dnvqej5w7lm0qw
Tags: 1.7.0+ds1-7
* Standards-Version bump to 3.9.2, no changes needed
* Updated debian/copyright to match latest DEP-5
* Implement a -t/--tray switch to only run the wicd tray icon
  (36-implement_tray-only.patch) (Closes: #583684)
* Replace "cli" with "console" (to avoid the usage of "CLI", which is used
  by Mono applications) in wicd-cli's short description
  (Closes: #617328)
* Add Danish debconf translation, thanks to Joe Dalton
  (Closes: #621364)
* Add Serbian debconf translation, thanks to Zlatan Todoric
  (Closes: #635079, #635080)
* 34-dont_save_useless_config.patch: drop useless has_profile=False
  sections and more (Closes: #629364)
* Work-around adding non-existing users to debconf (Closes: #634051)
* Fix suspend scripts, they had old paths (37-fix_suspend_scripts.patch)
  (Closes: #635444)
* Fix search for libc in wicd/misc.py (38-fix_libc_ctype_linking.patch)
  (Closes: #636941)
* 39-fix_channel_digit_parsing.patch: support channels with more than
  2 digits (Closes: #640075)
* 40-checkbox_passwords.patch: add a checkbox to show/hide passwords
  (Closes: #573096) (LP: #476982)
* 41-add_new_templates.patch: new encryption templates (Closes: #641531)
* 42-support_new_urwid.patch: support urwid 1.0.0 (Closes: #645681)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: David Paleino <dapal@debian.org>
 
2
Subject: implement a -t/--tray switch to only run the tray icon
 
3
Forwarded: no
 
4
 
 
5
---
 
6
 gtk/wicd-client.py      |   18 ++++++++++++------
 
7
 other/wicd-tray.desktop |    2 +-
 
8
 2 files changed, 13 insertions(+), 7 deletions(-)
 
9
 
 
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.
 
14
 
 
15
 Arguments:
 
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):
 
21
 
 
22
     """
 
23
     try:
 
24
-        opts, args = getopt.getopt(sys.argv[1:], 'nhao', ['help', 'no-tray',
 
25
+        opts, args = getopt.getopt(sys.argv[1:], 'tnhao', ['help', 'no-tray',
 
26
+                                                         'tray',
 
27
                                                          'no-animate',
 
28
                                                          'only-notifications'])
 
29
     except getopt.GetoptError:
 
30
@@ -989,6 +991,9 @@ def main(argv):
 
31
         if opt in ('-h', '--help'):
 
32
             usage()
 
33
             sys.exit(0)
 
34
+        elif opt in ('-t', '--tray'):
 
35
+            use_tray = True
 
36
+            display_app = False
 
37
         elif opt in ('-n', '--no-tray'):
 
38
             use_tray = False
 
39
         elif opt in ('-a', '--no-animate'):
 
40
@@ -1005,14 +1010,15 @@ def main(argv):
 
41
     setup_dbus()
 
42
     atexit.register(on_exit)
 
43
     
 
44
-    if display_app and not use_tray or not ICON_AVAIL:
 
45
+    if display_app:
 
46
         the_gui = gui.appGui(standalone=True)
 
47
-        mainloop = gobject.MainLoop()
 
48
-        mainloop.run()
 
49
-        sys.exit(0)
 
50
+        if not use_tray or not ICON_AVAIL:
 
51
+            mainloop = gobject.MainLoop()
 
52
+            mainloop.run()
 
53
+            sys.exit(0)
 
54
 
 
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)
 
58
 
 
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
 
63
@@ -1,6 +1,6 @@
 
64
 [Desktop Entry]
 
65
 Categories=Application;Network;
 
66
-Exec=wicd-gtk
 
67
+Exec=wicd-gtk --tray
 
68
 GenericName=Network Manager
 
69
 Icon=wicd-gtk
 
70
 Icon[en_US]=wicd-gtk