GNOME Bugzilla – Bug 698234
If one put only one name for fullname, login combobox proposes twice the same name
Last modified: 2013-07-17 19:51:49 UTC
if during the user creation, I set not the full name, but only the firstname for instance, the login combobox proposes the same login twice. gnome-initial-setup-0.8-3.fc19.x86_64
*** Bug 698787 has been marked as a duplicate of this bug. ***
Created attachment 244570 [details] [review] um-utils: Don't allow duplicates of the same suggestion This is because these insert the same string when there is a single string. (nwords2 is always > 0 in this case) um-utils.c:298 in_use = is_username_used (item0->str); if (!in_use && !g_ascii_isdigit (item0->str[0])) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, item0->str, -1); g_hash_table_insert (items, item0->str, item0->str); in_use = is_username_used (item1->str); if (nwords2 > 0 && !in_use && !g_ascii_isdigit (item1->str[0])) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, item1->str, -1); g_hash_table_insert (items, item1->str, item1->str); I've had a look and due to the way it's written it would be difficult to keep the correct behaviour by making sure the check is nwords2 > 1 as the code path for handling second words and special characters is entangled.
We need the same change in the control-center copy of this code, then.
Review of attachment 244570 [details] [review]: Works in brief testing, so lets go with it. Don't forget to push the same change to the control-center.
Pushed: gnome-control-center - 654f4bb2ec468db6d4052266f9d27961b3980be7 gnome-initial-setup - bb073d15d191dbaa6570d2e9d8770b82504700d8
would you mind to backport (cherry-pick) to gnome-3-8 branch as well?