[gucharmap] Revert "Sort the tree view column, not the model directly"
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Revert "Sort the tree view column, not the model directly"
- Date: Sat, 13 Dec 2014 19:30:30 +0000 (UTC)
commit 1b6e7887affad8ab8cd8d9f2ef6dc4606dec5dfc
Author: Christian Persch <chpe gnome org>
Date: Sat Dec 13 20:22:00 2014 +0100
Revert "Sort the tree view column, not the model directly"
This reverts commit 8daa603590cd403920cbb9b98595975ef0ba8d24.
Conflicts:
gucharmap/gucharmap-chapters-view.c
https://bugzilla.gnome.org/show_bug.cgi?id=620180
gucharmap/gucharmap-block-chapters-model.c | 3 +++
gucharmap/gucharmap-chapters-view.c | 4 ----
gucharmap/gucharmap-script-chapters-model.c | 4 ++++
3 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gucharmap/gucharmap-block-chapters-model.c b/gucharmap/gucharmap-block-chapters-model.c
index 65ce885..674c215 100644
--- a/gucharmap/gucharmap-block-chapters-model.c
+++ b/gucharmap/gucharmap-block-chapters-model.c
@@ -103,6 +103,9 @@ gucharmap_block_chapters_model_init (GucharmapBlockChaptersModel *model)
GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL,
(GtkTreeIterCompareFunc) compare_iters,
NULL, NULL);
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model),
+ GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL,
+ GTK_SORT_ASCENDING);
}
static GucharmapCodepointList *
diff --git a/gucharmap/gucharmap-chapters-view.c b/gucharmap/gucharmap-chapters-view.c
index dfdd091..497440f 100644
--- a/gucharmap/gucharmap-chapters-view.c
+++ b/gucharmap/gucharmap-chapters-view.c
@@ -66,7 +66,6 @@ gucharmap_chapters_view_init (GucharmapChaptersView *view)
column = priv->column = gtk_tree_view_column_new ();
gtk_tree_view_column_pack_start (column, cell, FALSE);
gtk_tree_view_column_add_attribute (column, cell, "text", GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL);
- gtk_tree_view_column_set_sort_column_id (column, GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL);
gtk_tree_view_append_column (tree_view, column);
selection = gtk_tree_view_get_selection (tree_view);
@@ -125,9 +124,6 @@ gucharmap_chapters_view_set_model (GucharmapChaptersView *view,
return;
gtk_tree_view_column_set_title (priv->column, gucharmap_chapters_model_get_title (model));
- 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);
diff --git a/gucharmap/gucharmap-script-chapters-model.c b/gucharmap/gucharmap-script-chapters-model.c
index da6a2ab..16ce39a 100644
--- a/gucharmap/gucharmap-script-chapters-model.c
+++ b/gucharmap/gucharmap-script-chapters-model.c
@@ -51,6 +51,10 @@ gucharmap_script_chapters_model_init (GucharmapScriptChaptersModel *model)
-1);
}
g_free (unicode_scripts);
+
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model),
+ GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL,
+ GTK_SORT_ASCENDING);
}
static GucharmapCodepointList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]