Usability: Sort commodity trees on the commodity name by default. This allows for a consistent default sort even if commodities are quickly removed from and re-added to the model. This can happen, for example, when a commodity is edited in the Security Editor.

BP 


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17468 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Charles Day 2008-08-13 17:44:11 +00:00
parent fca4b45dcc
commit 9a653982fe

View File

@ -458,6 +458,12 @@ gnc_tree_view_commodity_new (QofBook *book,
g_object_set_data(G_OBJECT(col), DEFAULT_VISIBLE, GINT_TO_POINTER(1));
gnc_tree_view_configure_columns(view);
/* Sort on the name column by default. This allows for a consistent
* sort if commodities are briefly removed and re-added. */
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(s_model),
GNC_TREE_MODEL_COMMODITY_COL_FULLNAME,
GTK_SORT_ASCENDING);
gtk_widget_show(GTK_WIDGET(view));
LEAVE(" %p", view);
return GTK_TREE_VIEW(view);