[gnome-control-center/wip/networking2: 62/101] network: Fix hotspot switch getting out of sync



commit 78f3a4e2709f140314077c0a3e64dd8dab93c965
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 3a326ae..a3c9b4c 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]