]> 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:38 +0000 (03:26 +0000)
committerJim Evins <evins@snaught.com>
Wed, 2 Jan 2008 03:26:38 +0000 (03:26 +0000)
* src/util.c:
Sort font lists alphabetically.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@725 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/ChangeLog
glabels2/src/util.c

index 07c26ab39822a510b026fb847239b366e7326ee3..4642fcbb61804fbade9cb12a72b1266617f259c3 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);