From: <cl...@us...> - 2003-03-14 23:50:42
|
Update of /cvsroot/todo-manager/todo-manager In directory sc8-pr-cvs1:/tmp/cvs-serv30158 Modified Files: interface.py Log Message: If the user has a tk_options file in their todo-manager directory it will now overide the default one in the root directory. Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/interface.py,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- interface.py 14 Mar 2003 23:27:27 -0000 1.42 +++ interface.py 14 Mar 2003 23:50:38 -0000 1.43 @@ -47,9 +47,18 @@ master.title(appname) # Set the option file - try: - master.option_readfile(os.path.join(tdmcalls.get_root_directory(), "tk_options")) - except TclError: + # General options file + gen = os.path.join(tdmcalls.get_root_directory(), "tk_options") + # User's options file + user = os.path.join(tdmcalls.get_user_directory(), "tk_options") + + conf = None + if os.path.isfile(user): conf = user + elif os.path.isfile(gen): conf = gen + + if conf: + master.option_readfile(conf) + else: print _("The Tk Option file could not be found.") font = master.option_get("font", Tk) |