Display the SX variables in the "Since Last Run..." dialog in ASCII order

rather than ordering by hashvalue (i.e. no order at all) as was done previously.
Patch by Jesse Weinstein.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18693 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2010-02-20 00:25:31 +00:00
parent 0e00cfd225
commit ccf46258e5

View File

@ -337,11 +337,17 @@ gnc_sx_instance_new(GncSxInstances *parent, GncSxInstanceState state, GDate *dat
return rtn; return rtn;
} }
static gint
_compare_GncSxVariables(gconstpointer a, gconstpointer b)
{
return strcmp(((const GncSxVariable*)a)->name, ((const GncSxVariable*)b)->name);
}
static void static void
_build_list_from_hash_elts(gpointer key, gpointer value, gpointer user_data) _build_list_from_hash_elts(gpointer key, gpointer value, gpointer user_data)
{ {
GList **list = (GList**)user_data; GList **list = (GList**)user_data;
*list = g_list_append(*list, value); *list = g_list_insert_sorted(*list, value, _compare_GncSxVariables);
} }
GList * GList *