Sorry about mixing three patches in one; I don't (yet) know how to make bzr separate them. I'll do it by hand if requested, though.
All three of these patches are tiny, less than 10 lines for each. First, I modified the sx variable handling code to sort the variables when it turns them into a list, for display in the "Since Last Run..." dialog. In the process of getting gnucash to build, I found that I needed to add bzr support to gnc-svnversion, so that's the second patch. Also, I noticed that README referred to a non-existent file, so per a suggestion on IRC, I took the reference out. Let me know if these would be of interest, and/or if I should submit them in a different way. As for licensing, I hereby give up any copyright interest I may have in them, and release them to the public domain, e.g. http://creativecommons.org/publicdomain/zero/1.0/ Jesse Weinstein
Index: README =================================================================== --- README (revision 17012) +++ README (working copy) @@ -423,9 +423,7 @@ ------------------ Before you start developing GnuCash, you should do the following: -1. Read the file src/doc/coding-style.txt to learn about the coding-styles - used in the GnuCash source code. Also read - http://wiki.gnucash.org/wiki/Development +1. Read http://wiki.gnucash.org/wiki/Development 2. Several of the directories under src contain files called design.txt which explain many aspects of GnuCash's design. Read those. Index: src/app-utils/gnc-sx-instance-model.c =================================================================== --- src/app-utils/gnc-sx-instance-model.c (revision 18571) +++ src/app-utils/gnc-sx-instance-model.c (working copy) @@ -337,11 +337,17 @@ return rtn; } +static gint +_compare_GncSxVariables(gconstpointer a, gconstpointer b) +{ + return strcmp(((const GncSxVariable*)a)->name, ((const GncSxVariable*)b)->name); +} + static void _build_list_from_hash_elts(gpointer key, gpointer value, gpointer user_data) { GList **list = (GList**)user_data; - *list = g_list_append(*list, value); + *list = g_list_insert_sorted(*list, value, _compare_GncSxVariables); } GList * Index: util/gnc-svnversion =================================================================== --- util/gnc-svnversion (revision 17120) +++ util/gnc-svnversion (working copy) @@ -54,7 +54,18 @@ fi fi -if test $OSTYPE == "msys" +if test -d "${real_srcdir}"/.bzr ; +then + bzrhead=`bzr version-info "${real_srcdir}"` + if test $? = 0 ; then + echo "$bzrhead" | awk -F ':' '/revision-id/{print $5}' + exit 0 + else + exit 1 + fi +fi + +if test $OSTYPE -a $OSTYPE = "msys"; then svk_name="svk.bat" svk_cmd="cmd \/c svk"
_______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
