summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2011-03-09 19:27:14 -0500
committerRay Strode <rstrode@redhat.com>2011-03-09 19:27:14 -0500
commit8b91fee43060b97b080b774f88169a64ec6e39b5 (patch)
tree2b281fc48fc6c88ad1d1dc3409435cc9af5e34de /gui
parentfb47acb592e7e201e5ccedbfbae7d32d8cf254f2 (diff)
downloadgdm-8b91fee43060b97b080b774f88169a64ec6e39b5.tar.gz
greeter: don't show empty names in user list
If a user doesn't have a name in gecos, fall back to username. This is similar to commit f7978ec4dd39d3c4aecb462bfc6d0657c7ed6f0d, but functional instead of broken. https://bugzilla.gnome.org/show_bug.cgi?id=644156
Diffstat (limited to 'gui')
-rw-r--r--gui/simple-greeter/gdm-user-chooser-widget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/simple-greeter/gdm-user-chooser-widget.c b/gui/simple-greeter/gdm-user-chooser-widget.c
index 9b4e5de6..84c95864 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.c
+++ b/gui/simple-greeter/gdm-user-chooser-widget.c
@@ -469,7 +469,7 @@ update_item_for_user (GdmUserChooserWidget *widget,
escaped_username = g_markup_escape_text (act_user_get_user_name (user), -1);
real_name = act_user_get_real_name (user);
- if (real_name == NULL || real_name == '\0') {
+ if (real_name == NULL || real_name[0] == '\0') {
real_name = act_user_get_user_name (user);
}
escaped_real_name = g_markup_escape_text (real_name, -1);
@@ -785,7 +785,7 @@ add_user (GdmUserChooserWidget *widget,
escaped_username = g_markup_escape_text (act_user_get_user_name (user), -1);
real_name = act_user_get_real_name (user);
- if (real_name == NULL || real_name == '\0') {
+ if (real_name == NULL || real_name[0] == '\0') {
real_name = act_user_get_user_name (user);
}
escaped_real_name = g_markup_escape_text (real_name, -1);