How to filter a treeview?



[ I'm resending this after the original message from a different address
  got a "waiting for moderator approval" reply; sorry if the other one
  shows up too. Also I think send-by-subscribers-only lists suck :p ]

Hi,

I'm porting over an application which used it's own custom tree widget
in GTK+ 1.2 over to 2.0, and I'd like to use the available tree M/V/C
widgets instead of rewriting my own or fixing the current one.

On of the possibilities the custom tree offered was to set a filter
which affected if rows were displayed or not. This is a fairly essential
feature in the application and it has to be kept.

Question is, how can I get a similar result with the GtkTreeView? It
doesn't seem to offer anything like it. Neither do the cell renderers or
the treemodel, AFAICS; but I didn't really expect them to since this
seems like something which should be a "View" feature, if present at
all.
OTOH, the view doesn't really know about rows, only the model does, and
there doesn't appear to be a way to act on rows in the view either.

Walking the treemodel to remove or reinsert rows as filtered out or not
isn't an option; it consists of about 10000 rows at present and this is
expected only to grow in the future.


Regards,

Filip

-- 
<rcw> debian comes in behind redhat, slackware, suse, and mandrake when
      searching google for 'linux distribution'
<asuffield> try "best linux distribution"



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