GnomeUIHandler



Hi,

After a bit of digging, I found this in gnome_ui_handler_menu_add_one():

        /*
         * If we are not a top-level UIHandler, propagate
         * the menu-item creation to the top-level.
         */
        if (uih->top_level_uih != CORBA_OBJECT_NIL) {
                menu_remote_create_item (uih, parent_path, item);
                return;
        }

        /*
         * We are the top-level UIHandler, and so we must create the
         * menu's widgets and so forth.
         */
        menu_toplevel_create_item (uih, parent_path, item,
gnome_object_corba_objref (GNOME_OBJECT (uih)));

That means you have to know your parent ui handler before you can start
adding menus. Wouldn't it be a good idea to be able to do that before
you know your parent, and add it to the parent at the _set_container call?
(and of course wait for the _set_menubar call before adding items to the
toplevel)


Another thing. I am creating the child menu structure with
_menu_parse_uiinfo_tree(), but this seems to override subtrees of the
toplevel uihandler. i.e. if I have a /preferences menu in both, I only
get to see the children of the child. Is there any way to make the child
only append items?


Martijn

-- 
Martijn van Beers  <martijn@earthling.net>

'Don't worry if it sounds odd. Believe me, you are talking to
someone who has seen a lot of stuff that is odd. And I don't
mean biscuits.' --- Arthur Dent



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