GNOME Bugzilla – Bug 440026
Missing wrapper for NautilusMenu
Last modified: 2008-01-11 14:31:43 UTC
libnautilus supports submenus since 0.15 (?), would be nice to have wrappers for these objects in nautilut-python. The attached patch implementes wrappers for nautilus_menu_get_type, nautilus_menu_new, nautilus_menu_append_item and nautilus_menu_item_set_submenu.
Created attachment 88510 [details] [review] Partial implementation of NautilusMenu wrappers.
Created attachment 89845 [details] [review] Same implementation but with the existing convention Also modify nautilus-python.h and nautilusmodule.c
(In reply to comment #2) > Created an attachment (id=89845) [edit] > Same implementation but with the existing convention > > Also modify nautilus-python.h and nautilusmodule.c > Looks good, can you include a simple example too?
Created attachment 93052 [details] Example MenuProvider (In reply to comment #2) > Created an attachment (id=89845) [edit] > Same implementation but with the existing convention > > Also modify nautilus-python.h and nautilusmodule.c > Just tried this patch, and it it works great except a MenuItem's sub-menu does not show up if it's returned from get_background_items(). I'm not sure if this is a problem with nautilus-python, or if it goes deeper than that. Attached is an example MenuProvider demonstrating the problem.
Im looking to use this functionality in Conduit, so it would be good if this was committed sometime....
2008-01-11 Johan Dahlin <johan@gnome.org> * examples/Makefile.am: * src/nautilus-python.c: (nautilus_python_init_python): * src/nautilus-python.h: * src/nautilus.defs: * examples/submenu.py: Add Menu wrapper which makes it possible to implement submenus. #440026, Lukáš Lalinský, Sylvain Baubeau, Erik Wien