Revision: 1671
http://geeqie.svn.sourceforge.net/geeqie/?rev=1671&view=rev
Author: nadvornik
Date: 2009-04-28 06:54:59 +0000 (Tue, 28 Apr 2009)
Log Message:
-----------
compilation fixes for older glib and gtk
Modified Paths:
--------------
trunk/src/bar_exif.c
trunk/src/compat.c
trunk/src/compat.h
trunk/src/main.h
trunk/src/utilops.c
Modified: trunk/src/bar_exif.c
===================================================================
--- trunk/src/bar_exif.c 2009-04-27 23:07:59 UTC (rev 1670)
+++ trunk/src/bar_exif.c 2009-04-28 06:54:59 UTC (rev 1671)
@@ -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;
Modified: trunk/src/compat.c
===================================================================
--- trunk/src/compat.c 2009-04-27 23:07:59 UTC (rev 1670)
+++ trunk/src/compat.c 2009-04-28 06:54:59 UTC (rev 1671)
@@ -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: */
Modified: trunk/src/compat.h
===================================================================
--- trunk/src/compat.h 2009-04-27 23:07:59 UTC (rev 1670)
+++ trunk/src/compat.h 2009-04-28 06:54:59 UTC (rev 1671)
@@ -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: */
Modified: trunk/src/main.h
===================================================================
--- trunk/src/main.h 2009-04-27 23:07:59 UTC (rev 1670)
+++ trunk/src/main.h 2009-04-28 06:54:59 UTC (rev 1671)
@@ -57,6 +57,7 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
+#include "compat.h"
/*
*----------------------------------------------------------------------------
Modified: trunk/src/utilops.c
===================================================================
--- trunk/src/utilops.c 2009-04-27 23:07:59 UTC (rev 1670)
+++ trunk/src/utilops.c 2009-04-28 06:54:59 UTC (rev 1671)
@@ -1834,7 +1834,7 @@
if (fd && fd->modified_xmp)
{
- keys = g_hash_table_get_keys(fd->modified_xmp);
+ keys = hash_table_get_keys(fd->modified_xmp);
}
g_assert(keys);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn