UI merging.



Hi

I have been converting a small game (similar to Mines) to bonobo. This is my
first bonobo-job so to say :). Well I'm having a bit of trouble merging the
menus from the xml file into the container's UI. I hope you can take a look.
The following is the function which creates the menus (and supposedly has to
merge them too)


void
control_create_menus (BonoboControl *control)
{
	Bonobo_UIContainer remote_uic;
	BonoboUIComponent *uic;

	remote_uic = bonobo_control_get_remote_ui_container (control);
	uic = bonobo_control_get_ui_component (control);

	bonobo_ui_component_set_container (uic, remote_uic);
	bonobo_object_release_unref (remote_uic, NULL);

	bonobo_ui_util_set_ui (uic, "/usr/share/flipit/",
			       "bonobo-flipit-ui.xml", "flipit");
}

this is called from the callbacks for the BonoboControl::activate and
BonoboControl:set_frame signals. Hope I'm not missing anything.
BTW, I'm using the code for Bonobo_GnoMines as a reference to how things are
supposed to be done.

Archit Baweja
























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