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:
Matthias Clasen 2012-12-09 20:41:43 -05:00 committed by Dan Winship
parent 96caacc136
commit d6e11db107

View file

@ -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);
}