[network-manager-applet/jk/rh879566-secret-flags: 2/4] trivial: rename new_connection to editing_connection



commit c296fda35b6264799e9fc26060b24522ac4a3b37
Author: Jiří Klimeš <jklimes redhat com>
Date:   Tue Nov 26 13:10:57 2013 +0100

    trivial: rename new_connection to editing_connection
    
    Because it is actually not a new connection, rather it denotes that we edit the
    connection as opposed to just providing password(s).

 src/wireless-security/eap-method-leap.c   |    8 ++++----
 src/wireless-security/eap-method-simple.c |    8 ++++----
 src/wireless-security/eap-method-tls.c    |    8 ++++----
 src/wireless-security/ws-leap.c           |    8 ++++----
 src/wireless-security/ws-wep-key.c        |    7 ++++---
 src/wireless-security/ws-wpa-psk.c        |    7 ++++---
 6 files changed, 24 insertions(+), 22 deletions(-)
---
diff --git a/src/wireless-security/eap-method-leap.c b/src/wireless-security/eap-method-leap.c
index 44eb720..6f0fa9d 100644
--- a/src/wireless-security/eap-method-leap.c
+++ b/src/wireless-security/eap-method-leap.c
@@ -33,7 +33,7 @@ struct _EAPMethodLEAP {
 
        WirelessSecurity *ws_parent;
 
-       gboolean new_connection;
+       gboolean editing_connection;
 
        GtkEntry *username_entry;
        GtkEntry *password_entry;
@@ -94,8 +94,8 @@ fill_connection (EAPMethod *parent, NMConnection *connection, NMSettingSecretFla
        g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, gtk_entry_get_text (method->username_entry), NULL);
        g_object_set (s_8021x, NM_SETTING_802_1X_PASSWORD, gtk_entry_get_text (method->password_entry), NULL);
 
-       /* Default to agent-owned secrets for new connections */
-       if (method->new_connection) {
+       /* Update secret flags and popup when editing the connection */
+       if (method->editing_connection) {
                GtkWidget *passwd_entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, 
"eap_leap_password_entry"));
                g_assert (passwd_entry);
 
@@ -190,7 +190,7 @@ eap_method_leap_new (WirelessSecurity *ws_parent,
 
        parent->password_flags_name = NM_SETTING_802_1X_PASSWORD;
        method = (EAPMethodLEAP *) parent;
-       method->new_connection = secrets_only ? FALSE : TRUE;
+       method->editing_connection = secrets_only ? FALSE : TRUE;
        method->ws_parent = wireless_security_ref (ws_parent);
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_notebook"));
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index ffbf8df..e302e39 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -36,7 +36,7 @@ struct _EAPMethodSimple {
 
        EAPMethodSimpleType type;
        gboolean is_editor;
-       gboolean new_connection;
+       gboolean editing_connection;
 
        GtkEntry *username_entry;
        GtkEntry *password_entry;
@@ -157,8 +157,8 @@ fill_connection (EAPMethod *parent, NMConnection *connection, NMSettingSecretFla
                g_object_set (s_8021x, NM_SETTING_802_1X_PASSWORD, gtk_entry_get_text 
(method->password_entry), NULL);
        }
 
-       /* Default to agent-owned secrets for new connections */
-       if (method->new_connection) {
+       /* Update secret flags and popup when editing the connection */
+       if (method->editing_connection) {
                GtkWidget *passwd_entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, 
"eap_simple_password_entry"));
                g_assert (passwd_entry);
 
@@ -301,7 +301,7 @@ eap_method_simple_new (WirelessSecurity *ws_parent,
        method = (EAPMethodSimple *) parent;
        method->type = type;
        method->is_editor = is_editor;
-       method->new_connection = secrets_only ? FALSE : TRUE;
+       method->editing_connection = secrets_only ? FALSE : TRUE;
        method->ws_parent = wireless_security_ref (ws_parent);
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_notebook"));
diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c
index 8777fed..eb48ed6 100644
--- a/src/wireless-security/eap-method-tls.c
+++ b/src/wireless-security/eap-method-tls.c
@@ -36,7 +36,7 @@
 struct _EAPMethodTLS {
        EAPMethod parent;
 
-       gboolean new_connection;
+       gboolean editing_connection;
 };
 
 
@@ -183,8 +183,8 @@ fill_connection (EAPMethod *parent, NMConnection *connection, NMSettingSecretFla
        }
        g_free (pk_filename);
 
-       /* Default to agent-owned secrets for new connections */
-       if (method->new_connection) {
+       /* Update secret flags and popup when editing the connection */
+       if (method->editing_connection) {
                ws_update_password_storage (NM_SETTING (s_8021x), flags, passwd_entry, 
parent->password_flags_name);
        }
 
@@ -431,7 +431,7 @@ eap_method_tls_new (WirelessSecurity *ws_parent,
                                        NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD :
                                        NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD;
        method = (EAPMethodTLS *) parent;
-       method->new_connection = secrets_only ? FALSE : TRUE;
+       method->editing_connection = secrets_only ? FALSE : TRUE;
 
        if (connection)
                s_8021x = nm_connection_get_setting_802_1x (connection);
diff --git a/src/wireless-security/ws-leap.c b/src/wireless-security/ws-leap.c
index a7adccd..72894e8 100644
--- a/src/wireless-security/ws-leap.c
+++ b/src/wireless-security/ws-leap.c
@@ -28,7 +28,7 @@
 
 struct _WirelessSecurityLEAP {
        WirelessSecurity parent;
-       gboolean new_connection;
+       gboolean editing_connection;
        const char *password_flags_name;
 };
 
@@ -114,8 +114,8 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
                      NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD, leap_password,
                      NULL);
 
-       /* Default to agent-owned secrets for new connections */
-       if (sec->new_connection)
+       /* Update secret flags and popup when editing the connection */
+       if (sec->editing_connection)
                ws_update_password_storage (NM_SETTING (s_wireless_sec), secret_flags, passwd_entry, 
sec->password_flags_name);
 }
 
@@ -163,7 +163,7 @@ ws_leap_new (NMConnection *connection, gboolean secrets_only)
 
        parent->adhoc_compatible = FALSE;
        sec = (WirelessSecurityLEAP *) parent;
-       sec->new_connection = secrets_only ? FALSE : TRUE;
+       sec->editing_connection = secrets_only ? FALSE : TRUE;
        sec->password_flags_name = NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD;
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_password_entry"));
diff --git a/src/wireless-security/ws-wep-key.c b/src/wireless-security/ws-wep-key.c
index ed86030..a865f20 100644
--- a/src/wireless-security/ws-wep-key.c
+++ b/src/wireless-security/ws-wep-key.c
@@ -32,7 +32,7 @@
 struct _WirelessSecurityWEPKey {
        WirelessSecurity parent;
 
-       gboolean new_connection;
+       gboolean editing_connection;
        const char *password_flags_name;
 
        NMWepKeyType type;
@@ -186,7 +186,8 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
                        nm_setting_wireless_security_set_wep_key (s_wsec, i, sec->keys[i]);
        }
 
-       if (sec->new_connection)
+       /* Update secret flags and popup when editing the connection */
+       if (sec->editing_connection)
                ws_update_password_storage (NM_SETTING (s_wsec), secret_flags, passwd_entry, 
sec->password_flags_name);
 }
 
@@ -255,7 +256,7 @@ ws_wep_key_new (NMConnection *connection,
                return NULL;
 
        sec = (WirelessSecurityWEPKey *) parent;
-       sec->new_connection = secrets_only ? FALSE : TRUE;
+       sec->editing_connection = secrets_only ? FALSE : TRUE;
        sec->password_flags_name = NM_SETTING_WIRELESS_SECURITY_WEP_KEY0;
        sec->type = type;
 
diff --git a/src/wireless-security/ws-wpa-psk.c b/src/wireless-security/ws-wpa-psk.c
index 8ab7f76..e33fcf4 100644
--- a/src/wireless-security/ws-wpa-psk.c
+++ b/src/wireless-security/ws-wpa-psk.c
@@ -32,7 +32,7 @@
 struct _WirelessSecurityWPAPSK {
        WirelessSecurity parent;
 
-       gboolean new_connection;
+       gboolean editing_connection;
        const char *password_flags_name;
 };
 
@@ -127,7 +127,8 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
        key = gtk_entry_get_text (GTK_ENTRY (widget));
        g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_PSK, key, NULL);
 
-       if (wpa_psk->new_connection)
+       /* Update secret flags and popup when editing the connection */
+       if (wpa_psk->editing_connection)
                ws_update_password_storage (NM_SETTING (s_wireless_sec), secret_flags, passwd_entry, 
wpa_psk->password_flags_name);
 
        wireless_security_clear_ciphers (connection);
@@ -181,7 +182,7 @@ ws_wpa_psk_new (NMConnection *connection, gboolean secrets_only)
 
        parent->adhoc_compatible = FALSE;
        sec = (WirelessSecurityWPAPSK *) parent;
-       sec->new_connection = secrets_only ? FALSE : TRUE;
+       sec->editing_connection = secrets_only ? FALSE : TRUE;
        sec->password_flags_name = NM_SETTING_WIRELESS_SECURITY_PSK;
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_entry"));


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