-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Refactor ActionMap and Command to use ActionIDs #17162
Changes from 78 commits
90627b3
9dff28f
8bcbd0b
052d063
8cc82de
642d0ab
66fe08f
2bb1b6c
be193b2
db528c9
7c907fe
b43191d
2093660
6c32539
eccd87f
44510dc
10d1fc8
71bf90f
d57c7a1
5c2307c
9fc6972
dca7df5
dd25ed7
6e293a5
af2d22f
bdf42c2
12f3aa9
aa49212
5ee630e
360b92e
5e70911
ca3eb87
85933e2
c134402
22ab936
0a3e17e
e28d478
f425746
d0938e2
12a61c5
f1633e0
ddfac90
3e7ab38
ae16a5e
dc874c3
936afd6
b3e9c26
5a1b822
c51558f
754bf04
2f1d8d2
2b4aeb2
e62dfa2
e725f1e
db00b90
3d92f27
428821b
6437b9f
4c744e6
ca4015f
45cfcd6
3c6015d
c2c75c8
3e601f5
cdb907d
f35bf20
2b16acd
193e573
0480d65
02a1e37
80fc299
ebc03e9
ccf1cc9
7793c5c
abef25d
4d35c14
3e31bda
14d83b5
6c6dd46
b88a8c5
9703815
a80316d
625753c
406312f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -826,7 +826,7 @@ namespace winrt::TerminalApp::implementation | |
newTabFlyout.Items().Append(settingsItem); | ||
|
||
auto actionMap = _settings.ActionMap(); | ||
const auto settingsKeyChord{ actionMap.GetKeyBindingForAction(ShortcutAction::OpenSettings, OpenSettingsArgs{ SettingsTarget::SettingsUI }) }; | ||
const auto settingsKeyChord{ actionMap.GetKeyBindingForAction(L"Terminal.OpenSettingsUI") }; | ||
if (settingsKeyChord) | ||
{ | ||
_SetAcceleratorForMenuItem(settingsItem, settingsKeyChord); | ||
|
@@ -848,7 +848,7 @@ namespace winrt::TerminalApp::implementation | |
commandPaletteFlyout.Click({ this, &TerminalPage::_CommandPaletteButtonOnClick }); | ||
newTabFlyout.Items().Append(commandPaletteFlyout); | ||
|
||
const auto commandPaletteKeyChord{ actionMap.GetKeyBindingForAction(ShortcutAction::ToggleCommandPalette) }; | ||
const auto commandPaletteKeyChord{ actionMap.GetKeyBindingForAction(L"Terminal.ToggleCommandPalette") }; | ||
if (commandPaletteKeyChord) | ||
{ | ||
_SetAcceleratorForMenuItem(commandPaletteFlyout, commandPaletteKeyChord); | ||
|
@@ -1023,7 +1023,8 @@ namespace winrt::TerminalApp::implementation | |
// NewTab(ProfileIndex=N) action | ||
NewTerminalArgs newTerminalArgs{ profileIndex }; | ||
NewTabArgs newTabArgs{ newTerminalArgs }; | ||
auto profileKeyChord{ _settings.ActionMap().GetKeyBindingForAction(ShortcutAction::NewTab, newTabArgs) }; | ||
const auto id = fmt::format(FMT_COMPILE(L"Terminal.OpenNewTabProfile{}"), profileIndex); | ||
const auto profileKeyChord{ _settings.ActionMap().GetKeyBindingForAction(id) }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There 100% is a issue right now for "I rebound keys for new tab profile N, but the dropdown still has the old ones" and I'm guessing this will solve that (because people can rebind the key for the literal There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #13943 I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep this fixes that! Also fixes it in the cmd palette There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PankajBhojwani should this PR close that bug? |
||
|
||
// make sure we find one to display | ||
if (profileKeyChord) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i really like how clean this feels now