aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-02 16:13:22 -0600
committerTed Gould <ted@gould.cx>2010-03-02 16:13:22 -0600
commitd723e8d4ed1e96c889d139a0f8c4cca117137c4a (patch)
treea5da8045991c065b22713629e6dff09469ee719c
parentad9dd9ec9a32d9380c12bce08d939d0f58d56555 (diff)
downloadayatana-indicator-session-d723e8d4ed1e96c889d139a0f8c4cca117137c4a.tar.gz
ayatana-indicator-session-d723e8d4ed1e96c889d139a0f8c4cca117137c4a.tar.bz2
ayatana-indicator-session-d723e8d4ed1e96c889d139a0f8c4cca117137c4a.zip
Creating a field for the user that has the real name in it, and a place for that to conflict.
-rw-r--r--src/session-service.c10
-rw-r--r--src/users-service-dbus.c1
-rw-r--r--src/users-service-dbus.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/session-service.c b/src/session-service.c
index 5746f7d..21c5b8b 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -406,7 +406,15 @@ compare_users_by_username (const gchar *a,
UserData *user1 = (UserData *)a;
UserData *user2 = (UserData *)b;
- return g_strcmp0 (user1->real_name, user2->real_name);
+ gint retval = g_strcmp0 (user1->real_name, user2->real_name);
+
+ /* If they're the same, they're both in conflict. */
+ if (retval == 0) {
+ user1->real_name_conflict = TRUE;
+ user2->real_name_conflict = TRUE;
+ }
+
+ return retval;
}
/* Builds up the menu for us */
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 0e5c922..7d2112a 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -662,6 +662,7 @@ sync_users (UsersServiceDbus *self)
user->shell = g_strdup (g_value_get_string (g_value_array_get_nth (values, 3)));
user->login_count = g_value_get_int (g_value_array_get_nth (values, 4));
user->icon_url = g_strdup (g_value_get_string (g_value_array_get_nth (values, 5)));
+ user->real_name_conflict = FALSE;
g_hash_table_insert (priv->users,
g_strdup (user->user_name),
diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h
index 41052f8..bba88a7 100644
--- a/src/users-service-dbus.h
+++ b/src/users-service-dbus.h
@@ -47,6 +47,8 @@ struct _UserData
GList *sessions;
+ gboolean real_name_conflict;
+
UsersServiceDbus *service;
};