[gnome-control-center: 8/14] network: Only show the disconnect button when a device is fully activated



commit f14b5501444faec72809b84706cc490b081218e8
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jul 26 14:43:54 2012 +0100

    network: Only show the disconnect button when a device is fully activated

 panels/network/net-device-wifi.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 2b85fe4..068fa95 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -790,6 +790,11 @@ nm_device_wifi_refresh_ui (NetDeviceWifi *device_wifi)
                                                      "button_forget"));
         gtk_widget_set_visible (widget, active_ap != NULL);
 
+        /* only disconnect when connection active */
+        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
+                                                     "button_disconnect"));
+        gtk_widget_set_sensitive (widget, state == NM_DEVICE_STATE_ACTIVATED);
+
         /* device MAC */
         str = nm_device_wifi_get_hw_address (NM_DEVICE_WIFI (nm_device));
         panel_set_device_widget_details (priv->builder, "mac", str);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]