small divelist issue with select_prev_dive(), select_next_dive()

Dirk Hohndel dirk at hohndel.org
Wed Jan 30 11:40:53 PST 2013


"Lubomir I. Ivanov" <neolit123 at gmail.com> writes:

> currently, if you import multiple dives, its possible to navigate in
> the divelist using the up/down arrow keys.
> we override select_prev_dive(), select_next_dive() since we want to
> skip the selection of trips and automatically expand them navigating
> in the dives inside.
>
> this however creates a small issue, since we override the default tree
> view behavior and yet i think we cannot control it very well.
> when the divelist is in mode GTK_SELECTION_MULTIPLE, there is an
> "anchor" row, which is the start row(?) of a selection.
> can be seen here in light orange:
> http://tiny-img.com/image.php?di=IQAI
>
> so on a fresh start of the app., while using the arrows does indeed
> work, it isn't possible to press enter over a selected dive and show
> the "dive edit" dialog.
> first a mouse click has to be made on a dive or the "anchor" has to be
> moved using ctrl + up/down. so in fact enter respects only the
> "anchor" row.

Interesting - never even realized that enter would open the edit window.

I still think we really really really need to get rid of the edit
window. Just today I got email from another user who played with
Subsurface and then stopped because they couldn't figure out how to edit
data (like Location or Buddy). And they found the program useless.

> the same doesn't happen if we don't override the default tree view
> behavior, where both the selected row and the anchor row move
> together.
> i've been trying different tricks to make the tree view move them
> together, with no success. :-(
> also while i can see how they do it in the treeview / selection source
> code, i can't find API calls to support this, and of course, normally
> we have no access to the opaque struct members.

There has got to be an API that moves the anchor row as well.
I'm at LCA today and will see if I can find someone more fluent in
Gtk...

/D


More information about the subsurface mailing list