]> granicus.if.org Git - python/commitdiff
Patch #1096231: Add default argument to wm_iconbitmap.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 17 Jun 2006 09:20:41 +0000 (09:20 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 17 Jun 2006 09:20:41 +0000 (09:20 +0000)
Lib/lib-tk/Tkinter.py
Misc/ACKS
Misc/NEWS

index 7cbcb500bb4861960228c1b3e3c5deef5e9c0fff..337090339f96557f8f38395206a56d4549d58e63 100644 (file)
@@ -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."""
index c51303f707a41bb49f593f0563012c9fe87e1045..f6803bbe589a6e34eed01b3cad0d04099b6303f1 100644 (file)
--- 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
index 1a658c53c1611997550891e186c814ffb9edcc8a..cad6f80892dffb0023e3e10bf8eef36bca0eae64 100644 (file)
--- 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.