summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-18 18:00:34 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-11-18 18:00:34 (GMT)
commitce9212f018fbd074aba7a37cef4291ebd2e428d4 (patch)
treeb4b2f212826ad5afcd1fa12a2579d2eef7f07843
parent830358af099ebafe0e32fb4bcbcf931d608664b5 (diff)
downloadcpython-ce9212f018fbd074aba7a37cef4291ebd2e428d4.zip
cpython-ce9212f018fbd074aba7a37cef4291ebd2e428d4.tar.gz
cpython-ce9212f018fbd074aba7a37cef4291ebd2e428d4.tar.bz2
Patch #1538878: Don't make tkSimpleDialog dialogs transient if
the parent window is withdrawn. This mirrors what dialog.tcl does.
-rw-r--r--Lib/lib-tk/tkSimpleDialog.py7
-rw-r--r--Misc/NEWS3
2 files changed, 9 insertions, 1 deletions
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py
index 4d11ce0..02ea034 100644
--- a/Lib/lib-tk/tkSimpleDialog.py
+++ b/Lib/lib-tk/tkSimpleDialog.py
@@ -46,8 +46,13 @@ class Dialog(Toplevel):
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)
diff --git a/Misc/NEWS b/Misc/NEWS
index 8324a05..6e50ed3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,9 @@ Extension Modules
Library
-------
+- Patch #1538878: Don't make tkSimpleDialog dialogs transient if
+ the parent window is withdrawn.
+
- Patch #1360200: Use unmangled_version RPM spec field to deal with
file name mangling.