[gnome-control-center/wip/networking2: 7/36] network: Fix hotspot switch getting out of sync
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/networking2: 7/36] network: Fix hotspot switch getting out of sync
- Date: Mon, 7 Jan 2013 05:14:48 +0000 (UTC)
commit 252aa7f4c3686a3f9f45cb31b0ec53e050318550
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 9 20:41:43 2012 -0500
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.
panels/network/net-device-wifi.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 9d8f221..053e0cd 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1343,6 +1343,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]