[network-manager-applet/ce-highlight-invalid-bgo767210: 2/3] fixup! wireless-security: Make broken configuration entries red



commit 0a747fa86f35950f5ce55de0141676bd8617189b
Author: Thomas Haller <thaller redhat com>
Date:   Mon Jun 6 18:32:37 2016 +0200

    fixup! wireless-security: Make broken configuration entries red
    
    Style fixes

 src/connection-editor/page-8021x-security.c |   10 +++++-----
 src/wireless-security/eap-method-fast.c     |    3 +--
 src/wireless-security/eap-method-leap.c     |    6 ++----
 src/wireless-security/eap-method-simple.c   |   10 ++++------
 src/wireless-security/ws-leap.c             |    6 ++----
 5 files changed, 14 insertions(+), 21 deletions(-)
---
diff --git a/src/connection-editor/page-8021x-security.c b/src/connection-editor/page-8021x-security.c
index 2a41335..b17df6e 100644
--- a/src/connection-editor/page-8021x-security.c
+++ b/src/connection-editor/page-8021x-security.c
@@ -134,12 +134,12 @@ ce_page_8021x_security_new (NMConnectionEditor *editor,
 
 static void
 clear_widget_errors (GtkWidget *widget,
-                    gpointer   user_data)
+                     gpointer   user_data)
 {
        if (GTK_IS_CONTAINER (widget)) {
                gtk_container_forall (GTK_CONTAINER (widget),
-                                     clear_widget_errors,
-                                     NULL);
+                                     clear_widget_errors,
+                                     NULL);
        } else {
                widget_unset_error (widget);
        }
@@ -178,8 +178,8 @@ ce_page_validate_v (CEPage *page, NMConnection *connection, GError **error)
                }
        } else {
                gtk_container_forall (GTK_CONTAINER (priv->security_widget),
-                                     clear_widget_errors,
-                                     NULL);
+                                     clear_widget_errors,
+                                     NULL);
                nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X);
                valid = TRUE;
        }
diff --git a/src/wireless-security/eap-method-fast.c b/src/wireless-security/eap-method-fast.c
index 4fa6780..c719c36 100644
--- a/src/wireless-security/eap-method-fast.c
+++ b/src/wireless-security/eap-method-fast.c
@@ -72,9 +72,8 @@ validate (EAPMethod *parent, GError **error)
                widget_set_error (widget);
                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-FAST PAC file"));
                ret = FALSE;
-       } else {
+       } else
                widget_unset_error (widget);
-       }
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_fast_inner_auth_combo"));
        g_assert (widget);
diff --git a/src/wireless-security/eap-method-leap.c b/src/wireless-security/eap-method-leap.c
index 5fbdd86..4887d96 100644
--- a/src/wireless-security/eap-method-leap.c
+++ b/src/wireless-security/eap-method-leap.c
@@ -64,9 +64,8 @@ validate (EAPMethod *parent, GError **error)
                widget_set_error (GTK_WIDGET (method->username_entry));
                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-LEAP username"));
                ret = FALSE;
-       } else {
+       } else
                widget_unset_error (GTK_WIDGET (method->username_entry));
-       }
 
        text = gtk_entry_get_text (method->password_entry);
        if (!text || !strlen (text)) {
@@ -74,9 +73,8 @@ validate (EAPMethod *parent, GError **error)
                if (!*error)
                        g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-LEAP 
password"));
                ret = FALSE;
-       } else {
+       } else
                widget_unset_error (GTK_WIDGET (method->password_entry));
-       }
 
        return ret;
 }
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index 0f72029..a6c820f 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -73,23 +73,21 @@ validate (EAPMethod *parent, GError **error)
                widget_set_error (GTK_WIDGET (method->username_entry));
                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP username"));
                ret = FALSE;
-       } else {
+       } else
                widget_unset_error (GTK_WIDGET (method->username_entry));
-       }
 
        /* Check if the password should always be requested */
-       if (always_ask_selected (method->password_entry)) {
+       if (always_ask_selected (method->password_entry))
                widget_unset_error (GTK_WIDGET (method->password_entry));
-       } else {
+       else {
                text = gtk_entry_get_text (method->password_entry);
                if (!text || !strlen (text)) {
                        widget_set_error (GTK_WIDGET (method->password_entry));
                        if (!*error)
                                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP 
password"));
                        ret = FALSE;
-               } else {
+               } else
                        widget_unset_error (GTK_WIDGET (method->password_entry));
-               }
        }
 
        return ret;
diff --git a/src/wireless-security/ws-leap.c b/src/wireless-security/ws-leap.c
index 2b8b615..9695e35 100644
--- a/src/wireless-security/ws-leap.c
+++ b/src/wireless-security/ws-leap.c
@@ -62,9 +62,8 @@ validate (WirelessSecurity *parent, GError **error)
                widget_set_error (entry);
                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing leap-username"));
                ret = FALSE;
-       } else {
+       } else
                widget_unset_error (entry);
-       }
 
        entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_password_entry"));
        g_assert (entry);
@@ -74,9 +73,8 @@ validate (WirelessSecurity *parent, GError **error)
                if (!*error)
                        g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing leap-password"));
                ret = FALSE;
-       } else {
+       } else
                widget_unset_error (entry);
-       }
 
        return ret;
 }


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