[hamster-applet] fixed doubleclick, showing tags



commit 0979f751f0b8d14c3371e470660dee702c8a7c0b
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Nov 25 21:22:46 2009 +0000

    fixed doubleclick, showing tags

 hamster/applet.py |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/hamster/applet.py b/hamster/applet.py
index 976b839..b5e21c5 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -311,7 +311,12 @@ class HamsterApplet(object):
         self.treeview.append_column(stuff.ActivityColumn(name=1,
                                                          description=5,
                                                          category=6))
+
+
+        tag_cell = widgets.TagCellRenderer()
+        self.treeview.append_column(gtk.TreeViewColumn(_("Tags"), tag_cell, data=7))
         
+
         duration_cell = gtk.CellRendererText()
         duration_cell.set_property("xalign", 1)
         timeColumn = gtk.TreeViewColumn(_("Duration"), duration_cell, text=3)
@@ -603,10 +608,11 @@ class HamsterApplet(object):
                 if fact['category']:
                     activity = '%s %s' % (activity, fact['category'])
 
-                if fact['description']:
-                    activity = "%s, %s" % (activity, fact['description'])
+                tags = fact["tags"]
+                if fact["description"]:
+                    tags.append(fact["description"])
                     
-                runtime.storage.add_fact(activity)
+                runtime.storage.add_fact(activity, ", ".join(tags))
                 runtime.dispatcher.dispatch('panel_visible', False)
         
         



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