From: Ed Page Date: Sat, 25 Apr 2009 01:54:11 +0000 (-0500) Subject: Implemented the UI for adding new projects and changing their visibility X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=393afa83620e5b1338c12773d4791c1007f36ac4;p=doneit Implemented the UI for adding new projects and changing their visibility --- diff --git a/src/gtk_toolbox.py b/src/gtk_toolbox.py index 6e5bbf7..5856f43 100644 --- a/src/gtk_toolbox.py +++ b/src/gtk_toolbox.py @@ -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