From: Johannes Sixt <j.sixt@viscovery.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
"Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Jason Sewall <jasonsewall@gmail.com>, David <davvid@gmail.com>,
Marco Costalba <mcostalba@gmail.com>,
Andy Parkins <andyparkins@gmail.com>,
git@vger.kernel.org
Subject: [PATCH] git-gui: Move frequently used commands to the top of the context menu.
Date: Thu, 13 Dec 2007 15:39:21 +0100 [thread overview]
Message-ID: <47614419.3050604@viscovery.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0712131417110.27959@racer.site>
From: Johannes Sixt <johannes.sixt@telecom.at>
"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>
---
Johannes Schindelin schrieb:
> On Thu, 13 Dec 2007, Johannes Sixt wrote:
>> It's probably sufficient to have an option "Stage this Line": Once you
>> have staged enough lines, the hunk will be split automatically by the
>> current number-of-context-lines setting.
>
> And your hand falls off... ;-)
Not with this patch.
And, obviously, "Stage this Line" is accompanied by "Unstage this Line".
So when you want to stage a lot *except* one line, then you better
stage the lot, then *unstage* one line.
-- Hannes
PS: Warning, Shawn: [ab]/git-gui.sh below is forged; you won't have
blob 95b9537.
git-gui.sh | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index 95b9537..8e3751f 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} {
--
1.5.3.7.1929.gf9f0a
next prev parent reply other threads:[~2007-12-13 14:39 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 13:48 [ANNOUNCE] ugit: a pyqt-based git gui // was: Re: If you would write git from scratch now, what would you change? David
2007-12-11 18:20 ` Marco Costalba
2007-12-11 19:14 ` Jason Sewall
2007-12-11 19:33 ` Marco Costalba
2007-12-11 20:54 ` David
2007-12-11 21:29 ` Jason Sewall
2007-12-12 4:10 ` Shawn O. Pearce
2007-12-12 5:13 ` Jason Sewall
2007-12-12 5:23 ` Shawn O. Pearce
2007-12-12 15:02 ` Jason Sewall
2007-12-12 18:15 ` Johannes Schindelin
2007-12-12 18:50 ` Jason Sewall
2007-12-12 19:37 ` [PATCH] Teach git-gui to split hunks Johannes Schindelin
2007-12-12 20:18 ` Junio C Hamano
2007-12-12 20:39 ` Johannes Schindelin
2007-12-12 20:50 ` Jean-François Veillette
2007-12-12 22:54 ` Junio C Hamano
2007-12-12 23:02 ` Wincent Colaiuta
2007-12-13 7:35 ` Johannes Sixt
2007-12-13 7:48 ` Shawn O. Pearce
2007-12-13 12:25 ` Johannes Schindelin
2007-12-13 8:45 ` Junio C Hamano
2007-12-13 9:41 ` Johannes Sixt
2007-12-13 12:49 ` Johannes Schindelin
2007-12-13 14:03 ` Johannes Sixt
2007-12-13 14:18 ` Johannes Schindelin
2007-12-13 14:39 ` Johannes Sixt [this message]
2007-12-14 6:32 ` [PATCH] git-gui: Move frequently used commands to the top of the context menu Shawn O. Pearce
2007-12-11 22:37 ` [ANNOUNCE] ugit: a pyqt-based git gui // was: Re: If you would write git from scratch now, what would you change? Alex Riesen
2007-12-11 23:08 ` Steffen Prohaska
2007-12-12 0:11 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47614419.3050604@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=andyparkins@gmail.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jasonsewall@gmail.com \
--cc=mcostalba@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).