[gnome-control-center] network: Simplify helper function
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Simplify helper function
- Date: Wed, 27 Nov 2019 22:12:05 +0000 (UTC)
commit d689224941b756b123fce78e5cf0814e8a265172
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Nov 12 09:30:31 2019 +1300
network: Simplify helper function
This will allow us to remove ws_802_1x_fill_connection in a following commit.
panels/network/connection-editor/ce-page-8021x-security.c | 2 +-
panels/network/wireless-security/ws-wpa-eap.c | 6 +++---
panels/network/wireless-security/ws-wpa-eap.h | 9 +++++----
3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-8021x-security.c
b/panels/network/connection-editor/ce-page-8021x-security.c
index 2e5f57f11..794e29cd5 100644
--- a/panels/network/connection-editor/ce-page-8021x-security.c
+++ b/panels/network/connection-editor/ce-page-8021x-security.c
@@ -139,7 +139,7 @@ ce_page_8021x_security_validate (CEPage *cepage, NMConnection *connection, GErro
s_con = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
nm_connection_add_setting (tmp_connection, nm_setting_duplicate (s_con));
- ws_802_1x_fill_connection (ws_wpa_eap_get_auth_combo (self->security),
tmp_connection);
+ ws_wpa_eap_fill_connection (self->security, tmp_connection);
s_8021x = nm_connection_get_setting (tmp_connection, NM_TYPE_SETTING_802_1X);
nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
diff --git a/panels/network/wireless-security/ws-wpa-eap.c b/panels/network/wireless-security/ws-wpa-eap.c
index 3fb73834e..a70cafee0 100644
--- a/panels/network/wireless-security/ws-wpa-eap.c
+++ b/panels/network/wireless-security/ws-wpa-eap.c
@@ -186,8 +186,8 @@ ws_wpa_eap_new (NMConnection *connection,
return self;
}
-GtkComboBox *
-ws_wpa_eap_get_auth_combo (WirelessSecurityWPAEAP *self)
+void
+ws_wpa_eap_fill_connection (WirelessSecurityWPAEAP *self, NMConnection *connection)
{
- return self->auth_combo;
+ ws_802_1x_fill_connection (self->auth_combo, connection);
}
diff --git a/panels/network/wireless-security/ws-wpa-eap.h b/panels/network/wireless-security/ws-wpa-eap.h
index 605a1debe..682e982b0 100644
--- a/panels/network/wireless-security/ws-wpa-eap.h
+++ b/panels/network/wireless-security/ws-wpa-eap.h
@@ -30,10 +30,11 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (WirelessSecurityWPAEAP, ws_wpa_eap, WS, WPA_EAP, WirelessSecurity)
-WirelessSecurityWPAEAP *ws_wpa_eap_new (NMConnection *connection,
- gboolean is_editor,
- gboolean secrets_only);
+WirelessSecurityWPAEAP *ws_wpa_eap_new (NMConnection *connection,
+ gboolean is_editor,
+ gboolean secrets_only);
-GtkComboBox *ws_wpa_eap_get_auth_combo (WirelessSecurityWPAEAP *sec);
+void ws_wpa_eap_fill_connection (WirelessSecurityWPAEAP *sec,
+ NMConnection *connection);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]