Re: GtkBin as a publicly derivable abstract class please.



On Fri, 2010-11-12 at 09:46 +0000, Emmanuele Bassi wrote:
> On Fri, 2010-11-12 at 14:50 +0900, Tristan Van Berkom wrote:
> > Guys, 
> >    this is the kind of thing we could probably just
> > resolve on irc but I work an opposite schedule so I'm
> > taking it to the list.
> > 
> > Today I found '_gtk_bin_set_child()'
> 
> what's wrong with gtk_container_add()?

Ah sorry I missed that, using gtk_container_add() is
really fine, yes.

However I'm still curious why _gtk_bin_set_child()
exists at all, reading the code it looks like widgets, 
such as GtkComboBox etc are doing the work of GtkBin 
and calling _gtk_bin_set_child().

That code would look much cleaner if it were to
just call gtk_container_add/remove() and not
call gtk_widget_set_parent()/unparent() at all
(and serve as a better example to readers why
might implement a bin widget).

Cheers,
      -Tristan




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