These changes to defaults.json are out-of-date, and Command doesn't need an ObservableVector

This commit is contained in:
Mike Griese
2020-08-03 16:51:01 -05:00
parent 7cb870c2c3
commit 8fd3e0d27c
4 changed files with 6 additions and 38 deletions

View File

@@ -30,11 +30,11 @@ namespace winrt::TerminalApp::implementation
{
Command::Command()
{
_nestedCommandsView = winrt::single_threaded_observable_vector<winrt::TerminalApp::Command>();
_nestedCommandsView = winrt::single_threaded_vector<winrt::TerminalApp::Command>();
_setAction(nullptr);
}
Collections::IObservableVector<winrt::TerminalApp::Command> Command::NestedCommands()
Collections::IVector<winrt::TerminalApp::Command> Command::NestedCommands()
{
return _nestedCommandsView;
}

View File

@@ -52,7 +52,7 @@ namespace winrt::TerminalApp::implementation
static std::vector<::TerminalApp::SettingsLoadWarnings> LayerJson(std::unordered_map<winrt::hstring, winrt::TerminalApp::Command>& commands,
const Json::Value& json);
Windows::Foundation::Collections::IObservableVector<TerminalApp::Command> NestedCommands();
Windows::Foundation::Collections::IVector<TerminalApp::Command> NestedCommands();
WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler);
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, Name, _PropertyChangedHandlers);
@@ -63,7 +63,7 @@ namespace winrt::TerminalApp::implementation
private:
Json::Value _originalJson;
std::unordered_map<winrt::hstring, winrt::TerminalApp::Command> _subcommands;
Windows::Foundation::Collections::IObservableVector<TerminalApp::Command> _nestedCommandsView{ nullptr };
Windows::Foundation::Collections::IVector<TerminalApp::Command> _nestedCommandsView{ nullptr };
static std::vector<winrt::TerminalApp::Command> _expandCommand(winrt::com_ptr<Command> expandable,
const std::vector<::TerminalApp::Profile>& profiles,

View File

@@ -13,6 +13,6 @@ namespace TerminalApp
ActionAndArgs Action;
String KeyChordText;
Windows.Foundation.Collections.IObservableVector<Command> NestedCommands { get; };
Windows.Foundation.Collections.IVector<Command> NestedCommands { get; };
}
}

View File

@@ -341,38 +341,6 @@
{ "command": { "action": "adjustFontSize", "delta": 1 }, "keys": "ctrl+=" },
{ "command": { "action": "adjustFontSize", "delta": -1 }, "keys": "ctrl+-" },
{ "command": "resetFontSize", "keys": "ctrl+0" }
],
"commands": [
{ "icon": null, "name": { "key": "NewTabCommandKey" }, "action": "newTab" },
{ "icon": null, "name": { "key": "DuplicateTabCommandKey" }, "action": "duplicateTab" },
{ "icon": null, "name": { "key": "DuplicatePaneCommandKey" }, "action": { "action": "splitPane", "split":"auto", "splitMode": "duplicate" } },
{ "icon": null, "name": { "key": "SplitHorizontalCommandKey" }, "action": { "action": "splitPane", "split": "horizontal" } },
{ "icon": null, "name": { "key": "SplitVerticalCommandKey" }, "action": { "action": "splitPane", "split": "vertical" } },
{ "icon": null, "name": { "key": "CloseWindowCommandKey" }, "action": "closeWindow" },
{ "icon": null, "name": { "key": "ClosePaneCommandKey" }, "action": "closePane" },
{ "icon": null, "name": { "key": "OpenNewTabDropdownCommandKey" }, "action": "openNewTabDropdown" },
{ "icon": null, "name": { "key": "OpenSettingsCommandKey" }, "action": "openSettings" },
{ "icon": null, "name": { "key": "FindCommandKey" }, "action": "find" },
{ "icon": null, "name": { "key": "NextTabCommandKey" }, "action": "nextTab" },
{ "icon": null, "name": { "key": "PrevTabCommandKey" }, "action": "prevTab" },
{ "icon": null, "name": { "key": "ToggleFullscreenCommandKey" }, "action": "toggleFullscreen" },
{ "icon": null, "name": { "key": "CopyTextCommandKey" }, "action": { "action": "copy", "singleLine": false } },
{ "icon": null, "name": { "key": "PasteCommandKey" }, "action": "paste" },
{ "icon": null, "name": { "key": "IncreaseFontSizeCommandKey" }, "action": { "action": "adjustFontSize", "delta": 1 } },
{ "icon": null, "name": { "key": "DecreaseFontSizeCommandKey" }, "action": { "action": "adjustFontSize", "delta": -1 } },
{ "icon": null, "name": { "key": "ResetFontSizeCommandKey" }, "action": "resetFontSize" },
{ "icon": null, "name": { "key": "ScrollDownCommandKey" }, "action": "scrollDown" },
{ "icon": null, "name": { "key": "ScrollDownPageCommandKey" }, "action": "scrollDownPage" },
{ "icon": null, "name": { "key": "ScrollUpCommandKey" }, "action": "scrollUp" },
{ "icon": null, "name": { "key": "ScrollUpPageCommandKey" }, "action": "scrollUpPage" }
]
}