X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=lib%2Fclass.tcl;h=c27b71476ac35dbad02b727f28aba5d7c0777e75;hb=9cb268c426ccb2bb836418caad669476b5dd1933;hp=24e8cecea46d3da6d94b04917a2776e541c234f3;hpb=6233ab17297684c0049923cb8492393276672b01;p=git.git diff --git a/lib/class.tcl b/lib/class.tcl index 24e8cecea..c27b71476 100644 --- a/lib/class.tcl +++ b/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 {}