407075
--- gdm-2.19.3/gui/gdmlogin.c.move-default-message	2007-06-17 13:07:27.000000000 -0400
407075
+++ gdm-2.19.3/gui/gdmlogin.c	2007-06-18 15:15:37.000000000 -0400
407075
@@ -169,6 +169,7 @@
407075
 extern const gchar *current_session;
407075
 extern gboolean session_dir_whacked_out;
407075
 extern gint gdm_timed_delay;
407075
+static gboolean using_fallback_message = FALSE;
407075
 
407075
 static gboolean first_prompt = TRUE;
407075
 
407075
@@ -1357,9 +1358,20 @@
407075
 					gdm_config_get_string (GDM_KEY_SOUND_ON_LOGIN_FILE),
407075
 					gdm_config_get_bool   (GDM_KEY_SOUND_ON_LOGIN));
407075
 		gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("_Username:"));
407075
+                if (ve_string_empty (gtk_label_get_text (GTK_LABEL (msg)))) {
407075
+                        gtk_label_set_text (GTK_LABEL (msg),
407075
+                                            _("Please enter your username"));
407075
+                        using_fallback_message = TRUE;
407075
+                }
407075
+
407075
 	} else {
407075
 		if (tmp != NULL)
407075
 			gtk_label_set_text (GTK_LABEL (label), tmp);
407075
+                if (using_fallback_message) {
407075
+                        gtk_label_set_text (GTK_LABEL (msg), "");
407075
+                        using_fallback_message = FALSE;
407075
+                }
407075
+
407075
 	}
407075
 	g_free (tmp);
407075
 
407075
@@ -1447,6 +1459,7 @@
407075
 		g_free (tmp);
407075
 	}
407075
 	replace_msg = FALSE;
407075
+	using_fallback_message = FALSE;
407075
 
407075
 	gtk_widget_show (GTK_WIDGET (msg));
407075
 	printf ("%c\n", STX);
407075
@@ -1625,9 +1638,7 @@
407075
 	if (browser_ok && gdm_config_get_bool (GDM_KEY_BROWSER))
407075
 	    gtk_widget_set_sensitive (GTK_WIDGET (browser), TRUE);
407075
 
407075
-	tmp = ve_locale_to_utf8 (args);
407075
-	gtk_label_set_text (GTK_LABEL (msg), tmp);
407075
-	g_free (tmp);
407075
+	gtk_label_set_text (GTK_LABEL (msg), "");
407075
 	gtk_widget_show (GTK_WIDGET (msg));
407075
 
407075
 	printf ("%c\n", STX);
407075
--- gdm-2.19.3/gui/greeter/greeter_item_pam.c.move-default-message	2007-06-17 13:07:26.000000000 -0400
407075
+++ gdm-2.19.3/gui/greeter/greeter_item_pam.c	2007-06-18 15:15:37.000000000 -0400
407075
@@ -47,6 +47,7 @@
b1f3e7
 gboolean require_quarter = FALSE;
b1f3e7
 
b1f3e7
 extern gboolean greeter_probably_login_prompt;
b1f3e7
+static gboolean using_fallback_message = FALSE;
b1f3e7
 extern GtkButton *gtk_ok_button;
b1f3e7
 extern GtkButton *gtk_start_again_button;
b1f3e7
 
407075
@@ -241,13 +242,35 @@
b1f3e7
 			 int         entry_len,
b1f3e7
 			 gboolean    entry_visible)
b1f3e7
 {
b1f3e7
+  GreeterItemInfo *message_info;
b1f3e7
   GreeterItemInfo *conversation_info;
b1f3e7
   GreeterItemInfo *entry_info;
b1f3e7
   GtkWidget *entry;
b1f3e7
 
b1f3e7
+  message_info = greeter_lookup_id ("pam-message");
b1f3e7
   conversation_info = greeter_lookup_id ("pam-prompt");
b1f3e7
   entry_info = greeter_lookup_id ("user-pw-entry");
b1f3e7
 
b1f3e7
+  if (strcmp (message, _("Username:")) == 0 && message_info)
b1f3e7
+    {
b1f3e7
+      gchar *text;
b1f3e7
+      text = NULL;
b1f3e7
+      g_object_get (G_OBJECT (message_info->item),
b1f3e7
+                    "text", &text,
b1f3e7
+                    NULL);
b1f3e7
+      if (ve_string_empty (text))
b1f3e7
+        {
b1f3e7
+          set_text (message_info, _("Please enter your username"));
b1f3e7
+          using_fallback_message = TRUE;
b1f3e7
+        }
b1f3e7
+      g_free (text);
b1f3e7
+    } 
b1f3e7
+  else if (using_fallback_message)
b1f3e7
+    {
b1f3e7
+      set_text (message_info, "");
b1f3e7
+      using_fallback_message = FALSE;
b1f3e7
+    }
b1f3e7
+
b1f3e7
   if (conversation_info)
b1f3e7
     {
b1f3e7
       set_text (conversation_info, message);
407075
@@ -312,6 +335,7 @@
b1f3e7
        * we try to collect them until the next prompt or reset or
b1f3e7
        * whatnot */
b1f3e7
       if ( ! replace_msg &&
b1f3e7
+	   ! using_fallback_message &&
b1f3e7
 	   /* empty message is for clearing */
b1f3e7
 	   ! ve_string_empty (message))
b1f3e7
 	{
407075
@@ -331,6 +355,7 @@
b1f3e7
         set_text (message_info, message);
b1f3e7
     }
b1f3e7
   replace_msg = FALSE;
b1f3e7
+  using_fallback_message = FALSE;
b1f3e7
 }
b1f3e7
 
b1f3e7
 
407075
--- gdm-2.19.3/daemon/verify-pam.c.move-default-message	2007-06-17 13:07:38.000000000 -0400
407075
+++ gdm-2.19.3/daemon/verify-pam.c	2007-06-18 15:17:19.000000000 -0400
407075
@@ -540,12 +540,6 @@
694126
 		case PAM_PROMPT_ECHO_ON:
694126
 			if (strcmp (m, _("Username:")) == 0) {
407075
 				if (ve_string_empty (selected_user)) {
694126
-					/* this is an evil hack, but really there is no way we'll
694126
-					   know this is a username prompt.  However we SHOULD NOT
694126
-					   rely on this working.  The pam modules can set their
694126
-					   prompt to whatever they wish to */
694126
-					gdm_slave_greeter_ctl_no_ret
694126
-						(GDM_MSG, _("Please enter your username"));
694126
 					s = gdm_slave_greeter_ctl (GDM_PROMPT, m);
694126
 					/* this will clear the message */
694126
 					gdm_slave_greeter_ctl_no_ret (GDM_MSG, "");
407075
--- gdm-2.19.3/daemon/verify-crypt.c.move-default-message	2007-06-17 13:07:39.000000000 -0400
407075
+++ gdm-2.19.3/daemon/verify-crypt.c	2007-06-18 15:15:37.000000000 -0400
407075
@@ -125,7 +125,6 @@
694126
 	authenticate_again:
694126
 		/* Ask for the user's login */
694126
 		gdm_verify_select_user (NULL);
694126
-		gdm_slave_greeter_ctl_no_ret (GDM_MSG, _("Please enter your username"));
694126
 		login = gdm_slave_greeter_ctl (GDM_PROMPT, _("Username:"));
694126
 		if (login == NULL ||
694126
 		    gdm_slave_greeter_check_interruption ()) {
407075
--- gdm-2.19.3/daemon/verify-shadow.c.move-default-message	2007-06-17 13:07:38.000000000 -0400
407075
+++ gdm-2.19.3/daemon/verify-shadow.c	2007-06-18 15:15:37.000000000 -0400
407075
@@ -127,7 +127,6 @@
694126
 	authenticate_again:
694126
 		/* Ask for the user's login */
694126
 		gdm_verify_select_user (NULL);
694126
-		gdm_slave_greeter_ctl_no_ret (GDM_MSG, _("Please enter your username"));
694126
 		login = gdm_slave_greeter_ctl (GDM_PROMPT, _("Username:"));
694126
 		if (login == NULL ||
694126
 		    gdm_slave_greeter_check_interruption ()) {