Bonobo toolbars handling
- From: Rodrigo Moya <rodrigo linuxave net>
- To: GNOME Components List <gnome-components-list gnome org>
- Subject: Bonobo toolbars handling
- Date: Wed, 17 May 2000 11:11:55 +0200
Hi all!
I'm trying to use the Bonobo toolbar API, and it does not seem to work.
Here is the code I'm using:
GnomeDbContainer *
gnome_db_container_new (const gchar *name,
GnomeUIInfo *menus[],
GnomeUIInfo *toolbar[],
GnomeDbContainerGetObjectFunc func)
{
GnomeDbContainer* container;
BonoboUIHandlerMenuItem* menu_list;
BonoboUIHandlerToolbarItem* toolbar_list;
container = gtk_type_new(gnome_db_container_get_type());
container->toplevel = gnome_app_new(name, name);
gtk_signal_connect(GTK_OBJECT(container->toplevel),
"delete_event",
GTK_SIGNAL_FUNC(close_cb),
(gpointer) container);
/* set menus */
container->uih = bonobo_ui_handler_new();
bonobo_ui_handler_set_app(container->uih,
GNOME_APP(container->toplevel));
if (menus)
{
bonobo_ui_handler_create_menubar(container->uih);
menu_list = bonobo_ui_handler_menu_parse_uiinfo_list(menus);
bonobo_ui_handler_menu_add_list(container->uih, "/", menu_list);
bonobo_ui_handler_menu_free_list(menu_list);
}
/* create toolbar */
if (toolbar)
{
bonobo_ui_handler_create_toolbar(container->uih, "/");
toolbar_list =
bonobo_ui_handler_toolbar_parse_uiinfo_list(toolbar);
bonobo_ui_handler_toolbar_add_list(container->uih, "/",
toolbar_list);
bonobo_ui_handler_toolbar_free_list(toolbar_list);
//gnome_app_create_toolbar(GNOME_APP(container->toplevel),
toolbar);
}
/* set status bar */
container->app_bar = gnome_appbar_new(TRUE, TRUE,
GNOME_PREFERENCES_USER);
gnome_appbar_set_default(GNOME_APPBAR(container->app_bar),
_("Ready"));
gnome_app_set_statusbar(GNOME_APP(container->toplevel),
container->app_bar);
if (menus)
{
gnome_app_install_menu_hints(GNOME_APP(container->toplevel),
menus);
}
return container;
}
What am I doing wrong?
Thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]