user-accounts: remove spinner from the password dialog
https://bugzilla.gnome.org/show_bug.cgi?id=702480
This commit is contained in:
parent
39e6b6d044
commit
f05d244155
2 changed files with 5 additions and 49 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -347,27 +346,11 @@ password_entry_focus_out (GtkWidget *entry,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue