Mercurial > geeqie
changeset 1574:ee2b66a09a03
compilation fixes for older glib and gtk
author | nadvornik |
---|---|
date | Tue, 28 Apr 2009 06:54:59 +0000 |
parents | 007d54b763cd |
children | 7a541ebaf0b9 |
files | src/bar_exif.c src/compat.c src/compat.h src/main.h src/utilops.c |
diffstat | 5 files changed, 28 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bar_exif.c Mon Apr 27 23:07:59 2009 +0000 +++ b/src/bar_exif.c Tue Apr 28 06:54:59 2009 +0000 @@ -235,16 +235,12 @@ g_signal_handlers_block_by_func(ee->value_widget, bar_pane_exif_entry_changed, ee); gtk_entry_set_text(GTK_ENTRY(ee->value_widget), text ? text : ""); g_signal_handlers_unblock_by_func(ee->value_widget, bar_pane_exif_entry_changed, ee); -#if GTK_CHECK_VERSION(2,12,0) gtk_widget_set_tooltip_text(ee->box, NULL); -#endif } else { gtk_label_set_text(GTK_LABEL(ee->value_widget), text); -#if GTK_CHECK_VERSION(2,12,0) gtk_widget_set_tooltip_text(ee->box, text); -#endif } gtk_widget_show(entry); ped->all_hidden = FALSE;
--- a/src/compat.c Mon Apr 27 23:07:59 2009 +0000 +++ b/src/compat.c Tue Apr 28 06:54:59 2009 +0000 @@ -35,4 +35,24 @@ } #endif } + +#if !GLIB_CHECK_VERSION(2, 14, 0) +static void hash_table_add(gpointer key, gpointer value, gpointer user_data) +{ + GList **list = user_data; + *list = g_list_prepend(*list, key); +} +#endif + +GList* hash_table_get_keys(GHashTable *hash_table) +{ +#if GLIB_CHECK_VERSION(2, 14, 0) + return g_hash_table_get_keys(hash_table); +#else + GList *list = NULL; + g_hash_table_foreach(hash_table, hash_table_add, &list); + return list; +#endif +} + /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- a/src/compat.h Mon Apr 27 23:07:59 2009 +0000 +++ b/src/compat.h Tue Apr 28 06:54:59 2009 +0000 @@ -14,6 +14,12 @@ #define COMPAT_H void radio_action_set_current_value(GtkRadioAction *action, gint current_value); +GList* hash_table_get_keys(GHashTable *hash_table); + +#if !GTK_CHECK_VERSION(2,12,0) +#define gtk_widget_set_tooltip_text(widget, text) /* ignored */ +#endif + #endif /* COMPAT_H */ /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */