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



commit 3b5085566c9c56c7ebb6f1bcc2dc273fc4930a4e
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 9c1835c..9d0a42b 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);
                method->ws_parent->password_flags_name = parent->password_flags_name;
@@ -191,7 +191,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);
        method->ws_parent->password_flags_name = parent->password_flags_name;
 
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index 66e819c..aa925df 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);
                method->ws_parent->password_flags_name = parent->password_flags_name;
@@ -302,7 +302,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);
        method->ws_parent->password_flags_name = parent->password_flags_name;
 
diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c
index 051e38a..3d39e9d 100644
--- a/src/wireless-security/eap-method-tls.c
+++ b/src/wireless-security/eap-method-tls.c
@@ -38,7 +38,7 @@ struct _EAPMethodTLS {
 
        WirelessSecurity *ws_parent;
 
-       gboolean new_connection;
+       gboolean editing_connection;
 };
 
 
@@ -185,8 +185,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 (method->ws_parent, NM_SETTING (s_8021x), flags, widget);
        }
 
@@ -441,7 +441,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;
        method->ws_parent = wireless_security_ref (ws_parent);
        method->ws_parent->password_flags_name = parent->password_flags_name;
 
diff --git a/src/wireless-security/ws-leap.c b/src/wireless-security/ws-leap.c
index 8ee4298..dc1a535 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;
 };
 
 static void
@@ -112,8 +112,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 (parent, NM_SETTING (s_wireless_sec), secret_flags, widget);
 }
 
@@ -162,7 +162,7 @@ ws_leap_new (NMConnection *connection, gboolean secrets_only)
        parent->adhoc_compatible = FALSE;
        parent->password_flags_name = NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD;
        sec = (WirelessSecurityLEAP *) parent;
-       sec->new_connection = secrets_only ? FALSE : TRUE;
+       sec->editing_connection = secrets_only ? FALSE : TRUE;
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_password_entry"));
        g_assert (widget);
diff --git a/src/wireless-security/ws-wep-key.c b/src/wireless-security/ws-wep-key.c
index 7442e9b..2a98035 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;
 
        NMWepKeyType type;
        char keys[4][65];
@@ -185,7 +185,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 (parent, NM_SETTING (s_wsec), secret_flags, passwd_entry);
 }
 
@@ -255,7 +256,7 @@ ws_wep_key_new (NMConnection *connection,
 
        parent->password_flags_name = NM_SETTING_WIRELESS_SECURITY_WEP_KEY0;
        sec = (WirelessSecurityWEPKey *) parent;
-       sec->new_connection = secrets_only ? FALSE : TRUE;
+       sec->editing_connection = secrets_only ? FALSE : TRUE;
        sec->type = type;
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_entry"));
diff --git a/src/wireless-security/ws-wpa-psk.c b/src/wireless-security/ws-wpa-psk.c
index 9e2ab1e..2c54591 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;
 };
 
 static void
@@ -126,7 +126,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 (parent, NM_SETTING (s_wireless_sec), secret_flags, passwd_entry);
 
        wireless_security_clear_ciphers (connection);
@@ -181,7 +182,7 @@ ws_wpa_psk_new (NMConnection *connection, gboolean secrets_only)
        parent->adhoc_compatible = FALSE;
        parent->password_flags_name = NM_SETTING_WIRELESS_SECURITY_PSK;
        sec = (WirelessSecurityWPAPSK *) parent;
-       sec->new_connection = secrets_only ? FALSE : TRUE;
+       sec->editing_connection = secrets_only ? FALSE : TRUE;
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_entry"));
        g_assert (widget);


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