Mercurial > geeqie
comparison src/compat.c @ 1574:ee2b66a09a03
compilation fixes for older glib and gtk
author | nadvornik |
---|---|
date | Tue, 28 Apr 2009 06:54:59 +0000 |
parents | 8b89e3ff286b |
children | 956aab097ea7 |
comparison
equal
deleted
inserted
replaced
1573:007d54b763cd | 1574:ee2b66a09a03 |
---|---|
33 } | 33 } |
34 group = g_slist_next(group); | 34 group = g_slist_next(group); |
35 } | 35 } |
36 #endif | 36 #endif |
37 } | 37 } |
38 | |
39 #if !GLIB_CHECK_VERSION(2, 14, 0) | |
40 static void hash_table_add(gpointer key, gpointer value, gpointer user_data) | |
41 { | |
42 GList **list = user_data; | |
43 *list = g_list_prepend(*list, key); | |
44 } | |
45 #endif | |
46 | |
47 GList* hash_table_get_keys(GHashTable *hash_table) | |
48 { | |
49 #if GLIB_CHECK_VERSION(2, 14, 0) | |
50 return g_hash_table_get_keys(hash_table); | |
51 #else | |
52 GList *list = NULL; | |
53 g_hash_table_foreach(hash_table, hash_table_add, &list); | |
54 return list; | |
55 #endif | |
56 } | |
57 | |
38 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ | 58 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |