[PATCH] Select all dives in a trip when said trip is expanded and clicked

Linus Torvalds torvalds at linux-foundation.org
Mon Feb 18 10:47:54 PST 2013


On Mon, Feb 18, 2013 at 10:35 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> I'm not understanding why you do thegtk_tree_view_row_expanded on each
> iteration.

Oh, ok, I see it. You intentionally break the whole "if the trip is
expanded, just rely on gtk selection", and you want to select the
dives when you select the trip by hand but not the dives.

And no, we cannot do this. I know we *used* to do it, but it was
buggy.  When the dives are exposed, we have to let the gtk selection
just work, because not doing that screws things up.

So right now, if the trip is expanded, and you want to select the
children, you have to actually do that with the mouse. Exactly because
of the whole "messing with what gtk already knows about the selection
doesn't really work".

It's annoying, yes. But the alternative was to have random SIGSEGV's.

You can *possibly* do this by creating a list of the selected trips,
and after letting the gtk selection work, iterate over that list.
That's close to what we used to do, but we did it from the "selection
will change" callback, and that didn't work because you then need to
wait to use it until after the selection is done, and in the meantime
there might have been a callback that removed some entry (this was why
we got SIGSEGV's on OS X - apparently gtk just happens to be robust
for this on X11, but not with the Quartz backend)

                    Linus


More information about the subsurface mailing list