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

This commit is contained in:
Richard Hughes 2012-07-26 14:43:54 +01:00
parent 9441a74e8a
commit f14b550144

View file

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