GNOME Bugzilla – Bug 149077
Paths in gtk_ui_manager_add_ui fail with a leading slash
Last modified: 2004-12-22 21:47:04 UTC
Parts of my UI are built at runtime, so I use gtk_ui_manager_add_ui to supplement the bits build from an XML description. This didn't work for me, until I read this: http://mail.gnome.org/archives/gtk-app-devel-list/2004-July/msg00263.html It appears that the UI path must _NOT_ have a leading slash, or the function fails. It works if you leave off the leading slash (this was using GTK 2.4.0, IIRC)
David, it appears that for add_ui(), either ui/toolbar/... or /toolbar/... will work, while for get_widget(), /ui/toolbar/... works as well. That is a bit unfortunate, and it would probably be best to make sure that /ui/toolbar works for add_ui() as well, and treat the fact that ui/toolbar works as an accident...