[Python-checkins] r52780 - in python/trunk: Lib/lib-tk/tkSimpleDialog.py Misc/NEWS

martin.v.loewis python-checkins at python.org
Sat Nov 18 19:00:25 CET 2006


Author: martin.v.loewis
Date: Sat Nov 18 19:00:23 2006
New Revision: 52780
Modified:
 python/trunk/Lib/lib-tk/tkSimpleDialog.py
 python/trunk/Misc/NEWS
Log:
Patch #1538878: Don't make tkSimpleDialog dialogs transient if
the parent window is withdrawn. This mirrors what dialog.tcl
does.
Will backport to 2.5.
Modified: python/trunk/Lib/lib-tk/tkSimpleDialog.py
==============================================================================
--- python/trunk/Lib/lib-tk/tkSimpleDialog.py	(original)
+++ python/trunk/Lib/lib-tk/tkSimpleDialog.py	Sat Nov 18 19:00:23 2006
@@ -46,8 +46,13 @@
 title -- the dialog title
 '''
 Toplevel.__init__(self, parent)
- self.transient(parent)
 
+ # If the master is not viewable, don't
+ # make the child transient, or else it
+ # would be opened withdrawn
+ if parent.winfo_viewable(): 
+ self.transient(parent)
+ 
 if title:
 self.title(title)
 
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sat Nov 18 19:00:23 2006
@@ -98,6 +98,9 @@
 Library
 -------
 
+- Patch #1538878: Don't make tkSimpleDialog dialogs transient if
+ the parent window is withdrawn.
+
 - Bug #1597824: return the registered function from atexit.register()
 to facilitate usage as a decorator.
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /