gnucash maint: Make TreeView toggle-buttons not activatable if no toggle callback.
John Ralls
jralls at code.gnucash.org
Sun Apr 28 20:09:16 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/e42c8113 (commit)
from https://github.com/Gnucash/gnucash/commit/3feb8646 (commit)
commit e42c81134158c30a31cef8727bc44c9b46e746d7
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Apr 28 14:33:46 2019 -0700
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.
diff --git a/gnucash/gnome-utils/gnc-tree-view.c b/gnucash/gnome-utils/gnc-tree-view.c
index e1aa9ef46..6498c91f4 100644
--- a/gnucash/gnome-utils/gnc-tree-view.c
+++ b/gnucash/gnome-utils/gnc-tree-view.c
@@ -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,
Summary of changes:
gnucash/gnome-utils/gnc-tree-view.c | 4 ++++
1 file changed, 4 insertions(+)
More information about the gnucash-changes
mailing list