Re: GtkTreeModelFilter and GtkTreeSortable
- From: Emmanuele Bassi <ebassi gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeModelFilter and GtkTreeSortable
- Date: Sat, 29 Sep 2007 09:13:37 +0100
On Fri, 2007-09-28 at 23:49 -0300, MatÃÂas Alejandro Torres wrote:
Hi,
I'm building an application in which there's a tree view that used to
display a sortable tree model. Yesterday I started using a
GtkTreeModelFilter for searching patterns in this sortable model.
My problem is that GtkTreeModelFilter does not implements the
GtkTreeSortable interface and I lost the sorting capabilities that I
used to have.
use a filter on the sort model:
GtkTreeModel implementation (list store, tree store, etc.)
+---- GtkTreeModelSort
+---- GtkTreeModelFilter
you just need to remember to convert the iterators given to you by the
GtkTreeView widget *twice*: one from the filter to the sort model, and
one from the sort model to the real model.
ciao,
Emmanuele.
--
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]