[gdm/wip/initial-setup] Sync username utilities from gnome-control-center
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/initial-setup] Sync username utilities from gnome-control-center
- Date: Mon, 23 May 2011 21:16:05 +0000 (UTC)
commit 4d7334d31d397ffb08172523c059143a90de8b87
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 23 17:15:44 2011 -0400
Sync username utilities from gnome-control-center
gui/initial-setup/um-utils.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gui/initial-setup/um-utils.c b/gui/initial-setup/um-utils.c
index b874ff4..f579cb7 100644
--- a/gui/initial-setup/um-utils.c
+++ b/gui/initial-setup/um-utils.c
@@ -557,14 +557,18 @@ generate_username_choices (const gchar *name,
lc_name = g_ascii_strdown (ascii_name, -1);
- /* remove all non ASCII alphanumeric chars from the name,
- * apart from the few allowed symbols
+ /* Remove all non ASCII alphanumeric chars from the name,
+ * apart from the few allowed symbols.
+ *
+ * We do remove '.', even though it is usually allowed,
+ * since it often comes in via an abbreviated middle name,
+ * and the dot looks just wrong in the proposals then.
*/
stripped_name = g_strnfill (strlen (lc_name) + 1, '\0');
i = 0;
for (c = lc_name; *c; c++) {
if (!(g_ascii_isdigit (*c) || g_ascii_islower (*c) ||
- *c == ' ' || *c == '-' || *c == '.' || *c == '_' ||
+ *c == ' ' || *c == '-' || *c == '_' ||
/* used to track invalid words, removed below */
*c == '?') )
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]