[gnome-system-tools/gnome-2-30] Fix updating users list when conf key is changed
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-tools/gnome-2-30] Fix updating users list when conf key is changed
- Date: Sun, 25 Apr 2010 18:09:36 +0000 (UTC)
commit c46728b47706a7b3bf43ffe9b298147068d31a18
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Sun Apr 25 19:12:30 2010 +0200
Fix updating users list when conf key is changed
Since we are now using a GtkTreeModelSort for the users list, in addition to the GtkTreeModelFilter, the update_key() function was broken and had no effect. This was only occurring when changing 'showal' or 'showroot' options in GConf/GSettings are tweaked while users-admin is running.
src/users/users-tool.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/users/users-tool.c b/src/users/users-tool.c
index bd26f50..4d2676a 100644
--- a/src/users/users-tool.c
+++ b/src/users/users-tool.c
@@ -61,14 +61,15 @@ on_option_changed (GConfClient *client,
{
GstTool *tool = GST_TOOL (data);
GtkWidget *widget;
- GtkTreeModel *model;
+ GtkTreeModel *sort_model, *filter_model;
GST_USERS_TOOL (tool)->showall = gst_conf_get_boolean (GST_TOOL (tool), "showall");
GST_USERS_TOOL (tool)->showroot = gst_conf_get_boolean (GST_TOOL (tool), "showroot");
widget = gst_dialog_get_widget (tool->main_dialog, "users_table");
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
- gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (model));
+ sort_model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
+ filter_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model));
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (filter_model));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]