[gnome-control-center/wifi-dont-show-conf-button-for-non-active-connections] network: Show configuration button only for active/connecting connections
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wifi-dont-show-conf-button-for-non-active-connections] network: Show configuration button only for active/connecting connections
- Date: Mon, 18 Oct 2021 12:43:57 +0000 (UTC)
commit ea734b648634804665b44d24bccb9f13f32e90eb
Author: Felipe Borges <felipeborges gnome org>
Date: Mon Oct 18 14:39:28 2021 +0200
network: Show configuration button only for active/connecting connections
In commit c7bd4428399588dc777cdca45f5f415f37cfec66 we started to
show the configuration button for all rows, which fixes the original
issue of not being able to tweak a connection during association but
also introduces a regression of not having connection data to show
for other connections in the list. This way, the configuration
button will fail to create a net_connection_editor interface for
rows that aren't associated with an active connection.
Let's only show the configuration button when the NMActiveConnectionState
is either NM_ACTIVE_CONNECTION_STATE_ACTIVATING or
NM_ACTIVE_CONNECTION_STATE_ACTIVATED.
Fixes #1494
panels/network/cc-wifi-connection-row.c | 3 +++
panels/network/cc-wifi-connection-row.ui | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/panels/network/cc-wifi-connection-row.c b/panels/network/cc-wifi-connection-row.c
index d1ded0fc9..8d8b9962a 100644
--- a/panels/network/cc-wifi-connection-row.c
+++ b/panels/network/cc-wifi-connection-row.c
@@ -37,6 +37,7 @@ struct _CcWifiConnectionRow
GtkSpinner *connecting_spinner;
GtkImage *encrypted_icon;
GtkLabel *name_label;
+ GtkButton *options_button;
GtkImage *strength_icon;
};
@@ -250,6 +251,7 @@ update_ui (CcWifiConnectionRow *self)
}
gtk_widget_set_visible (GTK_WIDGET (self->active_label), active);
+ gtk_widget_set_visible (GTK_WIDGET (self->options_button), active || connecting);
if (security != NM_AP_SEC_UNKNOWN && security != NM_AP_SEC_NONE && security != NM_AP_SEC_OWE)
{
@@ -457,6 +459,7 @@ cc_wifi_connection_row_class_init (CcWifiConnectionRowClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcWifiConnectionRow, connecting_spinner);
gtk_widget_class_bind_template_child (widget_class, CcWifiConnectionRow, encrypted_icon);
gtk_widget_class_bind_template_child (widget_class, CcWifiConnectionRow, name_label);
+ gtk_widget_class_bind_template_child (widget_class, CcWifiConnectionRow, options_button);
gtk_widget_class_bind_template_child (widget_class, CcWifiConnectionRow, strength_icon);
gtk_widget_class_bind_template_callback (widget_class, configure_clicked_cb);
diff --git a/panels/network/cc-wifi-connection-row.ui b/panels/network/cc-wifi-connection-row.ui
index 39bb6db8b..e294484cb 100644
--- a/panels/network/cc-wifi-connection-row.ui
+++ b/panels/network/cc-wifi-connection-row.ui
@@ -81,7 +81,7 @@
</object>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton" id="options_button">
<property name="name">options_button</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]