[gnome-control-center/gnome-3-18] bluetooth: Avoid broken state when enabling Bluetooth



commit 16fc8c0d4b24699e3e047dda1bdee0a919f908e4
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Jan 10 14:49:15 2016 +0100

    bluetooth: Avoid broken state when enabling Bluetooth
    
    When enabling Bluetooth, and with older versions of the rfkill
    gnome-settings-daemon D-Bus service, we could get into a state where the
    Bluetooth rfkill was off, but the hciX rfkill associated with the
    adapter is blocked.
    
    Avoid showing filler text in that case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760168

 panels/bluetooth/cc-bluetooth-panel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index c1ba61f..61e96f1 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -155,7 +155,8 @@ cc_bluetooth_panel_update_power (CcBluetoothPanel *self)
                sensitive = FALSE;
                powered = FALSE;
                page = BLUETOOTH_AIRPLANE_PAGE;
-       } else if (self->priv->bt_airplane_mode) {
+       } else if (self->priv->bt_airplane_mode ||
+                  !bluetooth_settings_widget_get_default_adapter_powered (BLUETOOTH_SETTINGS_WIDGET 
(self->priv->widget))) {
                g_debug ("Default adapter is unpowered, but should be available");
                sensitive = TRUE;
                powered = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]