small divelist issue with select_prev_dive(), select_next_dive()

Lubomir I. Ivanov neolit123 at gmail.com
Wed Jan 30 07:05:27 PST 2013


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.

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.

lubomir
--


More information about the subsurface mailing list