The goal is to make the command system more modular, so each command can
be defined as a single object that includes a declaration (name, label,
etc.) and a runtime (to execute the command, test if it should be
enabled, etc.)
Utility methods are provided to convert a command to a menu item or a
toolbar button, thus reducing duplicated and boiler plate code across the
codebase (often the menu item logic was duplicated in the toolbar
button logic and vice versa).
The goal is to make it easier to add new commands (and associated menu
item and toolbar buttons) and to call them from
anywhere. This is also useful for plugins, which can also easily define
new commands.
Could also allow creating a command palette.
Squashed commit of the following:
commit 5fde36f5c3fa7c7efbce6d81f48fe841c823e88c
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:43:20 2020 +0100
Cannot fix for now
commit 251284db3c8b7da6db83f3e06fd19bfdc8b8dd3f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:31:08 2020 +0100
Fixed print to multiple PDFs logic
commit 00d9557996fb984b400fe650594150ae2681e03f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:49:20 2020 +0100
Fixed local search in TinyMCE
commit 46778bf0a79f3bba9ddbc27389fadce4f8944507
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:37:31 2020 +0100
Restored note toolbar buttons
commit 3e623c98f0a1cf08bf7d0136f0c8982c5e1ddcd8
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 12:30:57 2020 +0100
Various fixes and moved note toolbar to left of title
commit 790262fe9df5b08d4a619e5244d2906047b39855
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:21:11 2020 +0100
Clean up
commit cea30f42e69014ecabda6fa5083199a1ba7b7510
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:08:23 2020 +0100
Fixed note loading in TinyMCE