Minor fixes found while working on packaging
[doneit] / src / rtm_view.py
index ecfdebf..1eb8516 100644 (file)
@@ -2,14 +2,14 @@
 @todo Add an agenda view to the task list
        Tree of days, with each successive 7 days dropping the visibility of further lower priority items
 @todo Add a map view
-               Using new api widgets people are developing)
-               Integrate GPS w/ fallback to default location
-               Use locations for mapping
+       Using new api widgets people are developing)
+       Integrate GPS w/ fallback to default location
+       Use locations for mapping
 @todo Add a quick search (OR within a property type, and between property types) view
-               Drop down for multi selecting priority
-               Drop down for multi selecting tags
-               Drop down for multi selecting locations
-               Calendar selector for choosing due date range
+       Drop down for multi selecting priority
+       Drop down for multi selecting tags
+       Drop down for multi selecting locations
+       Calendar selector for choosing due date range
 @todo Remove blocking operations from UI thread
 """
 
@@ -128,6 +128,9 @@ def item_sort_by_fuzzydate_then_priority(items):
 
 
 class ItemListView(object):
+       """
+       @bug Not all columns are visible on maemo
+       """
 
        ID_IDX = 0
        COMPLETION_IDX = 1
@@ -146,6 +149,7 @@ class ItemListView(object):
                self._showIncomplete = True
 
                self._editDialog = gtk_toolbox.EditTaskDialog(widgetTree)
+               self._notesDialog = gtk_toolbox.NotesDialog(widgetTree)
 
                self._itemList = gtk.ListStore(
                        gobject.TYPE_STRING, # id
@@ -287,16 +291,18 @@ class ItemListView(object):
                                        self._editDialog.disable()
                                self.reset_task_list(self._projId)
                        elif viewColumn is self._dueColumn:
-                               self._editDialog.enable(self._manager)
-                               try:
-                                       self._editDialog.request_task(self._manager, taskId)
-                               finally:
-                                       self._editDialog.disable()
-                               self.reset_task_list(self._projId)
+                               due = self._manager.get_task_details(taskId)["dueDate"]
+                               if due.is_good():
+                                       calendar = gtk_toolbox.PopupCalendar(None, due.get())
+                                       calendar.run()
                        elif viewColumn is self._linkColumn:
                                webbrowser.open(self._manager.get_task_details(taskId)["url"])
                        elif viewColumn is self._notesColumn:
-                               pass
+                               self._notesDialog.enable()
+                               try:
+                                       self._notesDialog.run(self._manager, taskId)
+                               finally:
+                                       self._notesDialog.disable()
                except StandardError, e:
                        self._errorDisplay.push_exception()