Re: SubMenu in extensions



Am Sonntag, den 11.02.2007, 21:28 +0100 schrieb Jes�pino:
> I'm developing a extension for convert files from one format to
> another format. I want to use submenus in the right click menu, but i
> don't know how.
> 
> Is any way to do this??
> 
> Greetings.

Raffaele Sandrini hacked sub menu support into Nautilus 2.16 cf.
"nautilus-menu.h":

NautilusMenu *menu;
NautilusMenuitem *item;
GList *toplevel_items;

item = nautilus_menu_item_new ("foo", "Foo", ...);
toplevel_items = g_list_append (NULL, item);

/* Foo submenu */
menu = nautilus_menu_new ();
nautilus_menu_item_set_submenu (item, menu);
item = nautilus_menu_item_new (...);
nautilus_menu_append_item (menu, item);

return toplevel_items;

-- 
Christian Neumair <chris gnome-de org>




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