Add:maptool:Sort tiles after name
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 14 Jun 2011 20:10:11 +0000 (20:10 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 14 Jun 2011 20:10:11 +0000 (20:10 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4531 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/maptool/tile.c

index 777790f..ec34212 100644 (file)
@@ -236,6 +236,11 @@ merge_tile(char *base, char *sub)
        return 1;
 }
 
+static gint
+get_tiles_list_cmp(gconstpointer s1, gconstpointer s2)
+{
+       return strcmp((char *)s1, (char *)s2);
+}
 
 static void
 get_tiles_list_func(char *key, struct tile_head *th, GList **list)
@@ -248,6 +253,7 @@ get_tiles_list(void)
 {
        GList *ret=NULL;
        g_hash_table_foreach(tile_hash, (GHFunc)get_tiles_list_func, &ret);
+       ret=g_list_sort(ret, get_tiles_list_cmp);
        return ret;
 }