r17468 - gnucash/trunk/src/gnome-utils - 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.

Charles Day cedayiv at cvs.gnucash.org
Wed Aug 13 13:44:11 EDT 2008


Author: cedayiv
Date: 2008-08-13 13:44:11 -0400 (Wed, 13 Aug 2008)
New Revision: 17468
Trac: http://svn.gnucash.org/trac/changeset/17468

Modified:
   gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c
Log:
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 


Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c	2008-08-12 20:12:37 UTC (rev 17467)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-commodity.c	2008-08-13 17:44:11 UTC (rev 17468)
@@ -458,6 +458,12 @@
   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);



More information about the gnucash-changes mailing list