[gnome-control-center] user-accounts: remove spinner from the password dialog



commit f05d2441558936bd607061e696cb4ba5a4aa3572
Author: Ondrej Holy <oholy redhat com>
Date:   Tue Jul 23 12:40:09 2013 +0200

    user-accounts: remove spinner from the password dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702480

 panels/user-accounts/data/password-dialog.ui |   32 +++----------------------
 panels/user-accounts/um-password-dialog.c    |   22 +-----------------
 2 files changed, 5 insertions(+), 49 deletions(-)
---
diff --git a/panels/user-accounts/data/password-dialog.ui b/panels/user-accounts/data/password-dialog.ui
index 98d895e..cb23bc4 100644
--- a/panels/user-accounts/data/password-dialog.ui
+++ b/panels/user-accounts/data/password-dialog.ui
@@ -221,35 +221,11 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkBox" id="box18">
+                  <object class="GtkImage" id="old-password-checkmark">
                     <property name="visible">True</property>
-                    <child>
-                      <object class="GtkImage" id="old-password-checkmark">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="stock">gtk-apply</property>
-                        <property name="halign">start</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <child>
-                          <object class="GtkSpinner" id="old-password-spinner">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-apply</property>
+                    <property name="halign">start</property>
                   </object>
                   <packing>
                     <property name="left_attach">2</property>
diff --git a/panels/user-accounts/um-password-dialog.c b/panels/user-accounts/um-password-dialog.c
index 4fec49e..5ced5c0 100644
--- a/panels/user-accounts/um-password-dialog.c
+++ b/panels/user-accounts/um-password-dialog.c
@@ -36,7 +36,7 @@
 #include "run-passwd.h"
 #include "pw-utils.h"
 
-#define PASSWORD_CHECK_TIMEOUT 500
+#define PASSWORD_CHECK_TIMEOUT 1000
 
 struct _UmPasswordDialog {
         GtkWidget *dialog;
@@ -57,7 +57,6 @@ struct _UmPasswordDialog {
         GtkWidget *old_password_label;
         GtkWidget *old_password_entry;
         GtkWidget *old_password_checkmark;
-        GtkWidget *old_password_spinner;
         gboolean   old_password_ok;
         gint       old_password_entry_timeout_id;
 
@@ -348,26 +347,10 @@ password_entry_focus_out (GtkWidget        *entry,
 }
 
 static void
-begin_action (UmPasswordDialog *um)
-{
-        gtk_widget_show (um->old_password_spinner);
-        gtk_spinner_start (GTK_SPINNER (um->old_password_spinner));
-}
-
-static void
-finish_action (UmPasswordDialog *um)
-{
-        gtk_widget_hide (um->old_password_spinner);
-        gtk_spinner_stop (GTK_SPINNER (um->old_password_spinner));
-}
-
-static void
 auth_cb (PasswdHandler    *handler,
          GError           *error,
          UmPasswordDialog *um)
 {
-        finish_action (um);
-
         if (error) {
                 um->old_password_ok = FALSE;
                 set_entry_validation_error (GTK_ENTRY (um->old_password_entry),
@@ -389,7 +372,6 @@ old_password_entry_timeout (UmPasswordDialog *um)
 
         text = gtk_entry_get_text (GTK_ENTRY (um->old_password_entry));
         if (strlen (text) > 0 && !um->old_password_ok) {
-                begin_action (um);
                 passwd_authenticate (um->passwd_handler, text, (PasswdCallback)auth_cb, um);
         }
 
@@ -503,7 +485,6 @@ um_password_dialog_new (void)
                           G_CALLBACK (old_password_entry_changed), um);
         um->old_password_entry = widget;
         um->old_password_label = (GtkWidget *) gtk_builder_get_object (builder, "old-password-label");
-        um->old_password_spinner = (GtkWidget *) gtk_builder_get_object (builder, "old-password-spinner");
         um->old_password_checkmark = (GtkWidget *) gtk_builder_get_object (builder, 
"old-password-checkmark");
         um->old_password_entry_timeout_id = 0;
 
@@ -569,7 +550,6 @@ um_password_dialog_set_user (UmPasswordDialog *um,
                 gtk_entry_set_text (GTK_ENTRY (um->verify_entry), "");
                 gtk_entry_set_text (GTK_ENTRY (um->old_password_entry), "");
                 gtk_widget_hide (um->old_password_checkmark);
-                gtk_widget_hide (um->old_password_spinner);
 
                 if (act_user_get_uid (um->user) == getuid ()) {
                         mode_change (um, ACT_USER_PASSWORD_MODE_REGULAR);


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