summaryrefslogtreecommitdiff
path: root/git-gui/lib/class.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'git-gui/lib/class.tcl')
-rw-r--r--git-gui/lib/class.tcl10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-gui/lib/class.tcl b/git-gui/lib/class.tcl
index 24e8cecea4..c27b71476a 100644
--- a/git-gui/lib/class.tcl
+++ b/git-gui/lib/class.tcl
@@ -134,6 +134,13 @@ proc delete_this {{t {}}} {
if {[namespace exists $t]} {namespace delete $t}
}
+proc make_dialog {t w args} {
+ upvar $t top $w pfx this this
+ global use_ttk
+ uplevel [linsert $args 0 make_toplevel $t $w]
+ pave_toplevel $pfx
+}
+
proc make_toplevel {t w args} {
upvar $t top $w pfx this this
@@ -148,11 +155,12 @@ proc make_toplevel {t w args} {
}
}
- if {[winfo ismapped .]} {
+ if {$::root_exists || [winfo ismapped .]} {
regsub -all {::} $this {__} w
set top .$w
set pfx $top
toplevel $top
+ set ::root_exists 1
} else {
set top .
set pfx {}