From: <cl...@us...> - 2003-03-24 02:10:12
|
Update of /cvsroot/todo-manager/todo-manager In directory sc8-pr-cvs1:/tmp/cvs-serv7831 Modified Files: interface.py Log Message: Support for a new call: ask_yes_no for simple questions about stuff Index: interface.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/interface.py,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- interface.py 20 Mar 2003 00:23:43 -0000 1.44 +++ interface.py 24 Mar 2003 02:10:05 -0000 1.45 @@ -699,6 +699,9 @@ return askopenfilename(filetypes=[(args[0], args[1])], initialdir=self.__curdir) elif command == "file_saveas_prompt": return asksaveasfilename(filetypes=[(args[0], args[1])], initialdir=self.__curdir) + elif command == "ask_yes_no": + m = tkMessageBox.askquestion(args[0], args[1]) + return {'yes': 1, 'no': 0}[m] elif command == "ask_yes_no_cancel": m = tkMessageBox.Message(title=args[0], message=args[1], icon=tkMessageBox.QUESTION, type=tkMessageBox.YESNOCANCEL, master=self._master) |