1. Armin Rigo
  2. cpython-withatomic

Commits

Martin von Löwis  committed f6dc55d

Patch #1096231: Add default argument to wm_iconbitmap.

  • Participants
  • Parent commits 8a50d8e
  • Branches legacy-trunk

Comments (0)

Files changed (3)

File Lib/lib-tk/Tkinter.py

View file
  • Ignore whitespace
         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."""

File Misc/ACKS

View file
  • Ignore whitespace
 Frederik Fix
 Hern�n Mart�nez Foffani
 Doug Fort
+John Fouhy
 Martin Franklin
 Robin Friedrich
 Ivan Frohne

File Misc/NEWS

View file
  • Ignore whitespace
 Library
 -------
 
+- Patch #1096231: Add ``default`` argument to Tkinter.Wm.wm_iconbitmap.
+
 - Patch #763580: Add name and value arguments to Tkinter variable
   classes.