[gucharmap/gnome-2-30] Sort the tree view column, not the model directly
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap/gnome-2-30] Sort the tree view column, not the model directly
- Date: Thu, 10 Jun 2010 16:37:24 +0000 (UTC)
commit 5349c32a643d1aff85f4622cb3bae96795de4512
Author: Christian Persch <chpe gnome org>
Date: Mon May 31 23:03:10 2010 +0200
Sort the tree view column, not the model directly
gucharmap/gucharmap-block-chapters-model.c | 3 ---
gucharmap/gucharmap-chapters-view.c | 4 ++++
gucharmap/gucharmap-script-chapters-model.c | 4 ----
3 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gucharmap/gucharmap-block-chapters-model.c b/gucharmap/gucharmap-block-chapters-model.c
index 957371d..e07053e 100644
--- a/gucharmap/gucharmap-block-chapters-model.c
+++ b/gucharmap/gucharmap-block-chapters-model.c
@@ -103,9 +103,6 @@ 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 0d944f7..805de99 100644
--- a/gucharmap/gucharmap-chapters-view.c
+++ b/gucharmap/gucharmap-chapters-view.c
@@ -62,6 +62,7 @@ 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);
@@ -106,6 +107,9 @@ 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);
}
/**
diff --git a/gucharmap/gucharmap-script-chapters-model.c b/gucharmap/gucharmap-script-chapters-model.c
index 8741898..e40348d 100644
--- a/gucharmap/gucharmap-script-chapters-model.c
+++ b/gucharmap/gucharmap-script-chapters-model.c
@@ -51,10 +51,6 @@ 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]