mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-06 06:09:50 +00:00
Compare commits
1 Commits
main
...
dev/lhecke
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3366347bbe |
@@ -15,7 +15,6 @@
|
||||
#include "../../types/inc/utils.hpp"
|
||||
|
||||
using namespace winrt::Windows::ApplicationModel;
|
||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Xaml::Controls;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
@@ -884,13 +883,8 @@ namespace winrt::TerminalApp::implementation
|
||||
// we should display the loading error.
|
||||
// * We can't display the error now, because we might not have a
|
||||
// UI yet. We'll display the error in _OnLoaded.
|
||||
_settingsLoadedResult = _TryLoadSettings();
|
||||
|
||||
if (FAILED(_settingsLoadedResult))
|
||||
{
|
||||
_settings = CascadiaSettings::LoadDefaults();
|
||||
}
|
||||
|
||||
_settings = CascadiaSettings::LoadDefaults();
|
||||
_settingsLoadedResult = S_OK;
|
||||
_loadedInitialSettings = true;
|
||||
|
||||
// Register for directory change notification.
|
||||
@@ -998,37 +992,9 @@ namespace winrt::TerminalApp::implementation
|
||||
_RequestedThemeChangedHandlers(*this, Theme());
|
||||
}
|
||||
|
||||
// Function Description:
|
||||
// Returns the current app package or nullptr.
|
||||
// TRANSITIONAL
|
||||
// Exists to work around a compiler bug. This function encapsulates the
|
||||
// exception handling that we used to keep around calls to Package::Current,
|
||||
// so that when it's called inside a coroutine and fails it doesn't explode
|
||||
// terribly.
|
||||
static winrt::Windows::ApplicationModel::Package GetCurrentPackageNoThrow() noexcept
|
||||
{
|
||||
try
|
||||
{
|
||||
return winrt::Windows::ApplicationModel::Package::Current();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// discard any exception -- literally pretend we're not in a package
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fire_and_forget AppLogic::_ApplyStartupTaskStateChange()
|
||||
try
|
||||
{
|
||||
// First, make sure we're running in a packaged context. This method
|
||||
// won't work, and will crash mysteriously if we're running unpackaged.
|
||||
const auto package{ GetCurrentPackageNoThrow() };
|
||||
if (package == nullptr)
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
|
||||
const auto tryEnableStartupTask = _settings.GlobalSettings().StartOnUserLogin();
|
||||
const auto task = co_await StartupTask::GetAsync(StartupTaskName);
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Xaml::Controls;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
using namespace winrt::Windows::System;
|
||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||
using namespace winrt::Windows::UI::Text;
|
||||
using namespace winrt::Windows::Storage;
|
||||
using namespace winrt::Windows::Storage::Pickers;
|
||||
@@ -908,7 +907,7 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
CommandPalette().Visibility(Visibility::Collapsed);
|
||||
//CommandPalette().Visibility(Visibility::Collapsed);
|
||||
_UpdateTabView();
|
||||
}
|
||||
|
||||
@@ -957,11 +956,11 @@ namespace winrt::TerminalApp::implementation
|
||||
// When the tab switcher is eventually dismissed, the focus will
|
||||
// get tossed back to the focused terminal control, so we don't
|
||||
// need to worry about focus getting lost.
|
||||
if (CommandPalette().Visibility() != Visibility::Visible)
|
||||
{
|
||||
tab.Focus(FocusState::Programmatic);
|
||||
_UpdateMRUTab(tab);
|
||||
}
|
||||
//if (CommandPalette().Visibility() != Visibility::Visible)
|
||||
//{
|
||||
// tab.Focus(FocusState::Programmatic);
|
||||
// _UpdateMRUTab(tab);
|
||||
//}
|
||||
|
||||
tab.TabViewItem().StartBringIntoView();
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// happen before the Settings UI is reloaded and tries to re-read
|
||||
// those values.
|
||||
_UpdateCommandsForPalette();
|
||||
CommandPalette().SetActionMap(_settings.ActionMap());
|
||||
//CommandPalette().SetActionMap(_settings.ActionMap());
|
||||
|
||||
if (needRefreshUI)
|
||||
{
|
||||
@@ -276,16 +276,16 @@ namespace winrt::TerminalApp::implementation
|
||||
// When the visibility of the command palette changes to "collapsed",
|
||||
// the palette has been closed. Toss focus back to the currently active
|
||||
// control.
|
||||
CommandPalette().RegisterPropertyChangedCallback(UIElement::VisibilityProperty(), [this](auto&&, auto&&) {
|
||||
if (CommandPalette().Visibility() == Visibility::Collapsed)
|
||||
{
|
||||
_FocusActiveControl(nullptr, nullptr);
|
||||
}
|
||||
});
|
||||
CommandPalette().DispatchCommandRequested({ this, &TerminalPage::_OnDispatchCommandRequested });
|
||||
CommandPalette().CommandLineExecutionRequested({ this, &TerminalPage::_OnCommandLineExecutionRequested });
|
||||
CommandPalette().SwitchToTabRequested({ this, &TerminalPage::_OnSwitchToTabRequested });
|
||||
CommandPalette().PreviewAction({ this, &TerminalPage::_PreviewActionHandler });
|
||||
//CommandPalette().RegisterPropertyChangedCallback(UIElement::VisibilityProperty(), [this](auto&&, auto&&) {
|
||||
// if (CommandPalette().Visibility() == Visibility::Collapsed)
|
||||
// {
|
||||
// _FocusActiveControl(nullptr, nullptr);
|
||||
// }
|
||||
//});
|
||||
//CommandPalette().DispatchCommandRequested({ this, &TerminalPage::_OnDispatchCommandRequested });
|
||||
//CommandPalette().CommandLineExecutionRequested({ this, &TerminalPage::_OnCommandLineExecutionRequested });
|
||||
//CommandPalette().SwitchToTabRequested({ this, &TerminalPage::_OnSwitchToTabRequested });
|
||||
//CommandPalette().PreviewAction({ this, &TerminalPage::_PreviewActionHandler });
|
||||
|
||||
// Settings AllowDependentAnimations will affect whether animations are
|
||||
// enabled application-wide, so we don't need to check it each time we
|
||||
@@ -2880,7 +2880,7 @@ namespace winrt::TerminalApp::implementation
|
||||
commandsCollection.Append(nameAndCommand.Value());
|
||||
}
|
||||
|
||||
CommandPalette().SetCommands(commandsCollection);
|
||||
//CommandPalette().SetCommands(commandsCollection);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
ContentDialog a Row, I believe it's assigned Row 0 by default. So,
|
||||
when the dialog gets opened, the dialog seemingly causes a giant
|
||||
hole to appear in the body of the app.
|
||||
|
||||
|
||||
Assigning all the dialogs to Row 2 (where the rest of the content
|
||||
is) makes the "hole" appear in the same space as the rest of the
|
||||
TabContent, fixing the issue.
|
||||
|
||||
|
||||
Note that the actual content in a content dialog gets parented to
|
||||
the PopupRoot, so it actually always appeared in the correct place, it's
|
||||
just this weird hole that appeared in Row 0.
|
||||
@@ -190,6 +190,7 @@
|
||||
</ContentDialog>
|
||||
|
||||
<local:CommandPalette x:Name="CommandPalette"
|
||||
x:Load="False"
|
||||
Grid.Row="2"
|
||||
VerticalAlignment="Stretch"
|
||||
PreviewKeyDown="_KeyDownHandler"
|
||||
|
||||
@@ -27,7 +27,6 @@ using namespace ::Microsoft::Console::VirtualTerminal;
|
||||
using namespace ::Microsoft::Terminal::Core;
|
||||
using namespace winrt::Windows::Graphics::Display;
|
||||
using namespace winrt::Windows::System;
|
||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||
|
||||
// The minimum delay between updates to the scroll bar's values.
|
||||
// The updates are throttled to limit power usage.
|
||||
|
||||
@@ -21,7 +21,6 @@ using namespace ::Microsoft::Console::VirtualTerminal;
|
||||
using namespace ::Microsoft::Terminal::Core;
|
||||
using namespace winrt::Windows::Graphics::Display;
|
||||
using namespace winrt::Windows::System;
|
||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||
|
||||
static constexpr unsigned int MAX_CLICK_COUNT = 3;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored.
|
||||
{
|
||||
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
|
||||
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
|
||||
|
||||
// Launch Settings
|
||||
"initialCols": 120,
|
||||
|
||||
Reference in New Issue
Block a user