From: <cl...@us...> - 2002-06-22 16:54:40
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv9222 Modified Files: Tag: dev-bronze interface.py Log Message: * The view menu is back and it is still only used to show the calendar. * New keybinding Ctrl+D to show the calendar * The 'Show Calendar' option is now 'Show Calendar on Startup' Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.40 retrieving revision 1.1.2.41 diff -u -d -r1.1.2.40 -r1.1.2.41 --- interface.py 22 Jun 2002 04:59:44 -0000 1.1.2.40 +++ interface.py 22 Jun 2002 16:54:37 -0000 1.1.2.41 @@ -63,6 +63,11 @@ file.add_separator() file.add_command(label="Exit", underline=1, accelerator="Alt+X", command=self.OnExit) + # View menu + view = Menu(menu, tearoff=FALSE) + view.add_checkbutton(label="Show Calendar", underline=0, accelerator="Ctrl+D", + variable=self.__view_calendar) + # Sorting menu sorting = Menu(menu, tearoff=FALSE) sorting.add_radiobutton(label="None", value=0, variable=self.__sorting_method) @@ -85,6 +90,7 @@ # Add the sub menus to the main menu menu.add_cascade(label="File", underline=0, menu=file) + menu.add_cascade(label="View", underline=0, menu=view) menu.add_cascade(label="Sorting", underline=0, menu=sorting, state=DISABLED) menu.add_cascade(label="Help", underline=0, menu=help) @@ -164,6 +170,10 @@ master.bind('<Control-f>', self.OnFinished); master.bind('<Control-F>', self.OnFinished) master.bind('<Control-l>', self.OnClearFields) master.bind('<Control-L>', self.OnClearFields) + master.bind('<Control-d>', lambda e, s=self: + s.__view_calendar.set(not s.__view_calendar.get())) + master.bind('<Control-D>', lambda e, s=self: + s.__view_calendar.set(not s.__view_calendar.get())) master.bind('<F1>', self.OnHelp) self._nameEntry.bind('<Return>', self.OnAdd) self._nameEntry.bind('<Tab>', lambda e, s=self: s.phantom_fields(0)) @@ -179,6 +189,7 @@ master.protocol('WM_DELETE_WINDOW', self.OnExit) self.__disable_finish.trace('w', self.OnDisableFinish) + self.__view_calendar.trace('w', self.show_calendar) # The priority dropdown window. This is tricky self.__priority_dropdown = dd = Toplevel(master, bd=0) @@ -209,7 +220,7 @@ self._taskList.update() # So the list is fully drawn before adding anything to it self.update_list() - def show_calendar(self, event=None): + def show_calendar(self, *args): # Delete all existing items in the frame for c in self._calframe.winfo_children(): c.destroy() @@ -324,9 +335,6 @@ tasklist.update_columns() self.update_list() - self.__view_calendar.set(dlg._show_calendar.get()) - self.show_calendar() - def OnHelp(self, event=None): self._app.show_html_help(ui=self) @@ -784,8 +792,8 @@ row=3, column=0, sticky=W) Checkbutton(frame, text="Show Finished Time Column", variable=self._show_finished_time).grid( row=3, column=1, sticky=W) - Checkbutton(frame, text="Show Calendar", variable=self._show_calendar).grid(row=4, - column=0, sticky=W) + Checkbutton(frame, text="Show Calendar on Startup", variable=self._show_calendar).grid( + row=4, column=0, sticky=W) frame.grid(row=1, column=0, ipadx=2, ipady=3, pady=4, sticky=NSEW) # Listbox colors |