From: <cl...@us...> - 2003-03-09 20:00:26
|
Update of /cvsroot/todo-manager/todo-manager In directory sc8-pr-cvs1:/tmp/cvs-serv12167 Modified Files: interface.py Log Message: Cleanup and small bug fix for group filtering. Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/interface.py,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- interface.py 2 Jan 2003 02:42:37 -0000 1.39 +++ interface.py 9 Mar 2003 20:00:14 -0000 1.40 @@ -29,6 +29,7 @@ self._font = None self.__sorting_method = IntVar() self.__filter_method = IntVar() + self.__current_group = None self.__disable_finish = IntVar() self.__view_calendar = IntVar() self.__calendar_filter = IntVar() @@ -306,6 +307,7 @@ self.update_groups() else: + self.__current_group = None self._groupList = Label(self._extrasframe, bd=0, width=0) self._groupList.grid() self._groupScroll = Label(self._extrasframe, bd=0, width=0) @@ -557,7 +559,7 @@ self._finished['text'] = _("Finished") self.__modified_name = FALSE - def OnDisplayPriorityDropdown(self, x, y): + def OnDisplayPriorityDropdown(self, event=None): dd = self.__priority_dropdown dd.withdraw() # Incase it's already displayed dd.focus_set() @@ -611,11 +613,10 @@ filter_method = self.__filter_method.get() # Get the group that is currently active - g = None if self.__view_group_list.get(): i = self._groupList.curselection() if len(i) > 0: - g = self._groupList.get(int(i[0])) + self.__current_group = self._groupList.get(int(i[0])) # The sorting and filter settings must be in the range of the available values # If they aren't, set them to 0 @@ -631,7 +632,7 @@ self.__filter_method.set(0) f = 0 - self._app.set_ui_sorting_filter(self, s, f, g) + self._app.set_ui_sorting_filter(self, s, f, self.__current_group) def OnExit(self, event=None): self.save_config() @@ -657,8 +658,7 @@ tags=(tag, ptag)) # Tag bindings - canvas.tag_bind(ptag, '<Button-1>', lambda e, s=self, x=x, y=y: - s.OnDisplayPriorityDropdown(100, 100)) + canvas.tag_bind(ptag, '<Button-1>', self.OnDisplayPriorityDropdown) def draw_finished_box(self, canvas, row, column, x, y, tag): name = self._taskList.get_column_text(row, 1) |