diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2006-11-18 18:00:23 (GMT) |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2006-11-18 18:00:23 (GMT) |
| commit | c73a4a4f5170c6f9631d8f07979af8a953507933 (patch) | |
| tree | e52b2d7f2984feec39d9c887bb9ea40dba2890af /Lib/lib-tk/tkSimpleDialog.py | |
| parent | 8c456f3b5705f9b4dc8f822f92185570c1ce94bb (diff) | |
| download | cpython-c73a4a4f5170c6f9631d8f07979af8a953507933.zip cpython-c73a4a4f5170c6f9631d8f07979af8a953507933.tar.gz cpython-c73a4a4f5170c6f9631d8f07979af8a953507933.tar.bz2 | |
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.
Diffstat (limited to 'Lib/lib-tk/tkSimpleDialog.py')
| -rw-r--r-- | Lib/lib-tk/tkSimpleDialog.py | 7 |
1 files changed, 6 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) |
