[gnome-control-center] Remove one more leftover reference to a filter model
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Remove one more leftover reference to a filter model
- Date: Tue, 17 Jul 2012 04:00:42 +0000 (UTC)
commit 54835c8f4486309c1517a7f71735fbdd7e098c5f
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 16 23:59:03 2012 -0400
Remove one more leftover reference to a filter model
The active input sources are no longer stored in a filter model.
Also, use gtk_list_store_insert_with_values for atomic insertion.
panels/region/gnome-region-panel-input.c | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/panels/region/gnome-region-panel-input.c b/panels/region/gnome-region-panel-input.c
index 8423420..5ff6455 100644
--- a/panels/region/gnome-region-panel-input.c
+++ b/panels/region/gnome-region-panel-input.c
@@ -530,7 +530,7 @@ chooser_response (GtkWidget *chooser, gint response_id, gpointer data)
{
GtkTreeView *tv;
GtkListStore *my_model;
- GtkTreeIter child_iter, filter_iter;
+ GtkTreeIter child_iter;
gchar *name;
gchar *type;
gchar *id;
@@ -550,24 +550,19 @@ chooser_response (GtkWidget *chooser, gint response_id, gpointer data)
tv = GTK_TREE_VIEW (WID ("active_input_sources"));
my_model = GTK_LIST_STORE (gtk_tree_view_get_model (tv));
- gtk_list_store_append (my_model, &child_iter);
-
- gtk_list_store_set (my_model, &child_iter,
- NAME_COLUMN, name,
- TYPE_COLUMN, type,
- ID_COLUMN, id,
- SETUP_COLUMN, app_info,
- -1);
+ gtk_list_store_insert_with_values (my_model, &child_iter, -1,
+ NAME_COLUMN, name,
+ TYPE_COLUMN, type,
+ ID_COLUMN, id,
+ SETUP_COLUMN, app_info,
+ -1);
g_free (name);
g_free (type);
g_free (id);
if (app_info)
g_object_unref (app_info);
- gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (gtk_tree_view_get_model (tv)),
- &filter_iter,
- &child_iter);
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (tv), &filter_iter);
+ gtk_tree_selection_select_iter (gtk_tree_view_get_selection (tv), &child_iter);
update_button_sensitivity (builder);
update_configuration (GTK_TREE_MODEL (my_model));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]