Carrying around our own structure for the menu item might be an overkill.
Each Glib object already "carries around a table of associations from strings to pointers.".
So, probably, we need to dump the custom shared structure that gets freed spontaneously and stuff everything into the menu item object with g_object_set_data/g_object_set_data_full calls which gets passed to the callback routine.
Nautilus does not appear to have anything in code that could call the menu provider for an item activation but I will poke it some more.
Carrying around our own structure for the menu item might be an overkill.
Each Glib object already "carries around a table of associations from strings to pointers.".
So, probably, we need to dump the custom shared structure that gets freed spontaneously and stuff everything into the menu item object with g_object_ set_data/ g_object_ set_data_ full calls which gets passed to the callback routine.
Nautilus does not appear to have anything in code that could call the menu provider for an item activation but I will poke it some more.