[hamster-applet/gnome-2-26] on doubleclick switch respect also category. fixes bug 586707
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Subject: [hamster-applet/gnome-2-26] on doubleclick switch respect also category. fixes bug 586707
- Date: Wed, 8 Jul 2009 12:11:39 +0000 (UTC)
commit e8283e404d04fb23141d5e0ac9ecb5b79317d0d7
Author: Toms Bauģis <toms baugis gmail com>
Date: Wed Jul 8 13:11:14 2009 +0100
on doubleclick switch respect also category. fixes bug 586707
hamster/applet.py | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/hamster/applet.py b/hamster/applet.py
index 8effd1d..30a8eff 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -636,14 +636,18 @@ class HamsterApplet(object):
else:
selection = tree.get_selection()
(model, iter) = selection.get_selected()
- activity_name = model[iter][1].decode('utf8', 'replace')
- if activity_name:
- description = model[iter][5]
- if description:
- description = description.decode('utf8', 'replace')
- activity_name = "%s, %s" % (activity_name, description)
-
- self.add_fact(activity_name)
+
+ fact = model[iter][6]
+ if fact:
+ activity = fact['name']
+ if fact['category']:
+ activity = '%s %s' % (activity, fact['category'])
+
+ if fact['description']:
+ activity = "%s, %s" % (activity, fact['description'])
+
+ print activity
+ #self.add_fact(activity)
def add_fact(self, activity_name):
if self.last_activity and self.last_activity['start_time'] != datetime.date.today():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]