aboutsummaryrefslogtreecommitdiff
path: root/src/session-menu-mgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session-menu-mgr.c')
-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);