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.
This commit is contained in:
Matthias Clasen 2011-05-25 08:33:56 -04:00
parent e5675435c2
commit c390d4f36d

View file

@ -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)); widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, wid_name));
g_free (wid_name); g_free (wid_name);
if (widget != NULL) { 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);
} }
} }