[gdm] No longer clear the entry field by setting the entry to a string of '\b' characters. The code in gt
- From: Brian Cameron <bcameron src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] No longer clear the entry field by setting the entry to a string of '\b' characters. The code in gt
- Date: Wed, 19 May 2010 20:52:09 +0000 (UTC)
commit 4881e0138224315ac690c3bbdc9da0c927480109
Author: Brian Cameron <Brian Cameron sun com>
Date: Wed May 19 15:49:58 2010 -0500
No longer clear the entry field by setting the entry to a string of '\b'
characters. The code in gtk_editable_delete_text already does this. See
bug #576801, so this is not necessary. Just use gtk_editable_delete_text
instead.
gui/simple-greeter/gdm-greeter-login-window.c | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 946f9c5..934e5db 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -512,19 +512,6 @@ switch_mode (GdmGreeterLoginWindow *login_window,
}
static void
-delete_entry_text (GtkWidget *entry)
-{
- const char *typed_text;
- char *null_text;
-
- /* try to scrub out any secret info */
- typed_text = gtk_entry_get_text (GTK_ENTRY (entry));
- null_text = g_strnfill (strlen (typed_text) + 1, '\b');
- gtk_entry_set_text (GTK_ENTRY (entry), null_text);
- gtk_entry_set_text (GTK_ENTRY (entry), "");
-}
-
-static void
reset_dialog (GdmGreeterLoginWindow *login_window)
{
GtkWidget *entry;
@@ -557,7 +544,7 @@ reset_dialog (GdmGreeterLoginWindow *login_window)
entry = GTK_WIDGET (gtk_builder_get_object (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->builder, "auth-prompt-entry"));
- delete_entry_text (entry);
+ gtk_editable_delete_text (GTK_EDITABLE (entry), 0, -1);
gtk_entry_set_visibility (GTK_ENTRY (entry), TRUE);
set_message (login_window, "");
@@ -768,7 +755,7 @@ gdm_greeter_login_window_info_query (GdmGreeterLoginWindow *login_window,
g_debug ("GdmGreeterLoginWindow: info query: %s", text);
entry = GTK_WIDGET (gtk_builder_get_object (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->builder, "auth-prompt-entry"));
- delete_entry_text (entry);
+ gtk_editable_delete_text (GTK_EDITABLE (entry), 0, -1);
gtk_entry_set_visibility (GTK_ENTRY (entry), TRUE);
set_log_in_button_mode (login_window, LOGIN_BUTTON_ANSWER_QUERY);
@@ -797,7 +784,7 @@ gdm_greeter_login_window_secret_info_query (GdmGreeterLoginWindow *login_window,
_show_cancel_button (login_window);
entry = GTK_WIDGET (gtk_builder_get_object (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->builder, "auth-prompt-entry"));
- delete_entry_text (entry);
+ gtk_editable_delete_text (GTK_EDITABLE (entry), 0, -1);
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
set_log_in_button_mode (login_window, LOGIN_BUTTON_ANSWER_QUERY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]