[network-manager-applet/jk/password-icon-1-0: 16/17] fixup! editor: remove "Always ask for this password every time" checkbox



commit 243f71a1789a019854b9be8b28c2ac569ee8341f
Author: Jiří Klimeš <jklimes redhat com>
Date:   Fri Apr 24 13:47:56 2015 +0200

    fixup! editor: remove "Always ask for this password every time" checkbox

 src/wireless-security/eap-method-simple.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index da1025f..9402254 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -195,16 +195,18 @@ password_storage_changed (GObject *entry,
                           EAPMethodSimple *method)
 {
        gboolean always_ask;
+       gboolean secrets_only = method->flags & EAP_METHOD_SIMPLE_FLAG_SECRETS_ONLY;
 
        always_ask = always_ask_selected (method->password_entry);
 
-       if (always_ask) {
+       if (always_ask && !secrets_only) {
                /* we always clear this button and do not restore it
                 * (because we want to hide the password). */
                gtk_toggle_button_set_active (method->show_password, FALSE);
        }
 
-       gtk_widget_set_sensitive (GTK_WIDGET (method->show_password), !always_ask);
+       gtk_widget_set_sensitive (GTK_WIDGET (method->show_password),
+                                 !always_ask || secrets_only);
 
        if (!method->idle_func_id)
                method->idle_func_id = g_idle_add ((GSourceFunc) stuff_changed, method);
@@ -339,9 +341,6 @@ eap_method_simple_new (WirelessSecurity *ws_parent,
                          G_CALLBACK (password_storage_changed),
                          method);
 
-       if (flags & EAP_METHOD_SIMPLE_FLAG_SECRETS_ONLY)
-               gtk_widget_hide (widget);
-
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "show_checkbutton_eapsimple"));
        g_assert (widget);
        method->show_password = GTK_TOGGLE_BUTTON (widget);


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