]> git.street.me.uk Git - andy/viking.git/commitdiff
g_timeout_add_seconds() did not exist until glib 2.14
authorQuy Tonthat <qtonthat@gmail.com>
Mon, 13 Oct 2008 04:09:30 +0000 (04:09 +0000)
committerQuy Tonthat <qtonthat@gmail.com>
Mon, 13 Oct 2008 04:09:30 +0000 (04:09 +0000)
Signed-off-by: Quy Tonthat <qtonthat@gmail.com>
src/vikgpslayer.c

index cb7c70acad492282b0dd78e7e2c68508c2af20e8..715c1b4ad80b6cb581dad8f1e8ed851b06742187 100644 (file)
 #include <gps.h>
 #endif
 
+#if ! GLIB_CHECK_VERSION(2,14,0)
+inline guint g_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data) {
+  return g_timeout_add(interval*1000, function, data);
+}
+#endif
+
 #define DISCONNECT_UPDATE_SIGNAL(vl, val) g_signal_handlers_disconnect_matched(vl, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, val)
 static VikGpsLayer *vik_gps_layer_create (VikViewport *vp);
 static void vik_gps_layer_realize ( VikGpsLayer *val, VikTreeview *vt, GtkTreeIter *layer_iter );