[gnome-control-center/wip/networking3: 5/17] network: Fix hotspot switch getting out of sync
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/networking3: 5/17] network: Fix hotspot switch getting out of sync
- Date: Wed, 30 Jan 2013 15:52:56 +0000 (UTC)
commit 9467098f0b473f8d689a7e2f0ee32edfbabf71e1
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 65b553e..a1d0169 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]