Re: GtkUIManager




"<ui>"
"<menu action='ToolsMenu'>"
"      <menuitem action='AboutTools'/>"
"</menu>"

then gtk_ui_manager_get_widget( 'AboutTools') to get the menu item for
the 'about tools' button, then gtk_widget_get_parent() to get the
GtkMenu that the item is inside, then gtk_menu_append() to add my own
menu item to the end.

I think placeholders are for merging UIs: they mark where you'd like
menu sets to join up.

John


 LOL .. I was just about to email you saying that I got it... Thanks again !!

 Here is how I am doing .. (I think it is exactly how you described.)

        GtkWidget* i, *pm, * tmp;
        pm = gtk_ui_manager_get_widget (ui, "/MenuBar/ToolsMenu");
        tmp = gtk_menu_item_get_submenu(GTK_MENU_ITEM(pm));
        i = plugin->get_tools_menu();
        if(tmp) {
            gtk_menu_shell_append(GTK_MENU_SHELL(tmp), i);
            gtk_widget_show_all(i);
        }
        else
            g_print("PM IS NULL...");
           Handle error here.






                
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page ? Try My Yahoo!
http://my.yahoo.com 



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