- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox

with Tcl/Tk-8.5.
This commit is contained in:
Matthias Klose 2010-03-16 10:48:52 +00:00
parent 3cc8f211ed
commit 8b41168bab
2 changed files with 8 additions and 3 deletions

View File

@ -70,11 +70,13 @@ def _show(title=None, message=None, _icon=None, _type=None, **options):
if title: options["title"] = title if title: options["title"] = title
if message: options["message"] = message if message: options["message"] = message
res = Message(**options).show() res = Message(**options).show()
# In some Tcl installations, Tcl converts yes/no into a boolean # In some Tcl installations, yes/no is converted into a boolean.
if isinstance(res, bool): if isinstance(res, bool):
if res: return YES if res:
return YES
return NO return NO
return res # In others we get a Tcl_Obj.
return str(res)
def showinfo(title=None, message=None, **options): def showinfo(title=None, message=None, **options):
"Show an info message" "Show an info message"

View File

@ -20,6 +20,9 @@ Core and Builtins
Library Library
------- -------
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
with Tcl/Tk-8.5.
- Issue #8140: extend compileall to compile single files. Add -i option. - Issue #8140: extend compileall to compile single files. Add -i option.
- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of