Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an openAbout action. #15990

Merged
merged 1 commit into from Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 24 additions & 23 deletions doc/cascadia/profiles.schema.json
Expand Up @@ -378,8 +378,12 @@
},
"ShortcutActionName": {
"enum": [
"addMark",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just sorted all these, since they seemed 90% sorted already

"adjustFontSize",
"adjustOpacity",
"clearAllMarks",
"clearBuffer",
"clearMark",
"closeOtherPanes",
"closeOtherTabs",
"closePane",
Expand All @@ -390,71 +394,68 @@
"copy",
"duplicateTab",
"expandSelectionToWord",
"experimental.colorSelection",
"exportBuffer",
"find",
"findMatch",
"focusPane",
"globalSummon",
"identifyWindow",
"identifyWindows",
"markMode",
"moveFocus",
"movePane",
"swapPane",
"markMode",
"moveTab",
"multipleActions",
"newTab",
"newWindow",
"nextTab",
"openAbout",
"openNewTabDropdown",
"openSettings",
"openSystemMenu",
"openTabColorPicker",
"openTabRenamer",
"openWindowRenamer",
"paste",
"prevTab",
"renameTab",
"openSystemMenu",
"openTabRenamer",
"quakeMode",
"quit",
"renameTab",
"renameWindow",
"resetFontSize",
"resizePane",
"renameWindow",
"restoreLastClosed",
"scrollDown",
"scrollDownPage",
"scrollUp",
"scrollUpPage",
"scrollToBottom",
"scrollToMark",
"scrollToTop",
"scrollUp",
"scrollUpPage",
"searchWeb",
"selectAll",
"sendInput",
"setColorScheme",
"setFocusMode",
"setFullScreen",
"setMaximized",
"setTabColor",
"showSuggestions",
"splitPane",
"swapPane",
"switchSelectionEndpoint",
"switchToTab",
"tabSearch",
"toggleAlwaysOnTop",
"toggleBlockSelection",
"toggleFocusMode",
"selectAll",
"setFocusMode",
"switchSelectionEndpoint",
"toggleFullscreen",
"setFullScreen",
"setMaximized",
"togglePaneZoom",
"toggleSplitOrientation",
"toggleReadOnlyMode",
"toggleShaderEffects",
"toggleSplitOrientation",
"wt",
"quit",
"adjustOpacity",
"restoreLastClosed",
"addMark",
"scrollToMark",
"clearMark",
"clearAllMarks",
"searchWeb",
"experimental.colorSelection",
"unbound"
],
"type": "string"
Expand Down
6 changes: 6 additions & 0 deletions src/cascadia/TerminalApp/AppActionHandlers.cpp
Expand Up @@ -1419,4 +1419,10 @@ namespace winrt::TerminalApp::implementation
}
args.Handled(true);
}
void TerminalPage::_HandleOpenAbout(const IInspectable& /*sender*/,
const ActionEventArgs& args)
{
_ShowAboutDialog();
args.Handled(true);
}
}
2 changes: 2 additions & 0 deletions src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp
Expand Up @@ -96,6 +96,7 @@ static constexpr std::string_view ShowContextMenuKey{ "showContextMenu" };
static constexpr std::string_view ExpandSelectionToWordKey{ "expandSelectionToWord" };
static constexpr std::string_view RestartConnectionKey{ "restartConnection" };
static constexpr std::string_view ToggleBroadcastInputKey{ "toggleBroadcastInput" };
static constexpr std::string_view OpenAboutKey{ "openAbout" };

static constexpr std::string_view ActionKey{ "action" };

Expand Down Expand Up @@ -430,6 +431,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
{ ShortcutAction::ExpandSelectionToWord, RS_(L"ExpandSelectionToWordCommandKey") },
{ ShortcutAction::RestartConnection, RS_(L"RestartConnectionKey") },
{ ShortcutAction::ToggleBroadcastInput, RS_(L"ToggleBroadcastInputCommandKey") },
{ ShortcutAction::OpenAbout, RS_(L"OpenAboutCommandKey") },
};
}();

Expand Down
3 changes: 2 additions & 1 deletion src/cascadia/TerminalSettingsModel/AllShortcutActions.h
Expand Up @@ -109,7 +109,8 @@
ON_ALL_ACTIONS(ExpandSelectionToWord) \
ON_ALL_ACTIONS(CloseOtherPanes) \
ON_ALL_ACTIONS(RestartConnection) \
ON_ALL_ACTIONS(ToggleBroadcastInput)
ON_ALL_ACTIONS(ToggleBroadcastInput) \
ON_ALL_ACTIONS(OpenAbout)

#define ALL_SHORTCUT_ACTIONS_WITH_ARGS \
ON_ALL_ACTIONS_WITH_ARGS(AdjustFontSize) \
Expand Down
Expand Up @@ -720,4 +720,8 @@
<value>Search the web for selected text</value>
<comment>This will open a web browser to search for some user-selected text</comment>
</data>
</root>
<data name="OpenAboutCommandKey" xml:space="preserve">
<value>Open about dialog</value>
<comment>This will open the "about" dialog, to display version info and other documentation</comment>
</data>
</root>
3 changes: 2 additions & 1 deletion src/cascadia/TerminalSettingsModel/defaults.json
Expand Up @@ -373,7 +373,8 @@
{ "command": "quakeMode", "keys":"win+sc(41)" },
{ "command": "openSystemMenu", "keys": "alt+space" },
{ "command": "quit" },
{ "command": "restoreLastClosed"},
{ "command": "restoreLastClosed" },
{ "command": "openAbout" },

// Tab Management
// "command": "closeTab" is unbound by default.
Expand Down