X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-gui%2Flib%2Fbranch_checkout.tcl;h=2e459a82976c6bf77cf1e9f2f1edeae8872a3364;hb=d1672d90bae20d33512fbf8f9b8330e5840da0c5;hp=72c45b45541749699460de1122c711888b389403;hpb=5071877d2c623ffc41b48bbb49908a61051a6228;p=git.git diff --git a/git-gui/lib/branch_checkout.tcl b/git-gui/lib/branch_checkout.tcl index 72c45b455..2e459a829 100644 --- a/git-gui/lib/branch_checkout.tcl +++ b/git-gui/lib/branch_checkout.tcl @@ -10,38 +10,41 @@ field opt_fetch 1; # refetch tracking branch if used? field opt_detach 0; # force a detached head case? constructor dialog {} { - make_toplevel top w - wm title $top "[appname] ([reponame]): Checkout Branch" + 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 {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 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 {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 - set w_rev [::choose_rev::new $w.rev {Revision}] + set w_rev [::choose_rev::new $w.rev [mc Revision]] $w_rev bind_listbox [cb _checkout] pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5 - labelframe $w.options -text {Options} + ${NS}::labelframe $w.options -text [mc Options] - checkbutton $w.options.fetch \ - -text {Fetch Tracking Branch} \ + ${NS}::checkbutton $w.options.fetch \ + -text [mc "Fetch Tracking Branch"] \ -variable @opt_fetch pack $w.options.fetch -anchor nw - checkbutton $w.options.detach \ - -text {Detach From Local Branch} \ + ${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 }