X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-gui%2Flib%2Fbranch_checkout.tcl;h=2e459a82976c6bf77cf1e9f2f1edeae8872a3364;hb=7e7db5e4520388d3a6f1efbe2f7a29d43bd06a2b;hp=6603703ea163d830c7de1478aa2dd737c4d9d499;hpb=d4f6bc887de7957645b998a0b0e22bc4048f36dd;p=git.git diff --git a/git-gui/lib/branch_checkout.tcl b/git-gui/lib/branch_checkout.tcl index 6603703ea..2e459a829 100644 --- a/git-gui/lib/branch_checkout.tcl +++ b/git-gui/lib/branch_checkout.tcl @@ -10,21 +10,24 @@ field opt_fetch 1; # refetch tracking branch if used? field opt_detach 0; # force a detached head case? constructor dialog {} { - make_toplevel top w + global use_ttk NS + make_dialog top w + wm withdraw $w wm title $top [append "[appname] ([reponame]): " [mc "Checkout Branch"]] if {$top ne {.}} { wm geometry $top "+[winfo rootx .]+[winfo rooty .]" } - label $w.header -text [mc "Checkout Branch"] -font font_uibold + ${NS}::label $w.header -text [mc "Checkout Branch"] \ + -font font_uibold -anchor center pack $w.header -side top -fill x - frame $w.buttons - button $w.buttons.create -text [mc Checkout] \ + ${NS}::frame $w.buttons + ${NS}::button $w.buttons.create -text [mc Checkout] \ -default active \ -command [cb _checkout] pack $w.buttons.create -side right - button $w.buttons.cancel -text [mc Cancel] \ + ${NS}::button $w.buttons.cancel -text [mc Cancel] \ -command [list destroy $w] pack $w.buttons.cancel -side right -padx 5 pack $w.buttons -side bottom -fill x -pady 10 -padx 10 @@ -33,14 +36,14 @@ constructor dialog {} { $w_rev bind_listbox [cb _checkout] pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5 - labelframe $w.options -text [mc Options] + ${NS}::labelframe $w.options -text [mc Options] - checkbutton $w.options.fetch \ + ${NS}::checkbutton $w.options.fetch \ -text [mc "Fetch Tracking Branch"] \ -variable @opt_fetch pack $w.options.fetch -anchor nw - checkbutton $w.options.detach \ + ${NS}::checkbutton $w.options.detach \ -text [mc "Detach From Local Branch"] \ -variable @opt_detach pack $w.options.detach -anchor nw @@ -50,6 +53,7 @@ constructor dialog {} { bind $w [cb _visible] bind $w [list destroy $w] bind $w [cb _checkout]\;break + wm deiconify $w tkwait window $w }