git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Alexander Gavrilov <angavrilov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH (GITK) 5/6] gitk: Fixed automatic row selection during load.
Date: Thu, 31 Jul 2008 21:25:31 +1000	[thread overview]
Message-ID: <18577.41259.758690.635991@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <200807271021.46661.angavrilov@gmail.com>

Alexander Gavrilov writes:

> - Switching views now actually preserves the selected commit.
> - Reloading (also Edit View) preserves the currently selected commit.
> - Initial selection does not produce weird scrolling.
> 
> Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>

I need a more detailed explanation of the rationale for the specific
changes you have made in the changelog.

As for the patch, it mostly looks good, but I have a few comments
below.

> +proc getcommits {selid} {
>      global canv curview need_redisplay viewactive
>  
>      initlayout
>      if {[start_rev_list $curview]} {
> +	reset_pending_select $selid

Is there any significance to having the call to reset_pending_select
after the start_rev_list call (other than not setting pending_select
if start_rev_list fails)?  I couldn't see any.  If there is then it
should be noted in a comment and/or the patch description.

> @@ -503,7 +511,7 @@ proc updatecommits {} {
>      filerun $fd [list getcommitlines $fd $i $view 1]
>      incr viewactive($view)
>      set viewcomplete($view) 0
> -    set pending_select $mainheadid
> +    reset_pending_select {}

This doesn't actually change anything, right?  If so then I'd prefer
the simple, direct assignment to calling a procedure that does the
assignment.

> @@ -4036,6 +4042,7 @@ proc layoutmore {} {
>      }
>      if {[info exists pending_select] &&
>  	[commitinview $pending_select $curview]} {
> +	update
>  	selectline [rowofcommit $pending_select] 1

What does that update do?  Would update idletasks be better?

Thanks,
Paul.

  parent reply	other threads:[~2008-07-31 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-27  6:17 [PATCH (GITK) 0/6] Runaway process and commit selection fixes Alexander Gavrilov
2008-07-27  6:18 ` [PATCH (GITK) 1/6] gitk: Kill back-end processes on window close Alexander Gavrilov
2008-07-27  6:19   ` [PATCH (GITK) 2/6] gitk: Register diff-files & diff-index in commfd, to ensure kill Alexander Gavrilov
2008-07-27  6:20     ` [PATCH (GITK) 3/6] gitk: On Windows use a Cygwin-specific flag for kill Alexander Gavrilov
2008-07-27  6:20       ` [PATCH (GITK) 4/6] gitk: Fixed broken exception handling in diff Alexander Gavrilov
2008-07-27  6:21         ` [PATCH (GITK) 5/6] gitk: Fixed automatic row selection during load Alexander Gavrilov
2008-07-27  6:22           ` [PATCH (GITK) 6/6] gitk: Fallback to selecting the head commit upon load Alexander Gavrilov
2008-07-31 11:25           ` Paul Mackerras [this message]
2008-07-31 12:41             ` [PATCH (GITK) 5/6] gitk: Fixed automatic row selection during load Alexander Gavrilov
2008-08-03  8:49               ` [RFC PATCH (GITK)] gitk: Allow overriding the default commit Alexander Gavrilov

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18577.41259.758690.635991@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=angavrilov@gmail.com \
    --cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).