Plugins Via Main Menubar?

Tags: #<Tag:0x00007f00c27baa10>

In order to facilitate Keyboard Maestro (Macros) I was able to get a listing of scripts in the menubar so I can assign key commands to them.

(Dealing with Contextual Menus and Shortcuts is a load of un-predictable voodoo.)

Screen Shot 2020-01-22 at 20.23.28

        scripts = config.setting["list_of_scripts"]
        menu = self.menuBar().addMenu(_("&Functions"))
        menu.addSeparator()
        menu.addMenu(ScriptsMenu(scripts, _("&Run scripts"), menu))
        menu.addMenu(QtWidgets.QMenu(_("P&lugins"), menu))
        menu.addAction(self.album_search_action)
        menu.addSeparator()

This functionality isn’t perfect, the menu items are not updated if new scripts are added, or script contents changed, until Picard is re-launched.

I can’t come up with a similar way of getting a list of plugins though :wink: I’d like to have those too.

Screen Shot 2020-01-22 at 20.23.39

** These mods are not foolproof, there is no checking for eligibility (can that function be used with the current selection). Making an improper selection will crash Picard until proper checking is added.

Also menu items are not updated if new scripts are added, or script contents changed, until Picard is re-launched. Again, experimental at this point.