pull request

Dirk Hohndel dirk at hohndel.org
Fri Aug 17 15:13:49 PDT 2012


Dirk Hohndel <dirk at hohndel.org> writes:

> Hi Linus,
>
> this fixes the selection oddities that have been introduced with the
> dive trip based grouping.
>
> The one oddity that I haven't tracked down is when you use the cursor
> keys and are on the top entry (which is the summary entry for the first
> dive trip) and press cursor up. Strangely that still unselects all the
> dives.
> But this is not really a regression introduced by my changes - this even
> happens when we sort by another column. Hitting 'cursor up' when at the
> top entry also unselects all dives - but in that case the effect isn't
> as noticable as we treat "no dives selected" as "keep the last dive that
> was selected"...

yada, yada. Of course, right after sending this pull request, I found
yet another corner case. And fixing that made another one appear.

I am not a huge fan of gtk right now.

This is from the last commit message to explain what happens:

    The corner cases are getting more and more artificial. Without this patch,
    the following can happen:
    Select one or more dives in an (expanded) dive trip. Now collapse that
    trip with the little triangle. Select a different trip. The previously
    selected dive(s) are still part of the selection (as you can see, for
    example, in the statistics tab).
    
    With this patch the scenario above works as intended (all the dives in the
    new trip are selected), but we have another corner case:
    Just as before, select one or more dives in an expanded dive trip.
    Collapse that trip and ctrl-click on another trip. Now you lose the
    originally selected dives.
    
    Frankly, if you ctrl-click to add more dives to your selection - just
    don't collapse the trips the dives are in?
    
    As this new corner case seems even more artificial than the previous one,
    I consider this patch an improvement. But fundamentally I am just battling
    all the ways in which gtk's selection handling is messed up. When I get
    the selection call back I cannot tell if this is a new selection or an
    incremental selection (i.e., a shift-click or ctrl-click).
    

/D


The following changes since commit aab94d07ccb890caaa03cf220b442ea5ce228fc1:

  Fix string handling in get_combo_box_entry_text (2012-08-17 09:36:04 -0700)

are available in the git repository at:

  git://git.hohndel.org/subsurface.git fixes

for you to fetch changes up to 9e9ba73b3d21c2184c16f3ba5cf3a71f7c662a55:

  Another selection fix (2012-08-17 15:08:50 -0700)

----------------------------------------------------------------
Dirk Hohndel (2):
      More fiddling with the selection
      Another selection fix

 divelist.c | 66 +++++++++++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 45 insertions(+), 21 deletions(-)


More information about the subsurface mailing list