I use a Gtk Cell Renderer Toggle inside a treeView. When I click on the toggle button, the row where the toggle button is placed gets selected. I want to prevent this behaviour. I tried it by returning FALSE when the toggled signal is fired, so the event shouldn't be propageted through the parent widgets of the checkbox (the row, the treeView)...but it didn't work.
I want to keep selection feature enabled, so disabling this feature is not a solution
Here is how I did it:
renderer = gtk_cell_renderer_toggle_new();;
g_signal_connect (G_OBJECT(renderer), "toggled", (GCallback)(update_result_list_model), NULL);
And here is the callback, and it doesn't stop event propagation:
extern "C" gboolean update_result_list_model(GtkCellRendererToggle *cell,
gchar *path_str,
gpointer data)
{
// Do some job....
return false;
}
Thanks