I have a GtkListBox with a GtkListBoxRow. Same as the left panel of Gnome Contact.
What signal is emitted when hovering the mouse over GtkLisBoxRow so that I can do the same effect as Gnome Contact, to display a GtkCheckButton
I’ve tried enter-notify-event and leave-notify-event but it didn’t work.
In GTK3, GtkListBoxRow doesn’t receive events because it doesn’t have its own GdkWindow. In general, you can connect to event signals on the GtkListBox, and call gtk_list_box_get_row_at_y().
My friend thanks for the tip. Now it worked. I connected the state-flags-changed signal. and now it works. By hovering the mouse over the GtkListBoxRow I can display my GtkCheckButton.
However if I check the GTK_STATE_FLAG_PRELIGHT it does not work because the flags return the numbers 128 o move the mouse over the GtkListBoxRow and 130 when the mouse leaves the GtkListBoxRow
but it shows warning:
…/src/gui/fnc-box-row-view.c:44:12: warning: comparison between ‘GtkStateFlags’ {aka ‘enum ’} and ‘enum ’ [-Wenum-compare]
44 | if (flags == GDK_TARGET)
Also, I’m not sure why you’re calling gtk_widget_get_state_flags() if you’re in a state-flags-changed signal handler where that is provided for you as an argument.
If I don’t get the gpointer state flag I have a bag.
If I put the mouse on top of the row it doesn’t activate, just when I leave the mouse on top of the row it displays the check button