{"thread":{"id":"38297","subject":"[RFC PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.","startedAt":"2015-01-06T17:51:58Z","lastAt":"2015-05-17T01:39:24Z","messageCount":12,"participants":["Marc Branchaud","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"254350","messageId":"1420566720-25238-1-git-send-email-marcnarc@xiplink.com","threadId":"38297","inReplyTo":null,"subject":"[PATCH 0/2] Tweaking the gitk window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-01-06T17:51:58Z","receivedAt":"2015-01-06T17:51:58Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"The first patch simply changes the title from \"gitk: <dir>\" to \"<dir> - gitk\",\nwhich is the title layout used by most of the applications on my Kubuntu box.\n\nThe second patch is the one that I'm more keen to see accepted.  It relies\non the first only in that it follows the new title layout.\n\n\t\tM.\n"},{"id":"254349","messageId":"1420566720-25238-2-git-send-email-marcnarc@xiplink.com","threadId":"38297","inReplyTo":"1420566720-25238-1-git-send-email-marcnarc@xiplink.com","subject":"[PATCH 1/2] gitk: Rearrange window title to be more conventional.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-01-06T17:51:59Z","receivedAt":"2015-01-06T17:51:59Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n---\n\nI did a bit of googling but couldn't find some standard that says the\napplication name goes at the end of the title bar.  But this is how all the\nbrowsers and other apps I use regularly do things.\n\n\t\tM.\n\n gitk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 78358a7..03de545 100755\n--- a/gitk\n+++ b/gitk\n@@ -12293,7 +12293,7 @@ catch {\n }\n # wait for the window to become visible\n tkwait visibility .\n-wm title . \"$appname: [reponame]\"\n+wm title . \"[reponame] - $appname\"\n update\n readrefs\n \n-- \n2.2.1\n"},{"id":"254348","messageId":"1420566720-25238-3-git-send-email-marcnarc@xiplink.com","threadId":"38297","inReplyTo":"1420566720-25238-1-git-send-email-marcnarc@xiplink.com","subject":"[RFC PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-01-06T17:52:00Z","receivedAt":"2015-01-06T17:52:00Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n---\n\nI often open multiple gitk windows in the same working directory to examine\nother branches or refs in the repo.  This change allows me to distinguish\nwhich window is showing what.\n\nThis is an RFC because it doesn't behave great with views.  I don't use views\nat all, so this doesn't bother me.  I'm not too sure what should be displayed\nif the user changes views -- probably the view name, but I'm not sure how to\nget a that in the code.\n\n\t\tM.\n\n gitk | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 03de545..b8463fd 100755\n--- a/gitk\n+++ b/gitk\n@@ -488,7 +488,7 @@ proc reset_pending_select {selid} {\n }\n \n proc getcommits {selid} {\n-    global canv curview need_redisplay viewactive\n+    global appname canv curview need_redisplay viewactive vrevs\n \n     initlayout\n     if {[start_rev_list $curview]} {\n@@ -498,6 +498,11 @@ proc getcommits {selid} {\n     } else {\n \tshow_status [mc \"No commits selected\"]\n     }\n+    set rev \"$vrevs($curview)\"\n+    if {$rev eq \"\"} {\n+\tset rev \"HEAD\"\n+    }\n+    wm title . \"[reponame]: $rev - $appname\"\n }\n \n proc updatecommits {} {\n-- \n2.2.1\n"},{"id":"255288","messageId":"54C655FD.8020801@xiplink.com","threadId":"38297","inReplyTo":"1420566720-25238-1-git-send-email-marcnarc@xiplink.com","subject":"Re: [PATCH 0/2] Tweaking the gitk window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-01-26T14:58:05Z","receivedAt":"2015-01-26T14:58:05Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 15-01-06 12:51 PM, Marc Branchaud wrote:\n> The first patch simply changes the title from \"gitk: <dir>\" to \"<dir> - gitk\",\n> which is the title layout used by most of the applications on my Kubuntu box.\n> \n> The second patch is the one that I'm more keen to see accepted.  It relies\n> on the first only in that it follows the new title layout.\n\nPing?\n\n\t\tM.\n"},{"id":"256847","messageId":"54F48443.2020007@xiplink.com","threadId":"38297","inReplyTo":"1420566720-25238-1-git-send-email-marcnarc@xiplink.com","subject":"Re: [PATCH 0/2] Tweaking the gitk window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-03-02T15:39:47Z","receivedAt":"2015-03-02T15:39:47Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 15-01-06 12:51 PM, Marc Branchaud wrote:\n> The first patch simply changes the title from \"gitk: <dir>\" to \"<dir> - gitk\",\n> which is the title layout used by most of the applications on my Kubuntu box.\n> \n> The second patch is the one that I'm more keen to see accepted.  It relies\n> on the first only in that it follows the new title layout.\n\nPing?\n\n\t\tM.\n"},{"id":"258362","messageId":"1427120297-26314-1-git-send-email-marcnarc@xiplink.com","threadId":"38297","inReplyTo":"1420566720-25238-1-git-send-email-marcnarc@xiplink.com","subject":"[PATCH 1/2] gitk: Rearrange window title to be more conventional.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-03-23T14:18:16Z","receivedAt":"2015-03-23T14:18:16Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n---\n\nI did a bit of googling but couldn't find some standard that says the\napplication name goes at the end of the title bar.  But this is how all the\nbrowsers and other apps I use regularly do things.\n\n\t\tM.\n\n gitk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 9a2daf3..b859879 100755\n--- a/gitk\n+++ b/gitk\n@@ -12393,7 +12393,7 @@ catch {\n }\n # wait for the window to become visible\n tkwait visibility .\n-wm title . \"$appname: [reponame]\"\n+wm title . \"[reponame] - $appname\"\n update\n readrefs\n \n-- \n2.3.3\n"},{"id":"258363","messageId":"1427120297-26314-2-git-send-email-marcnarc@xiplink.com","threadId":"38297","inReplyTo":"1427120297-26314-1-git-send-email-marcnarc@xiplink.com","subject":"[PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-03-23T14:18:17Z","receivedAt":"2015-03-23T14:18:17Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n---\n\nI often open multiple gitk windows in the same working directory to examine\nother branches or refs in the repo.  This change allows me to distinguish\nwhich window is showing what.\n\n\t\tM.\n\n gitk | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex b859879..379b13a 100755\n--- a/gitk\n+++ b/gitk\n@@ -488,7 +488,7 @@ proc reset_pending_select {selid} {\n }\n \n proc getcommits {selid} {\n-    global canv curview need_redisplay viewactive\n+    global appname canv curview need_redisplay viewactive vrevs\n \n     initlayout\n     if {[start_rev_list $curview]} {\n@@ -498,6 +498,11 @@ proc getcommits {selid} {\n     } else {\n \tshow_status [mc \"No commits selected\"]\n     }\n+    set rev \"$vrevs($curview)\"\n+    if {$rev eq \"\"} {\n+\tset rev \"HEAD\"\n+    }\n+    wm title . \"[reponame]: $rev - $appname\"\n }\n \n proc updatecommits {} {\n-- \n2.3.3\n"},{"id":"259049","messageId":"20150406043711.GC31463@iris.ozlabs.ibm.com","threadId":"38297","inReplyTo":"1420566720-25238-3-git-send-email-marcnarc@xiplink.com","subject":"Re: [RFC PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2015-04-06T04:37:11Z","receivedAt":"2015-04-06T04:37:11Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Tue, Jan 06, 2015 at 12:52:00PM -0500, Marc Branchaud wrote:\n> Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n> ---\n> \n> I often open multiple gitk windows in the same working directory to examine\n> other branches or refs in the repo.  This change allows me to distinguish\n> which window is showing what.\n> \n> This is an RFC because it doesn't behave great with views.  I don't use views\n> at all, so this doesn't bother me.  I'm not too sure what should be displayed\n> if the user changes views -- probably the view name, but I'm not sure how to\n> get a that in the code.\n\nThe view name is in $viewname($curview).  If that is \"Command line\"\nyou probably want to show some selected command line arguments.\n\nUsing $vrevs($curview) seems about right, though it will contain\n\"--gitk-symmetric-diff-marker\" in some situations, which is an\ninternal thing that we don't want to show externally.  You should\nprobably filter it out.\n\nThe patch will need a proper description before I can apply it, of\ncourse.\n\nPaul.\n"},{"id":"259047","messageId":"20150406043848.GD31463@iris.ozlabs.ibm.com","threadId":"38297","inReplyTo":"1427120297-26314-1-git-send-email-marcnarc@xiplink.com","subject":"Re: [PATCH 1/2] gitk: Rearrange window title to be more conventional.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2015-04-06T04:38:48Z","receivedAt":"2015-04-06T04:38:48Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Mon, Mar 23, 2015 at 10:18:16AM -0400, Marc Branchaud wrote:\n> Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n\nThanks, applied.\n\nPaul.\n"},{"id":"259137","messageId":"1428421911-20393-1-git-send-email-marcnarc@xiplink.com","threadId":"38297","inReplyTo":"20150406043711.GC31463@iris.ozlabs.ibm.com","subject":"[PATCHv2] gitk: Show the current view's name in the window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-04-07T15:51:51Z","receivedAt":"2015-04-07T15:51:51Z","isPatch":false,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"If the current view is the \"Command line\" view, show the command line\narguments instead of the view name.\n\nSigned-off-by: Marc Branchaud <marcnarc@xiplink.com>\n---\n\nThis is v2 of my previous \"Show the command-line revs in the window title\" RFC\npatch.  (I'm having trouble accessing gmane, or I'd include a link here.)\n\nThis version incorporates Paul's feedback (thanks!) and handles view properly.\n\n\t\tM.\n\n gitk | 17 ++++++++++++++++-\n 1 file changed, 16 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex b859879..90419e3 100755\n--- a/gitk\n+++ b/gitk\n@@ -4034,6 +4034,19 @@ proc shellsplit {str} {\n     return $l\n }\n \n+proc set_window_title {} {\n+    global appname curview viewname vrevs\n+    set rev [mc \"All files\"]\n+    if {$curview ne 0} {\n+\tif {$viewname($curview) eq [mc \"Command line\"]} {\n+\t    set rev [string map {\"--gitk-symmetric-diff-marker\" \"--merge\"} $vrevs($curview)]\n+\t} else {\n+\t    set rev $viewname($curview)\n+\t}\n+    }\n+    wm title . \"[reponame]: $rev - $appname\"\n+}\n+\n # Code to implement multiple views\n \n proc newview {ishighlight} {\n@@ -4510,6 +4523,7 @@ proc showview {n} {\n     } elseif {$numcommits == 0} {\n \tshow_status [mc \"No commits selected\"]\n     }\n+    set_window_title\n }\n \n # Stuff relating to the highlighting facility\n@@ -6650,6 +6664,7 @@ proc show_status {msg} {\n     global canv fgcolor\n \n     clear_display\n+    set_window_title\n     $canv create text 3 3 -anchor nw -text $msg -font mainfont \\\n \t-tags text -fill $fgcolor\n }\n@@ -12393,7 +12408,7 @@ catch {\n }\n # wait for the window to become visible\n tkwait visibility .\n-wm title . \"[reponame] - $appname\"\n+set_window_title\n update\n readrefs\n \n-- \n2.3.5\n"},{"id":"260526","messageId":"55478195.4070301@xiplink.com","threadId":"38297","inReplyTo":"1428421911-20393-1-git-send-email-marcnarc@xiplink.com","subject":"Re: [PATCHv2] gitk: Show the current view's name in the window title.","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2015-05-04T14:26:29Z","receivedAt":"2015-05-04T14:26:29Z","isPatch":false,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 15-04-07 11:51 AM, Marc Branchaud wrote:\n> If the current view is the \"Command line\" view, show the command line\n> arguments instead of the view name.\n> \n> Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n> ---\n> \n> This is v2 of my previous \"Show the command-line revs in the window title\" RFC\n> patch.  (I'm having trouble accessing gmane, or I'd include a link here.)\n> \n> This version incorporates Paul's feedback (thanks!) and handles view properly.\n\nPing?\n\n\t\tM.\n\n\n> \t\tM.\n> \n>  gitk | 17 ++++++++++++++++-\n>  1 file changed, 16 insertions(+), 1 deletion(-)\n> \n> diff --git a/gitk b/gitk\n> index b859879..90419e3 100755\n> --- a/gitk\n> +++ b/gitk\n> @@ -4034,6 +4034,19 @@ proc shellsplit {str} {\n>      return $l\n>  }\n>  \n> +proc set_window_title {} {\n> +    global appname curview viewname vrevs\n> +    set rev [mc \"All files\"]\n> +    if {$curview ne 0} {\n> +\tif {$viewname($curview) eq [mc \"Command line\"]} {\n> +\t    set rev [string map {\"--gitk-symmetric-diff-marker\" \"--merge\"} $vrevs($curview)]\n> +\t} else {\n> +\t    set rev $viewname($curview)\n> +\t}\n> +    }\n> +    wm title . \"[reponame]: $rev - $appname\"\n> +}\n> +\n>  # Code to implement multiple views\n>  \n>  proc newview {ishighlight} {\n> @@ -4510,6 +4523,7 @@ proc showview {n} {\n>      } elseif {$numcommits == 0} {\n>  \tshow_status [mc \"No commits selected\"]\n>      }\n> +    set_window_title\n>  }\n>  \n>  # Stuff relating to the highlighting facility\n> @@ -6650,6 +6664,7 @@ proc show_status {msg} {\n>      global canv fgcolor\n>  \n>      clear_display\n> +    set_window_title\n>      $canv create text 3 3 -anchor nw -text $msg -font mainfont \\\n>  \t-tags text -fill $fgcolor\n>  }\n> @@ -12393,7 +12408,7 @@ catch {\n>  }\n>  # wait for the window to become visible\n>  tkwait visibility .\n> -wm title . \"[reponame] - $appname\"\n> +set_window_title\n>  update\n>  readrefs\n>  \n> \n"},{"id":"261401","messageId":"20150517013924.GC21039@iris.ozlabs.ibm.com","threadId":"38297","inReplyTo":"1428421911-20393-1-git-send-email-marcnarc@xiplink.com","subject":"Re: [PATCHv2] gitk: Show the current view's name in the window title.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2015-05-17T01:39:24Z","receivedAt":"2015-05-17T01:39:24Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Tue, Apr 07, 2015 at 11:51:51AM -0400, Marc Branchaud wrote:\n> If the current view is the \"Command line\" view, show the command line\n> arguments instead of the view name.\n> \n> Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>\n\nThanks, applied.\n\nPaul.\n"}]}