diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-11-15 11:39:31 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-11-15 11:39:31 -0600 |
commit | 01aa2f9c7ebbf04426b63114d02c656b022a2777 (patch) | |
tree | 13b249ec8d71ecff2b895c72e483b7e31de9fcbc /src | |
parent | a7b8ed9c8c18e48c51d08ca1b0ef0ab3de485461 (diff) | |
download | ayatana-indicator-session-01aa2f9c7ebbf04426b63114d02c656b022a2777.tar.gz ayatana-indicator-session-01aa2f9c7ebbf04426b63114d02c656b022a2777.tar.bz2 ayatana-indicator-session-01aa2f9c7ebbf04426b63114d02c656b022a2777.zip |
if the user's real name can't be determined, fall back to the user's account name.
Diffstat (limited to 'src')
-rw-r--r-- | src/session-menu-mgr.c | 7 |
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); |