Compare commits

...

18 Commits

Author SHA1 Message Date
Carlos Zamora
054afcc59d const 2026-05-12 15:12:28 -07:00
Carlos Zamora
56aa5fc73f add "Profiles" to search results 2026-05-12 11:41:29 -07:00
Carlos Zamora
3ee13c679f spell check 2026-05-12 10:27:52 -07:00
Carlos Zamora
87d9fdb1da add polish 2026-05-07 18:53:54 -07:00
Carlos Zamora
7cbfb5784a [SUI] Move profiles into a new Profiles page 2026-05-07 15:59:50 -07:00
Windows Console Service Bot
ea4cb8145f Localization Updates - main - 04/30/2026 03:04:35 (#20168)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
2026-05-06 16:36:17 -05:00
Sushaanth Srinivasan
a325a2fa5a Fix settings error text legibility in High Contrast mode (#20098)
Closes #18147

`SystemErrorTextColor` doesn't adapt to High Contrast themes, so the
error details in the "Failed to reload settings" dialog are illegible
(yellow on cream in HC White, for example).

Fix: skip the `ErrorTextBrush` foreground override when High Contrast is
active, letting the text inherit the system HC text color from its
parent element. This matches the existing HC detection pattern used in
`TermControl.cpp` and `MainPage.cpp`.

Validated manually on High Contrast White and Night sky themes.

Co-authored-by: SushaanthSrinivasan <SushaanthSrinivasan@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-06 02:35:16 +00:00
nmurrell07
dadde2fb11 fix(resizePane): Mark as handled only when resize succeeds (#20001)
This fix addresses issue #19983 where resizePane actions unconditionally
consume keystrokes even when no resize can occur.

The fix follows the same pattern used for moveFocus and swapPane fixes:
- Changed Tab::ResizePane to return bool indicating success
- Changed TerminalPage::_ResizePane to return bool from ResizePane  
- Updated _HandleResizePane to set args.Handled() based on whether
resize succeeded

This allows the keychord to propagate to the terminal when no resize can
occur, matching the behavior of moveFocus and swapPane (#6129).

Closes #19983

---------

Co-authored-by: nmurrell07 <nmurrell07@users.noreply.github.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
2026-05-05 19:42:48 +00:00
Dustin L. Howett
8edac5fb12 Don't allow overflowing lengths in WM_COPYDATA (#20185)
It is possible to craft a packet whose `len` is `0x80000001`.

We should not produce values that do not fit in size_t (on e.g. x86).

Reject them summarily.
2026-05-05 19:19:25 +00:00
Dustin L. Howett
dbc5177f7f Migrate some pull requests from OS (#20181)
Some work was required to ensure conhost builds.

---------

Co-authored-by: Dragos Sambotin <dragoss@microsoft.com>
Co-authored-by: Daniel Paoliello (HE HIM) <danpao@microsoft.com>
2026-05-05 00:34:13 +00:00
Carlos Zamora
b753e3dee3 Replace confirmCloseAllTabs with confirmOnClose (#20055)
## Summary of the Pull Request
Replaces the `warning.confirmCloseAllTabs` setting with a
`warning.confirmOnClose` enum setting that accepts the following:
- `never`: don't present a warning dialog when closing a session
- `automatic`: present a warning dialog when closing multiple tabs/panes
at once
- `always`: present a warning dialog when closing any session

The confirmation dialog contains a "don't ask me again" checkbox. When
checked, we update the setting to `never`.

This setting also affects the following actions:
- "close other tabs"
- "close tabs after"
- "close other panes"
- "quit"
The appropriate confirmation dialog is shown in these scenarios. We also
present an aggregate dialog instead of prompting the user once per
tab/pane. If there are no other tabs/panes, we don't present a dialog
and treat the key binding as unhandled (passing the key through).

## References and Relevant Issues
Iteration of #19944 

## Validation Steps Performed
- closing a tab:
   -  1 pane --> no dialog
   -  2 panes --> dialog
   -  action and middle clicking tab trigger same flow
- close all other tabs:
   -  no other tabs --> no dialog
   -  1 other tab --> dialog
- close all other panes:
   -  1 pane --> no dialog
   -  2 panes --> dialog
- close all tabs after the current tab:
   -  no tabs after --> no dialog (even if tabs before)
   -  1 tab after --> dialog
- close window:
   -  2 tabs --> dialog
   -  2 panes --> dialog
   -  1 tab with one pane --> no dialog
- Quit the Terminal:
   -  3 windows --> dialog
   - 1 window --> dialog
-  "don't ask me again" checkbox checked --> setting changed to "never"
-  "never" --> no dialog for scenarios above
-  "always" --> dialog always appears, even when closing a single pane

## PR Checklist
Closes #5301 
Closes #6641
"don't ask me again" checkbox is also mentioned in #10000 

Co-authored by @zadjii-msft
2026-05-04 10:43:34 -07:00
Carlos Zamora
a834313fb7 Add a setting for sending a notification on BEL (#20011)
## Summary of the Pull Request
Targets #20010 

Adds another `bellStyle` flag option. This sends a windows toast
notification to the user when a BEL is encountered

- [X] Closes #18605 
- [ ] Documentation updated

Heavily based on #19936 
Co-authored by @zadjii-msft
2026-05-04 10:38:17 -07:00
Carlos Zamora
059986ebce [Unpackaged] Fix taskbar glomming due to AUMID (#20064)
The bug was caused by an AUMID mismatch between the Taskbar's .lnk file
and Windows Terminal. Since no AUMID was associated with the .exe, the
OS automatically creates one for us. However, #20018 added an AUMID for
unpackaged scenarios, so now there was a mismatch, resulting in a new
taskbar entry being created.

To fix this, we check if a .lnk points to our .exe in the taskbar.
There's 3 cases here:
1. no .lnk of interest exists --> set the AUMID normally
2. the .lnk carries our AUMID --> set the AUMID normally
3. the .lnk doesn't have an AUMID (aka uses the auto-resolved one) -->
- for this launch: don't set the AUMID so that we both use the
auto-resolved one
- on next launch: set the AUMID on the .lnk and process so that they all
agree

## Validation Steps Performed
In unpackaged folder, move WindowsTerminal.exe to the taskbar (creates
.lnk)...
 Double-click the .exe --> Same taskbar entry is used
 Double-click the .exe _again_ --> second window goes to same taskbar
entry

The first window doesn't have to close for this to work. It just * works
*!

Bug introduced in #20018 
Closes #20053
2026-05-01 16:56:19 -05:00
Carlos Zamora
e4e3f08efc Add toast notification infrastructure (#20010)
## Summary of the Pull Request
Adds the infrastructure for toast notifications. Breakdown:
- `DesktopNotification`:
- `DesktopNotificationArgs` includes the struct to group all
notification-related data together.
   - `SendNotification()` actually sends it
- `AppCommandlineArgs.cpp`: added a check for the `--from-toast` no-op
sentinel; ensures no new window is created
- Most of the other changes are just bubbling up the notification from
the `TerminalPaneContent` to `TerminalPage`
- `TabManagement.cpp`: `_SendDesktopNotification()` does the final
packaging of the notification before calling the `DesktopNotification`
API

This supports finding the right tab when it's been reordered or even
moved to a new window!
This also has expanded to support finding the right pane, which is
resilient to pane swaps/closing too. When the pane can't be found, we
just fallback to the tab.
If the pane is already focused, we don't send a notification.

This simply adds the infrastructure! Looks like nothing can actually
take advantage of it yet, but it's been tested with the changes in
#20011.

Heavily based on #19935
Co-authored by @zadjii-msft
2026-04-29 17:24:45 -07:00
Dustin L. Howett
84e807cbeb appx: add appLicensing to Preview and Stable manifests (#20163)
This should prevent an outage like the one from #19764
2026-04-29 17:04:16 -05:00
Carlos Zamora
115ec2cbb9 Fix rounding error for word selection (#20084)
## Summary of the Pull Request
Dustin reported this bug to me. Thankfully it was an easy fix.

## References and Relevant Issues
Bug from implementing #5099

## Validation Steps Performed
Double-click ____ of right-most cell of a word selects the current word
 right-half
 left-half
2026-04-29 17:01:43 -05:00
Carlos Zamora
3362651659 Tab menu: show "restart" + maintain items' enable state (#19972)
## Summary of the Pull Request
Changes how/when we display the "restart connection" item in the tab's
context menu. Now, we always display it, but it's disabled if we're not
in a terminal tab.

Applies similar enable/disable logic to the rest of the menu items.
Previous to this, they just wouldn't do anything (which is fair, they
didn't make any sense).

## Validation Steps Performed
Check tab's menu in following scenarios:
 terminal pane
 settings tab
 snippets pane

Closes #18891
2026-04-29 18:54:43 +00:00
Carlos Zamora
c72600dd4f Add more settings model unit tests (#20117)
## Summary of the Pull Request
Adds tests to `UnitTests_SettingsModel` to improve coverage. Tests
include:
- `SettingInheritanceFallback`: Settings inherit from user defaults;
unset settings fall back to built-in defaults
- `ClearSettingRestoresInheritance`: `ClearXxx()` removes the value at
the current layer, causing fallback to the parent
- `HasSettingAtSpecificLayer`: `HasXxx() `distinguishes explicitly set
values from inherited ones
- `ModifyProfileSettingAndRoundtrip`: Change a profile setting via
setter and `ToJson()` reflects it
- `ModifyGlobalSettingAndRoundtrip`: Change global settings via setter
and `ToJson()` reflects them
- `ModifyColorSchemeAndRoundtrip`: Change a color scheme property and
the serialized JSON reflects it
- `FixupUserSettingsDetectsChanges`: A clean roundtrip produces
idempotent FixupUserSettings() (returns false)
- `FixupCommandlinePatching`: 4 sub-cases: CMD/PowerShell short names
get patched to full paths, no-op when already clean, custom profiles are
untouched

This also updates `TestCloneInheritanceTree` to verify that `HasXxx()`
and settters that modify the clone don't modify the original.

This is being done in preparation for auto-save to help ensure we don't
have any regressions.

## Validation Steps Performed
 Tests pass
 Manually reviewed the new tests, they make sense and do add value
(though some are less valuable than others, admittedly)
 Sent Copilot on a quest to ensure we're not adding redundant tests. It
did catch a few and remove them fwiw.
2026-04-29 10:16:30 -07:00
106 changed files with 2984 additions and 603 deletions

View File

@@ -241,6 +241,7 @@ consoletaeftemplates
consoleuwp
CONSOLEWINDOWOWNER
consrv
consteval
constexprable
contentfiles
conterm

View File

@@ -60,7 +60,8 @@
"enum": [
"audible",
"window",
"taskbar"
"taskbar",
"notification"
]
}
},
@@ -70,6 +71,7 @@
"audible",
"taskbar",
"window",
"notification",
"all",
"none"
]
@@ -2654,10 +2656,21 @@
"type": "string"
},
"warning.confirmCloseAllTabs": {
"deprecated": true,
"description": "[Deprecated] Use \"warning.confirmOnClose\" instead.",
"default": true,
"description": "When set to \"true\" closing a window with multiple tabs open will require confirmation. When set to \"false\", the confirmation dialog will not appear.",
"type": "boolean"
},
"warning.confirmOnClose": {
"default": "automatic",
"description": "Controls when a confirmation dialog appears before closing tabs or windows.",
"enum": [
"never",
"automatic",
"always"
],
"type": "string"
},
"useTabSwitcher": {
"description": "[Deprecated] Replaced with the \"tabSwitcherMode\" setting.",
"default": true,

View File

@@ -237,6 +237,7 @@
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources" />
<rescap:Capability Name="appLicensing" />
</Capabilities>
<Extensions>

View File

@@ -237,6 +237,7 @@
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources" />
<rescap:Capability Name="appLicensing" />
</Capabilities>
<Extensions>

View File

@@ -499,8 +499,8 @@ namespace winrt::TerminalApp::implementation
}
else
{
_ResizePane(realArgs.ResizeDirection());
args.Handled(true);
const auto resizeSucceeded = _ResizePane(realArgs.ResizeDirection());
args.Handled(resizeSucceeded);
}
}
}
@@ -801,7 +801,7 @@ namespace winrt::TerminalApp::implementation
_RemoveTabs(tabsToRemove);
actionArgs.Handled(true);
actionArgs.Handled(!tabsToRemove.empty());
}
}
@@ -837,7 +837,7 @@ namespace winrt::TerminalApp::implementation
// tab row, until you mouse over them. Probably has something to do
// with tabs not resizing down until there's a mouse exit event.
actionArgs.Handled(true);
actionArgs.Handled(!tabsToRemove.empty());
}
}

View File

@@ -1068,6 +1068,15 @@ int AppCommandlineArgs::ParseArgs(winrt::array_view<const winrt::hstring> args)
return 0;
}
// When a toast notification is clicked, Windows may launch a new instance
// with "--from-toast" as the argument. This is a no-op sentinel — the
// in-process Activated handler on the toast already handled activation.
// See DesktopNotification.cpp for more details.
if (args.size() == 2 && args[1] == L"--from-toast")
{
return 0;
}
auto commands = ::TerminalApp::AppCommandlineArgs::BuildCommands(args);
for (auto& cmdBlob : commands)

View File

@@ -15,6 +15,7 @@ namespace winrt::TerminalApp::implementation
til::typed_event<IPaneContent> TaskbarProgressChanged;
til::typed_event<IPaneContent> ReadOnlyChanged;
til::typed_event<IPaneContent> FocusRequested;
til::typed_event<IPaneContent, winrt::TerminalApp::NotificationEventArgs> NotificationRequested;
til::typed_event<winrt::Windows::Foundation::IInspectable, Microsoft::Terminal::Settings::Model::Command> DispatchCommandRequested;
};

View File

@@ -0,0 +1,129 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "DesktopNotification.h"
#include <WtExeUtils.h>
using namespace winrt::Windows::UI::Notifications;
using namespace winrt::Windows::Data::Xml::Dom;
namespace winrt::TerminalApp::implementation
{
std::atomic<uint64_t> DesktopNotification::_lastNotificationTime{ 0 };
// Method Description:
// - Rate-limits toast notifications so we don't spam the user.
// Return Value:
// - Returns true if a notification is allowed, false if too recent.
bool DesktopNotification::ShouldSendNotification()
{
const auto now = GetTickCount64();
auto last = _lastNotificationTime.load(std::memory_order_relaxed);
// Subtraction wraps cleanly modulo 2^64, so the delta is correct even
// across the (~584 million year) GetTickCount64 rollover.
if (now - last < MinNotificationIntervalMs)
{
return false;
}
// Attempt to update; if another thread beat us, that's fine — we'll skip this one.
return _lastNotificationTime.compare_exchange_strong(last, now, std::memory_order_relaxed);
}
// Method Description:
// - Sends a toast notification with the given title and message.
// - When the user clicks the toast, the `Activated` callback fires
// with the tabIndex that was passed in, so the caller can switch
// to the correct tab and summon the window.
// Arguments:
// - args: The title, message, and tab index to include in the notification.
// - activated: A callback invoked on the background thread when the
// toast is clicked. The uint32_t parameter is the tab index.
void DesktopNotification::SendNotification(const DesktopNotificationArgs& args, std::function<void()> activatedFunc)
{
try
{
if (!ShouldSendNotification())
{
return;
}
// Build the toast XML. We use a simple template with a title and body text.
//
// <toast launch="--from-toast">
// <visual>
// <binding template="ToastGeneric">
// <text>Title</text>
// <text>Message</text>
// </binding>
// </visual>
// </toast>
auto toastXml = ToastNotificationManager::GetTemplateContent(ToastTemplateType::ToastText02);
auto textNodes = toastXml.GetElementsByTagName(L"text");
// First <text> is the title
textNodes.Item(0).InnerText(args.Title);
// Second <text> is the body
textNodes.Item(1).InnerText(args.Message);
auto toastElement = toastXml.DocumentElement();
// When a toast is clicked, Windows launches a new instance of the app
// with the "launch" attribute as command-line arguments. We handle
// toast activation in-process via the Activated event below, so the
// new instance should do nothing. "--from-toast" is recognized by
// AppCommandlineArgs::ParseArgs as a no-op sentinel.
toastElement.SetAttribute(L"launch", L"--from-toast");
toastElement.SetAttribute(L"scenario", L"default");
auto toast = ToastNotification{ toastXml };
// Set the tag and group to enable notification replacement.
// Repeated notifications with the same tag replace the previous one
// rather than stacking in the notification center.
toast.Tag(args.Tag);
toast.Group(L"WindowsTerminal");
// When the user activates (clicks) the toast, fire the callback.
if (activatedFunc)
{
toast.Activated([activatedFunc](const auto& /*sender*/, const auto& /*eventArgs*/) {
activatedFunc();
});
}
// For packaged apps, CreateToastNotifier() uses the package identity automatically.
// For unpackaged apps, we must pass the explicit AUMID that was registered
// at startup via SetCurrentProcessExplicitAppUserModelID.
winrt::Windows::UI::Notifications::ToastNotifier notifier{ nullptr };
if (IsPackaged())
{
notifier = ToastNotificationManager::CreateToastNotifier();
}
else
{
// Retrieve the AUMID that was set by WindowEmperor at startup.
wil::unique_cotaskmem_string aumid;
if (SUCCEEDED(GetCurrentProcessExplicitAppUserModelID(&aumid)))
{
notifier = ToastNotificationManager::CreateToastNotifier(aumid.get());
}
}
if (notifier)
{
notifier.Show(toast);
}
}
catch (...)
{
// Toast notification is a best-effort feature. If it fails (e.g., notifications
// are disabled, or the app is unpackaged without proper AUMID setup), we silently
// ignore the error.
LOG_CAUGHT_EXCEPTION();
}
}
}

View File

@@ -0,0 +1,37 @@
/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- DesktopNotification.h
Module Description:
- Helper for sending Windows desktop toast notifications. Used to surface
terminal activity events to the user via the Windows notification center.
--*/
#pragma once
#include "pch.h"
namespace winrt::TerminalApp::implementation
{
struct DesktopNotificationArgs
{
winrt::hstring Title;
winrt::hstring Message;
winrt::hstring Tag;
};
class DesktopNotification
{
public:
static bool ShouldSendNotification();
static void SendNotification(const DesktopNotificationArgs& args, std::function<void()> activatedFunc);
private:
static std::atomic<uint64_t> _lastNotificationTime;
// Minimum interval between notifications, in milliseconds (GetTickCount64 units).
static constexpr uint64_t MinNotificationIntervalMs = 5'000;
};
}

View File

@@ -14,6 +14,13 @@ namespace TerminalApp
runtimeclass BellEventArgs
{
Boolean FlashTaskbar { get; };
Boolean SendNotification { get; };
};
runtimeclass NotificationEventArgs
{
String Title { get; };
String Body { get; };
};
interface IPaneContent
@@ -46,6 +53,7 @@ namespace TerminalApp
event Windows.Foundation.TypedEventHandler<IPaneContent, Object> TaskbarProgressChanged;
event Windows.Foundation.TypedEventHandler<IPaneContent, Object> ReadOnlyChanged;
event Windows.Foundation.TypedEventHandler<IPaneContent, Object> FocusRequested;
event Windows.Foundation.TypedEventHandler<IPaneContent, NotificationEventArgs> NotificationRequested;
};

View File

@@ -499,24 +499,48 @@
<value>Hinweise von Drittanbietern</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Abbrechen</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Alle schließen</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Möchten Sie alle Fenster schließen?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Abbrechen</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Alle schließen</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Möchten Sie alle Registerkarten schließen?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Alle schließen</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Möchten Sie diese Registerkarte schließen?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Registerkarte schließen</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Möchten Sie diesen Bereich schließen?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Bereich schließen</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Möchten Sie diese Registerkarten schließen?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Registerkarten schließen</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Möchten Sie diese Bereiche schließen?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Bereiche schließen</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Nicht mehr fragen</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Abbrechen</value>
</data>
@@ -748,6 +772,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Aktivität auf der Registerkarte „{0}“</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Aktivität auf der Registerkarte „{0}“ (Fenster „{1}“)</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Eine neue Registerkarte im angegebenen Startverzeichnis öffnen</value>
</data>
@@ -884,10 +916,10 @@
<value>Wenn diese Option festgelegt ist, wird der Befehl an den Standardbefehl des Profils angefügt, anstatt ihn zu ersetzen.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Verbindung neu starten</value>
<value>Sitzung neu starten</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Verbindung mit aktivem Bereich neu starten</value>
<value>Sitzung im aktiven Bereich neu starten</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Schnipsel</value>

View File

@@ -496,24 +496,48 @@
<value>Third-Party notices</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Close all</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Do you want to close all windows?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Close all</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Do you want to close all tabs?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Close all</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Do you want to close this tab?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Close tab</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Do you want to close this pane?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Close pane</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Do you want to close these tabs?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Close tabs</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Do you want to close these panes?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Close panes</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Don't ask me again</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Cancel</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Activity in tab "{0}"</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Activity in tab "{0}" (window "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Open a new tab in given starting directory</value>
</data>
@@ -881,10 +913,10 @@
<value>If set, the command will be appended to the profile's default command instead of replacing it.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Restart connection</value>
<value>Restart session</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Restart the active pane connection</value>
<value>Restart the session in the active pane</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Snippets</value>

View File

@@ -496,24 +496,48 @@
<value>Avisos de terceros</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Cerrar todo</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>¿Quiere cerrar todas las ventanas?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Cerrar todo</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>¿Quieres cerrar todas las pestañas?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Cerrar todo</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>¿Desea cerrar esta pestaña?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Cerrar pestaña</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>¿Desea cerrar este panel?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Cerrar panel</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>¿Desea cerrar estas pestañas?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Cerrar pestañas</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>¿Desea cerrar estos paneles?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Cerrar paneles</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>No volver a preguntarme</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Cancelar</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Actividad en la pestaña "{0}"</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Actividad en la pestaña "{0}" (ventana "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Abrir una nueva pestaña en un directorio de inicio determinado</value>
</data>
@@ -881,10 +913,10 @@
<value>Si se establece, el comando se anexará al comando predeterminado del perfil en lugar de reemplazarlo.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Reiniciar conexión</value>
<value>Reiniciar sesión</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Reiniciar la conexión del panel activo</value>
<value>Reiniciar la sesión en el panel activo</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Fragmentos</value>

View File

@@ -496,24 +496,48 @@
<value>Mentions tierces</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Annuler</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Fermer tout</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Voulez-vous fermer toutes les fenêtres ?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Annuler</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Fermer tout</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Voulez-vous fermer tous les onglets ?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Fermer tout</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Voulez-vous fermer cet onglet ?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Fermer l'onglet</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Voulez-vous fermer ce volet ?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Fermer le volet</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Voulez-vous fermer ces onglets ?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Fermer les onglets</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Voulez-vous fermer ces volets ?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Fermer les panneaux</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Ne plus me le demander</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Annuler</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Activité sous longlet « {0} »</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Activité sous longlet « {0} » (fenêtre « {1} »)</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Ouvrez un nouvel onglet dans le répertoire correspondant</value>
</data>
@@ -881,10 +913,10 @@
<value>Si elle est définie, la commande sera ajoutée à la commande par défaut du profil au lieu de la remplacer.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Redémarrer la connexion</value>
<value>Redémarrer la session</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Redémarrer la connexion du volet actif</value>
<value>Redémarrez la session dans le volet actif</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Extraits</value>

View File

@@ -496,24 +496,48 @@
<value>Comunicazioni di terze parti</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Annulla</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Chiudi tutto</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Vuoi chiudere tutte le finestre?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Annulla</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Chiudi tutto</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Vuoi chiudere tutte le schede?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Chiudi tutto</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Vuoi chiudere questa scheda?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Chiudi scheda</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Vuoi chiudere questo riquadro?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Chiudi riquadro</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Vuoi chiudere queste schede?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Chiudi schede</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Vuoi chiudere questi riquadri?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Chiudi riquadri</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Non chiedermelo più</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Annulla</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Attività nella scheda "{0}"</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Attività nella scheda "{0}" (finestra "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Apri una nuova scheda nella directory di avvio specificata</value>
</data>
@@ -881,10 +913,10 @@
<value>Se impostato, il comando verrà aggiunto al comando predefinito del profilo invece di sostituirlo.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Riavvia connessione</value>
<value>Riavvia la sessione</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Riavvia la connessione al riquadro attivo</value>
<value>Riavvia la sessione nel riquadro attivo</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Frammenti</value>

View File

@@ -497,24 +497,48 @@
<value>サード パーティ通知</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>キャンセル</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>すべて閉じる</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>すべてのウィンドウを閉じますか?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>キャンセル</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>すべて閉じる</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>すべてのタブを閉じますか?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>すべて閉じる</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>このタブを閉じますか?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>タブを閉じる</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>このウィンドウを閉じますか?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>ウィンドウを閉じる</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>これらのタブを閉じますか?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>タブを閉じる</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>これらのウィンドウを閉じますか?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>ウィンドウを閉じる</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>今後、このメッセージを表示しない</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>キャンセル</value>
</data>
@@ -746,6 +770,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>タブ "{0}" のアクティビティ</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>タブ "{0}" のアクティビティ (ウィンドウ "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>指定された開始ディレクトリで新しいタブを開きます</value>
</data>
@@ -882,10 +914,10 @@
<value>設定されている場合、コマンドはプロファイルの既定のコマンドを置き換えるのではなく、追加されます。</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>接続の再起動</value>
<value>セッションの再開</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>アクティブ ペイン接続を再起動します</value>
<value>アクティブなウィンドウでセッションを再起動します</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>抜粋</value>

View File

@@ -496,24 +496,48 @@
<value>타사 통지</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>취소</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>모두 닫기</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>모든 창을 닫으시겠습니까?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>취소</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>모두 닫기</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>모든 탭을 닫으시겠습니까?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>모두 닫기</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>이 탭을 닫으시겠습니까?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>탭 닫기</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>이 창을 닫으시겠습니까?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>창 닫기</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>이러한 탭을 닫으시겠습니까?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>탭 닫기</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>이 창을 닫으시겠습니까?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>창 닫기</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>다시 묻지 않기</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>취소</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>"{0}" 탭의 활동</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>"{0}" 탭의 활동(창 "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>지정된 시작 디렉터리에서 새 탭 열기</value>
</data>
@@ -881,10 +913,10 @@
<value>설정하면 이 명령은 프로필의 기본 명령 대신 프로필의 기본 명령에 추가됩니다.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>연결 다시 시작</value>
<value>세션 다시 시작</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>활성 창 연결 다시 시작</value>
<value>활성 창에서 세션을 다시 시작하세요.</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>짧은 요약</value>

View File

@@ -496,24 +496,48 @@
<value>Avisos de Terceiros</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Fechar tudo</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Deseja fechar todas as janelas?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Fechar tudo</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Deseja fechar todas as guias?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Fechar tudo</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Deseja fechar esta guia?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Fechar guia</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Deseja fechar este painel?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Fechar painel</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Deseja fechar estas guias?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Fechar guias</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Deseja fechar estes painéis?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Fechar painéis</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Não me pergunte novamente</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Cancelar</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Atividade na aba "{0}"</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Atividade na aba "{0}" (janela "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Abrir uma nova guia no diretório inicial fornecido</value>
</data>
@@ -881,10 +913,10 @@
<value>Se definido, o comando será acrescentado ao comando padrão do perfil em vez de substituí-lo.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Reiniciar conexão</value>
<value>Reiniciar sessão</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Reiniciar a conexão do painel ativo</value>
<value>Reinicie a sessão no painel ativo</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Trechos</value>

View File

@@ -496,23 +496,47 @@
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<value>Ċдйĉέł !</value>
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Ĉάйçэļ !</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>€ļőşε áļľ !!!</value>
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Ďő убυ ẅåήт ţø ¢ľöѕē äľľ ẃιⁿðŏŵş? !!! !!! !!! </value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<value>Ďõ γбű ẁāŋţ ťó ςℓσśĕ äℓℓ шîйđбẁś? !!! !!! !!! </value>
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Ċľóѕε ªĺĺ !!!</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Ćăʼnċęℓ !</value>
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Ďō γőű шдπŧ ŧò ςłοѕз āĺℓ ţäьš? !!! !!! !!!</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<value>Ćļõѕέ аłℓ !!!</value>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Ĉŀõśê āłĺ !!!</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<value>Đσ ŷőū шдиŧ тò čļòŝз αŀľ ţâвŝ? !!! !!! !!!</value>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Đó уøυ ẅāńť тο çŀǿśę ŧĥíš τάъ? !!! !!! !!!</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Ċℓοѕē ţαъ !!!</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Đò γθũ ώăńт ťǿ ¢ℓσŝę ŧħîŝ ρаńе? !!! !!! !!!</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Ĉŀбśз φдŋё !!!</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Đó ўоú ŵąňτ ŧò çŀσѕė ŧћěśé ţдьş? !!! !!! !!! </value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Ćŀöśé ŧãвś !!!</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Ðǿ ỳбū ŵáήť ŧо ćļόśě τнέšê φăñєš? !!! !!! !!! </value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>€łǿśē рāⁿęѕ !!!</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Đòñ'ť ªѕķ мë àĝáîⁿ !!! !!</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Čǻñčėŀ !</value>
@@ -745,6 +769,14 @@
<value>Ẃϊйδοŵš !!</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Δćţíνïŧý īй τаь "{0}" !!! !!!</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Δсŧìνιŧý įņ ţªь "{0}" (ŵϊņδόώ "{1}") !!! !!! !!! !</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Фφĕń ª пёẅ ţâь ίи ğīνęņ ѕŧāятĩлğ δįŗęćтŏяγ !!! !!! !!! !!! </value>
</data>
@@ -881,10 +913,10 @@
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
<value>Γēѕŧâяŧ ŝєѕѕïσⁿ !!! !</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>
<value>Γėşťáгţ ŧħ℮ ŝёšŝīőń įй τђ℮ ăċţΐνе φǻñē !!! !!! !!! !!</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Šņíрρēťş !!</value>

View File

@@ -496,23 +496,47 @@
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<value>Ċдйĉέł !</value>
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Ĉάйçэļ !</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>€ļőşε áļľ !!!</value>
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Ďő убυ ẅåήт ţø ¢ľöѕē äľľ ẃιⁿðŏŵş? !!! !!! !!! </value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<value>Ďõ γбű ẁāŋţ ťó ςℓσśĕ äℓℓ шîйđбẁś? !!! !!! !!! </value>
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Ċľóѕε ªĺĺ !!!</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Ćăʼnċęℓ !</value>
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Ďō γőű шдπŧ ŧò ςłοѕз āĺℓ ţäьš? !!! !!! !!!</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<value>Ćļõѕέ аłℓ !!!</value>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Ĉŀõśê āłĺ !!!</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<value>Đσ ŷőū шдиŧ тò čļòŝз αŀľ ţâвŝ? !!! !!! !!!</value>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Đó уøυ ẅāńť тο çŀǿśę ŧĥíš τάъ? !!! !!! !!!</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Ċℓοѕē ţαъ !!!</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Đò γθũ ώăńт ťǿ ¢ℓσŝę ŧħîŝ ρаńе? !!! !!! !!!</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Ĉŀбśз φдŋё !!!</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Đó ўоú ŵąňτ ŧò çŀσѕė ŧћěśé ţдьş? !!! !!! !!! </value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Ćŀöśé ŧãвś !!!</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Ðǿ ỳбū ŵáήť ŧо ćļόśě τнέšê φăñєš? !!! !!! !!! </value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>€łǿśē рāⁿęѕ !!!</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Đòñ'ť ªѕķ мë àĝáîⁿ !!! !!</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Čǻñčėŀ !</value>
@@ -745,6 +769,14 @@
<value>Ẃϊйδοŵš !!</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Δćţíνïŧý īй τаь "{0}" !!! !!!</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Δсŧìνιŧý įņ ţªь "{0}" (ŵϊņδόώ "{1}") !!! !!! !!! !</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Фφĕń ª пёẅ ţâь ίи ğīνęņ ѕŧāятĩлğ δįŗęćтŏяγ !!! !!! !!! !!! </value>
</data>
@@ -881,10 +913,10 @@
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
<value>Γēѕŧâяŧ ŝєѕѕïσⁿ !!! !</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>
<value>Γėşťáгţ ŧħ℮ ŝёšŝīőń įй τђ℮ ăċţΐνе φǻñē !!! !!! !!! !!</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Šņíрρēťş !!</value>

View File

@@ -496,23 +496,47 @@
<value>Ţћĩřð-Ρářŧγ ñοŧīĉęŝ !!! !!!</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<value>Ċдйĉέł !</value>
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Ĉάйçэļ !</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>€ļőşε áļľ !!!</value>
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Ďő убυ ẅåήт ţø ¢ľöѕē äľľ ẃιⁿðŏŵş? !!! !!! !!! </value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<value>Ďõ γбű ẁāŋţ ťó ςℓσśĕ äℓℓ шîйđбẁś? !!! !!! !!! </value>
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Ċľóѕε ªĺĺ !!!</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Ćăʼnċęℓ !</value>
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Ďō γőű шдπŧ ŧò ςłοѕз āĺℓ ţäьš? !!! !!! !!!</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<value>Ćļõѕέ аłℓ !!!</value>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Ĉŀõśê āłĺ !!!</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<value>Đσ ŷőū шдиŧ тò čļòŝз αŀľ ţâвŝ? !!! !!! !!!</value>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Đó уøυ ẅāńť тο çŀǿśę ŧĥíš τάъ? !!! !!! !!!</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Ċℓοѕē ţαъ !!!</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Đò γθũ ώăńт ťǿ ¢ℓσŝę ŧħîŝ ρаńе? !!! !!! !!!</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Ĉŀбśз φдŋё !!!</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Đó ўоú ŵąňτ ŧò çŀσѕė ŧћěśé ţдьş? !!! !!! !!! </value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Ćŀöśé ŧãвś !!!</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Ðǿ ỳбū ŵáήť ŧо ćļόśě τнέšê φăñєš? !!! !!! !!! </value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>€łǿśē рāⁿęѕ !!!</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Đòñ'ť ªѕķ мë àĝáîⁿ !!! !!</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Čǻñčėŀ !</value>
@@ -745,6 +769,14 @@
<value>Ẃϊйδοŵš !!</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Δćţíνïŧý īй τаь "{0}" !!! !!!</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Δсŧìνιŧý įņ ţªь "{0}" (ŵϊņδόώ "{1}") !!! !!! !!! !</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Фφĕń ª пёẅ ţâь ίи ğīνęņ ѕŧāятĩлğ δįŗęćтŏяγ !!! !!! !!! !!! </value>
</data>
@@ -881,10 +913,10 @@
<value>Ĩƒ šęţ, ŧнĕ ¢ömmдлδ ŵîĺł ьέ åφрєйδĕđ τσ ŧђė рřŏƒїłє'ş đзƒªūľţ ¢οmмăńδ іñѕţέáđ øƒ ѓēρļąċĭлĝ їţ. !!! !!! !!! !!! !!! !!! !!! !!! !!! !</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Γēѕŧâяŧ ćǿńńēčťїöл !!! !!</value>
<value>Γēѕŧâяŧ ŝєѕѕïσⁿ !!! !</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Γėşťáгţ ŧħ℮ ãčтĩνέ ρăйё сǿηńëςтιóņ !!! !!! !!! !</value>
<value>Γėşťáгţ ŧħ℮ ŝёšŝīőń įй τђ℮ ăċţΐνе φǻñē !!! !!! !!! !!</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Šņíрρēťş !!</value>

View File

@@ -496,24 +496,48 @@
<value>Уведомления третьих лиц</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>Закрыть все</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>Закрыть все окна?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>Закрыть все</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>Закрыть все вкладки?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>Закрыть все</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>Закрыть эту вкладку?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>Закрыть вкладку</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>Закрыть эту панель?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>Закрыть область</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>Закрыть эти вкладки?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>Закрыть вкладки</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>Закрыть эти панели?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>Закрыть панели</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>Больше не спрашивать</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>Отмена</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>Активность на вкладке "{0}"</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>Активность на вкладке "{0}" (окно "{1}")</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>Открыть новую вкладку в указанном начальном каталоге</value>
</data>
@@ -881,10 +913,10 @@
<value>Если этот параметр настроен, команда будет добавлена к стандартной команде профиля, а не заменит ее.</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>Перезапустить подключение</value>
<value>Перезапустить сеанс</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>Перезапустить соединение с активной панелью.</value>
<value>Перезапустите сеанс в активной панели</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>Фрагменты</value>

View File

@@ -496,22 +496,10 @@
<value>第三方通知</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<value>取消</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>全部关闭</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>是否要关闭所有窗口?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>取消</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<value>全部关闭</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>是否要关闭所有标签页?</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
@@ -745,6 +733,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>选项卡“{0}”中的活动</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>选项卡“{0}”(窗口“{1}”)中的活动</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>在给定的起始目录中打开新选项卡</value>
</data>
@@ -881,10 +877,10 @@
<value>如果设置,该命令将追加到配置文件的默认命令,而不是替换它。</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>重新启动连接</value>
<value>重启会话</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>重新启动活动窗格连接</value>
<value>重活动窗格中的会话</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>片段</value>

View File

@@ -496,24 +496,48 @@
<value>第三方注意事項</value>
<comment>A hyperlink name for the Terminal's third-party notices</comment>
</data>
<data name="QuitDialog.CloseButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_Cancel" xml:space="preserve">
<value>取消</value>
</data>
<data name="QuitDialog.PrimaryButtonText" xml:space="preserve">
<value>全部關閉</value>
</data>
<data name="QuitDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllTitle" xml:space="preserve">
<value>您要關閉所有視窗嗎?</value>
</data>
<data name="CloseAllDialog.CloseButtonText" xml:space="preserve">
<value>取消</value>
</data>
<data name="CloseAllDialog.PrimaryButtonText" xml:space="preserve">
<data name="ConfirmCloseDialog_CloseAllPrimary" xml:space="preserve">
<value>全部關閉</value>
</data>
<data name="CloseAllDialog.Title" xml:space="preserve">
<data name="ConfirmCloseDialog_WindowTitle" xml:space="preserve">
<value>您要關閉所有索引標籤嗎?</value>
</data>
<data name="ConfirmCloseDialog_WindowPrimary" xml:space="preserve">
<value>全部關閉</value>
</data>
<data name="ConfirmCloseDialog_TabTitle" xml:space="preserve">
<value>是否要關閉此索引標籤?</value>
</data>
<data name="ConfirmCloseDialog_TabPrimary" xml:space="preserve">
<value>關閉索引標籤</value>
</data>
<data name="ConfirmCloseDialog_PaneTitle" xml:space="preserve">
<value>是否要關閉此窗格?</value>
</data>
<data name="ConfirmCloseDialog_PanePrimary" xml:space="preserve">
<value>關閉窗格</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsTitle" xml:space="preserve">
<value>是否要關閉這些索引標籤?</value>
</data>
<data name="ConfirmCloseDialog_MultipleTabsPrimary" xml:space="preserve">
<value>關閉索引標籤</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesTitle" xml:space="preserve">
<value>是否要關閉這些窗格?</value>
</data>
<data name="ConfirmCloseDialog_MultiplePanesPrimary" xml:space="preserve">
<value>關閉窗格</value>
</data>
<data name="DontAskAgainCheckBox.Content" xml:space="preserve">
<value>不要再問我</value>
</data>
<data name="CloseReadOnlyDialog.CloseButtonText" xml:space="preserve">
<value>取消</value>
</data>
@@ -745,6 +769,14 @@
<value>Windows</value>
<comment>This is displayed as a label for the context menu item that holds the submenu of available windows.</comment>
</data>
<data name="NotificationMessage_TabActivity" xml:space="preserve">
<value>索引標籤「{0}」中的活動</value>
<comment>{0} is the tab title. Shown as the body of a desktop notification when tab activity is detected.</comment>
</data>
<data name="NotificationMessage_TabActivityInWindow" xml:space="preserve">
<value>索引標籤「{0}」(視窗「{1}」) 中的活動</value>
<comment>{0} is the tab title, {1} is the window name. Shown as the body of a desktop notification when tab activity is detected and the window has a name.</comment>
</data>
<data name="DropPathTabRun.Text" xml:space="preserve">
<value>開啟指定起始目錄中的新索引標籤</value>
</data>
@@ -881,10 +913,10 @@
<value>如果設定,命令會附加到設定檔的預設命令,而不是取代命令。</value>
</data>
<data name="RestartConnectionText" xml:space="preserve">
<value>重新啟動連線</value>
<value>重新啟動工作模式</value>
</data>
<data name="RestartConnectionToolTip" xml:space="preserve">
<value>重新啟動使用中窗格連線</value>
<value>使用中窗格重新啟動工作階段</value>
</data>
<data name="SnippetPaneTitle.Text" xml:space="preserve">
<value>片斷</value>

View File

@@ -35,7 +35,6 @@ namespace winrt::TerminalApp::implementation
_activePane = nullptr;
_closePaneMenuItem.Visibility(WUX::Visibility::Collapsed);
_restartConnectionMenuItem.Visibility(WUX::Visibility::Collapsed);
auto firstId = _nextPaneId;
@@ -86,6 +85,7 @@ namespace winrt::TerminalApp::implementation
_MakeTabViewItem();
_CreateContextMenu();
_UpdateMenuItemStates();
_headerControl.TabStatus(_tabStatus);
@@ -844,14 +844,14 @@ namespace winrt::TerminalApp::implementation
// Arguments:
// - direction: The direction to move the separator in.
// Return Value:
// - <none>
void Tab::ResizePane(const ResizeDirection& direction)
// - whether a pane was resized
bool Tab::ResizePane(const ResizeDirection& direction)
{
ASSERT_UI_THREAD();
// NOTE: This _must_ be called on the root pane, so that it can propagate
// throughout the entire tree.
_rootPane->ResizePane(direction);
return _rootPane->ResizePane(direction);
}
// Method Description:
@@ -1148,6 +1148,14 @@ namespace winrt::TerminalApp::implementation
tab->TabRaiseVisualBell.raise();
}
// Send a desktop toast notification if requested, but only if
// the pane isn't already in the belled state. This prevents
// sending repeated toasts for repeated BEL characters.
if (bellArgs.SendNotification() && !tab->_tabStatus.BellIndicator())
{
tab->TabToastNotificationRequested.raise(tab->Title(), L"", sender);
}
// Show the bell indicator in the tab header
tab->ShowBellIndicator(true);
@@ -1166,6 +1174,18 @@ namespace winrt::TerminalApp::implementation
events.RestartTerminalRequested = terminal.RestartTerminalRequested(winrt::auto_revoke, { get_weak(), &Tab::_bubbleRestartTerminalRequested });
}
events.NotificationRequested = content.NotificationRequested(
winrt::auto_revoke,
[dispatcher, weakThis](TerminalApp::IPaneContent sender, auto notifArgs) -> safe_void_coroutine {
const auto weakThisCopy = weakThis;
co_await wil::resume_foreground(dispatcher);
if (const auto tab{ weakThisCopy.get() })
{
const auto title = notifArgs.Title().empty() ? tab->Title() : notifArgs.Title();
tab->TabToastNotificationRequested.raise(title, notifArgs.Body(), sender);
}
});
if (_tabStatus.IsInputBroadcastActive())
{
if (const auto& termContent{ content.try_as<TerminalApp::TerminalPaneContent>() })
@@ -1254,7 +1274,7 @@ namespace winrt::TerminalApp::implementation
// Method Description:
// - Set an indicator on the tab if any pane is in a closed connection state.
// - Show/hide the Restart Connection context menu entry depending on active pane's state.
// - Show/hide the Restart Session context menu entry depending on active pane's state.
// Arguments:
// - <none>
// Return Value:
@@ -1271,13 +1291,6 @@ namespace winrt::TerminalApp::implementation
_tabStatus.IsConnectionClosed(isClosed);
}
if (_activePane)
{
_restartConnectionMenuItem.Visibility(_activePane->IsConnectionClosed() ?
WUX::Visibility::Visible :
WUX::Visibility::Collapsed);
}
}
void Tab::_RestartActivePaneConnection()
@@ -1348,6 +1361,22 @@ namespace winrt::TerminalApp::implementation
}
});
}
_UpdateMenuItemStates();
}
void Tab::_UpdateMenuItemStates()
{
// Terminal-specific menu items
const auto content = _activePane ? _activePane->GetContent() : nullptr;
const auto isTerm = content && content.try_as<winrt::TerminalApp::TerminalPaneContent>() != nullptr;
_duplicateTabMenuItem.IsEnabled(isTerm);
_exportTabMenuItem.IsEnabled(isTerm);
_findMenuItem.IsEnabled(isTerm);
_restartConnectionMenuItem.IsEnabled(isTerm);
// Snippets Pane can technically be split
_splitTabMenuItem.IsEnabled(isTerm || (content && content.try_as<winrt::TerminalApp::SnippetsPaneContent>() != nullptr));
}
// Method Description:
@@ -1652,106 +1681,100 @@ namespace winrt::TerminalApp::implementation
Automation::AutomationProperties::SetHelpText(renameTabMenuItem, renameTabToolTip);
}
Controls::MenuFlyoutItem duplicateTabMenuItem;
{
// "Duplicate tab"
Controls::FontIcon duplicateTabSymbol;
duplicateTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
duplicateTabSymbol.Glyph(L"\xF5ED");
duplicateTabMenuItem.Click({ get_weak(), &Tab::_duplicateTabClicked });
duplicateTabMenuItem.Text(RS_(L"DuplicateTabText"));
duplicateTabMenuItem.Icon(duplicateTabSymbol);
_duplicateTabMenuItem.Click({ get_weak(), &Tab::_duplicateTabClicked });
_duplicateTabMenuItem.Text(RS_(L"DuplicateTabText"));
_duplicateTabMenuItem.Icon(duplicateTabSymbol);
const auto duplicateTabToolTip = RS_(L"DuplicateTabToolTip");
WUX::Controls::ToolTipService::SetToolTip(duplicateTabMenuItem, box_value(duplicateTabToolTip));
Automation::AutomationProperties::SetHelpText(duplicateTabMenuItem, duplicateTabToolTip);
WUX::Controls::ToolTipService::SetToolTip(_duplicateTabMenuItem, box_value(duplicateTabToolTip));
Automation::AutomationProperties::SetHelpText(_duplicateTabMenuItem, duplicateTabToolTip);
}
Controls::MenuFlyoutItem splitTabMenuItem;
{
// "Split tab"
Controls::FontIcon splitTabSymbol;
splitTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
splitTabSymbol.Glyph(L"\xF246"); // ViewDashboard
splitTabMenuItem.Click({ get_weak(), &Tab::_splitTabClicked });
splitTabMenuItem.Text(RS_(L"SplitTabText"));
splitTabMenuItem.Icon(splitTabSymbol);
_splitTabMenuItem.Click({ get_weak(), &Tab::_splitTabClicked });
_splitTabMenuItem.Text(RS_(L"SplitTabText"));
_splitTabMenuItem.Icon(splitTabSymbol);
const auto splitTabToolTip = RS_(L"SplitTabToolTip");
WUX::Controls::ToolTipService::SetToolTip(splitTabMenuItem, box_value(splitTabToolTip));
Automation::AutomationProperties::SetHelpText(splitTabMenuItem, splitTabToolTip);
WUX::Controls::ToolTipService::SetToolTip(_splitTabMenuItem, box_value(splitTabToolTip));
Automation::AutomationProperties::SetHelpText(_splitTabMenuItem, splitTabToolTip);
}
Controls::MenuFlyoutItem closePaneMenuItem = _closePaneMenuItem;
{
// "Close pane"
closePaneMenuItem.Click({ get_weak(), &Tab::_closePaneClicked });
closePaneMenuItem.Text(RS_(L"ClosePaneText"));
_closePaneMenuItem.Click({ get_weak(), &Tab::_closePaneClicked });
_closePaneMenuItem.Text(RS_(L"ClosePaneText"));
const auto closePaneToolTip = RS_(L"ClosePaneToolTip");
WUX::Controls::ToolTipService::SetToolTip(closePaneMenuItem, box_value(closePaneToolTip));
Automation::AutomationProperties::SetHelpText(closePaneMenuItem, closePaneToolTip);
WUX::Controls::ToolTipService::SetToolTip(_closePaneMenuItem, box_value(closePaneToolTip));
Automation::AutomationProperties::SetHelpText(_closePaneMenuItem, closePaneToolTip);
}
Controls::MenuFlyoutItem exportTabMenuItem;
{
// "Export tab"
Controls::FontIcon exportTabSymbol;
exportTabSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
exportTabSymbol.Glyph(L"\xE74E"); // Save
exportTabMenuItem.Click({ get_weak(), &Tab::_exportTextClicked });
exportTabMenuItem.Text(RS_(L"ExportTabText"));
exportTabMenuItem.Icon(exportTabSymbol);
_exportTabMenuItem.Click({ get_weak(), &Tab::_exportTextClicked });
_exportTabMenuItem.Text(RS_(L"ExportTabText"));
_exportTabMenuItem.Icon(exportTabSymbol);
const auto exportTabToolTip = RS_(L"ExportTabToolTip");
WUX::Controls::ToolTipService::SetToolTip(exportTabMenuItem, box_value(exportTabToolTip));
Automation::AutomationProperties::SetHelpText(exportTabMenuItem, exportTabToolTip);
WUX::Controls::ToolTipService::SetToolTip(_exportTabMenuItem, box_value(exportTabToolTip));
Automation::AutomationProperties::SetHelpText(_exportTabMenuItem, exportTabToolTip);
}
Controls::MenuFlyoutItem findMenuItem;
{
// "Find"
Controls::FontIcon findSymbol;
findSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
findSymbol.Glyph(L"\xF78B"); // SearchMedium
findMenuItem.Click({ get_weak(), &Tab::_findClicked });
findMenuItem.Text(RS_(L"FindText"));
findMenuItem.Icon(findSymbol);
_findMenuItem.Click({ get_weak(), &Tab::_findClicked });
_findMenuItem.Text(RS_(L"FindText"));
_findMenuItem.Icon(findSymbol);
const auto findToolTip = RS_(L"FindToolTip");
WUX::Controls::ToolTipService::SetToolTip(findMenuItem, box_value(findToolTip));
Automation::AutomationProperties::SetHelpText(findMenuItem, findToolTip);
WUX::Controls::ToolTipService::SetToolTip(_findMenuItem, box_value(findToolTip));
Automation::AutomationProperties::SetHelpText(_findMenuItem, findToolTip);
}
Controls::MenuFlyoutItem restartConnectionMenuItem = _restartConnectionMenuItem;
{
// "Restart connection"
// "Restart session"
Controls::FontIcon restartConnectionSymbol;
restartConnectionSymbol.FontFamily(Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
restartConnectionSymbol.Glyph(L"\xE72C");
restartConnectionMenuItem.Click([weakThis](auto&&, auto&&) {
_restartConnectionMenuItem.Click([weakThis](auto&&, auto&&) {
if (auto tab{ weakThis.get() })
{
tab->_RestartActivePaneConnection();
}
});
restartConnectionMenuItem.Text(RS_(L"RestartConnectionText"));
restartConnectionMenuItem.Icon(restartConnectionSymbol);
_restartConnectionMenuItem.Text(RS_(L"RestartConnectionText"));
_restartConnectionMenuItem.Icon(restartConnectionSymbol);
const auto restartConnectionToolTip = RS_(L"RestartConnectionToolTip");
WUX::Controls::ToolTipService::SetToolTip(restartConnectionMenuItem, box_value(restartConnectionToolTip));
Automation::AutomationProperties::SetHelpText(restartConnectionMenuItem, restartConnectionToolTip);
WUX::Controls::ToolTipService::SetToolTip(_restartConnectionMenuItem, box_value(restartConnectionToolTip));
Automation::AutomationProperties::SetHelpText(_restartConnectionMenuItem, restartConnectionToolTip);
}
// Build the menu
@@ -1759,16 +1782,16 @@ namespace winrt::TerminalApp::implementation
Controls::MenuFlyoutSeparator menuSeparator;
contextMenuFlyout.Items().Append(chooseColorMenuItem);
contextMenuFlyout.Items().Append(renameTabMenuItem);
contextMenuFlyout.Items().Append(duplicateTabMenuItem);
contextMenuFlyout.Items().Append(splitTabMenuItem);
contextMenuFlyout.Items().Append(_duplicateTabMenuItem);
contextMenuFlyout.Items().Append(_splitTabMenuItem);
_AppendMoveMenuItems(contextMenuFlyout);
contextMenuFlyout.Items().Append(exportTabMenuItem);
contextMenuFlyout.Items().Append(findMenuItem);
contextMenuFlyout.Items().Append(restartConnectionMenuItem);
contextMenuFlyout.Items().Append(_exportTabMenuItem);
contextMenuFlyout.Items().Append(_findMenuItem);
contextMenuFlyout.Items().Append(_restartConnectionMenuItem);
contextMenuFlyout.Items().Append(menuSeparator);
auto closeSubMenu = _AppendCloseMenuItems(contextMenuFlyout);
closeSubMenu.Items().Append(closePaneMenuItem);
closeSubMenu.Items().Append(_closePaneMenuItem);
// GH#5750 - When the context menu is dismissed with ESC, toss the focus
// back to our control.

View File

@@ -53,7 +53,7 @@ namespace winrt::TerminalApp::implementation
const float splitSize,
winrt::Windows::Foundation::Size availableSpace) const;
void ResizePane(const winrt::Microsoft::Terminal::Settings::Model::ResizeDirection& direction);
bool ResizePane(const winrt::Microsoft::Terminal::Settings::Model::ResizeDirection& direction);
bool NavigateFocus(const winrt::Microsoft::Terminal::Settings::Model::FocusDirection& direction);
bool SwapPane(const winrt::Microsoft::Terminal::Settings::Model::FocusDirection& direction);
bool FocusPane(const uint32_t id);
@@ -121,6 +121,7 @@ namespace winrt::TerminalApp::implementation
til::typed_event<TerminalApp::Tab, IInspectable> ActivePaneChanged;
til::event<winrt::delegate<>> TabRaiseVisualBell;
til::event<winrt::delegate<winrt::hstring /*title*/, winrt::hstring /*body*/, winrt::TerminalApp::IPaneContent /*content*/>> TabToastNotificationRequested;
til::typed_event<IInspectable, IInspectable> TaskbarProgressChanged;
// The TabViewIndex is the index this Tab object resides in TerminalPage's _tabs vector.
@@ -140,11 +141,17 @@ namespace winrt::TerminalApp::implementation
static constexpr double HeaderRenameBoxWidthTitleLength{ std::numeric_limits<double>::infinity() };
winrt::Windows::UI::Xaml::FocusState _focusState{ winrt::Windows::UI::Xaml::FocusState::Unfocused };
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeOtherTabsMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeTabsAfterMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _duplicateTabMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _splitTabMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _moveToNewWindowMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _moveRightMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _moveLeftMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _exportTabMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _findMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _restartConnectionMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeOtherTabsMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeTabsAfterMenuItem{};
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closePaneMenuItem{};
winrt::TerminalApp::ShortcutActionDispatch _dispatch;
Microsoft::Terminal::Settings::Model::IActionMapView _actionMap{ nullptr };
winrt::hstring _keyChord{};
@@ -159,9 +166,6 @@ namespace winrt::TerminalApp::implementation
std::shared_ptr<Pane> _activePane{ nullptr };
std::shared_ptr<Pane> _zoomedPane{ nullptr };
Windows::UI::Xaml::Controls::MenuFlyoutItem _closePaneMenuItem;
Windows::UI::Xaml::Controls::MenuFlyoutItem _restartConnectionMenuItem;
winrt::Microsoft::Terminal::Settings::Model::IconStyle _lastIconStyle;
winrt::hstring _lastIconPath{};
std::optional<winrt::Windows::UI::Color> _runtimeTabColor{};
@@ -182,6 +186,7 @@ namespace winrt::TerminalApp::implementation
winrt::TerminalApp::IPaneContent::ConnectionStateChanged_revoker ConnectionStateChanged;
winrt::TerminalApp::IPaneContent::ReadOnlyChanged_revoker ReadOnlyChanged;
winrt::TerminalApp::IPaneContent::FocusRequested_revoker FocusRequested;
winrt::TerminalApp::IPaneContent::NotificationRequested_revoker NotificationRequested;
// These events literally only apply if the content is a TermControl.
winrt::Microsoft::Terminal::Control::TermControl::KeySent_revoker KeySent;
@@ -220,6 +225,7 @@ namespace winrt::TerminalApp::implementation
void _AttachEventHandlersToPane(std::shared_ptr<Pane> pane);
void _UpdateActivePane(std::shared_ptr<Pane> pane);
void _UpdateMenuItemStates();
winrt::hstring _GetActiveTitle() const;
@@ -230,8 +236,6 @@ namespace winrt::TerminalApp::implementation
void _UpdateConnectionClosedState();
void _RestartActivePaneConnection();
void _DuplicateTab();
winrt::Windows::UI::Xaml::Media::Brush _BackgroundBrush();
void _MakeTabViewItem();

View File

@@ -17,6 +17,7 @@
#include "TabRowControl.h"
#include "DebugTapConnection.h"
#include "DesktopNotification.h"
#include "..\TerminalSettingsModel\FileUtils.h"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"
@@ -150,6 +151,18 @@ namespace winrt::TerminalApp::implementation
}
});
// When a tab requests a desktop toast notification, send the toast
// and handle activation by summoning this window and switching to the tab.
newTabImpl->TabToastNotificationRequested([weakThis{ get_weak() }, weakTab{ newTabImpl->get_weak() }](const winrt::hstring& title, const winrt::hstring& body, const winrt::TerminalApp::IPaneContent& content) {
if (const auto page{ weakThis.get() })
{
if (const auto tab{ weakTab.get() })
{
page->_SendDesktopNotification(title, body, tab, content);
}
}
});
auto tabViewItem = newTabImpl->TabViewItem();
_tabView.TabItems().InsertAt(insertPosition, tabViewItem);
@@ -394,7 +407,9 @@ namespace winrt::TerminalApp::implementation
// - Removes the tab (both TerminalControl and XAML) after prompting for approval
// Arguments:
// - tab: the tab to remove
winrt::Windows::Foundation::IAsyncAction TerminalPage::_HandleCloseTabRequested(winrt::TerminalApp::Tab tab)
// - skipConfirmClose: if true, skip the confirmOnClose check. Used when
// an aggregate confirmation has already been shown (i.e. close other tabs)
winrt::Windows::Foundation::IAsyncAction TerminalPage::_HandleCloseTabRequested(winrt::TerminalApp::Tab tab, bool skipConfirmClose)
{
winrt::com_ptr<TerminalPage> strong;
@@ -413,6 +428,24 @@ namespace winrt::TerminalApp::implementation
}
}
// Skip the per-tab confirmOnClose check when the caller has already
// shown an aggregate confirmation dialog (e.g. _RemoveTabs).
if (!skipConfirmClose)
{
const auto tabImpl = _GetTabImpl(tab);
if (tabImpl && _ShouldWarnOnCloseTab(tabImpl))
{
const auto weak = get_weak();
auto warningResult = co_await _ShowConfirmCloseDialog(ConfirmCloseDialogKind::Tab);
strong = weak.get();
if (!strong || warningResult != ContentDialogResult::Primary)
{
co_return;
}
}
}
auto t = winrt::get_self<implementation::Tab>(tab);
auto actions = t->BuildStartupActions(BuildStartupKind::None);
_AddPreviouslyClosedPaneOrTab(std::move(actions));
@@ -782,6 +815,26 @@ namespace winrt::TerminalApp::implementation
if (const auto pane{ activeTab->GetActivePane() })
{
const auto weak = get_weak();
// Check if we should warn before closing a single pane
// (only triggers on Always — Automatic doesn't warn for single pane)
const auto setting = _settings.GlobalSettings().ConfirmOnClose();
if (setting == ConfirmOnClose::Always)
{
// If this is the last pane, closing it closes the tab,
// so use the tab dialog text instead.
const auto kind = activeTab->GetLeafPaneCount() == 1 ? ConfirmCloseDialogKind::Tab : ConfirmCloseDialogKind::Pane;
auto warningResult = co_await _ShowConfirmCloseDialog(kind);
// Hold a strong reference to `this` for the rest of the
// method; we may be the last holder after `co_await`.
auto strong = weak.get();
if (!strong || warningResult != ContentDialogResult::Primary)
{
co_return;
}
}
if (co_await _PaneConfirmCloseReadOnly(pane))
{
if (const auto strong = weak.get())
@@ -795,10 +848,37 @@ namespace winrt::TerminalApp::implementation
// Method Description:
// - Close all panes with the given IDs sequentially.
// - Shows a single aggregate confirmation dialog upfront if the confirmOnClose setting warrants it.
// Arguments:
// - weakTab: weak reference to the tab that the pane belongs to.
// - weakTab: weak reference to the tab that the panes belong to.
// - paneIds: collection of the IDs of the panes that are marked for removal.
void TerminalPage::_ClosePanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds)
safe_void_coroutine TerminalPage::_ClosePanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds)
{
// Show a single aggregate confirmation for closing multiple panes.
if (_settings.GlobalSettings().ConfirmOnClose() != ConfirmOnClose::Never)
{
const auto weak = get_weak();
auto warningResult = co_await _ShowConfirmCloseDialog(ConfirmCloseDialogKind::MultiplePanes);
// Hold a strong reference to `this` after the co_await; we may
// be the last holder if the page was being torn down.
auto strong = weak.get();
if (!strong || warningResult != ContentDialogResult::Primary)
{
co_return;
}
}
_CloseRemainingPanes(weakTab, std::move(paneIds));
}
// Method Description:
// - Recursively closes panes by ID, chaining each close via the
// ClosedByParent callback. Called after confirmation has already
// been handled by _ClosePanes.
// Arguments:
// - weakTab: weak reference to the tab that the panes belong to
// - paneIds: remaining pane IDs to close
void TerminalPage::_CloseRemainingPanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds)
{
if (auto strongTab{ weakTab.get() })
{
@@ -813,10 +893,9 @@ namespace winrt::TerminalApp::implementation
pane->ClosedByParent([ids{ std::move(paneIds) }, weakThis{ get_weak() }, weakTab]() {
if (auto strongThis{ weakThis.get() })
{
strongThis->_ClosePanes(weakTab, std::move(ids));
strongThis->_CloseRemainingPanes(weakTab, std::move(ids));
}
});
// Close the pane which will eventually trigger the closed by parent event
_HandleClosePaneRequested(pane);
break;
@@ -841,18 +920,37 @@ namespace winrt::TerminalApp::implementation
// Method Description:
// - Closes provided tabs one by one
// - Shows a single aggregate confirmation dialog upfront if the confirmOnClose setting warrants it.
// Arguments:
// - tabs - tabs to remove
safe_void_coroutine TerminalPage::_RemoveTabs(const std::vector<winrt::TerminalApp::Tab> tabs)
{
if (tabs.empty())
{
co_return;
}
// Show a single aggregate confirmation instead of per-tab dialogs.
const auto weak = get_weak();
if (_settings.GlobalSettings().ConfirmOnClose() != ConfirmOnClose::Never)
{
auto warningResult = co_await _ShowConfirmCloseDialog(ConfirmCloseDialogKind::MultipleTabs);
// Hold a strong reference to `this` after the co_await so that
// the for-loop below can safely dispatch on us.
auto strong = weak.get();
if (!strong || warningResult != ContentDialogResult::Primary)
{
co_return;
}
}
for (auto& tab : tabs)
{
winrt::Windows::Foundation::IAsyncAction action{ nullptr };
if (const auto strong = weak.get())
{
action = _HandleCloseTabRequested(tab);
action = _HandleCloseTabRequested(tab, /*skipConfirmClose*/ true);
}
if (!action)
@@ -1185,4 +1283,128 @@ namespace winrt::TerminalApp::implementation
{
return _tabs.Size() > 1;
}
// Method Description:
// - Attempts to find and focus the given tab in this window.
// Arguments:
// - tab: The tab to focus.
// Return Value:
// - true if the tab was found and focused, false otherwise.
bool TerminalPage::FocusTab(const winrt::TerminalApp::Tab& tab)
{
if (const auto tabIndex{ _GetTabIndex(tab) })
{
_SelectTab(tabIndex.value());
return true;
}
return false;
}
// Method Description:
// - Sends a desktop toast notification with the given title and body.
// When the toast is activated (clicked), the window is summoned and
// the originating tab is focused.
// Arguments:
// - tabTitle: The title to display in the notification.
// - body: The body text. If empty, a standard tab-activity message is built.
// - tab: The tab to switch to when the toast is activated.
void TerminalPage::_SendDesktopNotification(const winrt::hstring& tabTitle, const winrt::hstring& body, const winrt::com_ptr<Tab>& tab, const winrt::TerminalApp::IPaneContent& content)
{
// Don't send a notification if the window is focused and the requesting
// pane is the active pane. The user is already looking at it.
if (_activated && tab == _GetFocusedTabImpl())
{
if (const auto activePane{ tab->GetActivePane() })
{
if (activePane->GetContent() == content)
{
return;
}
}
}
// Build the notification message.
// If a custom body is provided (e.g. from OSC 777), use the title/body directly.
// Otherwise, build the standard tab-activity notification message.
winrt::hstring notificationTitle;
winrt::hstring message;
if (!body.empty())
{
notificationTitle = tabTitle;
message = body;
}
else
{
// Use the window name if available for context; otherwise just use the tab title.
// Use the raw WindowName (not WindowNameForDisplay) so we don't include
// the "<unnamed window>" placeholder in the notification body.
const auto windowName = _WindowProperties ? _WindowProperties.WindowName() : winrt::hstring{};
if (!windowName.empty())
{
message = RS_fmt(L"NotificationMessage_TabActivityInWindow", std::wstring_view{ tabTitle }, std::wstring_view{ windowName });
}
else
{
message = RS_fmt(L"NotificationMessage_TabActivity", std::wstring_view{ tabTitle });
}
notificationTitle = CascadiaSettings::ApplicationDisplayName();
}
// Use the Tab object's identity hash as a stable toast tag.
// This survives tab reordering and cross-window moves.
const auto tabHash = std::hash<winrt::Windows::Foundation::IUnknown>{}(*tab);
const hstring tabTag{ fmt::format(FMT_COMPILE(L"wt-tab-{:016x}"), tabHash) };
const implementation::DesktopNotificationArgs args{
.Title = notificationTitle,
.Message = message,
.Tag = tabTag
};
implementation::DesktopNotification::SendNotification(args, [weakThis{ get_weak() }, weakTab{ tab->get_weak() }, weakContent{ winrt::make_weak(content) }]() {
if (const auto page{ weakThis.get() })
{
// The toast Activated callback runs on a background thread.
// Marshal to the UI thread for tab focus and window summon.
page->Dispatcher().RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [weakPage{ page->get_weak() }, weakTab, weakContent]() {
if (const auto p{ weakPage.get() })
{
if (const auto t{ weakTab.get() })
{
// Try to find and focus the tab in this window first.
if (const auto tabIndex{ p->_GetTabIndex(*t) })
{
p->SummonWindowRequested.raise(nullptr, nullptr);
p->_SelectTab(tabIndex.value());
// Focus the specific pane that raised the notification.
if (const auto paneContent{ weakContent.get() })
{
const auto rootPane = t->GetRootPane();
rootPane->WalkTree([&](const auto& pane) {
if (pane->GetContent() == paneContent)
{
rootPane->FocusPane(pane);
}
});
}
}
else
{
// The tab may have moved to another window.
// Raise FocusTabRequested so the emperor can
// search all windows for it.
p->FocusTabRequested.raise(nullptr, *t);
}
}
else
{
// Tab was closed. Just summon this window.
p->SummonWindowRequested.raise(nullptr, nullptr);
}
}
});
}
});
}
}

View File

@@ -174,6 +174,7 @@
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
</ClInclude>
<ClInclude Include="Toast.h" />
<ClInclude Include="DesktopNotification.h" />
<ClInclude Include="TerminalSettingsCache.h" />
<ClInclude Include="SuggestionsControl.h">
<DependentUpon>SuggestionsControl.xaml</DependentUpon>
@@ -287,6 +288,7 @@
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="Toast.cpp" />
<ClCompile Include="DesktopNotification.cpp" />
<ClCompile Include="TerminalSettingsCache.cpp" />
<ClCompile Include="SuggestionsControl.cpp">
<DependentUpon>SuggestionsControl.xaml</DependentUpon>

View File

@@ -884,26 +884,78 @@ namespace winrt::TerminalApp::implementation
}
// Method Description:
// - Displays a dialog to warn the user that they are about to close all open windows.
// Once the user clicks the OK button, shut down the application.
// If cancel is clicked, the dialog will close.
// - Displays the unified close confirmation dialog configured for the
// given scenario. Resets the "don't ask me again" checkbox before showing.
// If the user confirms and checked "don't ask me again", sets
// confirmOnClose to Never and writes settings to disk.
// - Only one dialog can be visible at a time. If another dialog is visible
// when this is called, nothing happens. See _ShowDialog for details
winrt::Windows::Foundation::IAsyncOperation<ContentDialogResult> TerminalPage::_ShowQuitDialog()
winrt::Windows::Foundation::IAsyncOperation<ContentDialogResult> TerminalPage::_ShowConfirmCloseDialog(ConfirmCloseDialogKind kind)
{
return _ShowDialogHelper(L"QuitDialog");
}
// Load the dialog (triggers x:Load) and configure its strings.
const auto dialog = FindName(L"ConfirmCloseDialog").as<ContentDialog>();
// Method Description:
// - Displays a dialog for warnings found while closing the terminal app using
// key binding with multiple tabs opened. Display messages to warn user
// that more than 1 tab is opened, and once the user clicks the OK button, remove
// all the tabs and shut down and app. If cancel is clicked, the dialog will close
// - Only one dialog can be visible at a time. If another dialog is visible
// when this is called, nothing happens. See _ShowDialog for details
winrt::Windows::Foundation::IAsyncOperation<ContentDialogResult> TerminalPage::_ShowCloseWarningDialog()
{
return _ShowDialogHelper(L"CloseAllDialog");
winrt::hstring title;
winrt::hstring primary;
switch (kind)
{
case ConfirmCloseDialogKind::CloseAll:
title = RS_(L"ConfirmCloseDialog_CloseAllTitle");
primary = RS_(L"ConfirmCloseDialog_CloseAllPrimary");
break;
case ConfirmCloseDialogKind::Window:
title = RS_(L"ConfirmCloseDialog_WindowTitle");
primary = RS_(L"ConfirmCloseDialog_WindowPrimary");
break;
case ConfirmCloseDialogKind::Tab:
title = RS_(L"ConfirmCloseDialog_TabTitle");
primary = RS_(L"ConfirmCloseDialog_TabPrimary");
break;
case ConfirmCloseDialogKind::MultiplePanes:
title = RS_(L"ConfirmCloseDialog_MultiplePanesTitle");
primary = RS_(L"ConfirmCloseDialog_MultiplePanesPrimary");
break;
case ConfirmCloseDialogKind::MultipleTabs:
title = RS_(L"ConfirmCloseDialog_MultipleTabsTitle");
primary = RS_(L"ConfirmCloseDialog_MultipleTabsPrimary");
break;
case ConfirmCloseDialogKind::Pane:
title = RS_(L"ConfirmCloseDialog_PaneTitle");
primary = RS_(L"ConfirmCloseDialog_PanePrimary");
break;
}
dialog.Title(winrt::box_value(title));
dialog.PrimaryButtonText(primary);
dialog.CloseButtonText(RS_(L"ConfirmCloseDialog_Cancel"));
// BODGY: After a ContentDialog is dismissed, FindName() can no longer
// resolve children inside it. Use Content() to get the checkbox directly.
const auto checkbox = dialog.Content().as<CheckBox>();
checkbox.IsChecked(false);
auto result = ContentDialogResult::None;
if (auto presenter{ _dialogPresenter.get() })
{
const auto weak = get_weak();
result = co_await presenter.ShowDialog(dialog);
// ShowDialog blocks until the dialog is dismissed, so it is
// possible for `this` to be torn down while we wait. Re-acquire
// a strong reference before touching any of our state.
const auto strong = weak.get();
if (!strong)
{
co_return ContentDialogResult::None;
}
if (result == ContentDialogResult::Primary && checkbox.IsChecked().Value())
{
_settings.GlobalSettings().ConfirmOnClose(ConfirmOnClose::Never);
_settings.WriteSettingsToDisk();
}
}
co_return result;
}
// Method Description:
@@ -2209,12 +2261,13 @@ namespace winrt::TerminalApp::implementation
// signal that we want to close everything.
safe_void_coroutine TerminalPage::RequestQuit()
{
if (!_displayingCloseDialog)
const auto setting = _settings.GlobalSettings().ConfirmOnClose();
if (setting != ConfirmOnClose::Never && !_displayingCloseDialog)
{
_displayingCloseDialog = true;
const auto weak = get_weak();
auto warningResult = co_await _ShowQuitDialog();
auto warningResult = co_await _ShowConfirmCloseDialog(ConfirmCloseDialogKind::CloseAll);
const auto strong = weak.get();
if (!strong)
{
@@ -2227,9 +2280,9 @@ namespace winrt::TerminalApp::implementation
{
co_return;
}
QuitRequested.raise(nullptr, nullptr);
}
QuitRequested.raise(nullptr, nullptr);
}
void TerminalPage::PersistState()
@@ -2307,12 +2360,59 @@ namespace winrt::TerminalApp::implementation
}
// Method Description:
// - Close the terminal app. If there is more
// than one tab opened, show a warning dialog.
// - Determines whether a close-window action should show a confirmation
// dialog, based on the confirmOnClose setting and the current window state.
// Arguments:
// - <none>
// Return Value:
// - true, if a warning dialog should be shown before closing the window
bool TerminalPage::_ShouldWarnOnClose() const
{
const auto setting = _settings.GlobalSettings().ConfirmOnClose();
switch (setting)
{
case ConfirmOnClose::Always:
return true;
case ConfirmOnClose::Automatic:
{
// Warn if there's more than one tab, or the one tab has more than one pane.
return _HasMultipleTabs() || _GetTabImpl(_tabs.GetAt(0))->GetLeafPaneCount() > 1;
}
case ConfirmOnClose::Never:
default:
return false;
}
}
// Method Description:
// - Determines whether closing a specific tab should show a confirmation
// dialog, based on the confirmOnClose setting and the tab's state.
// Arguments:
// - tab: The tab being closed
// Return Value:
// - true, if a warning dialog should be shown before closing the tab
bool TerminalPage::_ShouldWarnOnCloseTab(const winrt::com_ptr<Tab>& tab) const
{
const auto setting = _settings.GlobalSettings().ConfirmOnClose();
switch (setting)
{
case ConfirmOnClose::Always:
return true;
case ConfirmOnClose::Automatic:
// Warn if this tab has more than one pane.
return tab->GetLeafPaneCount() > 1;
case ConfirmOnClose::Never:
default:
return false;
}
}
// Method Description:
// - Close the terminal app. If the confirmOnClose setting indicates we should
// warn for the current window state, show a warning dialog.
safe_void_coroutine TerminalPage::CloseWindow()
{
if (_HasMultipleTabs() &&
_settings.GlobalSettings().ConfirmCloseAllTabs() &&
if (_ShouldWarnOnClose() &&
!_displayingCloseDialog)
{
if (_newTabButton && _newTabButton.Flyout())
@@ -2321,7 +2421,17 @@ namespace winrt::TerminalApp::implementation
}
_DismissTabContextMenus();
_displayingCloseDialog = true;
auto warningResult = co_await _ShowCloseWarningDialog();
const auto weak = get_weak();
auto warningResult = co_await _ShowConfirmCloseDialog(ConfirmCloseDialogKind::Window);
// Hold a strong reference to `this` after the co_await; we may
// be the last holder if the window was already being torn down.
auto strong = weak.get();
if (!strong)
{
co_return;
}
_displayingCloseDialog = false;
if (warningResult != ContentDialogResult::Primary)
@@ -2790,14 +2900,15 @@ namespace winrt::TerminalApp::implementation
// Arguments:
// - direction: The direction to move the separator in.
// Return Value:
// - <none>
void TerminalPage::_ResizePane(const ResizeDirection& direction)
// - whether a pane was resized
bool TerminalPage::_ResizePane(const ResizeDirection& direction)
{
if (const auto tabImpl{ _GetFocusedTabImpl() })
{
_UnZoomIfNeeded();
tabImpl->ResizePane(direction);
return tabImpl->ResizePane(direction);
}
return false;
}
// Method Description:

View File

@@ -54,6 +54,16 @@ namespace winrt::TerminalApp::implementation
ScrollDown = 1
};
enum class ConfirmCloseDialogKind
{
Pane,
Tab,
MultiplePanes,
MultipleTabs,
Window,
CloseAll
};
struct RenameWindowRequestedArgs : RenameWindowRequestedArgsT<RenameWindowRequestedArgs>
{
WINRT_PROPERTY(winrt::hstring, ProposedName);
@@ -168,6 +178,7 @@ namespace winrt::TerminalApp::implementation
void OpenSettingsUI();
void WindowActivated(const bool activated);
bool FocusTab(const winrt::TerminalApp::Tab& tab);
bool OnDirectKeyEvent(const uint32_t vkey, const uint8_t scanCode, const bool down);
@@ -192,6 +203,7 @@ namespace winrt::TerminalApp::implementation
til::typed_event<IInspectable, IInspectable> IdentifyWindowsRequested;
til::typed_event<IInspectable, winrt::TerminalApp::RenameWindowRequestedArgs> RenameWindowRequested;
til::typed_event<IInspectable, IInspectable> SummonWindowRequested;
til::typed_event<IInspectable, winrt::TerminalApp::Tab> FocusTabRequested;
til::typed_event<IInspectable, winrt::Microsoft::Terminal::Control::WindowSizeChangedEventArgs> WindowSizeChanged;
til::typed_event<IInspectable, IInspectable> OpenSystemMenu;
@@ -301,8 +313,7 @@ namespace winrt::TerminalApp::implementation
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowDialogHelper(const std::wstring_view& name);
void _ShowAboutDialog();
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowQuitDialog();
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowCloseWarningDialog();
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowConfirmCloseDialog(ConfirmCloseDialogKind kind);
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowCloseReadOnlyDialog();
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowMultiLinePasteWarningDialog();
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> _ShowLargePasteWarningDialog();
@@ -349,7 +360,7 @@ namespace winrt::TerminalApp::implementation
safe_void_coroutine _ExportTab(const Tab& tab, winrt::hstring filepath);
winrt::Windows::Foundation::IAsyncAction _HandleCloseTabRequested(winrt::TerminalApp::Tab tab);
winrt::Windows::Foundation::IAsyncAction _HandleCloseTabRequested(winrt::TerminalApp::Tab tab, bool skipConfirmClose = false);
void _CloseTabAtIndex(uint32_t index);
void _RemoveTab(const winrt::TerminalApp::Tab& tab);
safe_void_coroutine _RemoveTabs(const std::vector<winrt::TerminalApp::Tab> tabs);
@@ -400,9 +411,12 @@ namespace winrt::TerminalApp::implementation
TerminalApp::Tab _GetTabByTabViewItem(const IInspectable& tabViewItem) const noexcept;
void _HandleClosePaneRequested(std::shared_ptr<Pane> pane);
bool _ShouldWarnOnClose() const;
bool _ShouldWarnOnCloseTab(const winrt::com_ptr<Tab>& tab) const;
safe_void_coroutine _SetFocusedTab(const winrt::TerminalApp::Tab tab);
safe_void_coroutine _CloseFocusedPane();
void _ClosePanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds);
safe_void_coroutine _ClosePanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds);
void _CloseRemainingPanes(weak_ref<Tab> weakTab, std::vector<uint32_t> paneIds);
winrt::Windows::Foundation::IAsyncOperation<bool> _PaneConfirmCloseReadOnly(std::shared_ptr<Pane> pane);
void _AddPreviouslyClosedPaneOrTab(std::vector<Microsoft::Terminal::Settings::Model::ActionAndArgs>&& args);
@@ -412,7 +426,7 @@ namespace winrt::TerminalApp::implementation
const Microsoft::Terminal::Settings::Model::SplitDirection splitType,
const float splitSize,
std::shared_ptr<Pane> newPane);
void _ResizePane(const Microsoft::Terminal::Settings::Model::ResizeDirection& direction);
bool _ResizePane(const Microsoft::Terminal::Settings::Model::ResizeDirection& direction);
void _ToggleSplitOrientation();
void _ScrollPage(ScrollDirection scrollDirection);
@@ -571,6 +585,8 @@ namespace winrt::TerminalApp::implementation
void _activePaneChanged(winrt::TerminalApp::Tab tab, Windows::Foundation::IInspectable args);
safe_void_coroutine _doHandleSuggestions(Microsoft::Terminal::Settings::Model::SuggestionsArgs realArgs);
void _SendDesktopNotification(const winrt::hstring& tabTitle, const winrt::hstring& body, const winrt::com_ptr<Tab>& tab, const winrt::TerminalApp::IPaneContent& content);
#pragma region ActionHandlers
// These are all defined in AppActionHandlers.cpp
#define ON_ALL_ACTIONS(action) DECLARE_ACTION_HANDLER(action);

View File

@@ -86,17 +86,12 @@
Grid.Row="2"
x:Load="False" />
<ContentDialog x:Name="QuitDialog"
x:Uid="QuitDialog"
<ContentDialog x:Name="ConfirmCloseDialog"
Grid.Row="2"
x:Load="False"
DefaultButton="Primary" />
<ContentDialog x:Name="CloseAllDialog"
x:Uid="CloseAllDialog"
Grid.Row="2"
x:Load="False"
DefaultButton="Primary" />
DefaultButton="Primary">
<CheckBox x:Uid="DontAskAgainCheckBox" />
</ContentDialog>
<ContentDialog x:Name="CloseReadOnlyDialog"
x:Uid="CloseReadOnlyDialog"

View File

@@ -291,9 +291,11 @@ namespace winrt::TerminalApp::implementation
_control.BellLightOn();
}
// raise the event with the bool value corresponding to the taskbar flag
// raise the event with the bool values corresponding to the taskbar and notification flags
BellRequested.raise(*this,
*winrt::make_self<TerminalApp::implementation::BellEventArgs>(WI_IsFlagSet(_profile.BellStyle(), BellStyle::Taskbar)));
*winrt::make_self<TerminalApp::implementation::BellEventArgs>(
WI_IsFlagSet(_profile.BellStyle(), BellStyle::Taskbar),
WI_IsFlagSet(_profile.BellStyle(), BellStyle::Notification)));
}
}
}

View File

@@ -4,6 +4,7 @@
#pragma once
#include "TerminalPaneContent.g.h"
#include "BellEventArgs.g.h"
#include "NotificationEventArgs.g.h"
#include "BasicPaneEvents.h"
namespace winrt::TerminalApp::implementation
@@ -13,10 +14,21 @@ namespace winrt::TerminalApp::implementation
struct BellEventArgs : public BellEventArgsT<BellEventArgs>
{
public:
BellEventArgs(bool flashTaskbar) :
FlashTaskbar(flashTaskbar) {}
BellEventArgs(bool flashTaskbar, bool sendNotification) :
FlashTaskbar(flashTaskbar), SendNotification(sendNotification) {}
til::property<bool> FlashTaskbar;
til::property<bool> SendNotification;
};
struct NotificationEventArgs : public NotificationEventArgsT<NotificationEventArgs>
{
public:
NotificationEventArgs(const winrt::hstring& title = {}, const winrt::hstring& body = {}) :
Title(title), Body(body) {}
til::property<winrt::hstring> Title;
til::property<winrt::hstring> Body;
};
struct TerminalPaneContent : TerminalPaneContentT<TerminalPaneContent>, BasicPaneEvents

View File

@@ -108,13 +108,19 @@ static Documents::Run _BuildErrorRun(const winrt::hstring& text, const ResourceD
Documents::Run textRun;
textRun.Text(text);
// Color the text red (light theme) or yellow (dark theme) based on the system theme
auto key = winrt::box_value(L"ErrorTextBrush");
if (resources.HasKey(key))
// GH #18147 - In High Contrast mode, don't override the foreground.
// Let the text inherit the system HC text color from its parent element,
// since SystemErrorTextColor doesn't adapt to High Contrast themes.
if (!winrt::Windows::UI::ViewManagement::AccessibilitySettings{}.HighContrast())
{
auto g = resources.Lookup(key);
auto brush = g.try_as<winrt::Windows::UI::Xaml::Media::Brush>();
textRun.Foreground(brush);
// Color the text red (light theme) or yellow (dark theme) based on the system theme
auto key = winrt::box_value(L"ErrorTextBrush");
if (resources.HasKey(key))
{
auto g = resources.Lookup(key);
auto brush = g.try_as<winrt::Windows::UI::Xaml::Media::Brush>();
textRun.Foreground(brush);
}
}
return textRun;
@@ -1205,6 +1211,15 @@ namespace winrt::TerminalApp::implementation
}
}
bool TerminalWindow::FocusTab(const winrt::TerminalApp::Tab& tab)
{
if (_root)
{
return _root->FocusTab(tab);
}
return false;
}
void TerminalWindow::WindowName(const winrt::hstring& name)
{
const auto oldIsQuakeMode = _WindowProperties->IsQuakeWindow();

View File

@@ -92,6 +92,7 @@ namespace winrt::TerminalApp::implementation
bool ShowTabsFullscreen() const;
bool AutoHideWindow();
void IdentifyWindow();
bool FocusTab(const winrt::TerminalApp::Tab& tab);
std::optional<uint32_t> LoadPersistedLayoutIdx() const;
winrt::Microsoft::Terminal::Settings::Model::WindowLayout LoadPersistedLayout();
@@ -221,6 +222,7 @@ namespace winrt::TerminalApp::implementation
FORWARDED_TYPED_EVENT(SetTaskbarProgress, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable, _root, SetTaskbarProgress);
FORWARDED_TYPED_EVENT(IdentifyWindowsRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, IdentifyWindowsRequested);
FORWARDED_TYPED_EVENT(SummonWindowRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, SummonWindowRequested);
FORWARDED_TYPED_EVENT(FocusTabRequested, Windows::Foundation::IInspectable, winrt::TerminalApp::Tab, _root, FocusTabRequested);
FORWARDED_TYPED_EVENT(OpenSystemMenu, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, OpenSystemMenu);
FORWARDED_TYPED_EVENT(QuitRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, QuitRequested);
FORWARDED_TYPED_EVENT(ShowWindowChanged, Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Control::ShowWindowArgs, _root, ShowWindowChanged);

View File

@@ -4,6 +4,7 @@
import "IPaneContent.idl";
import "TerminalPage.idl";
import "ShortcutActionDispatch.idl";
import "Tab.idl";
namespace TerminalApp
{
@@ -74,6 +75,7 @@ namespace TerminalApp
Boolean ShowTabsFullscreen { get; };
void IdentifyWindow();
Boolean FocusTab(TerminalApp.Tab tab);
void SetPersistedLayoutIdx(UInt32 idx);
void RequestExitFullscreen();
@@ -126,6 +128,7 @@ namespace TerminalApp
event Windows.Foundation.TypedEventHandler<Object, Object> IdentifyWindowsRequested;
event Windows.Foundation.TypedEventHandler<Object, Object> IsQuakeWindowChanged;
event Windows.Foundation.TypedEventHandler<Object, Object> SummonWindowRequested;
event Windows.Foundation.TypedEventHandler<Object, TerminalApp.Tab> FocusTabRequested;
event Windows.Foundation.TypedEventHandler<Object, Object> OpenSystemMenu;
event Windows.Foundation.TypedEventHandler<Object, Object> QuitRequested;
event Windows.Foundation.TypedEventHandler<Object, TerminalApp.SystemMenuChangeArgs> SystemMenuChangeRequested;

View File

@@ -54,6 +54,9 @@
#include <winrt/Windows.Media.Playback.h>
#include <winrt/Windows.Management.Deployment.h>
#include <winrt/Windows.UI.Notifications.h>
#include <winrt/Windows.Data.Xml.Dom.h>
#include <winrt/Microsoft.UI.Xaml.Controls.h>
#include <winrt/Microsoft.UI.Xaml.Controls.Primitives.h>
#include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h>

View File

@@ -309,8 +309,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const auto isOnOriginalPosition = _lastMouseClickPosNoSelection == pixelPosition;
// Rounded coordinates for text selection.
// Don't round in VT mouse mode; cell-level precision matters more
const auto round = !_core->IsVtMouseModeEnabled();
// Don't round in VT mouse mode; cell-level precision matters more.
// Only round for single-click: for double/triple-click, rounding
// can push the position to the next cell, selecting the wrong word.
const auto round = multiClickMapper == 1 && !_core->IsVtMouseModeEnabled();
_core->LeftClickOnTerminal(_getTerminalPosition(til::point{ pixelPosition }, round),
multiClickMapper,
altEnabled,

View File

@@ -135,11 +135,14 @@
<TextBlock x:Uid="Globals_WarningsHeader"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Close All Tabs Warning -->
<local:SettingContainer x:Name="ConfirmCloseAllTabs"
x:Uid="Globals_ConfirmCloseAllTabs">
<ToggleSwitch IsOn="{x:Bind ViewModel.ConfirmCloseAllTabs, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
<!-- Confirm Close On -->
<local:SettingContainer x:Name="ConfirmOnClose"
x:Uid="Globals_ConfirmOnClose">
<ComboBox AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
ItemsSource="{x:Bind ViewModel.ConfirmOnCloseList}"
SelectedItem="{x:Bind ViewModel.CurrentConfirmOnClose, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Input Service Warning -->

View File

@@ -17,5 +17,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
INITIALIZE_BINDABLE_ENUM_SETTING(TabSwitcherMode, TabSwitcherMode, TabSwitcherMode, L"Globals_TabSwitcherMode", L"Content");
INITIALIZE_BINDABLE_ENUM_SETTING(CopyFormat, CopyFormat, winrt::Microsoft::Terminal::Control::CopyFormat, L"Globals_CopyFormat", L"Content");
INITIALIZE_BINDABLE_ENUM_SETTING(ConfirmOnClose, ConfirmOnClose, Model::ConfirmOnClose, L"Globals_ConfirmOnClose", L"Content");
}
}

View File

@@ -19,6 +19,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
GETSET_BINDABLE_ENUM_SETTING(TabSwitcherMode, Model::TabSwitcherMode, _GlobalSettings.TabSwitcherMode);
GETSET_BINDABLE_ENUM_SETTING(CopyFormat, winrt::Microsoft::Terminal::Control::CopyFormat, _GlobalSettings.CopyFormatting);
GETSET_BINDABLE_ENUM_SETTING(ConfirmOnClose, Model::ConfirmOnClose, _GlobalSettings.ConfirmOnClose);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, CopyOnSelect);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, TrimBlockSelection);
@@ -30,7 +31,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, DetectURLs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, SearchWebDefaultQueryUrl);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, WordDelimiters);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, ConfirmCloseAllTabs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, InputServiceWarning);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, WarnAboutLargePaste);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, WarnAboutMultiLinePaste);

View File

@@ -12,10 +12,13 @@ namespace Microsoft.Terminal.Settings.Editor
InteractionViewModel(Microsoft.Terminal.Settings.Model.GlobalAppSettings globalSettings);
IInspectable CurrentTabSwitcherMode;
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> TabSwitcherModeList { get; };
Windows.Foundation.Collections.IObservableVector<EnumEntry> TabSwitcherModeList { get; };
IInspectable CurrentCopyFormat;
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> CopyFormatList { get; };
Windows.Foundation.Collections.IObservableVector<EnumEntry> CopyFormatList { get; };
IInspectable CurrentConfirmOnClose;
Windows.Foundation.Collections.IObservableVector<EnumEntry> ConfirmOnCloseList { get; };
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, CopyOnSelect);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, TrimBlockSelection);
@@ -27,7 +30,6 @@ namespace Microsoft.Terminal.Settings.Editor
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, DetectURLs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(String, SearchWebDefaultQueryUrl);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(String, WordDelimiters);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ConfirmCloseAllTabs);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, InputServiceWarning);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, WarnAboutLargePaste);
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Microsoft.Terminal.Control.WarnAboutMultiLinePaste, WarnAboutMultiLinePaste);

View File

@@ -17,6 +17,7 @@
#include "ColorSchemes.h"
#include "EditColorScheme.h"
#include "AddProfile.h"
#include "Profiles.h"
#include "InteractionViewModel.h"
#include "LaunchViewModel.h"
#include "NewTabMenuViewModel.h"
@@ -102,7 +103,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
MainPage::MainPage(const CascadiaSettings& settings) :
_settingsSource{ settings },
_settingsClone{ settings.Copy() },
_profileVMs{ single_threaded_observable_vector<Editor::ProfileViewModel>() }
_profilesPageVM{ winrt::make<ProfilesPageViewModel>() }
{
InitializeComponent();
_UpdateBackgroundForMica();
@@ -156,8 +157,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
});
_SetupProfilesPageEventHandling();
// Make sure to initialize the profiles _after_ we have initialized the color schemes page VM, because we pass
// that VM into the appearance VMs within the profiles
// that VM into the appearance VMs within the profiles. The Profiles VM owns the per-profile list itself.
_InitializeProfilesList();
// Apply icons and tooltips (GH#19688, long names may be truncated) to static nav items
@@ -205,28 +208,24 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_UpdateBackgroundForMica();
// Deduce information about the currently selected item
IInspectable lastBreadcrumb;
const auto size = _breadcrumbs.Size();
if (size > 0)
// Capture data about where we are right now, so we can re-navigate to the same
// place after we rebuild all the settings.
IInspectable destination{ nullptr };
auto subPage = BreadcrumbSubPage::None;
hstring parentNavTag{};
if (const auto size = _breadcrumbs.Size(); size > 0)
{
lastBreadcrumb = _breadcrumbs.GetAt(size - 1);
const auto& crumb = _breadcrumbs.GetAt(size - 1).as<Breadcrumb>();
destination = crumb->Tag();
subPage = crumb->SubPage();
// If we were inside the Profiles section, remember that so we can restore
// the "Profiles " prefix on the rebuilt navigation.
if (_RootCrumbIsProfilesBreadcrumb())
{
parentNavTag = hstring{ profilesTag };
}
}
// Collect only the first items out of the menu item source, the static
// ones that we don't want to regenerate.
//
// By manipulating a MenuItemsSource this way, rather than manipulating the
// MenuItems directly, we avoid a crash in WinUI.
//
// By making the vector only _originalNumItems big to start, GetMany
// will only fill that number of elements out of the current source.
std::vector<IInspectable> menuItemsSTL(_originalNumItems, nullptr);
_menuItemSource.GetMany(0, menuItemsSTL);
// now, just stick them back in.
_menuItemSource.ReplaceAll(menuItemsSTL);
// Repopulate profile-related menu items
_InitializeProfilesList();
// Update the Nav State with the new version of the settings
@@ -236,64 +235,43 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_extensionsVM.UpdateSettings(_settingsClone, _colorSchemesPageVM);
_profileDefaultsVM = nullptr; // Lazy-loaded upon navigation
// Now that the menuItems are repopulated,
// refresh the current page using the breadcrumb data we collected before the refresh
if (const auto& crumb{ lastBreadcrumb.try_as<Breadcrumb>() }; crumb && crumb->Tag())
if (const auto& profileTag{ destination.try_as<Editor::ProfileViewModel>() })
{
bool foundNavigationParams = false;
auto destination = crumb->Tag();
auto subPage = crumb->SubPage();
for (const auto& item : _menuItemSource)
// Find the new profile VM by guid
if (const auto newProfileVM = _FindProfileViewModelByGuid(profileTag.OriginalProfileGuid()))
{
const auto menuItem = item.try_as<MUX::Controls::NavigationViewItem>();
if (!menuItem)
{
continue;
}
const auto& tag = menuItem.Tag();
if (const auto& stringTag{ tag.try_as<hstring>() })
{
if (const auto& destString{ destination.try_as<hstring>() })
{
foundNavigationParams = (*stringTag == *destString);
}
else if (destination.try_as<Editor::FolderEntryViewModel>() && *stringTag == newTabMenuTag)
{
foundNavigationParams = true;
subPage = BreadcrumbSubPage::NewTabMenu_Folder;
}
else if (destination.try_as<Editor::ExtensionPackageViewModel>() && *stringTag == extensionsTag)
{
foundNavigationParams = true;
subPage = BreadcrumbSubPage::Extensions_Extension;
}
}
else if (const auto& profileTag{ tag.try_as<ProfileViewModel>() })
{
const auto destProfile = destination.try_as<ProfileViewModel>();
if (destProfile && profileTag->OriginalProfileGuid() == destProfile->OriginalProfileGuid())
{
// Use the new profile VM from the refreshed menu items
destination = tag;
foundNavigationParams = true;
}
}
if (foundNavigationParams)
{
// found the one that was selected before the refresh
_Navigate(destination, subPage);
return;
}
destination = newProfileVM;
}
else
{
// Fall back to the Profiles landing page
destination = box_value(profilesTag);
subPage = BreadcrumbSubPage::None;
parentNavTag = {};
}
}
else if (destination.try_as<Editor::FolderEntryViewModel>())
{
destination = box_value(newTabMenuTag);
subPage = BreadcrumbSubPage::NewTabMenu_Folder;
}
else if (destination.try_as<Editor::ExtensionPackageViewModel>())
{
destination = box_value(extensionsTag);
subPage = BreadcrumbSubPage::Extensions_Extension;
}
else if (!destination.try_as<hstring>())
{
// Couldn't find a meaningful previous page. Fall back to the first menu item.
if (_menuItemSource && _menuItemSource.Size() > 0)
{
destination = _menuItemSource.GetAt(0).as<MUX::Controls::NavigationViewItem>().Tag();
subPage = BreadcrumbSubPage::None;
parentNavTag = {};
}
}
// Couldn't find the selected item, fall back to first menu item
// This happens when the selected item was a profile which doesn't exist in the new configuration
// We can use menuItemsSTL here because the only things they miss are profile entries.
const auto& firstItem{ _menuItemSource.GetAt(0).as<MUX::Controls::NavigationViewItem>() };
_Navigate(firstItem.Tag(), BreadcrumbSubPage::None);
_Navigate(destination, subPage, {}, parentNavTag);
_UpdateSearchIndex();
}
@@ -325,12 +303,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
// can be empty to indicate that we should create a fresh profile
void MainPage::_AddProfileHandler(winrt::guid profileGuid)
{
uint32_t insertIndex;
auto selectedItem{ SettingsNav().SelectedItem() };
if (_menuItemSource)
{
_menuItemSource.IndexOf(selectedItem, insertIndex);
}
if (profileGuid != winrt::guid{})
{
// if we were given a non-empty guid, we want to duplicate the corresponding profile
@@ -338,13 +310,13 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
if (profile)
{
const auto duplicated = _settingsClone.DuplicateProfile(profile);
_CreateAndNavigateToNewProfile(insertIndex, duplicated);
_CreateAndNavigateToNewProfile(duplicated);
}
}
else
{
// we were given an empty guid, create a new profile
_CreateAndNavigateToNewProfile(insertIndex, nullptr);
_CreateAndNavigateToNewProfile(nullptr);
}
}
@@ -451,7 +423,9 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
else if (_colorSchemesPageVM.CurrentPage() == ColorSchemesSubPage::Base)
{
_Navigate(boxedTag, BreadcrumbSubPage::None);
// Preserve the current root context so that "Profiles > Color schemes" still shows the Profiles prefix.
const hstring inheritedParentNavTag = _RootCrumbIsProfilesBreadcrumb() ? hstring{ profilesTag } : hstring{};
_Navigate(boxedTag, BreadcrumbSubPage::None, {}, inheritedParentNavTag);
}
}
else if (settingName == L"CurrentSchemeName")
@@ -521,6 +495,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
if (currentPage == ProfileSubPage::Base)
{
_breadcrumbs.Clear();
_AppendProfilesRootCrumb();
_breadcrumbs.Append(winrt::make<Breadcrumb>(breadcrumbTag, breadcrumbText, BreadcrumbSubPage::None));
}
_NavigateToProfileSubPage(profile, currentPage, breadcrumbTag, {});
@@ -535,7 +510,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
// a view model object (i.e. ProfileViewModel, ColorSchemeViewModel, etc.) for dynamic pages
// - subPage: the sub page to navigate to, used for pages that have multiple sub pages (i.e. Profile > Appearance/Terminal/Advanced)
// - elementToFocus: the name of the element to focus on the target page
void MainPage::_Navigate(const IInspectable& vm, BreadcrumbSubPage subPage, hstring elementToFocus)
// - parentNavTag: optional nav tag of the parent page when this navigation is invoked from inside another
// landing page. Used by the Profiles landing page to keep itself selected and to prepend a
// "Profiles" breadcrumb when entering Color schemes / a profile / Defaults / Add Profile from there.
void MainPage::_Navigate(const IInspectable& vm, BreadcrumbSubPage subPage, hstring elementToFocus, const hstring& parentNavTag)
{
_PreNavigateHelper();
@@ -616,8 +594,15 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, RS_(L"Nav_Extensions/Content"), BreadcrumbSubPage::None));
}
}
else if (*clickedItemTag == profilesTag)
{
contentFrame().Navigate(xaml_typename<Editor::Profiles>(), winrt::make<NavigateToPageArgs>(_profilesPageVM, *this, elementToFocus));
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, RS_(L"Nav_Profiles/Content"), BreadcrumbSubPage::None));
}
else if (*clickedItemTag == globalProfileTag)
{
_AppendProfilesRootCrumb();
// lazy load profile defaults VM
if (!_profileDefaultsVM)
{
@@ -636,9 +621,20 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
// Register handler for future user-driven sub-page changes
_SetupProfileEventHandling(_profileDefaultsVM);
// Keep the Profiles nav item selected.
selectedNavTag = profilesTag;
}
else if (*clickedItemTag == colorSchemesTag)
{
// Color Schemes page is accessible from root level and within Profiles,
// so we need to prepend the root crumb in the second case.
if (parentNavTag == profilesTag)
{
_AppendProfilesRootCrumb();
selectedNavTag = profilesTag;
}
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, RS_(L"Nav_ColorSchemes/Content"), BreadcrumbSubPage::None));
contentFrame().Navigate(xaml_typename<Editor::ColorSchemes>(), winrt::make<NavigateToPageArgs>(_colorSchemesPageVM, *this, elementToFocus));
@@ -654,47 +650,62 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
else if (*clickedItemTag == addProfileTag)
{
_AppendProfilesRootCrumb();
auto addProfileState{ winrt::make<AddProfilePageNavigationState>(_settingsClone) };
addProfileState.AddNew({ get_weak(), &MainPage::_AddProfileHandler });
contentFrame().Navigate(xaml_typename<Editor::AddProfile>(), winrt::make<NavigateToPageArgs>(addProfileState, *this, elementToFocus));
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, RS_(L"Nav_AddNewProfile/Content"), BreadcrumbSubPage::None));
// Keep the Profiles nav item selected.
selectedNavTag = profilesTag;
}
}
else if (const auto& profile = vm.try_as<Editor::ProfileViewModel>())
{
_AppendProfilesRootCrumb();
selectedNavTag = profilesTag;
if (profile.Orphaned())
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Base_Orphaned>(), winrt::make<NavigateToPageArgs>(profile, *this, elementToFocus));
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, profile.Name(), BreadcrumbSubPage::None));
profile.CurrentPage(ProfileSubPage::Base);
_SetupProfileEventHandling(profile);
return;
}
// Set CurrentPage before registering the handler to avoid double-navigation
const ProfileSubPage profileSubPage = ProfileSubPageFromBreadcrumb(subPage);
profile.CurrentPage(profileSubPage);
// Navigate directly to the correct sub-page
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, profile.Name(), BreadcrumbSubPage::None));
_NavigateToProfileSubPage(profile, profileSubPage, vm, elementToFocus);
if (const auto profileNavItem = _FindProfileNavItem(profile.OriginalProfileGuid()))
else
{
SettingsNav().SelectedItem(profileNavItem);
}
// Set CurrentPage before registering the handler to avoid double-navigation
const ProfileSubPage profileSubPage = ProfileSubPageFromBreadcrumb(subPage);
profile.CurrentPage(profileSubPage);
// Register handler for future user-driven sub-page changes
_SetupProfileEventHandling(profile);
// Navigate directly to the correct sub-page
_breadcrumbs.Append(winrt::make<Breadcrumb>(vm, profile.Name(), BreadcrumbSubPage::None));
_NavigateToProfileSubPage(profile, profileSubPage, vm, elementToFocus);
// Register handler for future user-driven sub-page changes
_SetupProfileEventHandling(profile);
}
}
else if (const auto& colorSchemeVM = vm.try_as<Editor::ColorSchemeViewModel>())
{
selectedNavTag = colorSchemesTag;
const auto boxedColorSchemesTag = box_value(colorSchemesTag);
// Suppress the handler to avoid double-navigation
_colorSchemesPageViewModelChangedRevoker.revoke();
// Color Schemes page is accessible from within Profiles and root level,
// so we need to prepend the root crumb in the first case.
if (parentNavTag == profilesTag)
{
_AppendProfilesRootCrumb();
selectedNavTag = profilesTag;
}
else
{
selectedNavTag = colorSchemesTag;
}
_breadcrumbs.Append(winrt::make<Breadcrumb>(boxedColorSchemesTag, RS_(L"Nav_ColorSchemes/Content"), BreadcrumbSubPage::None));
if (subPage == BreadcrumbSubPage::None)
@@ -813,26 +824,9 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
// Select the appropriate nav item
// NOTE: profiles are special in that they have their own nav item, so those are handled in the profile branch above
if (!selectedNavTag.empty())
{
for (auto&& menuItem : _menuItemSource)
{
if (const auto& navViewItem{ menuItem.try_as<MUX::Controls::NavigationViewItem>() })
{
if (const auto& tag{ navViewItem.Tag() })
{
if (const auto& stringTag{ tag.try_as<hstring>() })
{
if (*stringTag == selectedNavTag)
{
SettingsNav().SelectedItem(navViewItem);
break;
}
}
}
}
}
_SelectNavItemByTag(selectedNavTag);
}
}
@@ -855,7 +849,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
if (gsl::narrow_cast<uint32_t>(args.Index()) < (_breadcrumbs.Size() - 1))
{
const auto crumb = args.Item().as<Breadcrumb>();
_Navigate(crumb->Tag(), crumb->SubPage());
// If the breadcrumb chain is rooted at the Profiles landing page, preserve
// that context so navigating to sub pages (i.e. Color schemes) via a back-breadcrumb
// keeps the "Profiles " prefix.
const hstring parentNavTag = _RootCrumbIsProfilesBreadcrumb() ? hstring{ profilesTag } : hstring{};
_Navigate(crumb->Tag(), crumb->SubPage(), {}, parentNavTag);
}
}
@@ -872,35 +870,20 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_MoveXamlParsedNavItemsIntoItemSource();
}
// Manually create a NavigationViewItem and view model for each profile
// and keep a reference to them in a map so that we
// can easily modify the correct one when the associated
// profile changes.
_profileVMs.Clear();
// Populate the per-profile view models on the Profiles VM. The Profiles landing
// page (and the search index) read this same list back through the VM.
const auto& profileVMs = _profilesPageVM.Profiles();
profileVMs.Clear();
for (const auto& profile : _settingsClone.AllProfiles())
{
if (!profile.Deleted())
{
auto profileVM = _viewModelForProfile(profile, _settingsClone, Dispatcher());
profileVM.SetupAppearances(_colorSchemesPageVM.AllColorSchemes());
auto navItem = _CreateProfileNavViewItem(profileVM);
_menuItemSource.Append(navItem);
profileVM.DeleteProfileRequested({ this, &MainPage::_DeleteProfile });
profileVMs.Append(profileVM);
}
}
// Top off (the end of the nav view) with the Add Profile item
MUX::Controls::NavigationViewItem addProfileItem;
const auto addProfileText = RS_(L"Nav_AddNewProfile/Content");
addProfileItem.Content(box_value(addProfileText));
addProfileItem.Tag(box_value(addProfileTag));
WUX::Controls::ToolTipService::SetToolTip(addProfileItem, box_value(addProfileText));
FontIcon icon;
// This is the "Add" symbol
icon.Glyph(NavTagIconMap[addProfileTag]);
addProfileItem.Icon(icon);
_menuItemSource.Append(addProfileItem);
}
// BODGY
@@ -936,79 +919,17 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
SettingsNav().MenuItemsSource(_menuItemSource);
}
void MainPage::_CreateAndNavigateToNewProfile(const uint32_t index, const Model::Profile& profile)
void MainPage::_CreateAndNavigateToNewProfile(const Model::Profile& profile)
{
const auto newProfile{ profile ? profile : _settingsClone.CreateNewProfile() };
const auto profileViewModel{ _viewModelForProfile(newProfile, _settingsClone, Dispatcher()) };
profileViewModel.SetupAppearances(_colorSchemesPageVM.AllColorSchemes());
const auto navItem{ _CreateProfileNavViewItem(profileViewModel) };
profileViewModel.DeleteProfileRequested({ this, &MainPage::_DeleteProfile });
if (_menuItemSource)
{
_menuItemSource.InsertAt(index, navItem);
}
_profilesPageVM.Profiles().Append(profileViewModel);
// Select and navigate to the new profile
_Navigate(profileViewModel, BreadcrumbSubPage::None);
}
static MUX::Controls::InfoBadge _createGlyphIconBadge(wil::zwstring_view glyph)
{
MUX::Controls::InfoBadge badge;
MUX::Controls::FontIconSource icon;
icon.FontFamily(winrt::Windows::UI::Xaml::Media::FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" });
icon.FontSize(12);
icon.Glyph(glyph);
badge.IconSource(icon);
return badge;
}
MUX::Controls::NavigationViewItem MainPage::_CreateProfileNavViewItem(const Editor::ProfileViewModel& profile)
{
MUX::Controls::NavigationViewItem profileNavItem;
profileNavItem.Content(box_value(profile.Name()));
profileNavItem.Tag(box_value<Editor::ProfileViewModel>(profile));
profileNavItem.Icon(UI::IconPathConverter::IconWUX(profile.EvaluatedIcon()));
WUX::Controls::ToolTipService::SetToolTip(profileNavItem, box_value(profile.Name()));
if (profile.Orphaned())
{
profileNavItem.InfoBadge(_createGlyphIconBadge(L"\xE7BA") /* Warning Triangle */);
}
else if (profile.Hidden())
{
profileNavItem.InfoBadge(_createGlyphIconBadge(L"\xED1A") /* Hide */);
}
// Update the menu item when the icon/name changes
auto weakMenuItem{ make_weak(profileNavItem) };
profile.PropertyChanged([weakMenuItem](const auto&, const WUX::Data::PropertyChangedEventArgs& args) {
if (auto menuItem{ weakMenuItem.get() })
{
const auto& tag{ menuItem.Tag().as<Editor::ProfileViewModel>() };
if (args.PropertyName() == L"Icon")
{
menuItem.Icon(UI::IconPathConverter::IconWUX(tag.EvaluatedIcon()));
}
else if (args.PropertyName() == L"Name")
{
menuItem.Content(box_value(tag.Name()));
WUX::Controls::ToolTipService::SetToolTip(menuItem, box_value(tag.Name()));
}
else if (args.PropertyName() == L"Hidden")
{
menuItem.InfoBadge(tag.Hidden() ? _createGlyphIconBadge(L"\xED1A") /* Hide */ : nullptr);
}
}
});
// Add an event handler for when the user wants to delete a profile.
profile.DeleteProfileRequested({ this, &MainPage::_DeleteProfile });
// Register the VM so that it appears in the search index
_profileVMs.Append(profile);
return profileNavItem;
_Navigate(profileViewModel);
}
void MainPage::_DeleteProfile(const IInspectable /*sender*/, const Editor::DeleteProfileEventArgs& args)
@@ -1025,33 +946,20 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
}
// remove selected item
uint32_t index;
auto selectedItem{ SettingsNav().SelectedItem() };
if (_menuItemSource)
// Remove the profile VM
const auto& profileVMs = _profilesPageVM.Profiles();
for (uint32_t i = 0; i < profileVMs.Size(); ++i)
{
_menuItemSource.IndexOf(selectedItem, index);
_menuItemSource.RemoveAt(index);
// Remove it from the list of VMs
auto profileVM = selectedItem.as<MUX::Controls::NavigationViewItem>().Tag().as<Editor::ProfileViewModel>();
uint32_t vmIndex;
if (_menuItemSource.IndexOf(profileVM, vmIndex))
if (profileVMs.GetAt(i).OriginalProfileGuid() == guid)
{
_profileVMs.RemoveAt(vmIndex);
profileVMs.RemoveAt(i);
break;
}
// navigate to the profile next to this one
const auto newSelectedItem{ _menuItemSource.GetAt(index < _menuItemSource.Size() - 1 ? index : index - 1) };
const auto newTag = newSelectedItem.as<MUX::Controls::NavigationViewItem>().Tag();
if (const auto profileViewModel = newTag.try_as<ProfileViewModel>())
{
profileViewModel->FocusDeleteButton(true);
}
_Navigate(newTag, BreadcrumbSubPage::None);
// Since we are navigating to a new profile after deletion, scroll up to the top
SettingsMainPage_ScrollViewer().ChangeView(nullptr, 0.0, nullptr);
}
// Go back to the Profiles landing page
_Navigate(box_value(profilesTag));
SettingsMainPage_ScrollViewer().ChangeView(nullptr, 0.0, nullptr);
}
IObservableVector<IInspectable> MainPage::Breadcrumbs() noexcept
@@ -1061,29 +969,20 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void MainPage::_NavigateToProfileHandler(const IInspectable& /*sender*/, winrt::guid profileGuid)
{
if (const auto profileNavItem = _FindProfileNavItem(profileGuid))
if (const auto profileVM = _FindProfileViewModelByGuid(profileGuid))
{
_Navigate(profileNavItem.Tag(), BreadcrumbSubPage::None);
_Navigate(profileVM);
}
// Silently fail if the profile wasn't found
}
MUX::Controls::NavigationViewItem MainPage::_FindProfileNavItem(winrt::guid profileGuid) const
Editor::ProfileViewModel MainPage::_FindProfileViewModelByGuid(winrt::guid profileGuid) const
{
for (auto&& menuItem : _menuItemSource)
for (const auto& profileVM : _profilesPageVM.Profiles())
{
if (const auto& navViewItem{ menuItem.try_as<MUX::Controls::NavigationViewItem>() })
if (profileVM.OriginalProfileGuid() == profileGuid)
{
if (const auto& tag{ navViewItem.Tag() })
{
if (const auto& profileTag{ tag.try_as<ProfileViewModel>() })
{
if (profileTag->OriginalProfileGuid() == profileGuid)
{
return navViewItem;
}
}
}
return profileVM;
}
}
return nullptr;
@@ -1094,6 +993,62 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_Navigate(box_value(hstring{ colorSchemesTag }), BreadcrumbSubPage::ColorSchemes_Edit);
}
void MainPage::_AppendProfilesRootCrumb()
{
_breadcrumbs.Append(winrt::make<Breadcrumb>(box_value(profilesTag), RS_(L"Nav_Profiles/Content"), BreadcrumbSubPage::None));
}
bool MainPage::_RootCrumbIsProfilesBreadcrumb() const
{
if (_breadcrumbs.Size() == 0)
{
return false;
}
const auto rootTag = _breadcrumbs.GetAt(0).as<Breadcrumb>()->Tag().try_as<hstring>();
return rootTag && *rootTag == profilesTag;
}
void MainPage::_SelectNavItemByTag(std::wstring_view tag)
{
if (!_menuItemSource)
{
return;
}
for (auto&& menuItem : _menuItemSource)
{
if (const auto& navViewItem{ menuItem.try_as<MUX::Controls::NavigationViewItem>() })
{
if (const auto& itemTag{ navViewItem.Tag() })
{
if (const auto& stringTag{ itemTag.try_as<hstring>() })
{
if (*stringTag == tag)
{
SettingsNav().SelectedItem(navViewItem);
return;
}
}
}
}
}
}
void MainPage::_SetupProfilesPageEventHandling()
{
_profilesPageVM.OpenDefaultsRequested([this](const auto&, const auto&) {
_Navigate(box_value(globalProfileTag));
});
_profilesPageVM.OpenColorSchemesRequested([this](const auto&, const auto&) {
_Navigate(box_value(colorSchemesTag), {}, {}, hstring{ profilesTag });
});
_profilesPageVM.AddProfileRequested([this](const auto&, const auto&) {
_Navigate(box_value(addProfileTag));
});
_profilesPageVM.OpenProfileRequested([this](const auto&, const Editor::ProfileViewModel& profile) {
_Navigate(profile);
});
}
winrt::Windows::UI::Xaml::Media::Brush MainPage::BackgroundBrush()
{
return SettingsNav().Background();
@@ -1196,7 +1151,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
co_return;
}
_currentSearch = SearchIndex::Instance().SearchAsync(sanitizedQuery,
_profileVMs.GetView(),
_profilesPageVM.Profiles().GetView(),
get_self<implementation::NewTabMenuViewModel>(_newTabMenuPageVM)->FolderTreeFlatList().GetView(),
_colorSchemesPageVM.AllColorSchemes().GetView(),
_extensionsVM.ExtensionPackages().GetView(),

View File

@@ -84,21 +84,25 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
std::optional<HWND> _hostingHwnd;
void _InitializeProfilesList();
void _CreateAndNavigateToNewProfile(const uint32_t index, const Model::Profile& profile);
winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem _CreateProfileNavViewItem(const Editor::ProfileViewModel& profile);
void _CreateAndNavigateToNewProfile(const Model::Profile& profile);
void _DeleteProfile(const Windows::Foundation::IInspectable sender, const Editor::DeleteProfileEventArgs& args);
void _AddProfileHandler(const winrt::guid profileGuid);
void _SetupProfileEventHandling(const winrt::Microsoft::Terminal::Settings::Editor::ProfileViewModel profile);
void _SetupColorSchemesEventHandling();
void _SetupActionsEventHandling();
void _SetupProfilesPageEventHandling();
void _NavigateToProfileSubPage(const Editor::ProfileViewModel& profile, ProfileSubPage page, const IInspectable& breadcrumbTag, const hstring& elementToFocus);
void _PreNavigateHelper();
void _Navigate(const IInspectable& vm, BreadcrumbSubPage subPage, hstring elementToFocus = {});
void _Navigate(const IInspectable& vm, BreadcrumbSubPage subPage = BreadcrumbSubPage::None, hstring elementToFocus = {}, const hstring& parentNavTag = {});
void _NavigateToProfileHandler(const IInspectable& sender, winrt::guid profileGuid);
void _NavigateToColorSchemeHandler(const IInspectable& sender, const IInspectable& args);
Microsoft::UI::Xaml::Controls::NavigationViewItem _FindProfileNavItem(winrt::guid profileGuid) const;
Editor::ProfileViewModel _FindProfileViewModelByGuid(winrt::guid profileGuid) const;
void _AppendProfilesRootCrumb();
bool _RootCrumbIsProfilesBreadcrumb() const;
void _SelectNavItemByTag(std::wstring_view tag);
void _UpdateBackgroundForMica();
void _MoveXamlParsedNavItemsIntoItemSource();
@@ -106,11 +110,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
safe_void_coroutine _UpdateSearchIndex();
winrt::Microsoft::Terminal::Settings::Editor::ProfileViewModel _profileDefaultsVM{ nullptr };
Windows::Foundation::Collections::IVector<winrt::Microsoft::Terminal::Settings::Editor::ProfileViewModel> _profileVMs{ nullptr };
winrt::Microsoft::Terminal::Settings::Editor::ColorSchemesPageViewModel _colorSchemesPageVM{ nullptr };
winrt::Microsoft::Terminal::Settings::Editor::ActionsViewModel _actionsVM{ nullptr };
winrt::Microsoft::Terminal::Settings::Editor::NewTabMenuViewModel _newTabMenuPageVM{ nullptr };
winrt::Microsoft::Terminal::Settings::Editor::ExtensionsViewModel _extensionsVM{ nullptr };
winrt::Microsoft::Terminal::Settings::Editor::ProfilesPageViewModel _profilesPageVM{ nullptr };
Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IObservableVector<Windows::Foundation::IInspectable>> _currentSearch{ nullptr };

View File

@@ -192,11 +192,9 @@
x:Uid="Nav_Extensions"
Tag="Extensions_Nav" />
<muxc:NavigationViewItemHeader x:Uid="Nav_Profiles" />
<muxc:NavigationViewItem x:Name="BaseLayerMenuItem"
x:Uid="Nav_ProfileDefaults"
Tag="GlobalProfile_Nav" />
<muxc:NavigationViewItem x:Name="ProfilesNavItem"
x:Uid="Nav_Profiles"
Tag="Profiles_Nav" />
</muxc:NavigationView.MenuItems>
<muxc:NavigationView.FooterMenuItems>

View File

@@ -119,6 +119,10 @@
<DependentUpon>ColorSchemesPageViewModel.idl</DependentUpon>
<SubType>Code</SubType>
</ClInclude>
<ClInclude Include="Profiles.h">
<DependentUpon>Profiles.xaml</DependentUpon>
<SubType>Code</SubType>
</ClInclude>
<ClInclude Include="RenderingViewModel.h">
<DependentUpon>RenderingViewModel.idl</DependentUpon>
<SubType>Code</SubType>
@@ -231,6 +235,9 @@
<Page Include="Profiles_Base.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Profiles.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Profiles_Base_Orphaned.xaml">
<SubType>Designer</SubType>
</Page>
@@ -331,6 +338,10 @@
<DependentUpon>ColorSchemesPageViewModel.idl</DependentUpon>
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="Profiles.cpp">
<DependentUpon>Profiles.xaml</DependentUpon>
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="RenderingViewModel.cpp">
<DependentUpon>RenderingViewModel.idl</DependentUpon>
<SubType>Code</SubType>
@@ -456,6 +467,10 @@
<Midl Include="TerminalColorConverters.idl" />
<Midl Include="ColorSchemeViewModel.idl" />
<Midl Include="ColorSchemesPageViewModel.idl" />
<Midl Include="Profiles.idl">
<DependentUpon>Profiles.xaml</DependentUpon>
<SubType>Code</SubType>
</Midl>
<Midl Include="RenderingViewModel.idl" />
<Midl Include="InteractionViewModel.idl" />
<Midl Include="GlobalAppearanceViewModel.idl" />

View File

@@ -57,5 +57,6 @@
<Page Include="NullableColorPicker.xaml" />
<Page Include="IconPicker.xaml" />
<Page Include="NewTabMenu.xaml" />
<Page Include="Profiles.xaml" />
</ItemGroup>
</Project>

View File

@@ -17,6 +17,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
inline constexpr std::wstring_view actionsTag{ L"Actions_Nav" };
inline constexpr std::wstring_view newTabMenuTag{ L"NewTabMenu_Nav" };
inline constexpr std::wstring_view extensionsTag{ L"Extensions_Nav" };
inline constexpr std::wstring_view profilesTag{ L"Profiles_Nav" };
inline constexpr std::wstring_view globalProfileTag{ L"GlobalProfile_Nav" };
inline constexpr std::wstring_view addProfileTag{ L"AddProfile" };
inline constexpr std::wstring_view colorSchemesTag{ L"ColorSchemes_Nav" };
@@ -33,6 +34,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
std::pair{ actionsTag, L"\xE765" }, /* Keyboard Classic */
std::pair{ newTabMenuTag, L"\xE71D" }, /* All Apps */
std::pair{ extensionsTag, L"\xEA86" }, /* Puzzle */
std::pair{ profilesTag, L"\xE7EE" }, /* Other User */
std::pair{ globalProfileTag, L"\xE81E" }, /* Map Layers */
std::pair{ addProfileTag, L"\xE710" }, /* Add */
std::pair{ openJsonTag, L"\xE713" }, /* Settings */

View File

@@ -574,7 +574,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
hstring ProfileViewModel::BellStylePreview() const
{
const auto bellStyle = BellStyle();
if (WI_AreAllFlagsSet(bellStyle, BellStyle::Audible | BellStyle::Window | BellStyle::Taskbar))
if (WI_AreAllFlagsSet(bellStyle, BellStyle::Audible | BellStyle::Window | BellStyle::Taskbar | BellStyle::Notification))
{
return RS_(L"Profile_BellStyleAll/Content");
}
@@ -584,7 +584,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
std::vector<hstring> resultList;
resultList.reserve(3);
resultList.reserve(4);
if (WI_IsFlagSet(bellStyle, BellStyle::Audible))
{
resultList.emplace_back(RS_(L"Profile_BellStyleAudible/Content"));
@@ -597,6 +597,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
resultList.emplace_back(RS_(L"Profile_BellStyleTaskbar/Content"));
}
if (WI_IsFlagSet(bellStyle, BellStyle::Notification))
{
resultList.emplace_back(RS_(L"Profile_BellStyleNotification/Content"));
}
// add in the commas
hstring result{};
@@ -640,6 +644,13 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
BellStyle(currentStyle);
}
void ProfileViewModel::SetBellStyleNotification(winrt::Windows::Foundation::IReference<bool> on)
{
auto currentStyle = BellStyle();
WI_UpdateFlag(currentStyle, Model::BellStyle::Notification, winrt::unbox_value<bool>(on));
BellStyle(currentStyle);
}
// Method Description:
// - Construct _CurrentBellSounds by importing the _inherited_ value from the model
// - Adds a PropertyChanged handler to each BellSoundViewModel to propagate changes to the model

View File

@@ -46,6 +46,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void SetBellStyleAudible(winrt::Windows::Foundation::IReference<bool> on);
void SetBellStyleWindow(winrt::Windows::Foundation::IReference<bool> on);
void SetBellStyleTaskbar(winrt::Windows::Foundation::IReference<bool> on);
void SetBellStyleNotification(winrt::Windows::Foundation::IReference<bool> on);
hstring BellSoundPreview();
void RequestAddBellSound(hstring path);

View File

@@ -49,6 +49,7 @@ namespace Microsoft.Terminal.Settings.Editor
void SetBellStyleAudible(Windows.Foundation.IReference<Boolean> on);
void SetBellStyleWindow(Windows.Foundation.IReference<Boolean> on);
void SetBellStyleTaskbar(Windows.Foundation.IReference<Boolean> on);
void SetBellStyleNotification(Windows.Foundation.IReference<Boolean> on);
String BellSoundPreview { get; };
Windows.Foundation.Collections.IObservableVector<BellSoundViewModel> CurrentBellSounds { get; };

View File

@@ -0,0 +1,94 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "Profiles.h"
#include "Profiles.g.cpp"
#include "ProfilesPageViewModel.g.cpp"
#include "ProfileViewModel.h"
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Foundation::Collections;
using namespace winrt::Windows::UI::Xaml;
using namespace winrt::Windows::UI::Xaml::Controls;
using namespace winrt::Windows::UI::Xaml::Navigation;
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
Profiles::Profiles()
{
InitializeComponent();
Automation::AutomationProperties::SetName(DefaultsNavigator(), RS_(L"Profiles_DefaultsNavigator_Title/Text"));
Automation::AutomationProperties::SetName(ColorSchemesNavigator(), RS_(L"Profiles_ColorSchemesNavigator_Title/Text"));
Automation::AutomationProperties::SetName(AddProfileButton(), RS_(L"Profiles_AddProfileButton/Text"));
}
void Profiles::OnNavigatedTo(const NavigationEventArgs& e)
{
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
_ViewModel = args.ViewModel().as<Editor::ProfilesPageViewModel>();
BringIntoViewWhenLoaded(args.ElementToFocus());
TraceLoggingWrite(
g_hTerminalSettingsEditorProvider,
"NavigatedToPage",
TraceLoggingDescription("Event emitted when the user navigates to a page in the settings UI"),
TraceLoggingValue("profilesLanding", "PageId", "The identifier of the page that was navigated to"),
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
}
void Profiles::Defaults_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
{
_ViewModel.RequestOpenDefaults();
}
void Profiles::ColorSchemes_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
{
_ViewModel.RequestOpenColorSchemes();
}
void Profiles::AddProfile_Click(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
{
_ViewModel.RequestAddProfile();
}
void Profiles::Profile_Click(const IInspectable& sender, const RoutedEventArgs& /*args*/)
{
// Profile navigators are buttons whose DataContext is the bound ProfileViewModel.
if (const auto element = sender.try_as<FrameworkElement>())
{
if (const auto profile = element.DataContext().try_as<Editor::ProfileViewModel>())
{
_ViewModel.RequestOpenProfile(profile);
}
}
}
ProfilesPageViewModel::ProfilesPageViewModel()
{
_setProfiles(single_threaded_observable_vector<Editor::ProfileViewModel>());
}
void ProfilesPageViewModel::RequestOpenDefaults()
{
OpenDefaultsRequested.raise(*this, nullptr);
}
void ProfilesPageViewModel::RequestOpenColorSchemes()
{
OpenColorSchemesRequested.raise(*this, nullptr);
}
void ProfilesPageViewModel::RequestAddProfile()
{
AddProfileRequested.raise(*this, nullptr);
}
void ProfilesPageViewModel::RequestOpenProfile(const Editor::ProfileViewModel& profile)
{
OpenProfileRequested.raise(*this, profile);
}
}

View File

@@ -0,0 +1,67 @@
/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- Profiles.h
Abstract:
- The Profiles landing page in the Settings UI. The page hosts entry points to
the list of individual profiles among other profile-related settings.
--*/
#pragma once
#include "Profiles.g.h"
#include "ProfilesPageViewModel.g.h"
#include "ProfileViewModel.h"
#include "Utils.h"
#include "ViewModelHelpers.h"
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct ProfilesPageViewModel : ProfilesPageViewModelT<ProfilesPageViewModel>, ViewModelHelper<ProfilesPageViewModel>
{
public:
ProfilesPageViewModel();
void RequestOpenDefaults();
void RequestOpenColorSchemes();
void RequestAddProfile();
void RequestOpenProfile(const Editor::ProfileViewModel& profile);
// DON'T YOU DARE ADD A `WINRT_CALLBACK(PropertyChanged` TO A CLASS DERIVED FROM ViewModelHelper. Do this instead:
using ViewModelHelper<ProfilesPageViewModel>::PropertyChanged;
WINRT_OBSERVABLE_PROPERTY(Windows::Foundation::Collections::IObservableVector<Editor::ProfileViewModel>, Profiles, _propertyChangedHandlers, nullptr);
public:
til::typed_event<Windows::Foundation::IInspectable, Windows::Foundation::IInspectable> OpenDefaultsRequested;
til::typed_event<Windows::Foundation::IInspectable, Windows::Foundation::IInspectable> OpenColorSchemesRequested;
til::typed_event<Windows::Foundation::IInspectable, Windows::Foundation::IInspectable> AddProfileRequested;
til::typed_event<Windows::Foundation::IInspectable, Editor::ProfileViewModel> OpenProfileRequested;
};
struct Profiles : public HasScrollViewer<Profiles>, ProfilesT<Profiles>
{
public:
Profiles();
void OnNavigatedTo(const winrt::Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
void Defaults_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
void ColorSchemes_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
void AddProfile_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
void Profile_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
til::property_changed_event PropertyChanged;
WINRT_PROPERTY(Editor::ProfilesPageViewModel, ViewModel, nullptr);
};
}
namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
{
BASIC_FACTORY(Profiles);
BASIC_FACTORY(ProfilesPageViewModel);
}

View File

@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "ProfileViewModel.idl";
import "ColorSchemeViewModel.idl";
namespace Microsoft.Terminal.Settings.Editor
{
runtimeclass ProfilesPageViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
{
ProfilesPageViewModel();
Windows.Foundation.Collections.IObservableVector<ProfileViewModel> Profiles { get; };
void RequestOpenDefaults();
void RequestOpenColorSchemes();
void RequestAddProfile();
void RequestOpenProfile(ProfileViewModel profile);
event Windows.Foundation.TypedEventHandler<Object, IInspectable> OpenDefaultsRequested;
event Windows.Foundation.TypedEventHandler<Object, IInspectable> OpenColorSchemesRequested;
event Windows.Foundation.TypedEventHandler<Object, IInspectable> AddProfileRequested;
event Windows.Foundation.TypedEventHandler<Object, ProfileViewModel> OpenProfileRequested;
}
[default_interface] runtimeclass Profiles : Windows.UI.Xaml.Controls.Page
{
Profiles();
ProfilesPageViewModel ViewModel { get; };
}
}

View File

@@ -0,0 +1,136 @@
<!--
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
the MIT License. See LICENSE in the project root for license information.
-->
<Page x:Class="Microsoft.Terminal.Settings.Editor.Profiles"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:model="using:Microsoft.Terminal.Settings.Model"
xmlns:mtu="using:Microsoft.Terminal.UI"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="ProfileNavigatorTemplate"
x:DataType="local:ProfileViewModel">
<Button HorizontalAlignment="Stretch"
AutomationProperties.Name="{x:Bind Name, Mode=OneWay}"
Click="Profile_Click"
Style="{StaticResource NavigatorButtonStyle}">
<Grid ColumnSpacing="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="16" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl Grid.Column="0"
Width="16"
Height="16"
VerticalAlignment="Center"
Content="{x:Bind IconPreview, Mode=OneWay}"
IsTabStop="False" />
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Style="{StaticResource BodyStrongTextBlockStyle}"
Text="{x:Bind Name, Mode=OneWay}"
TextTrimming="CharacterEllipsis" />
<muxc:InfoBadge Grid.Column="2"
Margin="0,0,8,0"
VerticalAlignment="Center"
Visibility="{x:Bind Hidden, Mode=OneWay}">
<muxc:InfoBadge.IconSource>
<muxc:FontIconSource FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets"
FontSize="12"
Glyph="&#xED1A;" />
</muxc:InfoBadge.IconSource>
</muxc:InfoBadge>
<muxc:InfoBadge Grid.Column="2"
Margin="0,0,8,0"
VerticalAlignment="Center"
Visibility="{x:Bind Orphaned, Mode=OneWay}">
<muxc:InfoBadge.IconSource>
<muxc:FontIconSource FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets"
FontSize="12"
Glyph="&#xE7BA;" />
</muxc:InfoBadge.IconSource>
</muxc:InfoBadge>
</Grid>
</Button>
</DataTemplate>
</ResourceDictionary>
</Page.Resources>
<StackPanel Style="{StaticResource SettingsStackStyle}">
<!-- General Profile Settings -->
<TextBlock x:Uid="Profiles_GeneralSettingsHeader"
Margin="0,0,0,4"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Defaults navigator -->
<Button x:Name="DefaultsNavigator"
Click="Defaults_Click"
Style="{StaticResource NavigatorButtonStyle}">
<StackPanel Orientation="Vertical">
<TextBlock x:Uid="Profiles_DefaultsNavigator_Title"
Style="{StaticResource BodyStrongTextBlockStyle}" />
<TextBlock x:Uid="Profiles_DefaultsNavigator_Description"
Margin="0,2,0,0"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Style="{StaticResource CaptionTextBlockStyle}"
TextWrapping="Wrap" />
</StackPanel>
</Button>
<!-- Color schemes navigator -->
<Button x:Name="ColorSchemesNavigator"
Click="ColorSchemes_Click"
Style="{StaticResource NavigatorButtonStyle}">
<StackPanel Orientation="Vertical">
<TextBlock x:Uid="Profiles_ColorSchemesNavigator_Title"
Style="{StaticResource BodyStrongTextBlockStyle}" />
<TextBlock x:Uid="Profiles_ColorSchemesNavigator_Description"
Margin="0,2,0,0"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Style="{StaticResource CaptionTextBlockStyle}"
TextWrapping="Wrap" />
</StackPanel>
</Button>
<!-- Terminal profiles section -->
<TextBlock x:Uid="Profiles_TerminalProfilesHeader"
Style="{StaticResource TextBlockSubHeaderStyle}" />
<!-- Add Profile accent button -->
<Button x:Name="AddProfileButton"
Margin="0,4,0,0"
Click="AddProfile_Click"
Style="{StaticResource AccentButtonStyle}">
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="{StaticResource StandardIconSize}"
Glyph="&#xE710;" />
<TextBlock x:Uid="Profiles_AddProfileButton"
Style="{StaticResource IconButtonTextBlockStyle}" />
</StackPanel>
</Button>
<!-- List of profiles. Each is a NavigatorButtonStyle button rendered by ProfileNavigatorTemplate. -->
<ItemsControl Margin="0,0,0,16"
ItemTemplate="{StaticResource ProfileNavigatorTemplate}"
ItemsSource="{x:Bind ViewModel.Profiles, Mode=OneWay}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</Page>

View File

@@ -111,6 +111,8 @@
IsChecked="{x:Bind Profile.IsBellStyleFlagSet(2), BindBack=Profile.SetBellStyleWindow, Mode=TwoWay}" />
<CheckBox x:Uid="Profile_BellStyleTaskbar"
IsChecked="{x:Bind Profile.IsBellStyleFlagSet(4), BindBack=Profile.SetBellStyleTaskbar, Mode=TwoWay}" />
<CheckBox x:Uid="Profile_BellStyleNotification"
IsChecked="{x:Bind Profile.IsBellStyleFlagSet(8), BindBack=Profile.SetBellStyleNotification, Mode=TwoWay}" />
</StackPanel>
</local:SettingContainer>

View File

@@ -1553,6 +1553,10 @@
<value>Blinkendes Fenster</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Desktopbenachrichtigung</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Neu hinzufügen</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Warnen, wenn mehrere Registerkarten geschlossen werden</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Beim Schließen warnen</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Steuert, wann ein Bestätigungsdialogfeld angezeigt wird, bevor Registerkarten oder Fenster geschlossen werden. "Immer" zeigt das Dialogfeld beim Schließen eines Fensters an.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Nie</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Immer</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Mehrere Registerkarten oder Bereiche</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Warnen, wenn „Dienst für Bildschirmtastatur und Handschrifteingabefeld“ deaktiviert ist</value>
</data>

View File

@@ -1291,7 +1291,39 @@
</data>
<data name="Nav_Profiles.Content" xml:space="preserve">
<value>Profiles</value>
<comment>Header for the "profiles" menu items. This acts as a divider to introduce profile-related menu items.</comment>
<comment>Header for the "profiles" menu item. Navigates to a landing page that lists profile-related settings (defaults, color schemes, the list of terminal profiles, and the add-profile button).</comment>
</data>
<data name="Nav_Profiles.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Profiles</value>
<comment>Tooltip for the "profiles" menu item. Navigates to a landing page that lists profile-related settings.</comment>
</data>
<data name="Profiles_GeneralSettingsHeader.Text" xml:space="preserve">
<value>General Profile Settings</value>
<comment>Section header on the Profiles landing page. Introduces general-purpose profile settings such as the defaults shared by all profiles and the color schemes that profiles can use.</comment>
</data>
<data name="Profiles_TerminalProfilesHeader.Text" xml:space="preserve">
<value>Terminal profiles</value>
<comment>Section header on the Profiles landing page. Introduces the list of individual terminal profiles configured by the user.</comment>
</data>
<data name="Profiles_DefaultsNavigator_Title.Text" xml:space="preserve">
<value>Defaults</value>
<comment>Title for the "Defaults" navigator on the Profiles landing page. Clicking this opens the page where defaults shared by all profiles can be edited.</comment>
</data>
<data name="Profiles_DefaultsNavigator_Description.Text" xml:space="preserve">
<value>Changes made here apply to all profiles unless overridden by a specific profile. These settings do not affect the Windows Terminal appearance.</value>
<comment>Help text describing the "Defaults" navigator on the Profiles landing page. Clarifies that the defaults apply to every profile but are not the same as the global Windows Terminal appearance settings.</comment>
</data>
<data name="Profiles_ColorSchemesNavigator_Title.Text" xml:space="preserve">
<value>Color schemes</value>
<comment>Title for the "Color schemes" navigator on the Profiles landing page. Clicking this opens the same page reachable from the top-level Color schemes nav item.</comment>
</data>
<data name="Profiles_ColorSchemesNavigator_Description.Text" xml:space="preserve">
<value>Add, edit, or remove the color schemes that your profiles can use.</value>
<comment>Help text describing the "Color schemes" navigator on the Profiles landing page.</comment>
</data>
<data name="Profiles_AddProfileButton.Text" xml:space="preserve">
<value>Add a new profile</value>
<comment>Text on the accent-colored button on the Profiles landing page. Clicking this opens the page where users can add a new profile.</comment>
</data>
<data name="Globals_LaunchModeFocus.Content" xml:space="preserve">
<value>Focus</value>
@@ -1553,6 +1585,10 @@
<value>Flash window</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Desktop notification</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Add new</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2233,26 @@
<value>Warn when closing more than one tab</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Warn when closing</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Controls when a confirmation dialog appears before closing tabs or windows. "Always" presents the dialog when closing any pane.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Never</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Always</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Multiple tabs or panes</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Warn when "Touch Keyboard and Handwriting Panel Service" is disabled</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>Ventana Flash</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Notificaciones de escritorio</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Agregar nuevo</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Advertir al cerrar más de una pestaña</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Advertir al cerrar</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Controla cuándo aparece un cuadro de diálogo de confirmación antes de cerrar pestañas o ventanas. "Siempre" presenta el cuadro de diálogo al cerrar cualquier panel.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Nunca</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Siempre</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Varias pestañas o paneles</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Advertir cuando el servicio "Panel de escritura a mano y teclado táctil" está deshabilitado</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>Fenêtre Flash</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Notification de bureau</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Ajouter nouveau</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>M'avertir lorsque je ferme plusieurs onglets</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Avertir lors de la fermeture</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Contrôle lapparition dune boîte de dialogue de confirmation avant la fermeture des onglets ou des fenêtres. « Toujours » affiche la boîte de dialogue lors de la fermeture de nimporte quel volet.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Jamais</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Toujours</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Plusieurs onglets ou volets</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Avertir lorsque le « service clavier tactile et volet décriture manuscrite » est désactivé</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>Finestra di Flash</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Notifica desktop</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Aggiungi nuovo</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Avvisa in caso di chiusura di più schede</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Avvisa in caso di chiusura</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Controlla quando viene visualizzata una finestra di dialogo di conferma prima di chiudere schede o finestre. "Sempre" visualizza la finestra di dialogo quando si chiude un riquadro.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Mai</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Sempre</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Più schede o pannelli</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Avvisa quando il servizio "Tastiera virtuale e pannello per la grafia" è disabilitato</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>フラッシュ ウィンドウ</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>デスクトップ通知</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>新規追加</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>複数のタブを閉じるときに警告する</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>閉じるときに警告する</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>タブまたはウィンドウを閉じる前に確認ダイアログを表示するタイミングを制御します。[常に] を選択すると、ウィンドウを閉じるときにダイアログが表示されます。</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>しない</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>常に</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>複数のタブまたはウィンドウ</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>[タッチ キーボードと手書きパネル サービス] が無効になっている場合に警告する</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>플래시 창</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>데스크톱 알림</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>새로 추가</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>두 개 이상의 탭을 닫을 때 경고</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>닫을 때 경고 표시</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>탭이나 창을 닫기 전에 확인 대화 상자가 나타나는 시기를 제어합니다. "항상"은 창을 닫을 때 대화 상자를 표시합니다.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>사용 안 함</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>항상</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>여러 탭 또는 창</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>"터치 키보드 및 필기 패널 서비스"를 사용할 수 없는 경우 경고</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>Piscar janela</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Notificação da área de trabalho</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Adicionar novo</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Avisar ao fechar mais de uma guia</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Avisar ao fechar</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Controla quando uma caixa de diálogo de confirmação aparece antes de fechar guias ou janelas. "Sempre" apresenta a caixa de diálogo ao fechar qualquer painel.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Nunca</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Sempre</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Múltiplas guias ou painéis</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Avisar quando o "Serviço de Teclado Virtual e Painel de Manuscrito" estiver desabilitado</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>₣łāŝћ ẅїňďŏщ !!! </value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Ðëśкťõρ ʼnσţíƒΐçâτĭõη !!! !!!</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Äδď ⁿĕш !!</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Ẃářй ẅђëπ ĉľôśĩήĝ mǿѓĕ тĥąπ òπё τάь !!! !!! !!! !</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Ŵǻřπ ωћеŋ ςĺõşϊйĝ !!! !!</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Ĉбńţřòłѕ шĥεπ à čоņƒϊřmąτīóп ďíдłбġ ªррéǻŕѕ ъеƒбѓě ςłôśîпğ ţавś оѓ шϊńδǿẅş. "Άŀшãўś" ргзŝêņţš ťнê ðіāľŏĝ ẃћĕй ċℓöѕíñĝ αпŷ рāйε. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Ņèνέѓ !</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Δŀώǻỳş !</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Μύłтîрĺё ťдьś óя φąŋéŝ !!! !!! </value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Ẃǻґņ ώћĕπ "Ŧõũčђ Κзγьοдгď ąʼnð Нáлđẅŕīťίńģ Ρàňεℓ Śεŕνîçé" íš đìşāъŀêδ !!! !!! !!! !!! !!! !!! !!</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>₣łāŝћ ẅїňďŏщ !!! </value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Ðëśкťõρ ʼnσţíƒΐçâτĭõη !!! !!!</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Äδď ⁿĕш !!</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Ẃářй ẅђëπ ĉľôśĩήĝ mǿѓĕ тĥąπ òπё τάь !!! !!! !!! !</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Ŵǻřπ ωћеŋ ςĺõşϊйĝ !!! !!</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Ĉбńţřòłѕ шĥεπ à čоņƒϊřmąτīóп ďíдłбġ ªррéǻŕѕ ъеƒбѓě ςłôśîпğ ţавś оѓ шϊńδǿẅş. "Άŀшãўś" ргзŝêņţš ťнê ðіāľŏĝ ẃћĕй ċℓöѕíñĝ αпŷ рāйε. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Ņèνέѓ !</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Δŀώǻỳş !</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Μύłтîрĺё ťдьś óя φąŋéŝ !!! !!! </value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Ẃǻґņ ώћĕπ "Ŧõũčђ Κзγьοдгď ąʼnð Нáлđẅŕīťίńģ Ρàňεℓ Śεŕνîçé" íš đìşāъŀêδ !!! !!! !!! !!! !!! !!! !!</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>₣łāŝћ ẅїňďŏщ !!! </value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Ðëśкťõρ ʼnσţíƒΐçâτĭõη !!! !!!</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Äδď ⁿĕш !!</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Ẃářй ẅђëπ ĉľôśĩήĝ mǿѓĕ тĥąπ òπё τάь !!! !!! !!! !</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Ŵǻřπ ωћеŋ ςĺõşϊйĝ !!! !!</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Ĉбńţřòłѕ шĥεπ à čоņƒϊřmąτīóп ďíдłбġ ªррéǻŕѕ ъеƒбѓě ςłôśîпğ ţавś оѓ шϊńδǿẅş. "Άŀшãўś" ргзŝêņţš ťнê ðіāľŏĝ ẃћĕй ċℓöѕíñĝ αпŷ рāйε. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Ņèνέѓ !</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Δŀώǻỳş !</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Μύłтîрĺё ťдьś óя φąŋéŝ !!! !!! </value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Ẃǻґņ ώћĕπ "Ŧõũčђ Κзγьοдгď ąʼnð Нáлđẅŕīťίńģ Ρàňεℓ Śεŕνîçé" íš đìşāъŀêδ !!! !!! !!! !!! !!! !!! !!</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>Мигающее окно</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>Уведомления на рабочем столе</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>Добавить новую</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>Предупреждать при закрытии нескольких вкладок</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>Предупреждать при закрытии</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>Определяет, когда появляется диалоговое окно подтверждения перед закрытием вкладок или окон. "Всегда" — диалог отображается при закрытии любой панели.</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>Никогда</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>Всегда</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>Несколько вкладок или панелей</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>Предупреждать, если параметр "Служба сенсорной клавиатуры и панели рукописного ввода" отключен</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>闪烁窗口</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>桌面通知</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>新增</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,10 @@
<value>关闭多个选项卡时发出警告</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>控制在关闭选项卡或窗口之前何时显示确认对话框。“始终”在关闭任何窗格时显示对话框。</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>禁用“触摸键盘和手写面板服务”时发出警告</value>
</data>

View File

@@ -1553,6 +1553,10 @@
<value>快閃視窗</value>
<comment>An option to choose from for the "bell style" setting. When selected, a visual notification is used to notify the user. In this case, the window is flashed.</comment>
</data>
<data name="Profile_BellStyleNotification.Content" xml:space="preserve">
<value>桌面通知</value>
<comment>An option to choose from for the "bell style" setting. When selected, a Windows desktop notification (toast) is sent to notify the user.</comment>
</data>
<data name="ColorScheme_AddNewButton.Text" xml:space="preserve">
<value>新增</value>
<comment>Button label that creates a new color scheme.</comment>
@@ -2197,6 +2201,26 @@
<value>關閉多個索引標籤時發出警告</value>
<comment>Header for a control to toggle whether to show a confirm dialog box when closing the application with multiple tabs open.</comment>
</data>
<data name="Globals_ConfirmOnClose.Header" xml:space="preserve">
<value>關閉時警告</value>
<comment>Header for a dropdown controlling when to show a confirmation dialog before closing.</comment>
</data>
<data name="Globals_ConfirmOnClose.HelpText" xml:space="preserve">
<value>控制在關閉索引標籤或視窗之前出現確認對話方塊的時間。[永遠] 會在關閉任何窗格時顯示對話方塊。</value>
<comment>Help text associated with Globals_ConfirmOnClose. "Always" refers to Globals_ConfirmOnCloseAlways.Content.</comment>
</data>
<data name="Globals_ConfirmOnCloseNever.Content" xml:space="preserve">
<value>一律不要</value>
<comment>Option associated with Globals_ConfirmOnClose. "Never" means that the system will never display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAlways.Content" xml:space="preserve">
<value>一律</value>
<comment>Option associated with Globals_ConfirmOnClose. "Always" means that the system will always display a warning when closing.</comment>
</data>
<data name="Globals_ConfirmOnCloseAutomatic.Content" xml:space="preserve">
<value>多個索引標籤或窗格</value>
<comment>Option associated with Globals_ConfirmOnClose. The system will display a warning when multiple tabs or panes are present.</comment>
</data>
<data name="Globals_InputServiceWarning.Header" xml:space="preserve">
<value>停用「觸控式鍵盤和手寫面板服務」時發出警告</value>
</data>

View File

@@ -66,8 +66,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
hstring runtimeObjContext{};
if (const auto profileVM = runtimeObj.try_as<Editor::ProfileViewModel>())
{
// No runtimeObjContext: profile name and icon should be enough
runtimeObjLabel = profileVM.Name();
runtimeObjContext = RS_(L"Nav_Profiles/Content");
}
else if (const auto colorSchemeVM = runtimeObj.try_as<Editor::ColorSchemeViewModel>())
{
@@ -258,6 +258,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
localizedEntry.DisplayTextNeutral = EnglishOnlyResourceLoader().GetLocalizedString(entry.ResourceName);
}
if (!entry.SecondaryLabelResourceName.empty())
{
localizedEntry.SecondaryLabelLocalized = GetLibraryResourceString(entry.SecondaryLabelResourceName);
}
localizedIndex.emplace_back(std::move(localizedEntry));
}
return localizedIndex;
@@ -342,7 +346,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
if (bestScore >= MinimumMatchScore)
{
scoredResults.emplace_back(bestScore, winrt::make<FilteredSearchResult>(index, &entry));
scoredResults.emplace_back(bestScore, winrt::make<FilteredSearchResult>(index, &entry, nullptr, std::nullopt, entry.SecondaryLabelLocalized));
}
}

View File

@@ -20,6 +20,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
winrt::hstring DisplayTextLocalized;
std::optional<winrt::hstring> DisplayTextNeutral = std::nullopt;
// No "Neutral" copy of SecondaryLabelLocalized: unlike DisplayText, the secondary
// label is display-only (rendered in the search result row's caption). It is never
// passed to the fuzzy matcher, so a single localized string is sufficient.
winrt::hstring SecondaryLabelLocalized;
const IndexEntry* Entry = nullptr;
std::array<std::pair<std::optional<winrt::hstring>, int>, 2> GetSearchableFields() const;

View File

@@ -43,6 +43,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
DEFINE_ENUM_MAP(Microsoft::Terminal::Control::TextMeasurement, TextMeasurement);
DEFINE_ENUM_MAP(Microsoft::Terminal::Control::AmbiguousWidth, AmbiguousWidth);
DEFINE_ENUM_MAP(Microsoft::Terminal::Control::WarnAboutMultiLinePaste, WarnAboutMultiLinePaste);
DEFINE_ENUM_MAP(Model::ConfirmOnClose, ConfirmOnClose);
// Profile Settings
DEFINE_ENUM_MAP(Model::CloseOnExitMode, CloseOnExitMode);

View File

@@ -40,6 +40,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Microsoft::Terminal::Control::TextMeasurement> TextMeasurement();
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Microsoft::Terminal::Control::AmbiguousWidth> AmbiguousWidth();
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Microsoft::Terminal::Control::WarnAboutMultiLinePaste> WarnAboutMultiLinePaste();
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, ConfirmOnClose> ConfirmOnClose();
// Profile Settings
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, CloseOnExitMode> CloseOnExitMode();

View File

@@ -22,6 +22,7 @@ namespace Microsoft.Terminal.Settings.Model
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Control.TextMeasurement> TextMeasurement { get; };
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Control.AmbiguousWidth> AmbiguousWidth { get; };
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Control.WarnAboutMultiLinePaste> WarnAboutMultiLinePaste { get; };
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.ConfirmOnClose> ConfirmOnClose { get; };
// Profile Settings
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.CloseOnExitMode> CloseOnExitMode { get; };

View File

@@ -160,7 +160,16 @@ void GlobalAppSettings::LayerJson(const Json::Value& json, const OriginTag origi
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyInputServiceWarningKey, _InputServiceWarning) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyWarnAboutLargePasteKey, _WarnAboutLargePaste) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyWarnAboutMultiLinePasteKey, _WarnAboutMultiLinePaste) || _fixupsAppliedDuringLoad;
_fixupsAppliedDuringLoad = JsonUtils::GetValueForKey(json, LegacyConfirmCloseAllTabsKey, _ConfirmCloseAllTabs) || _fixupsAppliedDuringLoad;
// GH#6549 - Migrate legacy "confirmCloseAllTabs" boolean to the new
// "confirmOnClose" enum. true -> Automatic, false -> Never.
{
std::optional<bool> legacyConfirmClose;
if (JsonUtils::GetValueForKey(json, LegacyConfirmCloseAllTabsKey, legacyConfirmClose))
{
_ConfirmOnClose = legacyConfirmClose.value() ? ConfirmOnClose::Automatic : ConfirmOnClose::Never;
_fixupsAppliedDuringLoad = true;
}
}
#define GLOBAL_SETTINGS_LAYER_JSON(type, name, jsonKey, ...) \
JsonUtils::GetValueForKey(json, jsonKey, _##name); \

View File

@@ -50,6 +50,13 @@ namespace Microsoft.Terminal.Settings.Model
AfterCurrentTab,
};
enum ConfirmOnClose
{
Never = 0,
Automatic = 1,
Always = 2,
};
[default_interface] runtimeclass GlobalAppSettings {
Guid DefaultProfile;
@@ -61,7 +68,7 @@ namespace Microsoft.Terminal.Settings.Model
INHERITABLE_SETTING(Boolean, ShowTabsFullscreen);
INHERITABLE_SETTING(NewTabPosition, NewTabPosition);
INHERITABLE_SETTING(Boolean, ShowTitleInTitlebar);
INHERITABLE_SETTING(Boolean, ConfirmCloseAllTabs);
INHERITABLE_SETTING(ConfirmOnClose, ConfirmOnClose);
INHERITABLE_SETTING(String, Language);
INHERITABLE_SETTING(Microsoft.UI.Xaml.Controls.TabViewWidthMode, TabWidthMode);
INHERITABLE_SETTING(Boolean, UseAcrylicInTabRow);

View File

@@ -38,7 +38,7 @@ Author(s):
X(bool, AlwaysShowTabs, "alwaysShowTabs", true) \
X(Model::NewTabPosition, NewTabPosition, "newTabPosition", Model::NewTabPosition::AfterLastTab) \
X(bool, ShowTitleInTitlebar, "showTerminalTitleInTitlebar", true) \
X(bool, ConfirmCloseAllTabs, "warning.confirmCloseAllTabs", true) \
X(Model::ConfirmOnClose, ConfirmOnClose, "warning.confirmOnClose", Model::ConfirmOnClose::Automatic) \
X(Model::ThemePair, Theme, "theme") \
X(hstring, Language, "language") \
X(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabWidthMode, "tabWidthMode", winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode::Equal) \

View File

@@ -29,6 +29,7 @@ namespace Microsoft.Terminal.Settings.Model
Audible = 0x1,
Window = 0x2,
Taskbar = 0x4,
Notification = 0x8,
All = 0xffffffff
};

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Verbindung neu starten</value>
<value>Sitzung neu starten</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Notizblock öffnen</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Restart connection</value>
<value>Restart session</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Open scratchpad</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Reiniciar conexión</value>
<value>Reiniciar sesión</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Abrir el bloc de notas</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Redémarrer la connexion</value>
<value>Redémarrer la session</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Ouvrir le bloc-notes</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Riavvia connessione</value>
<value>Riavvia la sessione</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Aprire scratchpad</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>接続の再起動</value>
<value>セッションの再開</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>スクラッチパッドを開く</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>연결 다시 시작</value>
<value>세션 다시 시작</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>스크래치 패드 열기</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Reiniciar conexão</value>
<value>Reiniciar sessão</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Abrir o scratchpad</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Ŗ℮ŝţāґт čõʼnлęčŧįоή !!! !!</value>
<value>Ŗ℮ŝţāґт ѕēšŝĭσή !!! !</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Θφěп ŝĉґαŧςђρąδ !!! !</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Ŗ℮ŝţāґт čõʼnлęčŧįоή !!! !!</value>
<value>Ŗ℮ŝţāґт ѕēšŝĭσή !!! !</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Θφěп ŝĉґαŧςђρąδ !!! !</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Ŗ℮ŝţāґт čõʼnлęčŧįоή !!! !!</value>
<value>Ŗ℮ŝţāґт ѕēšŝĭσή !!! !</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Θφěп ŝĉґαŧςђρąδ !!! !</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>Перезапустить подключение</value>
<value>Перезапустить сеанс</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>Открыть временную память</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>重新启动连接</value>
<value>重启会话</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>打开便笺本</value>

View File

@@ -702,7 +702,7 @@
<comment>When enabled, input will go to all panes in this tab simultaneously</comment>
</data>
<data name="RestartConnectionKey" xml:space="preserve">
<value>重新啟動連線</value>
<value>重新啟動工作模式</value>
</data>
<data name="OpenScratchpadKey" xml:space="preserve">
<value>開啟聽寫面板</value>

View File

@@ -88,14 +88,34 @@ JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Core::MatchMode)
};
};
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::ConfirmOnClose)
{
JSON_MAPPINGS(3) = {
pair_type{ "never", ValueType::Never },
pair_type{ "automatic", ValueType::Automatic },
pair_type{ "always", ValueType::Always },
};
auto FromJson(const Json::Value& json)
{
return BaseEnumMapper::FromJson(json);
}
bool CanConvert(const Json::Value& json)
{
return BaseEnumMapper::CanConvert(json);
}
};
JSON_FLAG_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::BellStyle)
{
static constexpr std::array<pair_type, 6> mappings = {
static constexpr std::array<pair_type, 7> mappings = {
pair_type{ "none", AllClear },
pair_type{ "audible", ValueType::Audible },
pair_type{ "visual", ValueType::Window | ValueType::Taskbar },
pair_type{ "window", ValueType::Window },
pair_type{ "taskbar", ValueType::Taskbar },
pair_type{ "notification", ValueType::Notification },
pair_type{ "all", AllSet },
};

View File

@@ -24,7 +24,7 @@
"showAdminShield": true,
// Miscellaneous
"confirmCloseAllTabs": true,
"warning.confirmOnClose": "automatic",
"theme": "dark",
"snapToGridOnResize": true,
"disableAnimations": false,

View File

@@ -1843,6 +1843,15 @@ namespace SettingsModelUnitTests
VERIFY_ARE_EQUAL(settings->ProfileDefaults().HasTabTitle(), copyImpl->ProfileDefaults().HasTabTitle());
VERIFY_ARE_NOT_EQUAL(settings->ProfileDefaults().TabTitle(), copyImpl->ProfileDefaults().TabTitle());
// Verify HasXxx independence: setting a previously-inherited value on the clone
// should make HasXxx true on the clone but remain false on the original.
// SnapOnInput is not set in the JSON, so both should inherit the default.
VERIFY_IS_FALSE(settings->AllProfiles().GetAt(0).HasSnapOnInput());
VERIFY_IS_FALSE(copyImpl->AllProfiles().GetAt(0).HasSnapOnInput());
copyImpl->AllProfiles().GetAt(0).SnapOnInput(false);
VERIFY_IS_FALSE(settings->AllProfiles().GetAt(0).HasSnapOnInput());
VERIFY_IS_TRUE(copyImpl->AllProfiles().GetAt(0).HasSnapOnInput());
Log::Comment(L"Test empty profiles.defaults");
static constexpr std::string_view emptyPDJson{ R"(
{

View File

@@ -31,6 +31,10 @@ namespace SettingsModelUnitTests
TEST_METHOD(TestGenGuidsForProfiles);
TEST_METHOD(TestCorrectOldDefaultShellPaths);
TEST_METHOD(ProfileDefaultsProhibitedSettings);
TEST_METHOD(SettingInheritanceFallback);
TEST_METHOD(ClearSettingRestoresInheritance);
TEST_METHOD(HasSettingAtSpecificLayer);
};
void ProfileTests::ProfileGeneratesGuid()
@@ -532,4 +536,130 @@ namespace SettingsModelUnitTests
VERIFY_ARE_NOT_EQUAL(L"Default Profile Source", allProfiles.GetAt(2).Source());
VERIFY_ARE_NOT_EQUAL(L"foo.exe", allProfiles.GetAt(2).Commandline());
}
void ProfileTests::SettingInheritanceFallback()
{
// Verify that when no layer defines a setting, the default value is used.
// Also verify that when only user defaults defines it, profiles inherit from there.
static constexpr std::string_view userSettings{ R"({
"profiles": {
"defaults": {
"historySize": 5000
},
"list": [
{
"name": "profile0",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
},
{
"name": "profile1",
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
"snapOnInput": false
}
]
}
})" };
const auto settings = winrt::make_self<implementation::CascadiaSettings>(userSettings);
const auto allProfiles = settings->AllProfiles();
VERIFY_ARE_EQUAL(2u, allProfiles.Size());
// profile0: historySize inherited from defaults
VERIFY_ARE_EQUAL(5000, allProfiles.GetAt(0).HistorySize());
// profile0: snapOnInput not set anywhere, falls back to default (true)
VERIFY_ARE_EQUAL(true, allProfiles.GetAt(0).SnapOnInput());
// profile1: historySize inherited from defaults
VERIFY_ARE_EQUAL(5000, allProfiles.GetAt(1).HistorySize());
// profile1: snapOnInput explicitly set to false
VERIFY_ARE_EQUAL(false, allProfiles.GetAt(1).SnapOnInput());
}
void ProfileTests::ClearSettingRestoresInheritance()
{
// Verify that clearing a setting at the profile layer causes it to
// fall back to the parent's value.
static constexpr std::string_view parentString{ R"({
"name": "parent",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"historySize": 1000,
"tabTitle": "ParentTitle"
})" };
static constexpr std::string_view childString{ R"({
"name": "child",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"historySize": 2000,
"tabTitle": "ChildTitle"
})" };
const auto parentJson = VerifyParseSucceeded(parentString);
const auto childJson = VerifyParseSucceeded(childString);
auto parent = implementation::Profile::FromJson(parentJson);
auto child = parent->CreateChild();
child->LayerJson(childJson);
// Verify child has its own values
VERIFY_ARE_EQUAL(2000, child->HistorySize());
VERIFY_ARE_EQUAL(L"ChildTitle", child->TabTitle());
VERIFY_IS_TRUE(child->HasHistorySize());
VERIFY_IS_TRUE(child->HasTabTitle());
// Clear historySize on child: should fall back to parent
child->ClearHistorySize();
VERIFY_IS_FALSE(child->HasHistorySize());
VERIFY_ARE_EQUAL(1000, child->HistorySize());
// Clear tabTitle on child: should fall back to parent
child->ClearTabTitle();
VERIFY_IS_FALSE(child->HasTabTitle());
VERIFY_ARE_EQUAL(L"ParentTitle", child->TabTitle());
}
void ProfileTests::HasSettingAtSpecificLayer()
{
// Verify that HasXxx() correctly reports whether a setting is defined
// at the current layer vs inherited from a parent.
static constexpr std::string_view userSettings{ R"({
"profiles": {
"defaults": {
"historySize": 5000,
"tabTitle": "DefaultTitle"
},
"list": [
{
"name": "profile0",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"historySize": 9001
},
{
"name": "profile1",
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}"
}
]
}
})" };
const auto settings = winrt::make_self<implementation::CascadiaSettings>(userSettings);
const auto allProfiles = settings->AllProfiles();
VERIFY_ARE_EQUAL(2u, allProfiles.Size());
// profile0: historySize is explicitly set
VERIFY_IS_TRUE(allProfiles.GetAt(0).HasHistorySize());
VERIFY_ARE_EQUAL(9001, allProfiles.GetAt(0).HistorySize());
// profile0: tabTitle is NOT set at this layer (inherited from defaults)
VERIFY_IS_FALSE(allProfiles.GetAt(0).HasTabTitle());
VERIFY_ARE_EQUAL(L"DefaultTitle", allProfiles.GetAt(0).TabTitle());
// profile1: historySize is NOT set at this layer (inherited from defaults)
VERIFY_IS_FALSE(allProfiles.GetAt(1).HasHistorySize());
VERIFY_ARE_EQUAL(5000, allProfiles.GetAt(1).HistorySize());
// ProfileDefaults: historySize is set
VERIFY_IS_TRUE(settings->ProfileDefaults().HasHistorySize());
VERIFY_ARE_EQUAL(5000, settings->ProfileDefaults().HistorySize());
}
}

View File

@@ -60,6 +60,12 @@ namespace SettingsModelUnitTests
TEST_METHOD(ProfileWithInvalidIcon);
TEST_METHOD(ModifyProfileSettingAndRoundtrip);
TEST_METHOD(ModifyGlobalSettingAndRoundtrip);
TEST_METHOD(ModifyColorSchemeAndRoundtrip);
TEST_METHOD(FixupUserSettingsDetectsChanges);
TEST_METHOD(FixupCommandlinePatching);
private:
// Method Description:
// - deserializes and reserializes a json string representing a settings object model of type T
@@ -125,7 +131,7 @@ namespace SettingsModelUnitTests
"trimPaste": true,
"warning.confirmCloseAllTabs" : true,
"warning.confirmOnClose": "automatic",
"warning.inputService" : true,
"warning.largePaste" : true,
"warning.multiLinePaste" : "automatic",
@@ -1325,4 +1331,288 @@ namespace SettingsModelUnitTests
// what was written in the settings file.
VERIFY_ARE_EQUAL(R"(c:\this_icon_had_better_not_exist.tiff)", newResult["profiles"]["list"][0]["icon"].asString());
}
void SerializationTests::ModifyProfileSettingAndRoundtrip()
{
// Load settings, modify a profile setting via setter, serialize,
// and verify the JSON output reflects the change.
static constexpr std::string_view settingsJson{ R"(
{
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"profiles": [
{
"name": "profile0",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"historySize": 1000,
"commandline": "cmd.exe"
}
]
})" };
const auto settings{ winrt::make_self<implementation::CascadiaSettings>(settingsJson) };
// Verify initial value
VERIFY_ARE_EQUAL(1000, settings->AllProfiles().GetAt(0).HistorySize());
// Modify the setting
settings->AllProfiles().GetAt(0).HistorySize(5000);
VERIFY_ARE_EQUAL(5000, settings->AllProfiles().GetAt(0).HistorySize());
// Serialize and verify the change is reflected in JSON
const auto result{ settings->ToJson() };
VERIFY_ARE_EQUAL(5000, result["profiles"]["list"][0]["historySize"].asInt());
// Verify other settings are preserved
VERIFY_ARE_EQUAL("cmd.exe", result["profiles"]["list"][0]["commandline"].asString());
// Also verify: modify a setting that wasn't previously set
settings->AllProfiles().GetAt(0).TabTitle(L"NewTitle");
const auto result2{ settings->ToJson() };
VERIFY_ARE_EQUAL("NewTitle", result2["profiles"]["list"][0]["tabTitle"].asString());
}
void SerializationTests::ModifyGlobalSettingAndRoundtrip()
{
// Load settings, modify a global setting, serialize, verify JSON.
static constexpr std::string_view settingsJson{ R"(
{
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"initialRows": 30,
"alwaysOnTop": false,
"profiles": [
{
"name": "profile0",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
}
]
})" };
const auto settings{ winrt::make_self<implementation::CascadiaSettings>(settingsJson) };
// Verify initial values
VERIFY_ARE_EQUAL(30, settings->GlobalSettings().InitialRows());
VERIFY_ARE_EQUAL(false, settings->GlobalSettings().AlwaysOnTop());
// Modify global settings
settings->GlobalSettings().InitialRows(50);
settings->GlobalSettings().AlwaysOnTop(true);
// Verify in-memory changes
VERIFY_ARE_EQUAL(50, settings->GlobalSettings().InitialRows());
VERIFY_ARE_EQUAL(true, settings->GlobalSettings().AlwaysOnTop());
// Serialize and verify
const auto result{ settings->ToJson() };
VERIFY_ARE_EQUAL(50, result["initialRows"].asInt());
VERIFY_ARE_EQUAL(true, result["alwaysOnTop"].asBool());
}
void SerializationTests::ModifyColorSchemeAndRoundtrip()
{
// Load settings with a user color scheme, modify it, serialize, verify.
static constexpr std::string_view settingsJson{ R"(
{
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"profiles": [
{
"name": "profile0",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
}
],
"schemes": [
{
"name": "MyScheme",
"foreground": "#CCCCCC",
"background": "#0C0C0C",
"cursorColor": "#FFFFFF",
"black": "#0C0C0C",
"red": "#C50F1F",
"green": "#13A10E",
"yellow": "#C19C00",
"blue": "#0037DA",
"purple": "#881798",
"cyan": "#3A96DD",
"white": "#CCCCCC",
"brightBlack": "#767676",
"brightRed": "#E74856",
"brightGreen": "#16C60C",
"brightYellow": "#F9F1A5",
"brightBlue": "#3B78FF",
"brightPurple": "#B4009E",
"brightCyan": "#61D6D6",
"brightWhite": "#F2F2F2"
}
]
})" };
const auto settings{ winrt::make_self<implementation::CascadiaSettings>(settingsJson) };
// Find and modify the color scheme
const auto schemes = settings->GlobalSettings().ColorSchemes();
VERIFY_IS_TRUE(schemes.HasKey(L"MyScheme"));
auto myScheme = schemes.Lookup(L"MyScheme");
const auto origForeground = myScheme.Foreground();
myScheme.Foreground(til::color{ 0xAA, 0xBB, 0xCC });
// Serialize and verify the change persists
const auto result{ settings->ToJson() };
const auto& schemesJson = result["schemes"];
bool found = false;
for (const auto& scheme : schemesJson)
{
if (scheme["name"].asString() == "MyScheme")
{
VERIFY_ARE_EQUAL("#AABBCC", scheme["foreground"].asString());
found = true;
break;
}
}
VERIFY_IS_TRUE(found, L"MyScheme should be present in serialized output");
}
void SerializationTests::FixupUserSettingsDetectsChanges()
{
// Verify that FixupUserSettings returns true when settings need
// to be written back (e.g., migration), and false when clean.
static constexpr std::string_view cleanSettingsJson{ R"(
{
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"profiles": [
{
"name": "profile0",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"commandline": "cmd.exe"
}
]
})" };
// Load, fixup, serialize. Reload and verify fixup returns false.
implementation::SettingsLoader loader1{ cleanSettingsJson, implementation::LoadStringResource(IDR_DEFAULTS) };
loader1.MergeInboxIntoUserSettings();
loader1.FinalizeLayering();
loader1.FixupUserSettings();
const auto settings1 = winrt::make_self<implementation::CascadiaSettings>(std::move(loader1));
const auto result1{ settings1->ToJson() };
// Reload from the serialized output (should be stable)
implementation::SettingsLoader loader2{ toString(result1), implementation::LoadStringResource(IDR_DEFAULTS) };
loader2.MergeInboxIntoUserSettings();
loader2.FinalizeLayering();
const auto fixupNeeded = loader2.FixupUserSettings();
// After a clean roundtrip, no further fixups should be needed
VERIFY_IS_FALSE(fixupNeeded, L"A clean roundtrip should not require further fixups");
}
void SerializationTests::FixupCommandlinePatching()
{
// Verify that FixupUserSettings patches "cmd.exe" to the full path
// for the Command Prompt profile, and "powershell.exe" for the
// Windows PowerShell profile, and returns true to indicate changes.
// Case 1: CMD profile with short commandline should be patched
static constexpr std::string_view cmdSettingsJson{ R"(
{
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"profiles": [
{
"name": "Command Prompt",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"commandline": "cmd.exe"
}
]
})" };
{
implementation::SettingsLoader loader{ cmdSettingsJson, implementation::LoadStringResource(IDR_DEFAULTS) };
loader.MergeInboxIntoUserSettings();
loader.FinalizeLayering();
const auto fixupNeeded = loader.FixupUserSettings();
VERIFY_IS_TRUE(fixupNeeded, L"FixupUserSettings should return true when cmd.exe is patched");
const auto settings = winrt::make_self<implementation::CascadiaSettings>(std::move(loader));
const auto cmdProfile = settings->FindProfile(Utils::GuidFromString(L"{0caa0dad-35be-5f56-a8ff-afceeeaa6101}"));
VERIFY_IS_NOT_NULL(cmdProfile);
VERIFY_ARE_EQUAL(L"%SystemRoot%\\System32\\cmd.exe", cmdProfile.Commandline());
}
// Case 2: PowerShell profile with short commandline should be patched
static constexpr std::string_view psSettingsJson{ R"(
{
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles": [
{
"name": "Windows PowerShell",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"commandline": "powershell.exe"
}
]
})" };
{
implementation::SettingsLoader loader{ psSettingsJson, implementation::LoadStringResource(IDR_DEFAULTS) };
loader.MergeInboxIntoUserSettings();
loader.FinalizeLayering();
const auto fixupNeeded = loader.FixupUserSettings();
VERIFY_IS_TRUE(fixupNeeded, L"FixupUserSettings should return true when powershell.exe is patched");
const auto settings = winrt::make_self<implementation::CascadiaSettings>(std::move(loader));
const auto psProfile = settings->FindProfile(Utils::GuidFromString(L"{61c54bbd-c2c6-5271-96e7-009a87ff44bf}"));
VERIFY_IS_NOT_NULL(psProfile);
VERIFY_ARE_EQUAL(L"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", psProfile.Commandline());
}
// Case 3: CMD profile with the full path should NOT trigger fixup
static constexpr std::string_view cleanCmdSettingsJson{ R"(
{
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"profiles": [
{
"name": "Command Prompt",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}"
}
]
})" };
{
implementation::SettingsLoader loader{ cleanCmdSettingsJson, implementation::LoadStringResource(IDR_DEFAULTS) };
loader.MergeInboxIntoUserSettings();
loader.FinalizeLayering();
const auto fixupNeeded = loader.FixupUserSettings();
VERIFY_IS_FALSE(fixupNeeded, L"FixupUserSettings should return false when no patching is needed");
const auto settings = winrt::make_self<implementation::CascadiaSettings>(std::move(loader));
const auto cmdProfile = settings->FindProfile(Utils::GuidFromString(L"{0caa0dad-35be-5f56-a8ff-afceeeaa6101}"));
VERIFY_IS_NOT_NULL(cmdProfile);
// Should still resolve to the full path via inbox defaults
VERIFY_ARE_EQUAL(L"%SystemRoot%\\System32\\cmd.exe", cmdProfile.Commandline());
}
// Case 4: A non-builtin profile with "cmd.exe" should NOT be patched
static constexpr std::string_view customCmdSettingsJson{ R"(
{
"defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"profiles": [
{
"name": "My Custom CMD",
"guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
"commandline": "cmd.exe"
}
]
})" };
{
implementation::SettingsLoader loader{ customCmdSettingsJson, implementation::LoadStringResource(IDR_DEFAULTS) };
loader.MergeInboxIntoUserSettings();
loader.FinalizeLayering();
loader.FixupUserSettings();
const auto settings = winrt::make_self<implementation::CascadiaSettings>(std::move(loader));
const auto customProfile = settings->FindProfile(Utils::GuidFromString(L"{6239a42c-0000-49a3-80bd-e8fdd045185c}"));
VERIFY_IS_NOT_NULL(customProfile);
// Custom profile should keep "cmd.exe" unchanged
VERIFY_ARE_EQUAL(L"cmd.exe", customProfile.Commandline());
}
}
}

View File

@@ -265,6 +265,7 @@ void AppHost::Initialize()
_revokers.IsQuakeWindowChanged = _windowLogic.IsQuakeWindowChanged(winrt::auto_revoke, { this, &AppHost::_IsQuakeWindowChanged });
_revokers.SummonWindowRequested = _windowLogic.SummonWindowRequested(winrt::auto_revoke, { this, &AppHost::_SummonWindowRequested });
_revokers.FocusTabRequested = _windowLogic.FocusTabRequested(winrt::auto_revoke, { this, &AppHost::_FocusTabRequested });
_revokers.OpenSystemMenu = _windowLogic.OpenSystemMenu(winrt::auto_revoke, { this, &AppHost::_OpenSystemMenu });
_revokers.QuitRequested = _windowLogic.QuitRequested(winrt::auto_revoke, { this, &AppHost::_RequestQuitAll });
_revokers.ShowWindowChanged = _windowLogic.ShowWindowChanged(winrt::auto_revoke, { this, &AppHost::_ShowWindowChanged });
@@ -1064,6 +1065,14 @@ void AppHost::_SummonWindowRequested(const winrt::Windows::Foundation::IInspecta
HandleSummon(std::move(summonArgs));
}
void AppHost::_FocusTabRequested(const winrt::Windows::Foundation::IInspectable&,
const winrt::TerminalApp::Tab& tab)
{
// The tab may have moved to another window. Ask the emperor to
// search all windows and focus the tab wherever it currently lives.
_windowManager->FocusTabInAnyWindow(tab);
}
void AppHost::_OpenSystemMenu(const winrt::Windows::Foundation::IInspectable&,
const winrt::Windows::Foundation::IInspectable&)
{

View File

@@ -91,6 +91,9 @@ private:
void _SummonWindowRequested(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& args);
void _FocusTabRequested(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::TerminalApp::Tab& tab);
void _OpenSystemMenu(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Windows::Foundation::IInspectable& args);
@@ -151,6 +154,7 @@ private:
winrt::TerminalApp::TerminalWindow::IdentifyWindowsRequested_revoker IdentifyWindowsRequested;
winrt::TerminalApp::TerminalWindow::IsQuakeWindowChanged_revoker IsQuakeWindowChanged;
winrt::TerminalApp::TerminalWindow::SummonWindowRequested_revoker SummonWindowRequested;
winrt::TerminalApp::TerminalWindow::FocusTabRequested_revoker FocusTabRequested;
winrt::TerminalApp::TerminalWindow::OpenSystemMenu_revoker OpenSystemMenu;
winrt::TerminalApp::TerminalWindow::QuitRequested_revoker QuitRequested;
winrt::TerminalApp::TerminalWindow::ShowWindowChanged_revoker ShowWindowChanged;

Some files were not shown because too many files have changed in this diff Show More