Re: Gtk{Tree,List} replacement proposal



On 5 Jul 2000, Owen Taylor wrote:

> Jonathan Blandford <jrb@redhat.com> writes:
> 

> > > there's no destroy notification for the data here. couldn't the renderer
> > > simply use quarked data with destroy notification ere as well, if it requires
> > > the data pointer?
> > 
> > Each cell has a destroy function too, though moving to Quarked data
> > might make sence for consistency here.
> 
> I think the current way is correct. Every cell needs the data here,
> and keyed data would be a huge overhead. Also, there is no need to

what is the overhead with keyed data if i may ask?


> have keys for the data - the cell data is intimately tied to the cell
> type; it's not like you'll have 
> 
>  a) cell renderers without cell data
>  b) other people randomly setting data for the cell renderer

oh you have, it has popped up in virtually every other place in gtk
where we use user_data. just accept it, user_data is pretty much always
the wrong thing on structures long-term. besides, people who use the
g_datalist_* API finally get their destroy notification code right and
reentrant and save me many hours of debugging and fixing.

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





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