[hamster-applet] unbreak dbus add_fact (currently suplement with empty tag list)
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] unbreak dbus add_fact (currently suplement with empty tag list)
- Date: Sat, 12 Dec 2009 00:33:50 +0000 (UTC)
commit 02d200540ea04226cc90ea70492252730624a59a
Author: Toms Bauģis <toms baugis gmail com>
Date: Sat Dec 12 00:32:41 2009 +0000
unbreak dbus add_fact (currently suplement with empty tag list)
fixes bug 604312
hamster/hamsterdbus.py | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/hamster/hamsterdbus.py b/hamster/hamsterdbus.py
index 7e1ec48..eed86a8 100644
--- a/hamster/hamsterdbus.py
+++ b/hamster/hamsterdbus.py
@@ -142,17 +142,15 @@ class HamsterDbusController(dbus.service.Object):
@dbus.service.method(HAMSTER_URI, out_signature='ss')
def GetCurrentActivity(self):
- """Returns the Activity currently being used, or blanks if Hamster is not tracking currently
- s activity: Activity name
- s category: Category name
- """
- last_activity = runtime.storage.get_last_activity()
- if last_activity:
- return (last_activity['name'] or '', last_activity['category'] or '')
- else:
- return ('', '')
-
-
+ """Returns the Activity currently being used, or blanks if Hamster is not tracking currently
+ s activity: Activity name
+ s category: Category name
+ """
+ last_activity = runtime.storage.get_last_activity()
+ if last_activity:
+ return (last_activity['name'] or '', last_activity['category'] or '')
+ else:
+ return ('', '')
@dbus.service.method(HAMSTER_URI, out_signature='as')
def GetCategories(self):
@@ -185,7 +183,7 @@ class HamsterDbusController(dbus.service.Object):
if end_time:
end = datetime.datetime.utcfromtimestamp(end_time)
- fact = runtime.storage.add_fact(activity, start, end)
+ fact = runtime.storage.add_fact(activity, "", start, end)
return fact['id']
@dbus.service.method(HAMSTER_URI, in_signature='ss')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]