[hamster-applet] variable position mismatch. now stating the category explicitly.



commit b81815862d21b6ede15e4dfb94e26709d4c53408
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sun Apr 18 09:47:08 2010 +0100

    variable position mismatch.  now stating the category explicitly.

 src/hamster/edit_activity.py |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/hamster/edit_activity.py b/src/hamster/edit_activity.py
index 653f8e8..c37aa7a 100644
--- a/src/hamster/edit_activity.py
+++ b/src/hamster/edit_activity.py
@@ -186,8 +186,9 @@ class CustomFactController:
 
     def on_save_button_clicked(self, button):
         activity = self.new_name.get_text().decode("utf-8")
+        parsed = stuff.parse_activity_input(activity)
 
-        if not activity:
+        if not parsed.activity_name:
             return False
 
 
@@ -211,9 +212,20 @@ class CustomFactController:
             end_time = self._get_datetime("end")
 
         if self.fact_id:
-            runtime.storage.update_fact(self.fact_id, activity, tags, start_time, end_time, description)
+            runtime.storage.update_fact(self.fact_id,
+                                        parsed.activity_name,
+                                        tags,
+                                        start_time,
+                                        end_time,
+                                        parsed.category_name,
+                                        description)
         else:
-            runtime.storage.add_fact(activity, tags, start_time, end_time, description = description)
+            runtime.storage.add_fact(parsed.activity_name,
+                                     tags,
+                                     start_time,
+                                     end_time,
+                                     parsed.category_name,
+                                     description)
 
         self.close_window()
 



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