GNOME Bugzilla – Bug 314579
extension submenu support
Last modified: 2008-08-23 15:49:18 UTC
Created a patch against nautilus CVS adding submenu support for nautilus-extensions. Merged nautilus-menu-item.h into new nautilus-menu.h due to cross dependencies. Comments?
Created attachment 51381 [details] [review] Submenu support for nautilus-extensions
Excellent! 2.14 material, setting BLOCKED_BY_FREEZE keyword.
*** Bug 158748 has been marked as a duplicate of this bug. ***
Comments: NautilusMenu doesn't handle ownership correctly, it should ref the menu item in nautilus_menu_append_item(), and unref it on finalization. Also, I don't like exposing the list as a property, it seems so type/ownership unsafe. Instead, just have a nautilus_menu_get_items() call which return a GList *. Setting of the item_list property is especially troublesome wrt ownership of the items. I dunno about the versioning change for the extensions library. It makes some sense to do it, but if so we should do it a bit more automatic, with the version being defined in configure.in and the age being automatically calculated to always be back compat to the first version. That way its harder to forget to update, or accidentally make it not backwards compat. Finally, the nautilus style has brackets even around one-line blocks.
Raffaele, are you still willing to update your patch? :)
Created attachment 58612 [details] [review] updated patch Sure :). Sorry for the delay... was kinda busy. I hope i've addressed all the concerns.
Hello, Raffaele updated its patch months ago, is there a Nautilus maintainers / active hacker to review it ? thanks
Thanks, it's in 2.15.90 with some minor modifications: I fixed some styleguide issues and updated add_extension_menu_items to use nautilus_menu_get_items instead of the item-list property of the first patch. 2006-07-24 Martin Wehner <martin.wehner@gmail.com> * configure.in: * libnautilus-extension/Makefile.am: Add extension versioning infrastructure and add nautilus-menu.[ch]. * libnautilus-extension/nautilus-menu-item.[ch]: Add and handle a 'menu' property and add a function nautilus_menu_item_set_submenu. * libnautilus-extension/nautilus-menu.[ch]: New files implementing a submenu item. * src/file-manager/fm-directory-view.c: (add_extension_menu_items), (reset_extension_actions_menu): Add extension menu items recursively. * libnautilus-extension/nautilus-menu-provider.h: Update include. Extend extension API to support submenus. (#314579) Patch from Raffaele Sandrini <rasa@gmx.ch>
Looks like this was committed. Shouldn't the bug be closed?