Some dead code cleanup
This commit is contained in:
parent
b20222f2c0
commit
9d76c62dae
|
@ -1382,11 +1382,6 @@ namespace winrt::TerminalApp::implementation
|
|||
return _root ? _root->AlwaysOnTop() : false;
|
||||
}
|
||||
|
||||
// KeyChord AppLogic::GlobalHotkey()
|
||||
// {
|
||||
// return _settings.GlobalSettings().GlobalHotkey();
|
||||
// }
|
||||
|
||||
Windows::Foundation::Collections::IMap<Microsoft::Terminal::Control::KeyChord, Microsoft::Terminal::Settings::Model::ActionAndArgs> AppLogic::GlobalHotkeys()
|
||||
{
|
||||
return _settings.GlobalSettings().KeyMap().FetchGlobalHotkeys();
|
||||
|
|
|
@ -89,7 +89,6 @@ namespace winrt::TerminalApp::implementation
|
|||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> ShowDialog(winrt::Windows::UI::Xaml::Controls::ContentDialog dialog);
|
||||
|
||||
// winrt::Microsoft::Terminal::Control::KeyChord GlobalHotkey();
|
||||
Windows::Foundation::Collections::IMap<Microsoft::Terminal::Control::KeyChord, Microsoft::Terminal::Settings::Model::ActionAndArgs> GlobalHotkeys();
|
||||
|
||||
// -------------------------------- WinRT Events ---------------------------------
|
||||
|
|
|
@ -47,7 +47,6 @@ static constexpr std::string_view DisableAnimationsKey{ "disableAnimations" };
|
|||
static constexpr std::string_view StartupActionsKey{ "startupActions" };
|
||||
static constexpr std::string_view FocusFollowMouseKey{ "focusFollowMouse" };
|
||||
static constexpr std::string_view WindowingBehaviorKey{ "windowingBehavior" };
|
||||
static constexpr std::string_view GlobalHotkeyKey{ "globalHotkey" };
|
||||
|
||||
static constexpr std::string_view DebugFeaturesKey{ "debugFeatures" };
|
||||
|
||||
|
@ -319,34 +318,6 @@ void GlobalAppSettings::LayerJson(const Json::Value& json)
|
|||
|
||||
JsonUtils::GetValueForKey(json, StartupActionsKey, _StartupActions);
|
||||
|
||||
try
|
||||
{
|
||||
const auto keys = json[JsonKey(GlobalHotkeyKey)];
|
||||
const auto validString = keys.isString();
|
||||
const auto validArray = keys.isArray() && keys.size() == 1;
|
||||
|
||||
// GH#4239 - If the user provided more than one key
|
||||
// chord to a "keys" array, warn the user here.
|
||||
// TODO: GH#1334 - remove this check.
|
||||
if (keys.isArray() && keys.size() > 1)
|
||||
{
|
||||
// TODO: add a warning
|
||||
// warnings.push_back(SettingsLoadWarnings::TooManyKeysForChord);
|
||||
}
|
||||
|
||||
if (validString || validArray)
|
||||
{
|
||||
const auto keyChordString = keys.isString() ? winrt::to_hstring(keys.asString()) : winrt::to_hstring(keys[0].asString());
|
||||
|
||||
const auto chord = KeyChordSerialization::FromString(keyChordString);
|
||||
_GlobalHotkey = chord;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// TODO: add a settings warning
|
||||
}
|
||||
|
||||
JsonUtils::GetValueForKey(json, FocusFollowMouseKey, _FocusFollowMouse);
|
||||
|
||||
JsonUtils::GetValueForKey(json, WindowingBehaviorKey, _WindowingBehavior);
|
||||
|
|
|
@ -91,7 +91,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
|||
INHERITABLE_SETTING(Model::GlobalAppSettings, hstring, StartupActions, L"");
|
||||
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, FocusFollowMouse, false);
|
||||
INHERITABLE_SETTING(Model::GlobalAppSettings, Model::WindowingMode, WindowingBehavior, Model::WindowingMode::UseNew);
|
||||
INHERITABLE_SETTING(Model::GlobalAppSettings, Control::KeyChord, GlobalHotkey, nullptr);
|
||||
|
||||
private:
|
||||
guid _defaultProfile;
|
||||
|
|
|
@ -68,7 +68,6 @@ namespace Microsoft.Terminal.Settings.Model
|
|||
INHERITABLE_SETTING(String, StartupActions);
|
||||
INHERITABLE_SETTING(Boolean, FocusFollowMouse);
|
||||
INHERITABLE_SETTING(WindowingMode, WindowingBehavior);
|
||||
INHERITABLE_SETTING(Microsoft.Terminal.Control.KeyChord, GlobalHotkey);
|
||||
|
||||
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
|
||||
void AddColorScheme(ColorScheme scheme);
|
||||
|
|
Loading…
Reference in a new issue