Re: dynamic menu creation with bonobo



Hi Jaka,

On Wed, 25 Apr 2001, Jaka Mocnik wrote:
> the following code should produce a number of dynamically created menu
> items and insert them into existing menu structure. it does so indeed,
> but their labels are empty and therefore the resulting items have very
> small height.

	Due to libxml encoding problems, you are forced to get translation
right at the same time as mangling strings as they go to XML, either way -
a nice side effect.

>   new_media_menus = bonobo_ui_node_copy(ps_view->priv->media_menus,
> TRUE);
>   if(new_media_menus)
>     bonobo_ui_component_set_tree(ps_view->priv->uic, "/menu/View/Media",
>                                  new_media_menus, NULL);

	Use bonobo_ui_component_set_translate, set_tree is only for
particularly cunning users, I've added a comment to the docs to this
effect.

	HTH,

		Michael.

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





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