I'm looking into using node-webkits menus more extensively in Light Table and have found some issues that I'm happy to try and fix myself, but wanted to get some feedback on how we should design the solutions.
For one, I wanted to change the mac menus such that instead of adding the standard menus by default, you have pre-built menuitems that you can add to the menubar if you choose to. This would allow you to manipulate those default menus and prevents the issue where if you set the menu on a window twice it will duplicate those builtins. In order to do this, however, we'll need to expose some functionality that is specific to Mac and I'm not sure what @rogerwang's plan is for platform specific helpers. Another thing that will have to be added to support this is the ability to set accelerator keys. On OSX this is pretty straightforward, but it wasn't obvious how you do that on the windows/linux side of things.
Another enhancement is that I want to be able to set a menu and potentially remove the menu later. I've implemented it right now that if you pass null when setting a menu on a window it removes it - I don't think we need an explicit API for this one.
Thoughts?
Cheers,
Chris.