Re: [gtk-list] Re: Bug fix or feature addition?



On Mon, Aug 30, 1999 at 02:13:09AM -0600, Brad Pepers wrote:
[...]
> > No, there is no other way to do it. Maybe it would be nicer to have
> > such functions, but I think ctree does already have too much...
> 
> It does make it a pain when all you want to do is change one thing.
> I got around it by making all the nodes be non-leafs on the chance
> that even if it was a leaf at the start, it may need to change down
> the road.  This didn't seem to have any effect on the ctree at all
> which made me wonder what effects declaring a node a leaf or not
> should have.  Does it change the bahaviour in some way I haven't
> seen yet?

Yes, it's used in the dnd / reordering code it's nice to know whether
an node can have children. If you don't need that functionality, it's
ok to unset that flag for all nodes.
 
[...]
> > It's even a bit more troublesome. The returned text is only a pointer
> > to the node text, not a copy. If you try to feed that pointer into
> > set_node_info, ctree will free text first and then tries to copy it.
> > So you have to generate your own copy of text :
> 
> I'm not sure what you mean by the node text.  When I first create the
> node
> I pass in an array of char* for each of the columns.  So if a ctree has
> multiple columns, what is the text I get back from get_node_info?

It's the text of the tree column. I.e. it's only a pointer to the text in
the tree column not a copy.

bye,
  Lars



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