You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(10) |
Jun
(50) |
Jul
(27) |
Aug
(53) |
Sep
(75) |
Oct
(42) |
Nov
(43) |
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(7) |
Feb
(6) |
Mar
(24) |
Apr
(10) |
May
(12) |
Jun
(1) |
Jul
|
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(7) |
Dec
(13) |
2004 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(3) |
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(7) |
Oct
(11) |
Nov
(20) |
Dec
(34) |
2009 |
Jan
(11) |
Feb
(13) |
Mar
(11) |
Apr
(21) |
May
(36) |
Jun
(22) |
Jul
(30) |
Aug
(9) |
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
2010 |
Jan
(9) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <cl...@us...> - 2002-08-07 06:52:06
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv18538 Modified Files: Tag: dev-bronze interface.py main.py Log Message: Fixed a bug with interface task names not always being up-to-date Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.59 retrieving revision 1.1.2.60 diff -u -d -r1.1.2.59 -r1.1.2.60 --- interface.py 6 Aug 2002 18:04:47 -0000 1.1.2.59 +++ interface.py 7 Aug 2002 06:52:02 -0000 1.1.2.60 @@ -32,6 +32,7 @@ self.__phantom_fields = FALSE self.__modified_name = FALSE self.__curdir = os.getcwd() + self.__task_names = [] master.title(appname) @@ -538,6 +539,7 @@ # Listbox commands elif command == "insert_list_item": + self.__task_names.append(args[0]) tasklist = self._taskList i = self._app.get_task_count() - 1 tasklist.insert_object(i, 0, self.draw_priority_box) @@ -584,12 +586,19 @@ self._taskList.insert_object(row, col, func) elif command == "remove_list_item": - i = self.get_listitem_index(args[0]) - self._taskList.delete_item(i) + try: + self.__task_names.remove(args[0]) + i = self.get_listitem_index(args[0]) + self._taskList.delete_item(i) + except ValueError: + pass + elif command == "update_list_items": self.__task_names = args[0] # Holds the tasks that should be displayed self.update_list() - elif command == "clear_list_items": self._taskList.delete_item(ALL) + elif command == "clear_list_items": + self.__task_names = [] + self._taskList.delete_item(ALL) # Plugins elif command == "add_plugin": Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.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 --- main.py 6 Aug 2002 19:17:37 -0000 1.1.2.40 +++ main.py 7 Aug 2002 06:52:02 -0000 1.1.2.41 @@ -174,7 +174,7 @@ for t in self.__tasks: names.append(t["Name"]) - return tuple(names) + return names def delete_task(self, name): """Remove a task from the list. The only argument is the task index.""" |
From: <cl...@us...> - 2002-08-06 19:17:44
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv25500 Modified Files: Tag: dev-bronze main.py Log Message: La di da Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.39 retrieving revision 1.1.2.40 diff -u -d -r1.1.2.39 -r1.1.2.40 --- main.py 6 Aug 2002 00:02:42 -0000 1.1.2.39 +++ main.py 6 Aug 2002 19:17:37 -0000 1.1.2.40 @@ -432,7 +432,8 @@ # Current filename file = self.__current_file if file: - file = os.path.split(file)[1] + if file == default_file: file = "DEFAULT" + else: file = os.path.split(file)[1] else: file = "Untitled" self.interface_call(interface, "set_current_filename", file) |
From: <cl...@us...> - 2002-08-06 18:04:51
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv22630 Modified Files: Tag: dev-bronze interface.py Log Message: This is less dumb Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.58 retrieving revision 1.1.2.59 diff -u -d -r1.1.2.58 -r1.1.2.59 --- interface.py 6 Aug 2002 17:26:44 -0000 1.1.2.58 +++ interface.py 6 Aug 2002 18:04:47 -0000 1.1.2.59 @@ -392,9 +392,7 @@ if self.__view_calendar.get() and self._calendar: y, m, d = self._calendar.GetSelDate() y = str(y)[2:] - if len(str(m)) < 2: m = "0%d" %m - if len(str(d)) < 2: d = "0%d" %d - t = "%s/%s/%s" %(m, d, y) + t = "%0.2d/%0.2d/%s" %(m, d, y) else: t = time.strftime("%m/%d/%y", time.localtime(time.time())) |
From: <cl...@us...> - 2002-08-06 17:35:53
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv8795 Modified Files: Tag: dev-bronze README.txt Log Message: A few small changes Index: README.txt =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/README.txt,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -d -r1.1.2.12 -r1.1.2.13 --- README.txt 10 Jul 2002 18:55:36 -0000 1.1.2.12 +++ README.txt 6 Aug 2002 17:35:50 -0000 1.1.2.13 @@ -7,6 +7,7 @@ FEATURES ======== * User selectable task sorting + * Task filters * Due dates * Task notes * Finished date and time @@ -29,7 +30,7 @@ time. If you have a nifty idea, send it my way. If you're lucky it will end up in my little peice of software, and yes I will give you credit for it. - To find out what's new check the ChangeLog in this folder. + To find out what's new, read the file ChangeLog.txt in this folder. STARTING THE PROGRAM -------------------- |
From: <cl...@us...> - 2002-08-06 17:26:48
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv3352 Modified Files: Tag: dev-bronze interface.py Log Message: Removed the 'Save current sorting mode' option Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.57 retrieving revision 1.1.2.58 diff -u -d -r1.1.2.57 -r1.1.2.58 --- interface.py 6 Aug 2002 00:02:42 -0000 1.1.2.57 +++ interface.py 6 Aug 2002 17:26:44 -0000 1.1.2.58 @@ -291,7 +291,6 @@ dlg._save_win_pos.set(app.get_setting(CONF_SECTION, "savewinposition", TRUE)) dlg._save_win_size.set(app.get_setting(CONF_SECTION, "savewinsize", TRUE)) - dlg._save_sorting_mode.set(app.get_setting(CONF_SECTION, "savesortingmode", FALSE)) dlg._show_priority.set(app.get_setting(CONF_SECTION, "showpriority", TRUE)) dlg._show_duedate.set(app.get_setting(CONF_SECTION, "showduedate", FALSE)) dlg._show_finished.set(app.get_setting(CONF_SECTION, "showfinished", TRUE)) @@ -318,7 +317,6 @@ app.save_setting(CONF_SECTION, "savewinposition", dlg._save_win_pos.get()) app.save_setting(CONF_SECTION, "savewinsize", dlg._save_win_size.get()) - app.save_setting(CONF_SECTION, "savesortingmode", dlg._save_sorting_mode.get()) app.save_setting(CONF_SECTION, "showpriority", dlg._show_priority.get()) app.save_setting(CONF_SECTION, "showduedate", dlg._show_duedate.get()) app.save_setting(CONF_SECTION, "showfinished", dlg._show_finished.get()) @@ -791,7 +789,6 @@ self._save_win_pos = IntVar() self._save_win_size = IntVar() self._startup_file = IntVar() - self._save_sorting_mode = IntVar() self._xoffset = IntVar() self._yoffset = IntVar() self._show_priority = IntVar() @@ -828,8 +825,6 @@ row=0, column=0, sticky=W) Checkbutton(frame, text="Save window size", variable=self._save_win_size).grid( row=0, column=1, sticky=W) - Checkbutton(frame, text="Save current sorting mode", variable=self._save_sorting_mode).grid( - row=1, column=0, sticky=W) Checkbutton(frame, text="Show Priority Column", variable=self._show_priority).grid( row=2, column=0, sticky=W) Checkbutton(frame, text="Show Due Date Column", variable=self._show_duedate).grid( |
From: <cl...@us...> - 2002-08-06 00:06:32
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv15269 Modified Files: Tag: dev-bronze ChangeLog.txt TODO.txt Log Message: I get more done every day. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/ChangeLog.txt,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -d -r1.1.2.8 -r1.1.2.9 --- ChangeLog.txt 4 Aug 2002 03:59:55 -0000 1.1.2.8 +++ ChangeLog.txt 6 Aug 2002 00:06:29 -0000 1.1.2.9 @@ -3,6 +3,10 @@ - This file only contains changes that have been made since the last release of ToDo Manager +(08/05/2002) + * Task sorting and filter plugin support. + * Added built-in sorting and filter functions. + (08/03/2002) * The core tells the interface what tasks to add to the list and what plugins are loaded Index: TODO.txt =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/TODO.txt,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -d -r1.1.2.6 -r1.1.2.7 --- TODO.txt 10 Jul 2002 13:30:21 -0000 1.1.2.6 +++ TODO.txt 6 Aug 2002 00:06:29 -0000 1.1.2.7 @@ -12,8 +12,6 @@ Interface: * The DueDate Entry should auto format the date and time - * Sorting modes - * Task filters * Redesign the Options dialog ObjectListbox: |
From: <cl...@us...> - 2002-08-06 00:02:45
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv13874 Modified Files: Tag: dev-bronze interface.py main.py Log Message: Task sorting and filters work now. Wohoo! They counter-act each other and won't overlap, I don't know if people want them to work like this or not. Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.56 retrieving revision 1.1.2.57 diff -u -d -r1.1.2.56 -r1.1.2.57 --- interface.py 5 Aug 2002 08:21:10 -0000 1.1.2.56 +++ interface.py 6 Aug 2002 00:02:42 -0000 1.1.2.57 @@ -25,6 +25,7 @@ self._app = app self._master = master self.__sorting_method = IntVar() + self.__filter_method = IntVar() self.__disable_finish = IntVar() self.__view_calendar = IntVar() self.__calendar_filter = IntVar() @@ -72,12 +73,22 @@ # Sorting menu self._sorting_menu = sorting = Menu(menu, tearoff=FALSE) - sorting.add_radiobutton(label="None", value=0, variable=self.__sorting_method) - sorting.add_radiobutton(label="Alphabetical", value=1, variable=self.__sorting_method) - sorting.add_radiobutton(label="Priority", value=2, variable=self.__sorting_method) - sorting.add_radiobutton(label="Due Date", value=3, variable=self.__sorting_method) + sorting.add_radiobutton(label="None", variable=self.__sorting_method, + command=lambda s=self: s._app.sorting_none(s)) + sorting.add_radiobutton(label="Alphabetical", variable=self.__sorting_method, + command=lambda s=self: s._app.sorting_alphabetical(s)) + sorting.add_radiobutton(label="Priority", variable=self.__sorting_method, + command=lambda s=self: s._app.sorting_priority(s)) sorting.add_separator() + # Filter menu + self._filter_menu = filter = Menu(menu, tearoff=FALSE) + filter.add_radiobutton(label="None", variable=self.__filter_method, + command=lambda s=self: s._app.sorting_none(s)) + filter.add_radiobutton(label="Show Unfinished", variable=self.__filter_method, + command=lambda s=self: s._app.filter_finished(s)) + filter.add_separator() + # Help menu help = Menu(menu, tearoff=FALSE) help.add_command(label="Help", underline=0, accelerator="F1", command=self.OnHelp) @@ -87,7 +98,8 @@ # 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="Sorting", underline=0, menu=sorting) + menu.add_cascade(label="Filters", underline=1, menu=filter) menu.add_cascade(label="Help", underline=0, menu=help) # The main interface, this is the really fun part @@ -592,6 +604,12 @@ elif p['type'] == "file_export": self._export_menu.add_command(label=p['name'], command=lambda p=p, s=self: s._app.exec_plugin(p['value'], s)) + elif p['type'] == "task_sorting": + self._sorting_menu.add_radiobutton(label=p['name'], variable=self.__sorting_method, + command=lambda p=p, s=self: s._app.exec_plugin(p['value'], s)) + elif p['type'] == "task_filter": + self._filter_menu.add_radiobutton(label=p['name'], variable=self.__filter_method, + command=lambda p=p, s=self: s._app.exec_plugin(p['value'], s)) def get_task_format(self, name): """Return the formating for the specified task""" Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.38 retrieving revision 1.1.2.39 diff -u -d -r1.1.2.38 -r1.1.2.39 --- main.py 5 Aug 2002 22:32:05 -0000 1.1.2.38 +++ main.py 6 Aug 2002 00:02:42 -0000 1.1.2.39 @@ -611,6 +611,39 @@ This software is distributed under the standard Python license. """ + # Built-in sorting and filter functions + def sorting_none(self, ui=None): + self.interface_call(ui, "update_list_items", self.__get_task_names()) + + def sorting_alphabetical(self, ui=None): + tasks = self.__dup_task_list() + names = [] + + for t in tasks: + names.append(t["Name"]) + + names.sort() + self.interface_call(ui, "update_list_items", names) + + def sorting_priority(self, ui=None): + tasks = self.__dup_task_list() + names = [] + + for i in range(5, 0, -1): + for t in tasks: + if t["Priority"] == i: names.append(t["Name"]) + + self.interface_call(ui, "update_list_items", names) + + def filter_finished(self, ui=None): + tasks = self.__dup_task_list() + names = [] + + for t in tasks: + if t["Finished"] == FALSE: names.append(t["Name"]) + + self.interface_call(ui, "update_list_items", names) + def __quit(self): """Stop all proccesses, save the configuration file, and destroy all task instances.""" |
From: <cl...@us...> - 2002-08-05 22:32:15
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv19298 Modified Files: Tag: dev-bronze main.py Log Message: Sorry Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.37 retrieving revision 1.1.2.38 diff -u -d -r1.1.2.37 -r1.1.2.38 --- main.py 5 Aug 2002 08:21:10 -0000 1.1.2.37 +++ main.py 5 Aug 2002 22:32:05 -0000 1.1.2.38 @@ -486,7 +486,7 @@ return try: - webbrowser.open(help_file) + webbrowser.open(url) except Exception: self.interface_call(ui, "display_error", "Browser Error", "A runnable web browser could not be found.") |
From: <cl...@us...> - 2002-08-05 08:21:13
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv30301 Modified Files: Tag: dev-bronze interface.py main.py Log Message: * New core function to handle opening urls * The homepage link in the about box works fine now I didn't even know this was broken until today Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.55 retrieving revision 1.1.2.56 diff -u -d -r1.1.2.55 -r1.1.2.56 --- interface.py 4 Aug 2002 03:53:53 -0000 1.1.2.55 +++ interface.py 5 Aug 2002 08:21:10 -0000 1.1.2.56 @@ -346,7 +346,7 @@ self._app.show_html_help(ui=self) def OnHelpAbout(self): - dlg = AboutDlg(self._master, "About " + appname, self._app.get_about_text()) + dlg = AboutDlg(self._master, self._app, self, "About %s" %appname) dlg.do_modal() def OnAdd(self, event=None): @@ -730,10 +730,11 @@ #------------------------------------------------------------------------------- class AboutDlg(Dialog): - def __init__(self, parent, title=None, about=""): + def __init__(self, parent, app, interface, title=None): Dialog.__init__(self, parent, title) - self.about = about + self.app = app + self.interface = interface def body(self, master): # Creating the controls @@ -741,14 +742,14 @@ Label(master, text=version, font=("courier new", 12, 'italic'), fg='darkblue').grid( row=0, column=1, sticky=SW) Button(master, text="http://todo-manager.sourceforge.net", fg='blue', - activeforeground='blue', bd=0, cursor='hand2', command=self.__OnSFSite).grid( + activeforeground='blue', bd=0, cursor='hand2', command=self.__OnHomePage).grid( row=3, columnspan=2, sticky=W) frame = Frame(master, bd=2, relief=SUNKEN) text = Text(frame, bd=0, relief=FLAT, width=48, height=8, wrap=WORD) scroll = Scrollbar(frame, command=text.yview) text.grid(row=0, column=0, sticky=NSEW) scroll.grid(row=0, column=1, sticky=NS) - text.insert('1.0', self.about) + text.insert('1.0', self.app.get_about_text()) text.config(state=DISABLED, yscrollcommand=scroll.set) frame.grid(row=4, column=0, columnspan=2, pady=4) @@ -759,8 +760,8 @@ self.bind('<Return>', self.ok) frame.pack(side=RIGHT) - def __OnSFSite(self): - webbrowser.open("http://todo-manager.sourceforge.net") + def __OnHomePage(self, event=None): + self.app.show_home_page(ui=self.interface) #------------------------------------------------------------------------------- class OptionsDlg(Dialog): Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.36 retrieving revision 1.1.2.37 diff -u -d -r1.1.2.36 -r1.1.2.37 --- main.py 5 Aug 2002 08:10:39 -0000 1.1.2.36 +++ main.py 5 Aug 2002 08:21:10 -0000 1.1.2.37 @@ -473,10 +473,16 @@ def show_html_help(self, ui=None): """Display the HTML help file.""" + self.__open_url(help_file, ui) + + def show_home_page(self, ui=None): + self.__open_url("http://todo-manager.sf.net", ui) + + def __open_url(self, url, ui=None): # If the user specified a web browser then use it if possible browser = self.get_setting("Core", "webbrowser", None) if browser: - os.system(browser %help_file) + os.system(browser %url) return try: |
From: <cl...@us...> - 2002-08-05 08:10:44
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv27758 Modified Files: Tag: dev-bronze main.py Log Message: Guess what? Chicken butt. I really haven't testing these yet so don't run around using them Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.35 retrieving revision 1.1.2.36 diff -u -d -r1.1.2.35 -r1.1.2.36 --- main.py 4 Aug 2002 03:53:53 -0000 1.1.2.35 +++ main.py 5 Aug 2002 08:10:39 -0000 1.1.2.36 @@ -561,13 +561,15 @@ elif p['type'] == 'file_export': self.__ext_save_file(func=p['function'], desc=p['name'], ext=p['format'], ui=ui) - # FIXME: Task sorting and filters - # These do not work correctly yet - elif p['type'] == 'task_sorting': - pass + elif (p['type'] == 'task_sorting') or (p['type'] == 'task_filter'): + tasks = p['function'](self.__dup_task_list()) - elif p['type'] == 'task_filter': - pass + # Get the names of the tasks that were returned + names = [] + for t in tasks: + names.append(t["Name"]) + + self.interface_call(ui, "update_list_items", names) def __dup_task_list(self): """Create a duplicate of the task list""" |
From: <cl...@us...> - 2002-08-04 03:59:59
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv18169 Modified Files: Tag: dev-bronze ChangeLog.txt Log Message: I'm not paranoid... Someone is singing about me. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/ChangeLog.txt,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- ChangeLog.txt 24 Jul 2002 03:42:41 -0000 1.1.2.7 +++ ChangeLog.txt 4 Aug 2002 03:59:55 -0000 1.1.2.8 @@ -3,6 +3,10 @@ - This file only contains changes that have been made since the last release of ToDo Manager +(08/03/2002) + * The core tells the interface what tasks to add to the list and what + plugins are loaded + (07/09/2002) * File import and export plugin support |
From: <cl...@us...> - 2002-08-04 03:53:56
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv17307 Modified Files: Tag: dev-bronze interface.py main.py Log Message: main.py: * now passes a list of tasks to the interface with update_list_items * Tells interfaces what tasks exist and what plugins are loaded when they are bound. interface.py: * Updated to work with new main.py functionality * Preparation for sorting and filter support Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.54 retrieving revision 1.1.2.55 diff -u -d -r1.1.2.54 -r1.1.2.55 --- interface.py 2 Aug 2002 21:15:44 -0000 1.1.2.54 +++ interface.py 4 Aug 2002 03:53:53 -0000 1.1.2.55 @@ -48,8 +48,8 @@ # File menu file = Menu(menu, tearoff=FALSE) - file.import_menu = Menu(menu, tearoff=FALSE) - file.export_menu = Menu(menu, tearoff=FALSE) + self._import_menu = file.import_menu = Menu(menu, tearoff=FALSE) + self._export_menu = file.export_menu = Menu(menu, tearoff=FALSE) file.add_command(label="New", underline=0, accelerator="Ctrl+N", command=self.OnNew) file.add_command(label="Open", underline=0, accelerator="Ctrl+O", command=self.OnOpen) @@ -65,36 +65,18 @@ file.add_separator() file.add_command(label="Exit", underline=1, accelerator="Alt+X", command=self.OnExit) - # File import plugins - plgs = self._app.get_plugins('file_import') - for p in plgs: - file.import_menu.add_command(label=p['name'], command=lambda p=p, s=self: - s._app.exec_plugin(p['value'], s)) - - # File export plugins - plgs = self._app.get_plugins('file_export') - for p in plgs: - file.export_menu.add_command(label=p['name'], command=lambda p=p, s=self: - s._app.exec_plugin(p['value'], s)) - # 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) + self._sorting_menu = sorting = Menu(menu, tearoff=FALSE) sorting.add_radiobutton(label="None", value=0, variable=self.__sorting_method) - sorting.add_radiobutton(label="Priority", value=1, variable=self.__sorting_method) - sorting.add_radiobutton(label="Due Date", value=2, variable=self.__sorting_method) - sorting.add_radiobutton(label="Status", value=3, variable=self.__sorting_method) - sorting.add_separator() - sorting.add_radiobutton(label="Day Filter", value=5, variable=self.__sorting_method) - sorting.add_radiobutton(label="Week Filter", value=6, variable=self.__sorting_method) - sorting.add_radiobutton(label="Month Filter", value=6, variable=self.__sorting_method) + sorting.add_radiobutton(label="Alphabetical", value=1, variable=self.__sorting_method) + sorting.add_radiobutton(label="Priority", value=2, variable=self.__sorting_method) + sorting.add_radiobutton(label="Due Date", value=3, variable=self.__sorting_method) sorting.add_separator() - sorting.add_radiobutton(label="Tasks Due", value=8, variable=self.__sorting_method) - sorting.add_radiobutton(label="Tasks Finished", value=9, variable=self.__sorting_method) # Help menu help = Menu(menu, tearoff=FALSE) @@ -233,7 +215,6 @@ self.load_config() self._taskList.update() # So the controls are fully drawn - self.update_list() def show_calendar(self, *args): # Delete all existing items in the frame @@ -597,9 +578,21 @@ elif command == "remove_list_item": i = self.get_listitem_index(args[0]) self._taskList.delete_item(i) - elif command == "update_list_items": self.update_list() + elif command == "update_list_items": + self.__task_names = args[0] # Holds the tasks that should be displayed + self.update_list() elif command == "clear_list_items": self._taskList.delete_item(ALL) + # Plugins + elif command == "add_plugin": + p = args[0] + if p['type'] == "file_import": + self._import_menu.add_command(label=p['name'], command=lambda p=p, s=self: + s._app.exec_plugin(p['value'], s)) + elif p['type'] == "file_export": + self._export_menu.add_command(label=p['name'], command=lambda p=p, s=self: + s._app.exec_plugin(p['value'], s)) + def get_task_format(self, name): """Return the formating for the specified task""" @@ -657,7 +650,7 @@ tasklist.delete_item(ALL) i = 0 - for name in app.get_task_names(): + for name in self.__task_names: if calfilter and self._calendar: duedate = app.get_task_value(name, "DueDate") Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.34 retrieving revision 1.1.2.35 diff -u -d -r1.1.2.34 -r1.1.2.35 --- main.py 3 Aug 2002 20:41:54 -0000 1.1.2.34 +++ main.py 4 Aug 2002 03:53:53 -0000 1.1.2.35 @@ -167,7 +167,7 @@ if t["Name"] == name: if t.has_key(key): return t[key] - def get_task_names(self): + def __get_task_names(self): """Return a tuple of the task names""" names = [] @@ -309,7 +309,7 @@ self.__file_modified = FALSE - self.interface_call(ALL, "update_list_items") + self.interface_call(ALL, "update_list_items", self.__get_task_names()) # See if the file that has just been loaded is the default file dir = os.path.dirname(__file__) @@ -437,19 +437,31 @@ self.interface_call(interface, "set_current_filename", file) + # The contents of the task list + self.interface_call(interface, "update_list_items", self.__get_task_names()) + + # Plugins that are loaded + plgs = plugin._loaded_plugins + for p in plgs: + a = p.copy() + del a['function'] + self.interface_call(interface, "add_plugin", a) + # The interface was bound successfully - return TRUE + return return FALSE def unbind_interface(self, interface): - """Unbind an interface that is closed or will be closed.""" + """Unbind an interface from the core.""" if interface in self.__interfaces: # If this is the only interface then ask if the current file should be saved if len(self.__interfaces) == 1: # If cancel was selected then stop if self.ask_save_curfile(interface) == -1: return FALSE + + self.interface_call(interface, "clear_list_items") self.__interfaces.remove(interface) # If there aren't any interfaces then call quit @@ -523,27 +535,11 @@ while 1: time.sleep(60.0) - for n in self.get_task_names(): + for n in self.__get_task_names(): # If the task is due, tell the interface if self.is_task_due(n)[1] == 0: self.interface_call(ALL, "display_warning","A Task Is Due", "The task \"%s\" is due." %n) - - def get_plugins(self, type): - """Get all of the loaded plugins of a certain type.""" - - plgs = plugin._loaded_plugins - - l = [] # The list of plugins to return - for p in plgs: - if p['type'] == type: - a = p.copy() - # Remove the function so it can't be called - del a['function'] - - l.append(a) - - return tuple(l) def exec_plugin(self, index, ui=None, *args): """Execute a plugin""" |
From: <cl...@us...> - 2002-08-03 20:41:57
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv3305 Modified Files: Tag: dev-bronze main.py tdmcalls.py Log Message: I've had a long day Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.33 retrieving revision 1.1.2.34 diff -u -d -r1.1.2.33 -r1.1.2.34 --- main.py 2 Aug 2002 16:44:33 -0000 1.1.2.33 +++ main.py 3 Aug 2002 20:41:54 -0000 1.1.2.34 @@ -617,7 +617,70 @@ del self.__tasks # Ah, just for kicks #------------------------------------------------------------------------------- +# The standard file format +class TaskFile: + def __init__(self, file): + self.__file = file + + def read_next_task(self): + store = FALSE # Determines when task values should be stored + attrs = [] # The task attributes + + while 1: + line = self.__file.readline() + if not line: break + line = line.strip() + if line == '': continue + elif line == "[TASK]": store = TRUE + elif line == "[ENDTASK]" and store: break + elif store: + # Parse the string value + try: + key, value = line.split("=") + except ValueError: continue + + # Change "special" characters to plain ones + value = value.replace("\\n", "\n") + value = value.replace("\\t", "\t") + + if value == "TRUE": value = TRUE + elif value == "FALSE": value = FALSE + + # A quick hack for backwards compatibility + if key == "NoFinish": + attrs.append(("DisableFinish", value)) + attrs.append((key, value)) + + # If its the end of the file then return None + if attrs == []: return None + + # Return the attributes found + return attrs + + def save_task(self, task): + file = self.__file + + file.write("[TASK]\n") + + for name, value in task.items(): + # unicode strings tend to crash the save routine and corrupt files + try: + if type(value) == type(u''): + value = value.encode('utf-8') + except: + pass + + # Change "special" characters so they can be written to one line + # Just hope that the user doesn't use these + value = str(value).replace("\n", "\\n") + value = value.replace("\t", "\\t") + + file.write("%s=%s\n" %(name, value)) + + file.write("[ENDTASK]\n") + +#------------------------------------------------------------------------------- _help_text = """ToDo Manager usage: python todo-manager.py [options] [filename] OPTIONS: Index: tdmcalls.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/tdmcalls.py,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -d -r1.1.2.13 -r1.1.2.14 --- tdmcalls.py 2 Aug 2002 21:15:44 -0000 1.1.2.13 +++ tdmcalls.py 3 Aug 2002 20:41:54 -0000 1.1.2.14 @@ -8,76 +8,7 @@ import time, calendar -# Variables -TRUE = 1 -FALSE = 0 - -#----------------------------------------------------------------------------- -# The main file format for ToDo Manager -class TaskFile: - def __init__(self, file): - self.__file = file - - def read_next_task(self): - store = FALSE # Determines when task values should be stored - attrs = [] # The task attributes - - while 1: - line = self.__file.readline() - if not line: break - line = line.strip() - if line == '': continue - elif line == "[TASK]": store = TRUE - elif line == "[ENDTASK]" and store: break - elif store: - # Parse the string value - try: - key, value = line.split("=") - except ValueError: continue - - # Change "special" characters to plain ones - value = value.replace("\\n", "\n") - value = value.replace("\\t", "\t") - - if value == "TRUE": value = TRUE - elif value == "FALSE": value = FALSE - - # A quick hack for backwards compatibility - if key == "NoFinish": - attrs.append(("DisableFinish", value)) - - attrs.append((key, value)) - - # If its the end of the file then return None - if attrs == []: return None - - # Return the attributes found - return attrs - - def save_task(self, task): - file = self.__file - - file.write("[TASK]\n") - - for name, value in task.items(): - # unicode strings tend to crash the save routine and corrupt files - try: - if type(value) == type(u''): - value = value.encode('utf-8') - except: - pass - - # Change "special" characters so they can be written to one line - # Just hope that the user doesn't use these - value = str(value).replace("\n", "\\n") - value = value.replace("\t", "\\t") - - file.write("%s=%s\n" %(name, value)) - - file.write("[ENDTASK]\n") - -# ---------------------------------------------------------------------------- -# Misc. functions +# Date and time functions def parse_date(date): try: ls = date.split() |
From: <cl...@us...> - 2002-08-02 21:15:47
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv13721 Modified Files: Tag: dev-bronze interface.py tdmcalls.py Log Message: If I'm not using 'string' for anything then why am I importing it? Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.53 retrieving revision 1.1.2.54 diff -u -d -r1.1.2.53 -r1.1.2.54 --- interface.py 2 Aug 2002 20:09:09 -0000 1.1.2.53 +++ interface.py 2 Aug 2002 21:15:44 -0000 1.1.2.54 @@ -13,7 +13,7 @@ import tkMessageBox from objectlistbox import * from controls import * -import string, os, sys, time +import os, sys, time from tdm_calendar import Calendar from tdmcalls import cmp_dates Index: tdmcalls.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/tdmcalls.py,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -d -r1.1.2.12 -r1.1.2.13 --- tdmcalls.py 14 Jul 2002 05:19:13 -0000 1.1.2.12 +++ tdmcalls.py 2 Aug 2002 21:15:44 -0000 1.1.2.13 @@ -6,7 +6,7 @@ # # All kinds of little things in here -import string, time, calendar +import time, calendar # Variables TRUE = 1 |
From: <cl...@us...> - 2002-08-02 20:09:16
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv18029 Modified Files: Tag: dev-bronze interface.py objectlistbox.py Log Message: The tasklist will update correctly on startup again Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.52 retrieving revision 1.1.2.53 diff -u -d -r1.1.2.52 -r1.1.2.53 --- interface.py 31 Jul 2002 17:49:23 -0000 1.1.2.52 +++ interface.py 2 Aug 2002 20:09:09 -0000 1.1.2.53 @@ -232,9 +232,8 @@ self.load_config() - # Draw the task list for the first time + self._taskList.update() # So the controls are fully drawn self.update_list() - self._taskList.update() # So the list is fully drawn def show_calendar(self, *args): # Delete all existing items in the frame @@ -359,6 +358,7 @@ tasklist.show_column(4, dlg._show_finished_time.get()) tasklist.update_columns() + tasklist.update() self.update_list() def OnHelp(self, event=None): Index: objectlistbox.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/objectlistbox.py,v retrieving revision 1.1.2.21 retrieving revision 1.1.2.22 diff -u -d -r1.1.2.21 -r1.1.2.22 --- objectlistbox.py 2 Aug 2002 04:49:15 -0000 1.1.2.21 +++ objectlistbox.py 2 Aug 2002 20:09:09 -0000 1.1.2.22 @@ -73,9 +73,6 @@ self._canvas.bind('<B1-Motion>', self.__OnItemLeftMove) self._canvas.bind('<ButtonRelease-1>', self.__OnItemLeftRelease) - # Update all pending tasks - self.update() - def __OnConfig(self, event=None): self._canvas.update() self.draw() @@ -169,7 +166,7 @@ Label(self._columnFrame, text=col[0], bd=1, relief=RAISED, anchor=col[1], width=col[2]).pack(side=LEFT, fill=X, expand=col[3]) - self.update() + self.draw() def insert_text(self, row, column, text, **kw): if not kw.has_key("color"): kw["color"] = self.__foreground @@ -383,12 +380,6 @@ # Alias config to configure since some people don't like to type a lot config = configure - - def update(self): - """Update the entire widget""" - #Frame.update(self) - #self._canvas.update() - self.draw() def __setitem__(self, key, value): self.configure({key: value}) |
From: <cl...@us...> - 2002-08-02 16:44:36
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv1646 Modified Files: Tag: dev-bronze main.py Log Message: Clever users will be able to use the web browser of their choosing. Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.32 retrieving revision 1.1.2.33 diff -u -d -r1.1.2.32 -r1.1.2.33 --- main.py 18 Jul 2002 18:00:15 -0000 1.1.2.32 +++ main.py 2 Aug 2002 16:44:33 -0000 1.1.2.33 @@ -461,6 +461,12 @@ def show_html_help(self, ui=None): """Display the HTML help file.""" + # If the user specified a web browser then use it if possible + browser = self.get_setting("Core", "webbrowser", None) + if browser: + os.system(browser %help_file) + return + try: webbrowser.open(help_file) except Exception: |
From: <cl...@us...> - 2002-08-02 04:49:20
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv10024 Modified Files: Tag: dev-bronze objectlistbox.py Log Message: This doesn't need to be here Index: objectlistbox.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/objectlistbox.py,v retrieving revision 1.1.2.20 retrieving revision 1.1.2.21 diff -u -d -r1.1.2.20 -r1.1.2.21 --- objectlistbox.py 31 Jul 2002 17:49:24 -0000 1.1.2.20 +++ objectlistbox.py 2 Aug 2002 04:49:15 -0000 1.1.2.21 @@ -170,7 +170,6 @@ width=col[2]).pack(side=LEFT, fill=X, expand=col[3]) self.update() - self.draw() def insert_text(self, row, column, text, **kw): if not kw.has_key("color"): kw["color"] = self.__foreground |
From: <cl...@us...> - 2002-07-31 17:49:27
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv5221 Modified Files: Tag: dev-bronze interface.py objectlistbox.py Log Message: The window frame can now be resized in some X window managers that had problems before (blackbox/fluxbox). The tasklist now draws weird on startup too. Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.51 retrieving revision 1.1.2.52 diff -u -d -r1.1.2.51 -r1.1.2.52 --- interface.py 24 Jul 2002 04:36:39 -0000 1.1.2.51 +++ interface.py 31 Jul 2002 17:49:23 -0000 1.1.2.52 @@ -122,7 +122,6 @@ width=330, height=110, itemcolor=app.get_setting(CONF_SECTION, "itembackground", 'gray90'), selectioncolor=app.get_setting(CONF_SECTION, "selecteditembackground", "#6A7F9E")) - tl.grid(row=1, column=1, sticky=NSEW) # Add the columns tl.insert_column(END, "", width=2, anchor=W, visible=int(app.get_setting(CONF_SECTION, "showpriority", TRUE))) @@ -134,6 +133,7 @@ tl.insert_column(END, "Finished Time", anchor=E, width=18, visible=int(app.get_setting(CONF_SECTION, "showfinishedtime", TRUE))) tl.update_columns() + tl.grid(row=1, column=1, sticky=NSEW) tl.set_item_leftclick(self.OnTaskLeftClick) tl.set_item_rightclick(self.OnTaskRightClick) @@ -233,8 +233,8 @@ self.load_config() # Draw the task list for the first time - self._taskList.update() # So the list is fully drawn before adding anything to it self.update_list() + self._taskList.update() # So the list is fully drawn def show_calendar(self, *args): # Delete all existing items in the frame Index: objectlistbox.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/objectlistbox.py,v retrieving revision 1.1.2.19 retrieving revision 1.1.2.20 diff -u -d -r1.1.2.19 -r1.1.2.20 --- objectlistbox.py 18 Jun 2002 17:11:56 -0000 1.1.2.19 +++ objectlistbox.py 31 Jul 2002 17:49:24 -0000 1.1.2.20 @@ -387,8 +387,8 @@ def update(self): """Update the entire widget""" - Frame.update(self) - self._canvas.update() + #Frame.update(self) + #self._canvas.update() self.draw() def __setitem__(self, key, value): |
From: <cl...@us...> - 2002-07-24 04:36:42
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv18870 Modified Files: Tag: dev-bronze interface.py Log Message: I'll learn how to spell one of these days Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.50 retrieving revision 1.1.2.51 diff -u -d -r1.1.2.50 -r1.1.2.51 --- interface.py 14 Jul 2002 05:38:15 -0000 1.1.2.50 +++ interface.py 24 Jul 2002 04:36:39 -0000 1.1.2.51 @@ -555,7 +555,7 @@ tasklist.insert_text(i, 1, args[0]) tasklist.insert_object(i, 3, self.draw_finished_box) elif command == "set_list_item_value": - # Get the tast format + # Get the task format col1, col2, font = self.get_task_format(args[0]) try: @@ -868,8 +868,8 @@ int(self._yoffset.get()) return TRUE except ValueError: - tkMessageBox.showwarning("Invalid Value", "The offset values are currently invalid."\ - "Only numercial settings are permitted.") + tkMessageBox.showwarning("Invalid Value", "The offset values are currently invalid.\n"\ + "Only numerical settings are permitted.") return FALSE def __OnConfigure(self): |
From: <cl...@us...> - 2002-07-24 03:42:44
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv15589 Modified Files: Tag: dev-bronze ChangeLog.txt Log Message: Formatting is very important to me. Just don't ask why it wasn't like this to begin with. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/ChangeLog.txt,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -d -r1.1.2.6 -r1.1.2.7 --- ChangeLog.txt 10 Jul 2002 13:27:31 -0000 1.1.2.6 +++ ChangeLog.txt 24 Jul 2002 03:42:41 -0000 1.1.2.7 @@ -13,10 +13,10 @@ (06/24/2002) * Reworking of the plugin architecture Plugins are now referenced by a unique plugin value. When a module - (interface, etc...) wants to call a plugin it tells the core that it - wants to execute plugin `n`, and passes any extra arguments. This way - the only part of the app that has direct access to the plugin functions - is the core. + (interface, etc...) wants to call a plugin it tells the core that it + wants to execute plugin `n`, and passes any extra arguments. This way + the only part of the app that has direct access to the plugin functions + is the core. (05/23/2002) * The core has been modified so it doesn't depend on task indexes anymore. |
From: <cl...@us...> - 2002-07-18 18:00:22
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv28843 Modified Files: Tag: dev-bronze main.py Log Message: * bind_interface now has a TRUE/FALSE return value * Interfaces will be told the current filename after they are bound Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.31 retrieving revision 1.1.2.32 diff -u -d -r1.1.2.31 -r1.1.2.32 --- main.py 17 Jul 2002 16:40:26 -0000 1.1.2.31 +++ main.py 18 Jul 2002 18:00:15 -0000 1.1.2.32 @@ -427,6 +427,21 @@ if not interface in self.__interfaces: self.__interfaces.append(interface) + # Tell the interface a few things it should know + + # Current filename + file = self.__current_file + if file: + file = os.path.split(file)[1] + else: file = "Untitled" + + self.interface_call(interface, "set_current_filename", file) + + # The interface was bound successfully + return TRUE + + return FALSE + def unbind_interface(self, interface): """Unbind an interface that is closed or will be closed.""" |
From: <cl...@us...> - 2002-07-18 03:10:40
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv24210 Modified Files: tdmcalls.py Log Message: A fix for saving unicode strings. Index: tdmcalls.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/tdmcalls.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- tdmcalls.py 21 Oct 2001 01:58:41 -0000 1.8 +++ tdmcalls.py 18 Jul 2002 03:10:37 -0000 1.9 @@ -44,9 +44,19 @@ def save_task(self, task): file = self.__file + # This will prevent it from trying to write unicode strings out to a file + name = task.name + notes = task.notes + try: + if (type(name) is type(u'')) or (type(notes) is type(u'')): + name = name.encode('utf-8') + notes = notes.encode('utf-8') + except: + pass + file.write("[TASK]\n") - file.write("Name=%s\n" %task.name) - file.write("Notes=%s\n" %task.notes) + file.write("Name=%s\n" %name) + file.write("Notes=%s\n" %notes) file.write("DueDate=%s\n" %task.due_date) file.write("NoFinish=%s\n" %(("FALSE", "TRUE")[task.no_finish])) file.write("FinishedDate=%s\n" %task.finished_date) |
From: <cl...@us...> - 2002-07-17 16:40:30
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv21025 Modified Files: Tag: dev-bronze main.py Log Message: Make sure a file exists before loading it. Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.30 retrieving revision 1.1.2.31 diff -u -d -r1.1.2.30 -r1.1.2.31 --- main.py 16 Jul 2002 18:27:19 -0000 1.1.2.30 +++ main.py 17 Jul 2002 16:40:26 -0000 1.1.2.31 @@ -279,6 +279,11 @@ if self.ask_save_curfile(ui) == -1: return + # Make sure the file exists before opening it + if not os.path.isfile(filename): + self.interface_call(ui, "display_error", "File Error", + "The file %s does not exist." %filename) + file = open(filename, 'r') if not func: |
From: <cl...@us...> - 2002-07-16 18:27:23
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv24512 Modified Files: Tag: dev-bronze main.py Log Message: The default file will now be saved on exit. Index: main.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/main.py,v retrieving revision 1.1.2.29 retrieving revision 1.1.2.30 diff -u -d -r1.1.2.29 -r1.1.2.30 --- main.py 10 Jul 2002 18:21:47 -0000 1.1.2.29 +++ main.py 16 Jul 2002 18:27:19 -0000 1.1.2.30 @@ -214,19 +214,24 @@ def do_file_save(self, ui): filename = self.__current_file - self.__ext_save_file(filename, ui=ui) + + # This will cause a saveas prompt to be displayed if the current file is the default file. + if filename == default_file: + filename = None + + return self.__ext_save_file(filename, ui=ui) def do_file_saveas(self, ui): - self.__ext_save_file(ui=ui) + return self.__ext_save_file(ui=ui) def __ext_save_file(self, filename=None, func=None, desc=None, ext=None, ui=None): if not func: desc = "ToDo Manager File" ext = "*.tmf" - if not filename or filename == default_file: + if not filename: filename = self.interface_call(ui, "file_saveas_prompt", desc, ext) - if not filename: return + if not filename: return FALSE if not os.path.splitext(filename)[1]: filename = "%s%s" %(filename, ext[1:]) @@ -243,6 +248,7 @@ file.close() + return TRUE def __save_file(self, file): """Save the current task list to a file.""" @@ -442,12 +448,12 @@ "A runnable web browser could not be found.") def ask_save_curfile(self, ui=None): - """Prompt the user to save the current file. This may be removed.""" + """Prompt the user to save the current file.""" if self.__file_modified: # If it's the default file save it and move on if self.__current_file == default_file: - self.__ext_save_file(default_file) + self.__ext_save_file(default_file, ui=ui) return ans = self.interface_call(ui, "ask_yes_no_cancel", "Current File", |
From: <cl...@us...> - 2002-07-14 05:38:17
|
Update of /cvsroot/todo-manager/todo-manager In directory usw-pr-cvs1:/tmp/cvs-serv11968 Modified Files: Tag: dev-bronze interface.py Log Message: Special indentation on the first notes line won't be destroyed Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v retrieving revision 1.1.2.49 retrieving revision 1.1.2.50 diff -u -d -r1.1.2.49 -r1.1.2.50 --- interface.py 11 Jul 2002 15:17:09 -0000 1.1.2.49 +++ interface.py 14 Jul 2002 05:38:15 -0000 1.1.2.50 @@ -376,7 +376,7 @@ if name: tasklist.start_draw_cache() app.add_task(name) - app.set_task_value(name, "DueDate", self._dueDate.get().strip(), ui=self) + app.set_task_value(name, "DueDate", self._dueDate.get().rstrip(), ui=self) app.set_task_value(name, "Notes", self._notesText.get('1.0', END).strip(), ui=self) app.set_task_value(name, "DisableFinish", self.__disable_finish.get(), ui=self) tasklist.end_draw_cache() |