Comment 8 for bug 188288

Revision history for this message
A. Walton (awalton) wrote :

To be honest, this doesn't seem valid to me. It breaks the whole design of that structure, as it was intended to be opaque to the users of the API. It's a pretty common design pattern used throughout GNOME, specifically in this case to hide the NautilusMenuItemDetails from the consumers, forcing them to use nautilus_menu_item_set_[].

Iis there a reason nautilus_menu_item_set_submenu() won't work? Something like

NautilusMenu *nautilus_menu_mine = nautilus_menu_new ();
NautilusMenuItem *nautilus_menu_item_mine = nautilus_menu_item_new ("NautilusMenuMine::NautilusMenuMine", "My New Nautilus Menu Item", "Yaay", NULL);
nautilus_menu_item_set_submenu (nautilus_menu_item_mine, nautilus_menu_mine);
NautilusMenuItem *sub_menu_item = nautilus_menu_item_new ("NautilusMenuMine::SubMenuItem", "SubMenuItem", "Some More about it", NULL);
nautilus_menu_append_item (nautilus_menu_item, sub_menu_item);

That might be off a bit, but it's the general idea if I'm understanding the code correctly.