]> git.0d.be Git - empathy.git/commitdiff
Fix compilation if geoclue is not enabled
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 25 Jan 2009 13:05:56 +0000 (08:05 -0500)
committerPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
Mon, 1 Jun 2009 15:35:31 +0000 (11:35 -0400)
libempathy-gtk/empathy-location-manager.c
src/empathy.c

index c0595818e29f8ae423496932e8e8b51fd71bb7c7..de772c7e366ce68404f626d4c3bff7a29acc46f0 100644 (file)
@@ -30,7 +30,6 @@
 
 #if HAVE_GEOCLUE
 #include <geoclue/geoclue-master.h>
-#endif
 
 #include <extensions/extensions.h>
 
@@ -52,12 +51,12 @@ typedef struct {
     MissionControl *mc;
     GHashTable *location;
     gpointer token;
-#if HAVE_GEOCLUE
+
     GeoclueResourceFlags resources;
     GeoclueMasterClient *gc_client;
     GeocluePosition *gc_position;
     GeoclueAddress *gc_address;
-#endif
+
     gboolean reduce_accuracy;
     gdouble reduce_value;
     EmpathyAccountManager *account_manager;
@@ -68,7 +67,6 @@ static void location_manager_get_property (GObject *object, guint param_id,
     GValue *value, GParamSpec *pspec);
 static void location_manager_set_property (GObject *object, guint param_id,
     const GValue *value, GParamSpec *pspec);
-#if HAVE_GEOCLUE
 static void position_changed_cb (GeocluePosition *position,
     GeocluePositionFields fields, int timestamp, double latitude,
     double longitude, double altitude, GeoclueAccuracy *accuracy,
@@ -83,7 +81,6 @@ static void resource_cb (EmpathyConf  *conf, const gchar *key,
     gpointer user_data);
 static void accuracy_cb (EmpathyConf  *conf, const gchar *key,
     gpointer user_data);
-#endif
 static void account_connection_changed_cb (EmpathyAccountManager *manager,
     McAccount *account, TpConnectionStatusReason reason,
     TpConnectionStatus current, TpConnectionStatus previous,
@@ -293,7 +290,6 @@ update_timestamp (EmpathyLocationManager *location_manager,
   DEBUG ("\t - Timestamp: %" G_GINT64_FORMAT, stamp64);
 }
 
-#if HAVE_GEOCLUE
 static void
 initial_position_cb (GeocluePosition *position,
                      GeocluePositionFields fields,
index 66bb2c1190e2de19ff9bf1bfac2069fc626d15ce..60c2508380a39dba32cc5baf34782bc1c78e4bed 100644 (file)
@@ -422,7 +422,9 @@ int
 main (int argc, char *argv[])
 {
        guint32            startup_timestamp;
-       EmpathyLocationManager *location_manager;
+#if HAVE_GEOCLUE
+       EmpathyLocationManager *location_manager = NULL;
+#endif
        EmpathyStatusIcon *icon;
        EmpathyDispatcher *dispatcher;
        EmpathyLogManager *log_manager;
@@ -585,7 +587,9 @@ main (int argc, char *argv[])
                G_CALLBACK (new_call_handler_cb), NULL);
 
        /* Location mananger */
+#if HAVE_GEOCLUE
        location_manager = empathy_location_manager_get_default ();
+#endif
 
        gtk_main ();
 
@@ -598,7 +602,9 @@ main (int argc, char *argv[])
        g_object_unref (dispatcher);
        g_object_unref (chatroom_manager);
        g_object_unref (ft_manager);
+#if HAVE_GEOCLUE
        g_object_unref (location_manager);
+#endif
 
        notify_uninit ();