]> granicus.if.org Git - python/commitdiff
Patch #815924: Restore ability to pass type= and icon=
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 17 Jun 2006 19:03:26 +0000 (19:03 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 17 Jun 2006 19:03:26 +0000 (19:03 +0000)
Lib/lib-tk/tkMessageBox.py
Misc/NEWS

index 25071fe591a36d3202d15271a5e963d22bc5d144..aff069bfa75a9f7337001e8f57a1a843f31fcb1f 100644 (file)
@@ -63,9 +63,10 @@ class Message(Dialog):
 #
 # convenience stuff
 
-def _show(title=None, message=None, icon=None, type=None, **options):
-    if icon:    options["icon"] = icon
-    if type:    options["type"] = type
+# Rename _icon and _type options to allow overriding them in options
+def _show(title=None, message=None, _icon=None, _type=None, **options):
+    if _icon and "icon" not in options:    options["icon"] = _icon
+    if _type and "type" not in options:    options["type"] = _type
     if title:   options["title"] = title
     if message: options["message"] = message
     res = Message(**options).show()
index 7021236f9812102bbb6d4c77cabcce2a3d38cc56..7bc17f72bdea37e86692d9a7c28bb57a97be2e80 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -163,6 +163,9 @@ Extension Modules
 Library
 -------
 
+- Patch #815924: Restore ability to pass type= and icon= in tkMessageBox
+  functions.
+
 - Patch #812986: Update turtle output even if not tracing.
 
 - Patch #1494750: Destroy master after deleting children in