Commit 8eb6b504 authored by Bastien Nocera's avatar Bastien Nocera

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 #70 (comment 922816)
Fixes: 08defddc

Closes: #70
parent 376a5b60
Pipeline #217554 passed with stage
in 6 minutes and 47 seconds
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment