hamster-applet r633 - trunk/hamster



Author: tbaugis
Date: Fri Nov 21 09:54:44 2008
New Revision: 633
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=633&view=rev

Log:
fixed newly introduced crasher with evolution tasks.
fixes bug 558912, patch with modifications by Islam Amer

Modified:
   trunk/hamster/add_custom_fact.py
   trunk/hamster/applet.py
   trunk/hamster/eds.py

Modified: trunk/hamster/add_custom_fact.py
==============================================================================
--- trunk/hamster/add_custom_fact.py	(original)
+++ trunk/hamster/add_custom_fact.py	Fri Nov 21 09:54:44 2008
@@ -164,8 +164,9 @@
         # finally add TODO tasks from evolution to both lists
         tasks = hamster.eds.get_eds_tasks()
         for activity in tasks:
-            self.activities.append([activity['name']])
-            store.append([activity['name'], -1])
+            activity_category = "%s %s" % (activity['name'], activity['category'])
+            self.activities.append([activity['name'],activity['category'],activity_category])
+            store.append([activity['name'], activity['category'], activity_category])
 
         return True
 

Modified: trunk/hamster/applet.py
==============================================================================
--- trunk/hamster/applet.py	(original)
+++ trunk/hamster/applet.py	Fri Nov 21 09:54:44 2008
@@ -450,8 +450,9 @@
         # finally add TODO tasks from evolution to both lists
         tasks = hamster.eds.get_eds_tasks()
         for activity in tasks:
-            self.activities.append([activity['name']])
-            store.append([activity['name'], -1])
+            activity_category = "%s %s" % (activity['name'], activity['category'])
+            self.activities.append([activity['name'],activity['category'],activity_category])
+            store.append([activity['name'], activity['category'], activity_category])
 
         return True
 

Modified: trunk/hamster/eds.py
==============================================================================
--- trunk/hamster/eds.py	(original)
+++ trunk/hamster/eds.py	Fri Nov 21 09:54:44 2008
@@ -37,12 +37,15 @@
         if not sources:
             # BUG - http://bugzilla.gnome.org/show_bug.cgi?id=546825
             sources = [('default', 'default')]
+
         for source in sources:
+            category = source[0]
+
             data = ecal.open_calendar_source(source[1], ecal.CAL_SOURCE_TYPE_TODO)
             if data:
                 for task in data.get_all_objects():
-                    if task.get_status() in [ecal.AL_STATUS_NONE, ecal.AL_STATUS_INPROCESS]:
-                        tasks.append({'name': task.get_summary()})
+                    if task.get_status() in [ecal.ICAL_STATUS_NONE, ecal.ICAL_STATUS_INPROCESS]:
+                        tasks.append({'name': task.get_summary(), 'category' : category})
         return tasks
     except Exception, e: # TODO's are not priority - print warning and go home
         print e 



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