AUDIT: r17439 - gnucash/trunk/src/gnome-utils - Usability: Price Editor: Sort price trees on the commodity column by default. This allows for a consistent default sort even if commodities are removed from and re-added to the model. This can happen, for example, when a namespace or commodity is changed in another place (like the Security Editor) and gets removed and then re-added to the commodity db.
Charles Day
cedayiv at cvs.gnucash.org
Wed Jul 30 16:54:02 EDT 2008
Author: cedayiv
Date: 2008-07-30 16:54:01 -0400 (Wed, 30 Jul 2008)
New Revision: 17439
Trac: http://svn.gnucash.org/trac/changeset/17439
Modified:
gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c
Log:
Usability: Price Editor: Sort price trees on the commodity column by default. This allows for a consistent default sort even if commodities are removed from and re-added to the model. This can happen, for example, when a namespace or commodity is changed in another place (like the Security Editor) and gets removed and then re-added to the commodity db.
BP
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c 2008-07-30 01:08:07 UTC (rev 17438)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-price.c 2008-07-30 20:54:01 UTC (rev 17439)
@@ -471,6 +471,12 @@
gnc_tree_view_configure_columns(view);
+ /* Sort on the commodity column by default. This allows for a consistent
+ * sort if commodities are removed and re-added from the model. */
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(s_model),
+ GNC_TREE_MODEL_PRICE_COL_COMMODITY,
+ GTK_SORT_ASCENDING);
+
gtk_widget_show(GTK_WIDGET(view));
LEAVE(" %p", view);
return GTK_TREE_VIEW(view);
More information about the gnucash-changes
mailing list