From: Marc Branchaud <marcnarc@xiplink.com>
To: git@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCHv2] gitk: Show the current view's name in the window title.
Date: Mon, 04 May 2015 10:26:29 -0400 [thread overview]
Message-ID: <55478195.4070301@xiplink.com> (raw)
In-Reply-To: <1428421911-20393-1-git-send-email-marcnarc@xiplink.com>
On 15-04-07 11:51 AM, Marc Branchaud wrote:
> If the current view is the "Command line" view, show the command line
> arguments instead of the view name.
>
> Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
> ---
>
> This is v2 of my previous "Show the command-line revs in the window title" RFC
> patch. (I'm having trouble accessing gmane, or I'd include a link here.)
>
> This version incorporates Paul's feedback (thanks!) and handles view properly.
Ping?
M.
> M.
>
> gitk | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/gitk b/gitk
> index b859879..90419e3 100755
> --- a/gitk
> +++ b/gitk
> @@ -4034,6 +4034,19 @@ proc shellsplit {str} {
> return $l
> }
>
> +proc set_window_title {} {
> + global appname curview viewname vrevs
> + set rev [mc "All files"]
> + if {$curview ne 0} {
> + if {$viewname($curview) eq [mc "Command line"]} {
> + set rev [string map {"--gitk-symmetric-diff-marker" "--merge"} $vrevs($curview)]
> + } else {
> + set rev $viewname($curview)
> + }
> + }
> + wm title . "[reponame]: $rev - $appname"
> +}
> +
> # Code to implement multiple views
>
> proc newview {ishighlight} {
> @@ -4510,6 +4523,7 @@ proc showview {n} {
> } elseif {$numcommits == 0} {
> show_status [mc "No commits selected"]
> }
> + set_window_title
> }
>
> # Stuff relating to the highlighting facility
> @@ -6650,6 +6664,7 @@ proc show_status {msg} {
> global canv fgcolor
>
> clear_display
> + set_window_title
> $canv create text 3 3 -anchor nw -text $msg -font mainfont \
> -tags text -fill $fgcolor
> }
> @@ -12393,7 +12408,7 @@ catch {
> }
> # wait for the window to become visible
> tkwait visibility .
> -wm title . "[reponame] - $appname"
> +set_window_title
> update
> readrefs
>
>
next prev parent reply other threads:[~2015-05-04 14:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 17:51 [PATCH 0/2] Tweaking the gitk window title Marc Branchaud
2015-01-06 17:51 ` [PATCH 1/2] gitk: Rearrange window title to be more conventional Marc Branchaud
2015-01-06 17:52 ` [RFC PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title Marc Branchaud
2015-04-06 4:37 ` Paul Mackerras
2015-04-07 15:51 ` [PATCHv2] gitk: Show the current view's name " Marc Branchaud
2015-05-04 14:26 ` Marc Branchaud [this message]
2015-05-17 1:39 ` Paul Mackerras
2015-01-26 14:58 ` [PATCH 0/2] Tweaking the gitk " Marc Branchaud
2015-03-02 15:39 ` Marc Branchaud
2015-03-23 14:18 ` [PATCH 1/2] gitk: Rearrange window title to be more conventional Marc Branchaud
2015-03-23 14:18 ` [PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title Marc Branchaud
2015-04-06 4:38 ` [PATCH 1/2] gitk: Rearrange window title to be more conventional Paul Mackerras
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=55478195.4070301@xiplink.com \
--to=marcnarc@xiplink.com \
--cc=git@vger.kernel.org \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.