f6f5598c9c
Right now, we store GUIDs in panes and most of the functions for interacting with profiles on the settings model take GUIDs and look up profiles. This pull request changes how we store and look up profiles to prefer profile objects. Panes store strong references to their originating profiles, which simplifies settings lookup for CloseOnExit and the bell settings. In fact, deleting a pane's profile no longer causes it to forget which CloseOnExit setting applies to it. Duplicating a pane that is hosting a deleted profile (#5047) now duplicates the profile, even though it is otherwise unreachable. This makes the world more consistent and allows us to _eventually_ support panes hosting profiles that do not have GUIDs that can be looked up in the profile list. This is a gateway to #6776 and #10669, and consolidating the profile lookup logic will help with #10952. PR #10588 introduced TerminalSettings::CreateWithProfile and made ...CreateWithProfileByID a thin wrapper over top it, which looked up the profile by GUID before proceeding. It has also been removed, as its last caller is gone. Closes #5047
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
import "GlobalAppSettings.idl";
|
|
import "Profile.idl";
|
|
import "TerminalWarnings.idl";
|
|
import "DefaultTerminal.idl";
|
|
|
|
namespace Microsoft.Terminal.Settings.Model
|
|
{
|
|
[default_interface] runtimeclass CascadiaSettings {
|
|
CascadiaSettings(String json);
|
|
CascadiaSettings Copy();
|
|
|
|
void WriteSettingsToDisk();
|
|
|
|
static CascadiaSettings LoadDefaults();
|
|
static CascadiaSettings LoadAll();
|
|
static CascadiaSettings LoadUniversal();
|
|
|
|
static String SettingsPath { get; };
|
|
static String DefaultSettingsPath { get; };
|
|
|
|
static String ApplicationDisplayName { get; };
|
|
static String ApplicationVersion { get; };
|
|
|
|
GlobalAppSettings GlobalSettings { get; };
|
|
|
|
Profile ProfileDefaults { get; };
|
|
|
|
Windows.Foundation.Collections.IObservableVector<Profile> AllProfiles { get; };
|
|
Windows.Foundation.Collections.IObservableVector<Profile> ActiveProfiles { get; };
|
|
|
|
Profile DuplicateProfile(Profile sourceProfile);
|
|
|
|
ActionMap ActionMap { get; };
|
|
|
|
Windows.Foundation.Collections.IVectorView<SettingsLoadWarnings> Warnings { get; };
|
|
Windows.Foundation.IReference<SettingsLoadErrors> GetLoadingError { get; };
|
|
String GetSerializationErrorMessage { get; };
|
|
|
|
Profile CreateNewProfile();
|
|
Profile FindProfile(Guid profileGuid);
|
|
ColorScheme GetColorSchemeForProfile(Profile profile);
|
|
void UpdateColorSchemeReferences(String oldName, String newName);
|
|
|
|
Profile GetProfileForArgs(NewTerminalArgs newTerminalArgs);
|
|
|
|
void RefreshDefaultTerminals();
|
|
static Boolean IsDefaultTerminalAvailable { get; };
|
|
Windows.Foundation.Collections.IObservableVector<DefaultTerminal> DefaultTerminals { get; };
|
|
DefaultTerminal CurrentDefaultTerminal;
|
|
}
|
|
}
|