Make TreeView toggle-buttons not activatable if no toggle callback.

So that it's clear in the UI that clicking on the box won't do anything.
The case that triggered this is the Get-online-quotes item in the
Securities Editor tree view.
This commit is contained in:
John Ralls 2019-04-28 14:33:46 -07:00
parent 3feb864691
commit e42c811341

View File

@ -1723,6 +1723,10 @@ gnc_tree_view_add_toggle_column (GncTreeView *view,
g_return_val_if_fail (GNC_IS_TREE_VIEW(view), NULL);
renderer = gtk_cell_renderer_toggle_new ();
if (!toggle_edited_cb)
{
gtk_cell_renderer_toggle_set_activatable (GTK_CELL_RENDERER_TOGGLE (renderer), FALSE);
}
column =
gtk_tree_view_column_new_with_attributes (column_short_title,
renderer,