mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Usability: Price Editor: Previously, nothing happened when a namespace or commodity row was activated. Now these rows will expand or collapse. It is often easier to double-click the row than hunt for the expander.
BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17440 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a8ab7e88ca
commit
d4220928d6
@ -350,7 +350,27 @@ static void
|
||||
row_activated_cb (GtkTreeView *view, GtkTreePath *path,
|
||||
GtkTreeViewColumn *column, gpointer data)
|
||||
{
|
||||
gnc_prices_dialog_edit_clicked (GTK_WIDGET (view), data);
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
g_return_if_fail(view);
|
||||
|
||||
model = gtk_tree_view_get_model(view);
|
||||
if (gtk_tree_model_get_iter(model, &iter, path))
|
||||
{
|
||||
if (gtk_tree_model_iter_has_child(model, &iter))
|
||||
{
|
||||
/* There are children, so it's not a price.
|
||||
* Just expand or collapse the row. */
|
||||
if (gtk_tree_view_row_expanded(view, path))
|
||||
gtk_tree_view_collapse_row(view, path);
|
||||
else
|
||||
gtk_tree_view_expand_row(view, path, FALSE);
|
||||
}
|
||||
else
|
||||
/* It's a price, so click the Edit button. */
|
||||
gnc_prices_dialog_edit_clicked(GTK_WIDGET(view), data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user