network: Fix hotspot switch getting out of sync
When the user switches the hotspot switch off, we present a confirmation dialog which can be canceled. We do keep the hotspot running in that case, but we forget to set the switch back to 'on'. Fix that.
This commit is contained in:
parent
96caacc136
commit
d6e11db107
1 changed files with 8 additions and 0 deletions
|
@ -1352,6 +1352,14 @@ stop_hotspot_response_cb (GtkWidget *dialog, gint response, NetDeviceWifi *devic
|
|||
{
|
||||
if (response == GTK_RESPONSE_OK) {
|
||||
stop_shared_connection (device_wifi);
|
||||
} else {
|
||||
GtkWidget *sw;
|
||||
|
||||
sw = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
|
||||
"switch_hotspot_off"));
|
||||
device_wifi->priv->updating_device = TRUE;
|
||||
gtk_switch_set_active (GTK_SWITCH (sw), TRUE);
|
||||
device_wifi->priv->updating_device = FALSE;
|
||||
}
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue