Sorting a GtkListStore
- From: Harring Figueiredo <harringf yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Sorting a GtkListStore
- Date: Mon, 28 Apr 2003 20:08:13 -0700 (PDT)
Folks,
I have created a GtkTreeview/GtkListStore. The List Store has only one entry,
(A G_TYPE_POINTER). Hoever, my Treeview has more than one column.
I can get it to sort on the first column fine, but when trying to sort on
other columns, I get:
file gtkliststore.c: line 2346 (gtk_list_store_set_sort_column_id): assertion
`header != NULL' failed
=========
The GTK source code that it complaining is this:
if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
{
GtkTreeDataSortHeader *header = NULL;
header = _gtk_tree_data_list_get_header (list_store->sort_list,
sort_column_id);
/* We want to make sure that we have a function */
g_return_if_fail (header != NULL);
g_return_if_fail (header->func != NULL);
}
== How can I associate a Header to a sort function ?
I cannot use :
void gtk_tree_sortable_set_sort_column_id
(GtkTreeSortable *sortable,
gint sort_column_id,
GtkSortType order);
because the ListStore(sortable) does not know anything about the other column.
Again, how can I set a sorting on a GtkListStoreColumn/Treeview if a
ListSotre has only one "column" but the treeview has more than one column?
Thanks.
Harring
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]