Re: GtkTreeModelSort + GtkTreeModelFilter
- From: muppet <scott asofyet org>
- To: Jens Luedicke <jens luedicke gmail com>
- Cc: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: GtkTreeModelSort + GtkTreeModelFilter
- Date: Tue, 23 Aug 2005 07:59:32 -0400
On Aug 23, 2005, at 7:27 AM, Jens Luedicke wrote:
muppet wrote:
Sure you can. See attached example, modelmodelmodel.pl... a sorted
and filtered list. That's probably a rather heavyweight way to
do it,
but it is at least possible.
it doesn't work if you try to use a custom sort compare function.
TreeModelSort passes the underlying TreeModelFilter model to the
compare
function. which doesn't provide the get_sort_column_id method.
my $sort_func = sub {
my ($model,$a,$b) = @_;
my ($sort_column_id,$order) = $model->get_sort_column_id;
That just means you wind up with tight coupling because of having to
do things like
my ($sort_column_id, $order) = $model->get_child_model-
>get_sort_column_id;
(or is that just "get_model"?)
I didn't say it was "great", just "possible". ;-)
--
Without treatment, a common cold will last about seven days.
With treatment, it will last about a week.
-- conventional wisdom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]