[accounts-dialog] Some more details
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Some more details
- Date: Wed, 3 Mar 2010 03:28:35 +0000 (UTC)
commit d60d9a38fc607656109e6071a6f53c851968049a
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 2 22:25:24 2010 -0500
Some more details
Clear the verify entry when inserting a generated password, and
move the focus there. Also, make caps lock warnings and invalid
password warnings work together.
src/um-password-dialog.c | 10 ++++++----
src/um-utils.c | 9 +++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
index 96ad719..23defeb 100644
--- a/src/um-password-dialog.c
+++ b/src/um-password-dialog.c
@@ -107,7 +107,9 @@ activate_password_item (GtkMenuItem *item,
password = gtk_menu_item_get_label (item);
gtk_entry_set_text (GTK_ENTRY (um->password_entry), password);
+ gtk_entry_set_text (GTK_ENTRY (um->verify_entry), "");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (um->show_password_button), TRUE);
+ gtk_widget_grab_focus (um->verify_entry);
}
static void generate_passwords (UmPasswordDialog *um);
@@ -665,8 +667,8 @@ um_password_dialog_new (void)
um->password_entry = widget;
widget = (GtkWidget *) gtk_builder_get_object (builder, "old-password-entry");
- g_signal_connect (widget, "focus-out-event",
- G_CALLBACK (old_password_entry_focus_out), um);
+ g_signal_connect_after (widget, "focus-out-event",
+ G_CALLBACK (old_password_entry_focus_out), um);
g_signal_connect (widget, "notify::text",
G_CALLBACK (old_password_entry_changed), um);
g_signal_connect (widget, "activate",
@@ -677,8 +679,8 @@ um_password_dialog_new (void)
widget = (GtkWidget *) gtk_builder_get_object (builder, "verify-entry");
g_signal_connect (widget, "notify::text",
G_CALLBACK (verify_entry_changed), um);
- g_signal_connect (widget, "focus-out-event",
- G_CALLBACK (verify_entry_focus_out), um);
+ g_signal_connect_after (widget, "focus-out-event",
+ G_CALLBACK (verify_entry_focus_out), um);
um->verify_entry = widget;
len = 0;
diff --git a/src/um-utils.c b/src/um-utils.c
index 6d81fe4..5d638fd 100644
--- a/src/um-utils.c
+++ b/src/um-utils.c
@@ -273,6 +273,7 @@ void
set_entry_validation_error (GtkEntry *entry,
const gchar *text)
{
+ g_object_set (entry, "caps-lock-warning", FALSE, NULL);
gtk_entry_set_icon_from_stock (entry,
GTK_ENTRY_ICON_SECONDARY,
GTK_STOCK_DIALOG_ERROR);
@@ -292,10 +293,18 @@ set_entry_validation_error (GtkEntry *entry,
void
clear_entry_validation_error (GtkEntry *entry)
{
+ gboolean warning;
+
+ g_object_get (entry, "caps-lock-warning", &warning, NULL);
+
+ if (warning)
+ return;
+
g_object_set (entry, "has-tooltip", FALSE, NULL);
gtk_entry_set_icon_from_pixbuf (entry,
GTK_ENTRY_ICON_SECONDARY,
NULL);
+ g_object_set (entry, "caps-lock-warning", TRUE, NULL);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]