git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: git@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: [PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.
Date: Mon, 23 Mar 2015 10:18:17 -0400	[thread overview]
Message-ID: <1427120297-26314-2-git-send-email-marcnarc@xiplink.com> (raw)
In-Reply-To: <1427120297-26314-1-git-send-email-marcnarc@xiplink.com>

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
---

I often open multiple gitk windows in the same working directory to examine
other branches or refs in the repo.  This change allows me to distinguish
which window is showing what.

		M.

 gitk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gitk b/gitk
index b859879..379b13a 100755
--- a/gitk
+++ b/gitk
@@ -488,7 +488,7 @@ proc reset_pending_select {selid} {
 }
 
 proc getcommits {selid} {
-    global canv curview need_redisplay viewactive
+    global appname canv curview need_redisplay viewactive vrevs
 
     initlayout
     if {[start_rev_list $curview]} {
@@ -498,6 +498,11 @@ proc getcommits {selid} {
     } else {
 	show_status [mc "No commits selected"]
     }
+    set rev "$vrevs($curview)"
+    if {$rev eq ""} {
+	set rev "HEAD"
+    }
+    wm title . "[reponame]: $rev - $appname"
 }
 
 proc updatecommits {} {
-- 
2.3.3

  reply	other threads:[~2015-03-23 14:27 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
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   ` Marc Branchaud [this message]
2015-04-06  4:38   ` 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=1427120297-26314-2-git-send-email-marcnarc@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 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).