diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-06-17 19:03:26 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-06-17 19:03:26 +0000 |
commit | d4c90e262c44c558af5d02a436eb2431f39ad9ba (patch) | |
tree | c367f4c6ffc1a816225ff9b69cf5836f3a6bb45a /Lib/lib-tk | |
parent | cc8ec1440a33a0a841f66535b0b2c367faa1551e (diff) | |
download | cpython-d4c90e262c44c558af5d02a436eb2431f39ad9ba.tar.gz |
Patch #815924: Restore ability to pass type= and icon=
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/tkMessageBox.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/lib-tk/tkMessageBox.py b/Lib/lib-tk/tkMessageBox.py index 25071fe591..aff069bfa7 100644 --- a/Lib/lib-tk/tkMessageBox.py +++ b/Lib/lib-tk/tkMessageBox.py @@ -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() |