aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-11-16 09:30:53 +0000
committerTarmac <Unknown>2012-11-16 09:30:53 +0000
commit1f43c3a642d6e8b6bc42b4bc63f232fb2f35dd6c (patch)
tree12974181a2b64e130d3c8b5b5db28637d65297a1
parent2f0d22c67e73b46486971d5b29524da4a1d48333 (diff)
parent01aa2f9c7ebbf04426b63114d02c656b022a2777 (diff)
downloadayatana-indicator-session-1f43c3a642d6e8b6bc42b4bc63f232fb2f35dd6c.tar.gz
ayatana-indicator-session-1f43c3a642d6e8b6bc42b4bc63f232fb2f35dd6c.tar.bz2
ayatana-indicator-session-1f43c3a642d6e8b6bc42b4bc63f232fb2f35dd6c.zip
Show the login name if an account has no real name set. Fixes: https://bugs.launchpad.net/bugs/1076271.
Approved by Lars Uebernickel.
-rw-r--r--src/session-menu-mgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c
index 427f274..b618135 100644
--- a/src/session-menu-mgr.c
+++ b/src/session-menu-mgr.c
@@ -700,9 +700,10 @@ update_user_menuitem_name (DbusmenuMenuitem * mi, AccountsUser * user)
GString * gstr = g_string_new (accounts_user_get_real_name (user));
if (user_has_name_collision (user))
- {
- g_string_append_printf (gstr, " (%s)", accounts_user_get_user_name(user));
- }
+ g_string_append_printf (gstr, " (%s)", accounts_user_get_user_name(user));
+
+ if (!gstr->len)
+ g_string_assign (gstr, accounts_user_get_user_name(user));
dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, gstr->str);
g_string_free (gstr, TRUE);