[gnome-control-center] user-accounts: Show username when no real name
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Show username when no real name
- Date: Thu, 28 Apr 2011 13:37:56 +0000 (UTC)
commit b435556cd33d1536d452af0f49cfddbb9be9b923
Author: Bastien Nocera <hadess hadess net>
Date: Thu Apr 28 14:14:18 2011 +0100
user-accounts: Show username when no real name
So that users added "by hand" with adduser show up correctly
in the treeview.
https://bugzilla.gnome.org/show_bug.cgi?id=648348
panels/user-accounts/um-user.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/um-user.c b/panels/user-accounts/um-user.c
index 87aad57..0693895 100644
--- a/panels/user-accounts/um-user.c
+++ b/panels/user-accounts/um-user.c
@@ -275,8 +275,13 @@ um_user_get_display_name (UmUser *user)
{
g_return_val_if_fail (UM_IS_USER (user), NULL);
- return user->display_name ? user->display_name
- : user->props->real_name;
+ if (user->display_name)
+ return user->display_name;
+ if (user->props->real_name &&
+ *user->props->real_name != '\0')
+ return user->props->real_name;
+
+ return user->props->user_name;
}
const gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]