Implemented the UI for adding new projects and changing their visibility
authorEd Page <eopage@byu.net>
Sat, 25 Apr 2009 01:54:11 +0000 (20:54 -0500)
committerEd Page <eopage@byu.net>
Sat, 25 Apr 2009 01:54:11 +0000 (20:54 -0500)
src/gtk_toolbox.py

index 6e5bbf7..5856f43 100644 (file)
@@ -868,16 +868,20 @@ class ProjectsDialog(object):
                self._projView.set_model(self._projList)
 
        def _on_add(self, eventData):
-               eventName, taskName, = eventData
-               # @todo
+               eventName, projectName, = eventData
+               self._manager.add_project(projectName)
                self._populate_projects()
 
        def _on_add_edit(self, eventData):
                self._on_add(eventData)
 
-       def _on_toggle_visibility(self, *args):
-               # @todo
-               pass
+       def _on_toggle_visibility(self, cell, path):
+               listIndex = path[0]
+               row = self._projList[listIndex]
+               projId = row[self.ID_IDX]
+               oldValue = row[self.VISIBILITY_IDX]
+               self._manager.set_project_visibility(projId, not oldValue)
+               row[self.VISIBILITY_IDX] = not oldValue
 
        def _on_proj_select(self, *args):
                # @todo