← Back to team overview

lightdm-gtk-greeter-team team mailing list archive

[Merge] lp:~olivier-martin/lightdm-gtk-greeter/password_entry-optional into lp:lightdm-gtk-greeter

 

Olivier Martin has proposed merging lp:~olivier-martin/lightdm-gtk-greeter/password_entry-optional into lp:lightdm-gtk-greeter.

Requested reviews:
  LightDM Gtk+ Greeter Development Team (lightdm-gtk-greeter-team)

For more details, see:
https://code.launchpad.net/~olivier-martin/lightdm-gtk-greeter/password_entry-optional/+merge/224917

process_prompts(): Do not assume password_entry should be visible

Some PAM modules might do not use password_entry for their authentification step.
-- 
https://code.launchpad.net/~olivier-martin/lightdm-gtk-greeter/password_entry-optional/+merge/224917
Your team LightDM Gtk+ Greeter Development Team is requested to review the proposed merge of lp:~olivier-martin/lightdm-gtk-greeter/password_entry-optional into lp:lightdm-gtk-greeter.
=== modified file 'src/lightdm-gtk-greeter.c'
--- src/lightdm-gtk-greeter.c	2014-06-09 15:49:08 +0000
+++ src/lightdm-gtk-greeter.c	2014-06-28 21:53:29 +0000
@@ -1425,6 +1425,9 @@
     gtk_widget_set_sensitive (GTK_WIDGET (username_entry), TRUE);
     gtk_widget_set_sensitive (GTK_WIDGET (password_entry), TRUE);
 
+    /* Do not assume a password is requested */
+    gtk_widget_set_visible (GTK_WIDGET (password_entry), FALSE);
+
     /* Special case: no user selected from list, so PAM asks us for the user
      * via a prompt. For that case, use the username field */
     if (!prompted && pending_questions && !pending_questions->next &&
@@ -1436,6 +1439,7 @@
         prompted = TRUE;
         prompt_active = TRUE;
         gtk_widget_grab_focus (GTK_WIDGET (username_entry));
+        gtk_widget_set_visible (GTK_WIDGET (password_entry), TRUE);
         return;
     }
 
@@ -1452,6 +1456,7 @@
             continue;
         }
 
+        gtk_widget_set_visible (GTK_WIDGET (password_entry), TRUE);
         gtk_entry_set_text (password_entry, "");
         gtk_entry_set_visibility (password_entry, message->type.prompt != LIGHTDM_PROMPT_TYPE_SECRET);
         if (get_message_label()[0] == 0 && password_prompted)


Follow ups