X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-gui%2Flib%2Fclass.tcl;h=c27b71476ac35dbad02b727f28aba5d7c0777e75;hb=e7b3cea0f7589c57f7bb808330e32bdd7f901c95;hp=24e8cecea46d3da6d94b04917a2776e541c234f3;hpb=3f2fd36ebcc2ef15df196bd0544cc9c39da57dbf;p=git.git diff --git a/git-gui/lib/class.tcl b/git-gui/lib/class.tcl index 24e8cecea..c27b71476 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 {}