]> git.street.me.uk Git - andy/viking.git/commitdiff
Relax dependencies about glib
authorGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Tue, 9 Oct 2007 20:40:17 +0000 (20:40 +0000)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Tue, 9 Oct 2007 20:40:17 +0000 (20:40 +0000)
By implementing g_hash_table_remove_all ourselves we can relax
the glib dependency (no more need about glib 2.12).
Evan's patch.

ChangeLog
src/viktrwlayer.c

index ae0a3ccd7da4ef30011df6a495c4a7935c8426fc..de482d54038b180be8512b228a7d39fbdd786124 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,11 @@ Quy Tonthat <qtonthat@gmail.com>:
        * Add realtime tracking to GPS layer.
        * fix half-drawn problems for GPS layer.
 
+2007-10-01
+Guilhem Bonnefille <guilhem.bonnefille@gmail.com>:
+       * Relax dependencies about glib by implementing
+       g_hash_table_remove_all ourselves (Evan's patch)
+
 2007-10-01
 Quy Tonthat <qtonthat@gmail.com>:
        * Disable half-drawn update when the center is moved. Avoid using
index bb52a7980902fc07f022476af4260da93275f83e..149b39da7598b5eac6fd8705c001a753b16f912b 100644 (file)
 #include <stdlib.h>
 #include <ctype.h>
 
+/* Relax some dependencies */
+#if ! GLIB_CHECK_VERSION(2,12,0)
+static gboolean return_true (gpointer a, gpointer b, gpointer c) { return TRUE; }
+static g_hash_table_remove_all (GHashTable *ght) { g_hash_table_foreach_remove ( ght, (GHRFunc) return_true, FALSE ); }
+#endif
+
 #define GOOGLE_DIRECTIONS_STRING "(wget -O - \"http://maps.google.com/maps?q=%f,%f to %f,%f&output=js\" 2>/dev/null)"
 #define VIK_TRW_LAYER_TRACK_GC 13
 #define VIK_TRW_LAYER_TRACK_GC_RATES 10