summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-13 14:39:21 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-12-14 06:30:20 (GMT)
commitfba6072ed83bfc3c0e1eb56f11476b06a3b0dfb7 (patch)
tree1896f48d5b9284c612de0f345ac80f100eae17f5 /git-gui.sh
parentcfb5e104423b51aefb4d0e21a093bd9373b0af0b (diff)
downloadgit-fba6072ed83bfc3c0e1eb56f11476b06a3b0dfb7.zip
git-fba6072ed83bfc3c0e1eb56f11476b06a3b0dfb7.tar.gz
git-fba6072ed83bfc3c0e1eb56f11476b06a3b0dfb7.tar.bz2
git-gui: Move frequently used commands to the top of the context menu.
"Stage/Unstage Hunk" is probably the most frequently used command of the patch context menu *and* it is not available in some other form than the context menu. Therefore, it should go to the top. "Less Context" and "More Context" entries are also not easily available otherwise, and are therefore, moved second. The other entries are available via key strokes (Copy, Paste, Refresh) or rarly used (Font Size, Options) and can go last. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh42
1 files changed, 21 insertions, 21 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 1fca11f..fcb2ab2 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2542,6 +2542,27 @@ $ui_diff tag raise sel
set ctxm .vpane.lower.diff.body.ctxm
menu $ctxm -tearoff 0
$ctxm add command \
+ -label [mc "Apply/Reverse Hunk"] \
+ -command {apply_hunk $cursorX $cursorY}
+set ui_diff_applyhunk [$ctxm index last]
+lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
+$ctxm add separator
+$ctxm add command \
+ -label [mc "Show Less Context"] \
+ -command {if {$repo_config(gui.diffcontext) >= 1} {
+ incr repo_config(gui.diffcontext) -1
+ reshow_diff
+ }}
+lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+$ctxm add command \
+ -label [mc "Show More Context"] \
+ -command {if {$repo_config(gui.diffcontext) < 99} {
+ incr repo_config(gui.diffcontext)
+ reshow_diff
+ }}
+lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+$ctxm add separator
+$ctxm add command \
-label [mc Refresh] \
-command reshow_diff
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
@@ -2563,12 +2584,6 @@ $ctxm add command \
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add separator
$ctxm add command \
- -label [mc "Apply/Reverse Hunk"] \
- -command {apply_hunk $cursorX $cursorY}
-set ui_diff_applyhunk [$ctxm index last]
-lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
-$ctxm add separator
-$ctxm add command \
-label [mc "Decrease Font Size"] \
-command {incr_font_size font_diff -1}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
@@ -2577,21 +2592,6 @@ $ctxm add command \
-command {incr_font_size font_diff 1}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add separator
-$ctxm add command \
- -label [mc "Show Less Context"] \
- -command {if {$repo_config(gui.diffcontext) >= 1} {
- incr repo_config(gui.diffcontext) -1
- reshow_diff
- }}
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-$ctxm add command \
- -label [mc "Show More Context"] \
- -command {if {$repo_config(gui.diffcontext) < 99} {
- incr repo_config(gui.diffcontext)
- reshow_diff
- }}
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-$ctxm add separator
$ctxm add command -label [mc "Options..."] \
-command do_options
proc popup_diff_menu {ctxm x y X Y} {