GNOME Bugzilla – Bug 364248
Can't create a submenu for nautilus.MenuItem
Last modified: 2008-06-26 12:58:37 UTC
I want to create an extension that addes a menu item to the context menu of a file. I want to give this menu a submenu, but the current API won't allow this. Here is a simple example that gave me this error import pygtk pygtk.require('2.0') import gtk import nautilus class ExampleExtension(nautilus.MenuProvider): def __init__(self): return def get_file_items(self, window, file): item = nautilus.MenuItem('NautilusPython::example_file_item', 'Example', 'Example tip') item.set_submenu(gtk.Menu()) return item, And the error returned is item.set_submenu(gtk.Menu()) AttributeError: 'nautilus.MenuItem' object has no attribute 'set_submenu' This makes sense, as set_submenu must not be implemented in the nautilus package, however, I feel it should be provided and would be useful for my extension.
Moving to nautilus component, probably a dup but I couldn't find one.
This is dup of bug 314579
Thanks Nelson, closing as such. *** This bug has been marked as a duplicate of 341579 ***