[gnome-system-tools] Select current user on start
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-system-tools] Select current user on start
- Date: Mon, 25 Jan 2010 22:37:47 +0000 (UTC)
commit 6ff638b33af8b7bcb615f21f497c4ee140c819ab
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Mon Jan 25 12:59:35 2010 +0100
Select current user on start
Select current user instead of the first one on start. This fixes a leak of GtkTreePath*.
src/users/users-tool.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/users/users-tool.c b/src/users/users-tool.c
index 51829f1..8b1957f 100644
--- a/src/users/users-tool.c
+++ b/src/users/users-tool.c
@@ -128,23 +128,28 @@ update_users (GstUsersTool *tool)
OobsList *list;
OobsListIter iter;
GObject *user;
+ OobsUser *self;
+ GtkTreePath *path;
gboolean valid;
users_table_clear ();
list = oobs_users_config_get_users (OOBS_USERS_CONFIG (tool->users_config));
+ self = oobs_self_config_get_user (OOBS_SELF_CONFIG (tool->self_config));
valid = oobs_list_get_iter_first (list, &iter);
while (valid) {
user = oobs_list_get (list, &iter);
- users_table_add_user (OOBS_USER (user));
+ path = users_table_add_user (OOBS_USER (user));
gst_tool_add_configuration_object (GST_TOOL (tool), OOBS_OBJECT (user));
+ if (self == (OobsUser *) user)
+ users_table_select_path (path);
+
g_object_unref (user);
+ gtk_tree_path_free (path);
valid = oobs_list_iter_next (list, &iter);
}
-
- users_table_select_first ();
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]