Looks unnecessarily complex.  Shouldn't need all the changes to the internals.

Get any command is a good idea, yes.  To do that I suggest you modify 
`build_get_menu_item()` which is not in the API and not used in Geany.  Just 
add the field parameter, and the switch statement from 
`build_get_current_menu_item()` then add API_SYMBOL and fix the doxygen and 
there ya go, local changes only.

I'm not sure about `set_current`.  Sure its symmetric, but its modifying a menu 
item from an unknown source, which could include the defaults.  I don't think 
thats all that sensible, but I'm open to discussion if you can give a 
reasonable use-case, but at the moment I think the plugin should know what its 
modifying.

And don't forget you have to put the original values back in the plugin 
shutdown code, its hard to do that when you don't know what was modified.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1225#issuecomment-246219258

Reply via email to