Allow multiple menu items from plugin.
Type
Plugins
Severity
S5 - Suggestion
Status
won't fix
Regression
No
Workaround
Yes
Project
So that same plugin could be ran with different options. E.g.:
var mscorePlugin = {
menu: ['Plugins.My Plugin.Option1', Plugins.My Plugin.Option2'],
init: init,
run: run
};
or simply
var mscorePlugin = {
menu: 'Plugins.My Plugin.Option1|Plugins.My Plugin.Option2',
init: init,
run: run
};
Also the run function should be passed the menu name as it's argument. E.g. when Option 1 is clicked the plugin should run with "Plugins.My Plugin.Option1" being passed as an argument to run function.
Comments
You'd need to adjust this request to the new QML plugin infrastructur in MuseScore 2.0, see http://musescore.org/en/node/17294
This would also affect setting plugin shortcuts etc.
While it is fairly trivial to dump your common code into a separate file and have two qml plugins in your "plugin" that then each can have their own menu item. Having them call the common function with the correct parameters.