[hamster-applet/gnome-2-26] On midnight task switch take with us also category and description. Fixes bug 579417



commit c69a2c7540c074a84ca58da5a60512836d2ee558
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sat Apr 18 18:11:45 2009 +0100

    On midnight task switch take with us also category and description. Fixes bug 579417
---
 hamster/applet.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/hamster/applet.py b/hamster/applet.py
index 9536323..c91db73 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -407,7 +407,12 @@ class HamsterApplet(object):
             # if we have date change - let's finish previous task and start a new one
             if prev_date and prev_date != self.today: 
                 storage.touch_fact(self.last_activity)
-                storage.add_fact(self.last_activity['name'])
+                activity_name = self.last_activity['name']
+                if self.last_activity['category']:
+                    activity_name += "@%s" % self.last_activity['category']
+                if self.last_activity['description']:
+                    activity_name += ",%s" % self.last_activity['description']
+                storage.add_fact(activity_name)
             elif self.button.get_active(): # otherwise if we the day view is visible - update day's durations
                 self.load_day()
                     



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