[gucharmap] Set the search column after setting the model
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Set the search column after setting the model
- Date: Thu, 10 Jun 2010 16:35:35 +0000 (UTC)
commit 449ccdf10b308c8235bad0685936c21a8ed81fa4
Author: Christian Persch <chpe gnome org>
Date: Thu Jun 10 18:33:33 2010 +0200
Set the search column after setting the model
It's reset to -1 when the model changes, making typeahead search weirdly
search the english string instead of the translated one.
Bug #621215.
gucharmap/gucharmap-chapters-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gucharmap/gucharmap-chapters-view.c b/gucharmap/gucharmap-chapters-view.c
index 805de99..74f4468 100644
--- a/gucharmap/gucharmap-chapters-view.c
+++ b/gucharmap/gucharmap-chapters-view.c
@@ -68,7 +68,6 @@ gucharmap_chapters_view_init (GucharmapChaptersView *view)
selection = gtk_tree_view_get_selection (tree_view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
- gtk_tree_view_set_search_column (tree_view, GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL);
gtk_tree_view_set_enable_search (tree_view, TRUE);
}
@@ -110,6 +109,9 @@ gucharmap_chapters_view_set_model (GucharmapChaptersView *view,
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model),
GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL,
GTK_SORT_ASCENDING);
+
+ /* Need to re-set this here since it's set to -1 when the tree view model changes! */
+ gtk_tree_view_set_search_column (tree_view, GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]