summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2013-08-21 23:46:40 +0200
committerraveit65 <[email protected]>2013-08-21 23:46:40 +0200
commit6b2d9e48c82b8b73fd2af640fce4c1ba27eb7b50 (patch)
treea2eceb3588f8e75fd7eaa9c109e8f0f31d727ee1 /src
parent8701e25197a994f544c8b65561f25478dafc0b5b (diff)
downloadmate-user-share-6b2d9e48c82b8b73fd2af640fce4c1ba27eb7b50.tar.bz2
mate-user-share-6b2d9e48c82b8b73fd2af640fce4c1ba27eb7b50.tar.xz
make bluetooth really optional
Diffstat (limited to 'src')
-rw-r--r--src/share-extension.c13
1 files changed, 12 insertions, 1 deletions
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 <string.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include <bluetooth-client.h>
#include <libcaja-extension/caja-menu-provider.h>
#include <libcaja-extension/caja-location-widget-provider.h>
+#ifdef HAVE_BLUETOOTH
+#include <bluetooth-client.h>
+#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",