sharing: Hide the Bluetooth bits if Bluetooth is disabled
If gnome-bluetooth is unavailable, hide the ObexFTP and ObexPush sections of the sharing panel.
This commit is contained in:
parent
611eb34028
commit
f342aa4254
1 changed files with 3 additions and 5 deletions
|
@ -359,15 +359,12 @@ bluetooth_state_changed (CcSharingPanel *self)
|
||||||
gtk_widget_show (WID ("bluetooth-sharing-button"));
|
gtk_widget_show (WID ("bluetooth-sharing-button"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
|
cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
|
||||||
{
|
{
|
||||||
CcSharingPanelPrivate *priv = self->priv;
|
CcSharingPanelPrivate *priv = self->priv;
|
||||||
GSettings *settings;
|
GSettings *settings;
|
||||||
|
|
||||||
#ifdef HAVE_BLUETOOTH
|
|
||||||
priv->bluetooth_killswitch = bluetooth_killswitch_new ();
|
priv->bluetooth_killswitch = bluetooth_killswitch_new ();
|
||||||
|
|
||||||
/* get the initial state */
|
/* 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_signal_connect_swapped (priv->bluetooth_killswitch, "state-changed",
|
||||||
G_CALLBACK (bluetooth_state_changed), self);
|
G_CALLBACK (bluetooth_state_changed), self);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
cc_sharing_panel_bind_switch_to_label (self,
|
cc_sharing_panel_bind_switch_to_label (self,
|
||||||
WID ("share-public-folder-switch"),
|
WID ("share-public-folder-switch"),
|
||||||
|
@ -409,6 +404,7 @@ cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
|
||||||
bluetooth_set_accept_files, NULL, NULL);
|
bluetooth_set_accept_files, NULL, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cc_sharing_panel_add_folder (GtkWidget *button,
|
cc_sharing_panel_add_folder (GtkWidget *button,
|
||||||
|
@ -1029,9 +1025,11 @@ cc_sharing_panel_init (CcSharingPanel *self)
|
||||||
|
|
||||||
|
|
||||||
/* bluetooth */
|
/* bluetooth */
|
||||||
|
#ifdef HAVE_BLUETOOTH
|
||||||
if (cc_sharing_panel_check_schema_available (self, FILE_SHARING_SCHEMA_ID))
|
if (cc_sharing_panel_check_schema_available (self, FILE_SHARING_SCHEMA_ID))
|
||||||
cc_sharing_panel_setup_bluetooth_sharing_dialog (self);
|
cc_sharing_panel_setup_bluetooth_sharing_dialog (self);
|
||||||
else
|
else
|
||||||
|
#endif /* HAVE_BLUETOOTH */
|
||||||
gtk_widget_hide (WID ("bluetooth-sharing-button"));
|
gtk_widget_hide (WID ("bluetooth-sharing-button"));
|
||||||
|
|
||||||
/* media sharing */
|
/* media sharing */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue