Re: [gtk-list] Re: ANNOUNCE: GTK+ 1.1.5 Released



On 24 Nov 1998, Guillaume Laurent wrote:

> Tim Janik <timj@gtk.org> writes:
> 
> > you can do that still, the functions are just named differently/got
> > split into seperate ones.
> 
> Yup, I've corrected our wrapper of GtkScrolledWindow and the actual
> amount of code duplication is really trivial. Indeed I read your mail
> a bit in a hurry (lunch break :-).
> 
> > what would a gtk_widget_construct() do?
>  
> Do all that gtk_widget_new() does, except on a passed GtkObject. I'm
> not sure if we'll need one yet. I would expect so when we'll have arg
> support in Gtk--.

ahh, that functionality is already in place, do
sw = gtk_type_new (GTK_TYPE_SCROLLED_WINDOW);
/* <arg-name> doesn't neccessarily be a construct arg */
gtk_widget_set (sw,
                "<arg-name>", ARG,
                NULL);
gtk_object_default_construct (GTK_OBJECT (sw));

that's all that is done by gtk_widget_new().
as mentioned earlier, gtk_object_default_construct() will apply those
construct arguments with a default value, that haven't been set on
the object yet. ast the end of gtk_object_default_construct(), the
widget is marked as GTK_CONSTRUCTED (gtk_object_default_construct()
will for objects that are already GTK_CONSTRUCTED simply be a no-op).
                
> 
> -- 
> 					Guillaume.
> 					http://www.worldnet.fr/~glaurent
> 

---
ciaoTJ



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