Re: dynamically building UI



Hi Rodrigo,

On Sat, 21 Oct 2000 rodrigo linuxave net wrote:
> I'm a bit lost about the new UI component menus and toolbars stuff.

	Right; the changes are quite wide ranging, for documentation see
bonobo/doc/ui-faq.txt ui-std.xml ui-xml.txt

> I am converting an app which uses the old BonoboUIHandler. But it's
> weird, because there is a generic object which does all bonobo-related
> stuff, and control instances just pass it an array of GnomeUIInfo
> items to set menus and toolbars. So, it was easy with the
> BonoboUIHandler, I had just to call
> bonobo_ui_handler_menu_parse_uiinfo_list and create the menubar and
> toolbar.

	I see, well, there are 3 choices, it seems your case is made more
difficult because of the desire for bonobo and non-bonobo builds. (
gnumeric does this with 2 quite separate code paths ). So, you can either
try and separate the code paths, or copy bonobo-ui-compat.[ch] into your
project ( for now ), or add a non-optional dependency on Bonobo; the UI
handler portion of which is now API frozen anyway.

> But now, I can't find something similar, and I've seen in some code
> (Evolution & nautilus) that what they use for this is
> bonobo_ui_util_set_ui with an existing XML file. But this does not fit
> in what I want to do, so I've seen the BonoboUIXml, BonoboUIItem, etc,
> but can't figure out how to use them. I would really appreciate any
> example on this, if there is one.

	Ok, if you see bonobo/bonobo/app.c ( my regression testing app
) generates a load of menus dynamicaly, you might want to copy that. On
the other hand, you may find reading bonobo-ui-compat.[ch] will help you
see what to do for the best.

	Sorry for the pain; this is the _last_ major (painful) change to
Bonobo before Gnome 1.4.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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