public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] Add a scrollbar for commit history in gitk
@ 2013-10-29 13:53 Nicolas Cornu
  2013-10-30  6:35 ` Thomas Rast
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Cornu @ 2013-10-29 13:53 UTC (permalink / raw)
  To: git; +Cc: gitster

>From b3570290bd761a1bf952ea491fa62b123231fe61 Mon Sep 17 00:00:00 2001
From: Nicolas Cornu <ncornu@aldebaran-robotics•com>
Date: Tue, 29 Oct 2013 14:51:29 +0100
Subject: [PATCH] Add a scrollbar for commit history in gitk

---
 gitk-git/gitk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index d6f5e07..e517253 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2124,11 +2124,17 @@ proc makewindow {} {
     # create three canvases
     set cscroll .tf.histframe.csb
     set canv .tf.histframe.pwclist.canv
+    set cscrollhl .tf.histframe.pwclist.canv.csb
     canvas $canv \
     -selectbackground $selectbgcolor \
     -background $bgcolor -bd 0 \
-    -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
+    -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll" \
+    -xscrollcommand "scrollcanv $cscrollhl"
     .tf.histframe.pwclist add $canv
+    ${NS}::scrollbar $cscrollhl -command {$canv xview} -orient horizontal
+    if {!$use_ttk} {$cscrollhl configure -highlightthickness 0}
+    pack $cscrollhl -fill x -side bottom
+
     set canv2 .tf.histframe.pwclist.canv2
     canvas $canv2 \
     -selectbackground $selectbgcolor \
-- 
1.8.4.2

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

* Re: [PATCH] Add a scrollbar for commit history in gitk
  2013-10-29 13:53 [PATCH] Add a scrollbar for commit history in gitk Nicolas Cornu
@ 2013-10-30  6:35 ` Thomas Rast
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Rast @ 2013-10-30  6:35 UTC (permalink / raw)
  To: Nicolas Cornu; +Cc: git, gitster

Hi Nicolas,

Thanks for your patch.

You should Cc Paul Mackerras <paulus@samba•org> on gitk patches.

Nicolas Cornu <ncornu@aldebaran-robotics•com> writes:

> From b3570290bd761a1bf952ea491fa62b123231fe61 Mon Sep 17 00:00:00 2001
> From: Nicolas Cornu <ncornu@aldebaran-robotics•com>
> Date: Tue, 29 Oct 2013 14:51:29 +0100
> Subject: [PATCH] Add a scrollbar for commit history in gitk

You don't need these headers, they'll be taken from the email.  You only
need to put them if they don't agree (e.g., you are sending someone
else's patch).

Can you describe your patch in more detail, and spin a commit message
from it?  My first reaction to "Add a scrollbar for commit history in
gitk" is "there *is* a scrollbar".

The code hints that the scrollbar may be horizontal?  Is this worth the
vertical space it spends?  Should it be optional?  The commit message
should address these questions.

> ---
>  gitk-git/gitk | 8 +++++++-

You should eventually base your patch against the gitk.git repository,
which does not have the toplevel gitk-git/ prefix.

>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index d6f5e07..e517253 100755
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -2124,11 +2124,17 @@ proc makewindow {} {
>      # create three canvases
>      set cscroll .tf.histframe.csb
>      set canv .tf.histframe.pwclist.canv
> +    set cscrollhl .tf.histframe.pwclist.canv.csb
>      canvas $canv \
>      -selectbackground $selectbgcolor \
>      -background $bgcolor -bd 0 \
> -    -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
> +    -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll" \
> +    -xscrollcommand "scrollcanv $cscrollhl"
>      .tf.histframe.pwclist add $canv
> +    ${NS}::scrollbar $cscrollhl -command {$canv xview} -orient horizontal
> +    if {!$use_ttk} {$cscrollhl configure -highlightthickness 0}
> +    pack $cscrollhl -fill x -side bottom
> +
>      set canv2 .tf.histframe.pwclist.canv2
>      canvas $canv2 \
>      -selectbackground $selectbgcolor \

-- 
Thomas Rast
tr@thomasrast•ch

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

end of thread, other threads:[~2013-10-30  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 13:53 [PATCH] Add a scrollbar for commit history in gitk Nicolas Cornu
2013-10-30  6:35 ` Thomas Rast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox