aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-02 16:17:12 -0600
committerTed Gould <ted@gould.cx>2010-03-02 16:17:12 -0600
commit03c045f5890162a53ed613fcf8f627f0dc3badc8 (patch)
tree6ee9aac2259e170c19cd91300729f769e9b694c8 /src
parentd723e8d4ed1e96c889d139a0f8c4cca117137c4a (diff)
downloadayatana-indicator-session-03c045f5890162a53ed613fcf8f627f0dc3badc8.tar.gz
ayatana-indicator-session-03c045f5890162a53ed613fcf8f627f0dc3badc8.tar.bz2
ayatana-indicator-session-03c045f5890162a53ed613fcf8f627f0dc3badc8.zip
If we ARE a conflicted name then we need to fallback into displaying the user name.
Diffstat (limited to 'src')
-rw-r--r--src/session-service.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/session-service.c b/src/session-service.c
index 21c5b8b..85874b6 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -506,7 +506,13 @@ rebuild_items (DbusmenuMenuitem *root,
mi = dbusmenu_menuitem_new ();
dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_TYPE, USER_ITEM_TYPE);
+ if (user->real_name_conflict) {
+ gchar * conflictedname = g_strdup_printf("%s (%s)", user->real_name, user->user_name);
+ dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, conflictedname);
+ g_free(conflictedname);
+ } else {
dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, user->real_name);
+ }
dbusmenu_menuitem_property_set_bool (mi, USER_ITEM_PROP_LOGGED_IN, user->sessions != NULL);
dbusmenu_menuitem_child_append (root, mi);
g_signal_connect (G_OBJECT (mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_user_session), user);