summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-07-24 10:05:21 +0200
committerBastien Nocera <hadess@hadess.net>2013-07-24 10:06:21 +0200
commitf342aa4254144e8186fca6fdb13edffa86eb0d55 (patch)
treeaa3c157318c6ed13d3b6b7777da293ee78b1ff06
parent611eb340289fcb416f766e4acedfbfdcaaa2ceed (diff)
downloadgnome-control-center-f342aa4254144e8186fca6fdb13edffa86eb0d55.tar.gz
sharing: Hide the Bluetooth bits if Bluetooth is disabled
If gnome-bluetooth is unavailable, hide the ObexFTP and ObexPush sections of the sharing panel.
-rw-r--r--panels/sharing/cc-sharing-panel.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 2348ff616..246282387 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -359,15 +359,12 @@ bluetooth_state_changed (CcSharingPanel *self)
gtk_widget_show (WID ("bluetooth-sharing-button"));
}
-#endif
-
static void
cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
{
CcSharingPanelPrivate *priv = self->priv;
GSettings *settings;
-#ifdef HAVE_BLUETOOTH
priv->bluetooth_killswitch = bluetooth_killswitch_new ();
/* get the initial state */
@@ -375,8 +372,6 @@ cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
g_signal_connect_swapped (priv->bluetooth_killswitch, "state-changed",
G_CALLBACK (bluetooth_state_changed), self);
-#endif
-
cc_sharing_panel_bind_switch_to_label (self,
WID ("share-public-folder-switch"),
@@ -409,6 +404,7 @@ cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
bluetooth_set_accept_files, NULL, NULL);
}
+#endif
static void
cc_sharing_panel_add_folder (GtkWidget *button,
@@ -1029,9 +1025,11 @@ cc_sharing_panel_init (CcSharingPanel *self)
/* bluetooth */
+#ifdef HAVE_BLUETOOTH
if (cc_sharing_panel_check_schema_available (self, FILE_SHARING_SCHEMA_ID))
cc_sharing_panel_setup_bluetooth_sharing_dialog (self);
else
+#endif /* HAVE_BLUETOOTH */
gtk_widget_hide (WID ("bluetooth-sharing-button"));
/* media sharing */