Re: Force sorting of an GtkListStore



Is it posibile to proper reset the default sort function? There is the GtkTreeModelSort which provides such a function (gtk_tree_model_sort_reset_default_sort_func) but i don't want to change my whole application to use GtkTreeModelSort instead of GtkListStore just to reset the default sort function.

Is there any way?

best regards,
Seika van Olstroem

Seika van Olstroem schrieb:
Hello list,

how can i force a GtkListStore to be sorted? If i use gtk_tree_model_row_changed i doesn't work. sort_column_change doesn't worked as well.

I tried also to set the default sort function but i get an assertion error, cause i'm removing it after i set it. Please look:

<quote>

/* set default function to sort_func */
gtk_tree_sortable_set_default_sort_func (list, sort_func, NULL, NULL);
/* set the default column */
gtk_tree_sortable_set_sort_column_id (list, ...DEFAULT_SORT_COLUM..., ...ASCENDING);
/* unset default sort function to disable automatically sorting */
gtk_tree_sortable_set_default_sort_func (list, NULL, NULL, NULL);

</quote>

I'm setting the default sort function to null after i setted it to sort_func cause i only want sorting when i'm forcing it and not when a new row has appended or changed.

Thanks in advance.

best regards,
Seika van Olstroem





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]