Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui: update french translation git-gui: update Japanese translation git-gui: fix shortcut for menu "Commit/Revert Changes" git-gui: Quote git path when starting another gui in a submodule git-gui: update Italian translation git-gui: Update Swedish translation (520t0f0u) git-gui: use themed tk widgets with Tk 8.5 git-gui: Update German translation (12 new or changed strings). git-gui: Update translation template git-gui: Remove unused icon file_parttick git-gui: use different icon for new and modified files in the index git-gui: set GIT_DIR and GIT_WORK_TREE after setup git-gui: update shortcut tools to use _gitworktree git-gui: handle bare repos correctly git-gui: handle non-standard worktree locations git-gui: Support applying a range of changes at once git-gui: Add a special diff popup menu for submodules git-gui: Use git diff --submodule when available
This commit is contained in:
@ -8,9 +8,10 @@ field oldname
|
||||
field newname
|
||||
|
||||
constructor dialog {} {
|
||||
global current_branch
|
||||
global current_branch use_ttk NS
|
||||
|
||||
make_toplevel top w
|
||||
make_dialog top w
|
||||
wm withdraw $w
|
||||
wm title $top [append "[appname] ([reponame]): " [mc "Rename Branch"]]
|
||||
if {$top ne {.}} {
|
||||
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
|
||||
@ -19,27 +20,31 @@ constructor dialog {} {
|
||||
set oldname $current_branch
|
||||
set newname [get_config gui.newbranchtemplate]
|
||||
|
||||
label $w.header -text [mc "Rename Branch"] -font font_uibold
|
||||
${NS}::label $w.header -text [mc "Rename Branch"]\
|
||||
-font font_uibold -anchor center
|
||||
pack $w.header -side top -fill x
|
||||
|
||||
frame $w.buttons
|
||||
button $w.buttons.rename -text [mc Rename] \
|
||||
${NS}::frame $w.buttons
|
||||
${NS}::button $w.buttons.rename -text [mc Rename] \
|
||||
-default active \
|
||||
-command [cb _rename]
|
||||
pack $w.buttons.rename -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
|
||||
|
||||
frame $w.rename
|
||||
label $w.rename.oldname_l -text [mc "Branch:"]
|
||||
eval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]
|
||||
${NS}::frame $w.rename
|
||||
${NS}::label $w.rename.oldname_l -text [mc "Branch:"]
|
||||
if {$use_ttk} {
|
||||
ttk::combobox $w.rename.oldname_m -textvariable @oldname \
|
||||
-values [load_all_heads] -state readonly
|
||||
} else {
|
||||
eval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]
|
||||
}
|
||||
|
||||
label $w.rename.newname_l -text [mc "New Name:"]
|
||||
entry $w.rename.newname_t \
|
||||
-borderwidth 1 \
|
||||
-relief sunken \
|
||||
${NS}::label $w.rename.newname_l -text [mc "New Name:"]
|
||||
${NS}::entry $w.rename.newname_t \
|
||||
-width 40 \
|
||||
-textvariable @newname \
|
||||
-validate key \
|
||||
@ -60,6 +65,7 @@ constructor dialog {} {
|
||||
$w.rename.newname_t icursor end
|
||||
focus $w.rename.newname_t
|
||||
"
|
||||
wm deiconify $w
|
||||
tkwait window $w
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user