From 5ecad9ca13405d0cc4c2653435887a62e54bb673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 17 Jun 2006 09:20:41 +0000 Subject: Patch #1096231: Add default argument to wm_iconbitmap. --- Lib/lib-tk/Tkinter.py | 15 ++++++++++++--- Misc/ACKS | 1 + Misc/NEWS | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 7cbcb50..3370903 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1500,10 +1500,19 @@ class Wm: the group leader of this widget if None is given.""" return self.tk.call('wm', 'group', self._w, pathName) group = wm_group - def wm_iconbitmap(self, bitmap=None): + def wm_iconbitmap(self, bitmap=None, default=None): """Set bitmap for the iconified widget to BITMAP. Return - the bitmap if None is given.""" - return self.tk.call('wm', 'iconbitmap', self._w, bitmap) + the bitmap if None is given. + + Under Windows, the DEFAULT parameter can be used to set the icon + for the widget and any descendents that don't have an icon set + explicitely. DEFAULT can be the relative path to a .ico file + (example: root.iconbitmap(default='myicon.ico') ). See Tk + documentation for more information.""" + if default: + return self.tk.call('wm', 'iconbitmap', self._w, '-default', default) + else: + return self.tk.call('wm', 'iconbitmap', self._w, bitmap) iconbitmap = wm_iconbitmap def wm_iconify(self): """Display widget as icon.""" diff --git a/Misc/ACKS b/Misc/ACKS index c51303f..f6803bb 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -205,6 +205,7 @@ Nils Fischbeck Frederik Fix Hernán Martínez Foffani Doug Fort +John Fouhy Martin Franklin Robin Friedrich Ivan Frohne diff --git a/Misc/NEWS b/Misc/NEWS index 1a658c5..cad6f80 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -163,6 +163,8 @@ Extension Modules Library ------- +- Patch #1096231: Add ``default`` argument to Tkinter.Wm.wm_iconbitmap. + - Patch #763580: Add name and value arguments to Tkinter variable classes. -- cgit v0.12