[hamster-applet] simplified update, fixed bug with the dispatcher
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] simplified update, fixed bug with the dispatcher
- Date: Fri, 22 Jan 2010 10:19:25 +0000 (UTC)
commit dfde0847b079ddf578ab6b9e6c8f278a1143a2b3
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri Jan 22 10:18:49 2010 +0000
simplified update, fixed bug with the dispatcher
hamster/storage.py | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/hamster/storage.py b/hamster/storage.py
index 8fda37c..c7dce9c 100644
--- a/hamster/storage.py
+++ b/hamster/storage.py
@@ -88,19 +88,13 @@ class Storage(object):
self.end_transaction()
def update_fact(self, fact_id, activity_name, tags, start_time, end_time, description = None):
- now = datetime.datetime.now()
self.start_transaction()
-
- fact = self.get_fact(fact_id)
- if fact:
- self.__remove_fact(fact_id)
-
+ self.__remove_fact(fact_id)
result = self.__add_fact(activity_name, tags, start_time, end_time, description = description)
-
self.end_transaction()
if result:
- self.dispatch('day_updated', result['start_time'])
+ self.dispatch('day_updated')
return result
def get_activities(self, category_id = None):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]