3 * Copyright (C) 2008 - 2009 The Geeqie Team
5 * Authors: Vladimir Nadvornik / Laurent Monin
7 * This software is released under the GNU General Public License (GNU GPL).
8 * Please read the included file COPYING for more information.
9 * This software comes with no warranty of any kind, use at your own risk!
15 /* gtk_radio_action_set_current_value() replacement for GTK+ < 2.10 */
16 void radio_action_set_current_value(GtkRadioAction *action, gint current_value)
18 #if GTK_CHECK_VERSION(2, 10, 0)
19 gtk_radio_action_set_current_value(action, current_value);
24 group = gtk_radio_action_get_group(action);
27 action = GTK_RADIO_ACTION(group->data);
28 g_object_get(G_OBJECT(action), "value", &value, NULL);
29 if (value == current_value)
31 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE);
34 group = g_slist_next(group);
39 #if !GLIB_CHECK_VERSION(2, 14, 0)
40 static void hash_table_add(gpointer key, gpointer value, gpointer user_data)
42 GList **list = user_data;
43 *list = g_list_prepend(*list, key);
47 GList* hash_table_get_keys(GHashTable *hash_table)
49 #if GLIB_CHECK_VERSION(2, 14, 0)
50 return g_hash_table_get_keys(hash_table);
53 g_hash_table_foreach(hash_table, hash_table_add, &list);
58 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */