Dimension height;
Dimension border_width;
+ Bool show_stars_p; /* "I regret that I have but one asterisk for my country."
+ -- Nathan Hale, 1776. */
+
char *heading_label;
char *body_label;
char *user_label;
pw->ratio = 1.0;
+ pw->show_stars_p = get_boolean_resource("passwd.asterisks", "Boolean");
+
pw->heading_label = get_string_resource ("passwd.heading.label",
"Dialog.Label.Label");
pw->body_label = get_string_resource ("passwd.body.label",
s[1] = 0;
+ /* Add 10% to the time remaining every time a key is pressed. */
+ pw->ratio += 0.1;
+ if (pw->ratio > 1) pw->ratio = 1;
+
switch (*s)
{
case '\010': case '\177': /* Backspace */
break;
}
- i = strlen(typed_passwd);
- stars = (char *) malloc(i+1);
- memset (stars, '*', i);
- stars[i] = 0;
- update_passwd_window (si, stars, pw->ratio);
- free (stars);
+ if (pw->show_stars_p)
+ {
+ i = strlen(typed_passwd);
+ stars = (char *) malloc(i+1);
+ memset (stars, '*', i);
+ stars[i] = 0;
+ update_passwd_window (si, stars, pw->ratio);
+ free (stars);
+ }
+ else
+ {
+ update_passwd_window (si, "", pw->ratio);
+ }
}