[hamster-applet] checking all fact fields for equality check, not just id



commit f5743d0cbafd545ab27caecad90591e18234c381
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Aug 4 15:36:27 2010 +0100

    checking all fact fields for equality check, not just id

 src/hamster/widgets/facttree.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/hamster/widgets/facttree.py b/src/hamster/widgets/facttree.py
index 67d73db..152e95f 100644
--- a/src/hamster/widgets/facttree.py
+++ b/src/hamster/widgets/facttree.py
@@ -78,7 +78,15 @@ class FactRow(object):
         self.delta = fact['delta']
 
     def __eq__(self, other):
-        return isinstance(other, FactRow) and other.id == self.id
+        return isinstance(other, FactRow) and other.id == self.id \
+           and other.name == self.name \
+           and other.category == self.category \
+           and other.description == self.description \
+           and other.tags == self.tags \
+           and other.start_time == self.start_time \
+           and other.end_time == self.end_time \
+           and other.delta == self.delta
+
 
     def __hash__(self):
         return self.id



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