From 6b2d9e48c82b8b73fd2af640fce4c1ba27eb7b50 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Wed, 21 Aug 2013 23:46:40 +0200 Subject: make bluetooth really optional --- src/share-extension.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/share-extension.c b/src/share-extension.c index 188c559..b3b2952 100644 --- a/src/share-extension.c +++ b/src/share-extension.c @@ -27,10 +27,13 @@ #include #include #include -#include #include #include +#ifdef HAVE_BLUETOOTH +#include +#endif + #include "caja-share-bar.h" #include "user_share-common.h" @@ -101,6 +104,7 @@ bar_response_cb (CajaShareBar *bar, } } ++#ifdef HAVE_BLUETOOTH static void downloads_bar_set_from_bluetooth_status (GtkWidget *bar) { @@ -121,6 +125,7 @@ default_adapter_powered_cb (GObject *gobject, { downloads_bar_set_from_bluetooth_status (bar); } +#endif /* HAVE_BLUETOOTH */ static GtkWidget * caja_user_share_get_location_widget (CajaLocationWidgetProvider *iface, @@ -163,8 +168,13 @@ caja_user_share_get_location_widget (CajaLocationWidgetProvider *iface, if (is_dir[0] != FALSE && is_dir[1] != FALSE) { bar = caja_share_bar_new (_("May be used to share or receive files")); } else if (is_dir[0] != FALSE) { +#ifndef HAVE_BLUETOOTH bar = caja_share_bar_new (_("May be shared over the network or Bluetooth")); +#else + bar = caja_share_bar_new (_("May be shared over the network")); +#endif /* !HAVE_BLUETOOTH */ } else { +#ifdef HAVE_BLUETOOTH BluetoothClient *client; bar = caja_share_bar_new (_("May be used to receive files over Bluetooth")); @@ -175,6 +185,7 @@ caja_user_share_get_location_widget (CajaLocationWidgetProvider *iface, g_signal_connect (G_OBJECT (client), "notify::default-adapter-powered", G_CALLBACK (default_adapter_powered_cb), bar); downloads_bar_set_from_bluetooth_status (bar); +#endif /* HAVE_BLUETOOTH */ } g_signal_connect (bar, "response", -- cgit v1.2.1