[gnome-bluetooth/wip/hadess/workaround-connect-firmware] settings-widget: Disable discovery when connecting with switch
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/workaround-connect-firmware] settings-widget: Disable discovery when connecting with switch
- Date: Wed, 30 Sep 2020 15:21:02 +0000 (UTC)
commit dd0672839ffa01b2b5fa00907af5adba52f90fbe
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 30 17:18:01 2020 +0200
settings-widget: Disable discovery when connecting with switch
The value of the "default-adapter-discovering" property was set
incorrectly when using the switch to connect to a device.
See https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/issues/70#note_922816
Fixes: 08defddc2cdcff7f5d783de46c2fddb654c5aeed
lib/bluetooth-settings-widget.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index 5e9d3ca2..08d9d47e 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1086,9 +1086,10 @@ switch_connected_state_set (GtkSwitch *button,
data->bdaddr = g_strdup (priv->selected_bdaddr);
data->self = self;
- g_object_set (G_OBJECT (priv->client),
- "default-adapter-discovering", has_default_adapter (self),
- NULL);
+ if (gtk_switch_get_active (button))
+ g_object_set (G_OBJECT (priv->client),
+ "default-adapter-discovering", FALSE,
+ NULL);
bluetooth_client_connect_service (priv->client,
priv->selected_object_path,
gtk_switch_get_active (button),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]