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:
@ -91,50 +91,55 @@ trace add variable push_remote write \
|
||||
proc do_push_anywhere {} {
|
||||
global all_remotes current_branch
|
||||
global push_urltype push_remote push_url push_thin push_tags
|
||||
global push_force
|
||||
global push_force use_ttk NS
|
||||
|
||||
set w .push_setup
|
||||
toplevel $w
|
||||
wm withdraw $w
|
||||
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
|
||||
pave_toplevel $w
|
||||
|
||||
label $w.header -text [mc "Push Branches"] -font font_uibold
|
||||
${NS}::label $w.header -text [mc "Push Branches"] \
|
||||
-font font_uibold -anchor center
|
||||
pack $w.header -side top -fill x
|
||||
|
||||
frame $w.buttons
|
||||
button $w.buttons.create -text [mc Push] \
|
||||
${NS}::frame $w.buttons
|
||||
${NS}::button $w.buttons.create -text [mc Push] \
|
||||
-default active \
|
||||
-command [list start_push_anywhere_action $w]
|
||||
pack $w.buttons.create -side right
|
||||
button $w.buttons.cancel -text [mc "Cancel"] \
|
||||
${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
|
||||
-default normal \
|
||||
-command [list destroy $w]
|
||||
pack $w.buttons.cancel -side right -padx 5
|
||||
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
||||
|
||||
labelframe $w.source -text [mc "Source Branches"]
|
||||
listbox $w.source.l \
|
||||
${NS}::labelframe $w.source -text [mc "Source Branches"]
|
||||
slistbox $w.source.l \
|
||||
-height 10 \
|
||||
-width 70 \
|
||||
-selectmode extended \
|
||||
-yscrollcommand [list $w.source.sby set]
|
||||
-selectmode extended
|
||||
foreach h [load_all_heads] {
|
||||
$w.source.l insert end $h
|
||||
if {$h eq $current_branch} {
|
||||
$w.source.l select set end
|
||||
}
|
||||
}
|
||||
scrollbar $w.source.sby -command [list $w.source.l yview]
|
||||
pack $w.source.sby -side right -fill y
|
||||
pack $w.source.l -side left -fill both -expand 1
|
||||
pack $w.source -fill both -expand 1 -pady 5 -padx 5
|
||||
|
||||
labelframe $w.dest -text [mc "Destination Repository"]
|
||||
${NS}::labelframe $w.dest -text [mc "Destination Repository"]
|
||||
if {$all_remotes ne {}} {
|
||||
radiobutton $w.dest.remote_r \
|
||||
${NS}::radiobutton $w.dest.remote_r \
|
||||
-text [mc "Remote:"] \
|
||||
-value remote \
|
||||
-variable push_urltype
|
||||
eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
|
||||
if {$use_ttk} {
|
||||
ttk::combobox $w.dest.remote_m -textvariable push_remote \
|
||||
-values $all_remotes
|
||||
} else {
|
||||
eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
|
||||
}
|
||||
grid $w.dest.remote_r $w.dest.remote_m -sticky w
|
||||
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
|
||||
set push_remote origin
|
||||
@ -145,13 +150,11 @@ proc do_push_anywhere {} {
|
||||
} else {
|
||||
set push_urltype url
|
||||
}
|
||||
radiobutton $w.dest.url_r \
|
||||
${NS}::radiobutton $w.dest.url_r \
|
||||
-text [mc "Arbitrary Location:"] \
|
||||
-value url \
|
||||
-variable push_urltype
|
||||
entry $w.dest.url_t \
|
||||
-borderwidth 1 \
|
||||
-relief sunken \
|
||||
${NS}::entry $w.dest.url_t \
|
||||
-width 50 \
|
||||
-textvariable push_url \
|
||||
-validate key \
|
||||
@ -166,16 +169,16 @@ proc do_push_anywhere {} {
|
||||
grid columnconfigure $w.dest 1 -weight 1
|
||||
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
|
||||
|
||||
labelframe $w.options -text [mc "Transfer Options"]
|
||||
checkbutton $w.options.force \
|
||||
${NS}::labelframe $w.options -text [mc "Transfer Options"]
|
||||
${NS}::checkbutton $w.options.force \
|
||||
-text [mc "Force overwrite existing branch (may discard changes)"] \
|
||||
-variable push_force
|
||||
grid $w.options.force -columnspan 2 -sticky w
|
||||
checkbutton $w.options.thin \
|
||||
${NS}::checkbutton $w.options.thin \
|
||||
-text [mc "Use thin pack (for slow network connections)"] \
|
||||
-variable push_thin
|
||||
grid $w.options.thin -columnspan 2 -sticky w
|
||||
checkbutton $w.options.tags \
|
||||
${NS}::checkbutton $w.options.tags \
|
||||
-text [mc "Include tags"] \
|
||||
-variable push_tags
|
||||
grid $w.options.tags -columnspan 2 -sticky w
|
||||
@ -191,5 +194,6 @@ proc do_push_anywhere {} {
|
||||
bind $w <Key-Escape> "destroy $w"
|
||||
bind $w <Key-Return> [list start_push_anywhere_action $w]
|
||||
wm title $w [append "[appname] ([reponame]): " [mc "Push"]]
|
||||
wm deiconify $w
|
||||
tkwait window $w
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user