[hamster-applet] bring the toggle back. fixes bug 626964



commit 9046f72a0692ac291088f2629a59fb934a386224
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sun Aug 15 19:12:36 2010 +0100

    bring the toggle back. fixes bug 626964

 src/hamster-time-tracker |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/hamster-time-tracker b/src/hamster-time-tracker
index d81cd3f..7498258 100755
--- a/src/hamster-time-tracker
+++ b/src/hamster-time-tracker
@@ -480,16 +480,20 @@ if __name__ == "__main__":
     window = None
     if len(sys.argv) == 1:
         window = "main"
-    elif len(sys.argv) == 2 and sys.argv[1] in ("overview", "statistics", "edit", "preferences", "about"):
+    elif len(sys.argv) == 2 and sys.argv[1] in ("overview", "statistics", "edit", "preferences", "about", "toggle"):
         window = sys.argv[1]
     else:
         usage = _(
 """Hamster time tracker. Usage:
-  %(prog)s [overview|statistics|edit|preferences|about]
+  %(prog)s [overview|statistics|edit|preferences|about|toggle]
 """)
         sys.exit(usage % {'prog': sys.argv[0]})
 
-
+    if window == "toggle":
+        from hamster.client import Storage
+        storage = Storage()
+        storage.toggle()
+        sys.exit()
 
     from hamster.configuration import runtime, dialogs, conf
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]