On Fri, Feb 19, 2010 at 1:45 PM, Pietro Battiston <[email protected]> wrote:

> Il giorno ven, 19/02/2010 alle 13.04 +0100, Lionel Dricot ha scritto:
> > Hello,
> >
> >
> > I'm currently working closely with gtk.TreeModelFilter and I'm
> > currently stuck.
> >
> >
> > I've discovered that in order to have a row visible, that row has to
> > return True against the visible_func but, also, that *all his parents
> > have to be visible*.
> >
> >
> > This is rather important and not written in any GTK documentation I've
> > seen (maybe I should send a patch against pygtk doc for that).
> >
> >
> >
> >
> > As I consequence, I'm currently looking for a way to display children
> > that have an hidden parent. That children would be displayed at the
> > root.
> >
> >
> > For example :
> >
> >
> > a
> > --> b
> > ------->c
> > ---------->d
> >  (d is child of c which is child of b which is child of b)
> > if b is not visible, my tree would display :
> >
> >
> > a
> > c
> > -->d
>
> Isn't it quite inconsistent?!
>
> I think that I'd possibly expect
>
>
> a
> --> b
> ------->c
> ---------->d
>
> (automatically show parents of a row that has visible_func() True)
>
> or
>
> a
> ------->c
> ---------->d
>
> (simpler approach, but I guess this is visually _very ugly_ and
> counterintuitive for the user).
>
> In any case, I wouldn't want a row to change its appearance...
>
> So, what is the best option between the current behaviour and the "show
> all parents" (the first I presented)? I guess there is no general
> answer, but that the current is more intuitive for the programmer, and
> it is easier to workaround it if you need to (I guess that's what
> seahorse does, for instance).
>
> Still, a convenience method to switch from the current behaviour to the
> "show all parents" one would be a nice feature.
>
>
> > (currently, it only display "a").
> >
> >
> >
> >
> > How can I do that with my treemodelfilter ? It seems for me a rather
> > important usecase for a treemodelfilter but I cannot find any
> > documentation or code sample on the web about a way of doing that.
> >
>
> Again, if I understood correctly you can't do that with a
> treemodelfilter, because the "depth" of a row shouldn't change.
>
> Pietro
>
>
>
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to