I have a Gtk.ColumnView where cells are represented by Gtk.EditableLabels. Keyboard navigation works fine, clicking in the cells to edit them works fine, tab navigation
works fine.
However, clicking within a row to select that row doesn't work.
Some cells are editable (i.e. label.set_editable(True)) and some are not. The ones which are editable simply go into edit mode when clicked within the bounds of the label, the ones which are not don't react to clicks at all. In order to select a row with the mouse, I have to click in the "dead space" within the row, either between rows/cells or in a part of the cell that is not covered by a short label.
What I expect / want to happen, is for clicking on a non-editable cell to immediately select the row, and for clicking on an editable cell to select its row, and then begin editing.
I can sort of emulate this for non-editable rows by doing label.set_sensitive(False), but this styles everything with a light-grey "disabled" color, and that's not what I want to indicate; the row is interactable, it's just that that particular cell / column is not editable.
It seems in gtk4, there's no longer any "clicked" signal, so handling that is not possible; I gather I want to do something with a Gtk.Gesture event controller?
Update: while I haven't had time to fully isolate this example, there is open source code available here:
- https://github.com/glyph/Pomodouroboros/blob/1a879f33a4f63cd300c748f322d035cddf234284/src/pomodouroboros/linux/linuxlegacypom.ui
- https://github.com/glyph/Pomodouroboros/blob/1a879f33a4f63cd300c748f322d035cddf234284/src/pomodouroboros/linux/old_gtk_gui.py
- https://github.com/glyph/Pomodouroboros/blob/1a879f33a4f63cd300c748f322d035cddf234284/src/pomodouroboros/linux/gobj_utils.py
minimal working codeso we could see what you created and to have code for tests.