pop-up menus from bonobo?



Currently Nautilus has a lot of duplicate code to handle Bonobo menus (in
the menu bar) and GTK menus (for right-click pop-up menus). I'd very much
like to eliminate much of this duplicate code by converting the right-click
menus to use Bonobo menus.

I tried to find an example in Bonobo, but the only relevant code I could
find left me confused. In app.c there is apparently a sample pop-up menu
called "MyStuff". The part that confused me is that the code that used this
created a GTK menu from scratch, and then called bonobo_window_add_popup
with the path /popups/MyStuff and the GTK menu. Then it used another GtkMenu
call to make the popup appear. Do you need to manually create a GTK menu to
use a popup? If so, I don't understand what the advantage of getting Bonobo
involved is. Is there some way to pop up a menu defined in an xml file?

John





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