From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: Jens Lehmann <Jens.Lehmann@web.de>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] git-gui: fetch/prune all entry appears last
Date: Thu, 24 Feb 2011 00:09:28 +0000 [thread overview]
Message-ID: <87bp22fg3r.fsf@fox.patthoyts.tk> (raw)
In-Reply-To: <20110222193021.GB28519@book.hvoigt.net> (Heiko Voigt's message of "Tue, 22 Feb 2011 20:30:21 +0100")
Heiko Voigt <hvoigt@hvoigt.net> writes:
>The user might have got used to the order the remotes appeared previously.
>Lets add the all entry last so the all entry does not confuse previous
>users.
>
>Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
>---
>
>On Tue, Feb 22, 2011 at 07:36:23PM +0100, Jens Lehmann wrote:
>> 2) I would rather like to see it at the *end* of the submenu, not at the
>> beginning. Being used to always click on the first menu entry only
>> to learn that the remote that used to be there got with something
>> else is kind of surprising ;-)
>
>And this? Disclaimer: Also only superficially tested on OSX.
>
> lib/remote.tcl | 22 ++++++++++------------
> 1 files changed, 10 insertions(+), 12 deletions(-)
>
>diff --git a/lib/remote.tcl b/lib/remote.tcl
>index 18d3d06..5e4e7f4 100644
>--- a/lib/remote.tcl
>+++ b/lib/remote.tcl
>@@ -245,29 +245,27 @@ proc update_all_remotes_menu_entry {} {
> set prune_m $remote_m.prune
> if {$have_remote > 1} {
> make_sure_remote_submenues_exist $remote_m
>- set index [expr {[$fetch_m type 0] eq "tearoff" ? 1 : 0}]
>- if {[$fetch_m entrycget $index -label] ne "All"} {
>+ if {[$fetch_m entrycget end -label] ne "All"} {
>
>- $fetch_m insert $index separator
>- $fetch_m insert $index command \
>+ $fetch_m insert end separator
>+ $fetch_m insert end command \
> -label "All" \
> -command fetch_from_all
>
>- $prune_m insert $index separator
>- $prune_m insert $index command \
>+ $prune_m insert end separator
>+ $prune_m insert end command \
> -label "All" \
> -command prune_from_all
> }
> } else {
> if {[winfo exists $fetch_m]} {
>- set index [expr {[$fetch_m type 0] eq "tearoff" ? 1 : 0}]
>- if {[$fetch_m type end] eq "separator"} {
>+ if {[$fetch_m entrycget end -label] eq "All"} {
>
>- delete_from_menu $fetch_m $index
>- delete_from_menu $fetch_m $index
>+ delete_from_menu $fetch_m end
>+ delete_from_menu $fetch_m end
>
>- delete_from_menu $prune_m $index
>- delete_from_menu $prune_m $index
>+ delete_from_menu $prune_m end
>+ delete_from_menu $prune_m end
> }
> }
> }
This is fine as well. Tested it on windows. Applied to master.
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
next prev parent reply other threads:[~2011-02-24 0:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 16:43 [PATCH 1/2] git-gui: fix deleting item from all_remotes variable Heiko Voigt
2011-02-13 13:20 ` Pat Thoyts
2011-02-13 13:47 ` Heiko Voigt
2011-02-13 13:50 ` [PATCH 1/2] git-gui: refactor remote submenu creation into subroutine Heiko Voigt
2011-02-13 13:57 ` [RFC PATCH 2/2] git-gui: teach fetch/prune menu to do it for all remotes Heiko Voigt
2011-02-14 13:03 ` [PATCH] git-gui: Include version check and test for tearoff menu entry Pat Thoyts
2011-02-14 21:31 ` Heiko Voigt
2011-02-15 0:31 ` Pat Thoyts
2011-02-17 20:06 ` Heiko Voigt
2011-02-22 18:36 ` [RFC PATCH 2/2] git-gui: teach fetch/prune menu to do it for all remotes Jens Lehmann
2011-02-22 19:28 ` [PATCH 1/2] git-gui: fetch/prune all entry only for more than one entry Heiko Voigt
2011-02-24 0:02 ` Pat Thoyts
2011-02-22 19:30 ` [PATCH 2/2] git-gui: fetch/prune all entry appears last Heiko Voigt
2011-02-23 19:19 ` Jens Lehmann
2011-02-24 0:09 ` Pat Thoyts [this message]
2011-02-13 14:05 ` Re: [PATCH 1/2] git-gui: fix deleting item from all_remotes variable Heiko Voigt
2011-02-13 14:15 ` Heiko Voigt
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bp22fg3r.fsf@fox.patthoyts.tk \
--to=patthoyts@users.sourceforge.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).