[hamster-applet/gnome-2-26] never automatically delete a fact with description and allow to switch to same activity when descrip
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Subject: [hamster-applet/gnome-2-26] never automatically delete a fact with description and allow to switch to same activity when descrip
- Date: Mon, 18 May 2009 15:48:47 -0400 (EDT)
commit 98e659991ca2fd2b597fe2b2ff98bfb7ed624817
Author: Toms Bauģis <toms baugis gmail com>
Date: Mon May 18 20:45:56 2009 +0100
never automatically delete a fact with description and allow to switch to same activity when descriptions differ. fixes bug 581025
---
hamster/db.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hamster/db.py b/hamster/db.py
index 239e5e4..7d49a8d 100644
--- a/hamster/db.py
+++ b/hamster/db.py
@@ -278,13 +278,13 @@ class Storage(hamster.storage.Storage):
if last_fact['end_time'] == None and last_fact['start_time'] < start_time:
#if this is the same, ongoing activity, then there is no need to create another one
- if last_fact['activity_id'] == activity_id:
+ if not description and last_fact['activity_id'] == activity_id:
return last_fact
-
delta = (start_time - last_fact['start_time'])
- if 60 >= delta.seconds >= 0:
+ if not description and not last_fact["description"] \
+ and 60 >= delta.seconds >= 0:
self.__remove_fact(last_fact['id'])
start_time = last_fact['start_time']
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]