]> git.sur5r.net Git - glabels/commitdiff
2008-01-01 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Wed, 2 Jan 2008 03:26:29 +0000 (03:26 +0000)
committerJim Evins <evins@snaught.com>
Wed, 2 Jan 2008 03:26:29 +0000 (03:26 +0000)
* src/util.c:
Sort font lists alphabetically.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/branches/glabels-2_2@724 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/ChangeLog
glabels2/src/util.c

index c8e156517bea349d3f256469cb994eac4f83a011..cb686da4b1a8da20e6594def5278a4d8c58b857c 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-01  Jim Evins  <evins@snaught.com>
+
+       * src/util.c:
+               Sort font lists alphabetically.
+
 2008-01-01  Jim Evins  <evins@snaught.com>
 
        * src/merge-evolution.c:
index 6d9331b354780b51845c7cabd80a6f56ac9ec664..ee9151bff7667be2545c7fc59e52fb71b0bf82ae 100644 (file)
@@ -32,6 +32,7 @@
 #include <gtk/gtkliststore.h>
 #include <gtk/gtkcellrenderertext.h>
 #include <gtk/gtkcelllayout.h>
+#include <libglabels/str.h>
 
 #define FRAC_EPSILON 0.00005
 
@@ -326,7 +327,8 @@ gl_util_get_font_family_list (void)
        for ( i=0; i<n; i++ )
        {
                name = g_strdup (pango_font_family_get_name (families[i]));
-               list = g_list_append (list, name);
+               list = g_list_insert_sorted (list, name,
+                                             (GCompareFunc)lgl_str_utf8_casecmp);
        }
 
        g_free (families);