-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for multiple hotkeys per action (#490)
* Moved ActionsShortcutsManager into the nc::core namespace; DI'ing its Config depenency; Removed the 4 title placeholders in the main menu. * NSEventModifierFlagsHolder can be used from a clean C++ * Started laying out unit tests for ActionsShortcutsManager * Added a few more simple unit tests * clang-tidy * Allow constructing ActionShortcut out of EventData. Replaced IsKeyDown() with operator==(). * TagFromAction now returns std::optional, instead of relying on magic values to indicate errors * Removed the IF_MENU_TAG macro * ActionFromTag returns std::optional<std::string_view>, instead of encoding an error as an empty string * clang-tidy * ShortCutFromAction, ShortCutFromTag and DefaultShortCutFromTag return a std::optional instead of using the default state to convey errors * Added ActionTagsFromShortCut() and FirstOfActionTagsFromShortCut() that provide action(s) for a given shortcut * Removed ShortCutsUpdater, migrated client code to FirstOfActionTagsFromShortCut() * clang-tidy * Refactoring ActionShortcutsManager's API and internals to support multiple shortcuts per action * ShortCut -> Shortcut * ShortcutFromAction -> ShortcutsFromAction, ShortcutFromTag -> ShortcutsFromTag, DefaultShortcutFromTag -> DefaultShortcutsFromTag * Support for writing and reading multiple shortcuts per action * clang-tidy * Adding support for multiple shortcuts per action in the Settings dialog * Filtering out duplicate shortcuts per action * clang-tidy * Menu actions can be triggered via additional shortcuts as well * Extracted SetMenuShortcuts() into an NSMenu category. * Extracted part of ActionsShortcutsManager as a pure interface in nc::utility, DI'ed it into Viewer. * Updated the localization
- Loading branch information
1 parent
2d414fb
commit cd65597
Showing
31 changed files
with
1,496 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.