[gnome-control-center] Network: use the correct condition for the option button



commit c390d4f36d53adeb197adef41259d2ed050bc229
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 25 08:33:56 2011 -0400

    Network: use the correct condition for the option button
    
    The button needs a connection to edit; so set the sensitivity
    based on the existence of a connection.

 panels/network/cc-network-panel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 15c2950..9d4b1db 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -1270,7 +1270,7 @@ refresh_header_ui (CcNetworkPanel *panel, NMDevice *device, const char *page_nam
         widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, wid_name));
         g_free (wid_name);
         if (widget != NULL) {
-                gtk_widget_set_sensitive (widget, state == NM_DEVICE_STATE_ACTIVATED);
+                gtk_widget_set_sensitive (widget, find_connection_for_device (panel, device) != NULL);
         }
 }
 



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