Re: a couple of libglade api additions



On Thu, 2001-12-06 at 07:43, James Henstridge wrote:
> jacob berkman wrote:
> 
> >in doing gnomeui support for libglade, i've come across a couple of
> >libglade functions that need to be made public.
> >
> >the _get_toplevel() is needed to add dock items to GnomeApp (otherwise
> >any GnomeApps done in glade are useless).
> >
> Is such a function really needed?  Shouldn't it be possible to do 
> something like this in the dock's build_children() routine?:
>   GnomeApp *app = gtk_widget_get_ancestor (dock, GNOME_TYPE_APP);
>   ...
> 
>   if (app)
>     use the GnomeApp function to pack the child
>   else
>      use the normal BonoboDock method.
> 
> (this is what the stable branch does).
> 
> In the build_children() routine, the container widget should already 
> have been added to its parent, so the normal gtk functions for walking 
> the container heirachy should work.  Or am I missing something here?

i thought i could do this too (the libglade 1 code did this), but this
is not the case in libglade 2.  glade_xml_build_widget() calls
glade_xml_set_common_params(), which calls the _build_children()
function on the widget.  since the parent widget is waiting for
glade_xml_build_widget() to return, the child widgets get added first.

at least i'm pretty sure that's what's going on.

> >i think the second is needed if you are building your child widgets
> >manually... there might be a different way to do this.
> >
> >these changes are in the previously-internal libglade support apis, not
> >the application apis, so again they do not affect any applications
> >(except if they use GnomeApp with libglade - then they will actually be
> >usable).
> >
> >btw james - in the gnome support i am re-registering bonobo-dock,
> >because i need it to behave differently when used with GnomeApp (it
> >needs to make a gnome_app_ call which can't be done in libbonoboui).  is
> >there a better way to do this?
> >
> The reregistration should work fine (it is done a number of times in the 
> stable branch in the gnome support code).

i wish there was a way to chain these... what really should happen is
that people should subclass the widgets more :/

> Exporting set_packing_properties() looks fine.

ok.

jacob
-- 
"In fact, can you imagine anything more terrifying than a zombie clown?"
	-- moby



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