All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Tweaking the gitk window title.
@ 2015-01-06 17:51 Marc Branchaud
  2015-01-06 17:51 ` [PATCH 1/2] gitk: Rearrange window title to be more conventional Marc Branchaud
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-01-06 17:51 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

The first patch simply changes the title from "gitk: <dir>" to "<dir> - gitk",
which is the title layout used by most of the applications on my Kubuntu box.

The second patch is the one that I'm more keen to see accepted.  It relies
on the first only in that it follows the new title layout.

		M.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] gitk: Rearrange window title to be more conventional.
  2015-01-06 17:51 [PATCH 0/2] Tweaking the gitk window title Marc Branchaud
@ 2015-01-06 17:51 ` 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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-01-06 17:51 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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

I did a bit of googling but couldn't find some standard that says the
application name goes at the end of the title bar.  But this is how all the
browsers and other apps I use regularly do things.

		M.

 gitk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitk b/gitk
index 78358a7..03de545 100755
--- a/gitk
+++ b/gitk
@@ -12293,7 +12293,7 @@ catch {
 }
 # wait for the window to become visible
 tkwait visibility .
-wm title . "$appname: [reponame]"
+wm title . "[reponame] - $appname"
 update
 readrefs
 
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.
  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 ` Marc Branchaud
  2015-04-06  4:37   ` Paul Mackerras
  2015-01-26 14:58 ` [PATCH 0/2] Tweaking the gitk " Marc Branchaud
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Marc Branchaud @ 2015-01-06 17:52 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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.

This is an RFC because it doesn't behave great with views.  I don't use views
at all, so this doesn't bother me.  I'm not too sure what should be displayed
if the user changes views -- probably the view name, but I'm not sure how to
get a that in the code.

		M.

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

diff --git a/gitk b/gitk
index 03de545..b8463fd 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.2.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/2] Tweaking the gitk window title.
  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-01-26 14:58 ` 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
  4 siblings, 0 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-01-26 14:58 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

On 15-01-06 12:51 PM, Marc Branchaud wrote:
> The first patch simply changes the title from "gitk: <dir>" to "<dir> - gitk",
> which is the title layout used by most of the applications on my Kubuntu box.
> 
> The second patch is the one that I'm more keen to see accepted.  It relies
> on the first only in that it follows the new title layout.

Ping?

		M.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/2] Tweaking the gitk window title.
  2015-01-06 17:51 [PATCH 0/2] Tweaking the gitk window title Marc Branchaud
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-03-02 15:39 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

On 15-01-06 12:51 PM, Marc Branchaud wrote:
> The first patch simply changes the title from "gitk: <dir>" to "<dir> - gitk",
> which is the title layout used by most of the applications on my Kubuntu box.
> 
> The second patch is the one that I'm more keen to see accepted.  It relies
> on the first only in that it follows the new title layout.

Ping?

		M.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] gitk: Rearrange window title to be more conventional.
  2015-01-06 17:51 [PATCH 0/2] Tweaking the gitk window title Marc Branchaud
                   ` (3 preceding siblings ...)
  2015-03-02 15:39 ` Marc Branchaud
@ 2015-03-23 14:18 ` 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
  4 siblings, 2 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-03-23 14:18 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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

I did a bit of googling but couldn't find some standard that says the
application name goes at the end of the title bar.  But this is how all the
browsers and other apps I use regularly do things.

		M.

 gitk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitk b/gitk
index 9a2daf3..b859879 100755
--- a/gitk
+++ b/gitk
@@ -12393,7 +12393,7 @@ catch {
 }
 # wait for the window to become visible
 tkwait visibility .
-wm title . "$appname: [reponame]"
+wm title . "[reponame] - $appname"
 update
 readrefs
 
-- 
2.3.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.
  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
  2015-04-06  4:38   ` [PATCH 1/2] gitk: Rearrange window title to be more conventional Paul Mackerras
  1 sibling, 0 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-03-23 14:18 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Mackerras @ 2015-04-06  4:37 UTC (permalink / raw)
  To: Marc Branchaud; +Cc: git

On Tue, Jan 06, 2015 at 12:52:00PM -0500, Marc Branchaud wrote:
> 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.
> 
> This is an RFC because it doesn't behave great with views.  I don't use views
> at all, so this doesn't bother me.  I'm not too sure what should be displayed
> if the user changes views -- probably the view name, but I'm not sure how to
> get a that in the code.

The view name is in $viewname($curview).  If that is "Command line"
you probably want to show some selected command line arguments.

Using $vrevs($curview) seems about right, though it will contain
"--gitk-symmetric-diff-marker" in some situations, which is an
internal thing that we don't want to show externally.  You should
probably filter it out.

The patch will need a proper description before I can apply it, of
course.

Paul.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] gitk: Rearrange window title to be more conventional.
  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   ` Paul Mackerras
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Mackerras @ 2015-04-06  4:38 UTC (permalink / raw)
  To: Marc Branchaud; +Cc: git

On Mon, Mar 23, 2015 at 10:18:16AM -0400, Marc Branchaud wrote:
> Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>

Thanks, applied.

Paul.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCHv2] gitk: Show the current view's name in the window title.
  2015-04-06  4:37   ` Paul Mackerras
@ 2015-04-07 15:51     ` Marc Branchaud
  2015-05-04 14:26       ` Marc Branchaud
  2015-05-17  1:39       ` Paul Mackerras
  0 siblings, 2 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-04-07 15:51 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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.

		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
 
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCHv2] gitk: Show the current view's name in the window title.
  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
  1 sibling, 0 replies; 12+ messages in thread
From: Marc Branchaud @ 2015-05-04 14:26 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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
>  
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCHv2] gitk: Show the current view's name in the window title.
  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
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Mackerras @ 2015-05-17  1:39 UTC (permalink / raw)
  To: Marc Branchaud; +Cc: git

On Tue, Apr 07, 2015 at 11:51:51AM -0400, 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>

Thanks, applied.

Paul.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-05-17  4:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [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

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.