list|select-item(position, true, false) Doesn't work under GtkColumnView
Reproducible with current main. I found this when implementing the new list view in nautilus.
Steps to reproduce
Given a GtkColumnView whose list items are sellectable, hold Ctrl and single-click any row using the primary button.
Expected behavior
Toggles the selection state of the row.
Current behavior
Nothing seems to happen.
Interpretation
I believe this happens because the list|select-item
action gets called twice for a single event:
- By
GtkColumnViewCell
(because it's a subclass ofGtkListItemWidget
). - And by the whole row
GtkListItemWidget
(the child of the internalGtkListView
).
Workaround
If I set GtkListItem:selectable
to FALSE during a column's emission of GtkSignalListItemFactory::setup
callback, I can at least stop that column's GtkColumnViewCell
from triggering the action. I suppose this works because that the cell widgets are created after the row widget.
Another workaround is to call the action a 3rd time in the application's own click event handler.
Solution?
I can't figure out what the right fix would be.
I can try to write a patch if you point me in the right direction.