Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert TerminalSettingsEditor into a DLL #7675

Merged
3 commits merged into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/cascadia/TerminalApp/TerminalAppLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
</Reference>
<Reference Include="Microsoft.Terminal.Settings.Editor">
<HintPath>$(_BinRoot)TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
</Reference>
</ItemGroup>
<!-- ====================== Compiler & Linker Flags ===================== -->
<ItemDefinitionGroup>
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/dll/TerminalApp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
include Settings and Connection, since Control will include them for us) -->
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsEditor\TerminalSettingsEditor.vcxproj" />
<!-- Reference TerminalAppLib here, so we can use it's TerminalApp.winmd as
our TerminalApp.winmd. This didn't work correctly in VS2017, you'd need to
manually reference the lib -->
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ TRACELOGGING_DECLARE_PROVIDER(g_hTerminalAppProvider);
#include <shellapi.h>

#include <winrt/Microsoft.Terminal.TerminalConnection.h>
#include <winrt/Microsoft.Terminal.Settings.Editor.h>
#include <winrt/Windows.UI.Popups.h>

#include <CLI11/CLI11.hpp>
Expand Down
129 changes: 0 additions & 129 deletions src/cascadia/TerminalSettingsEditor/App.cpp

This file was deleted.

17 changes: 0 additions & 17 deletions src/cascadia/TerminalSettingsEditor/App.h

This file was deleted.

6 changes: 0 additions & 6 deletions src/cascadia/TerminalSettingsEditor/App.idl

This file was deleted.

33 changes: 0 additions & 33 deletions src/cascadia/TerminalSettingsEditor/App.xaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsEditor/ColorSchemes.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ namespace Microsoft.Terminal.Settings.Editor
[default_interface] runtimeclass ColorSchemes : Windows.UI.Xaml.Controls.Page
{
ColorSchemes();
Microsoft.Terminal.Settings.Model.ColorSchemeModel ColorSchemeModel { get; };
Microsoft.Terminal.Settings.Editor.Model.ColorSchemeModel ColorSchemeModel { get; };
}
}
20 changes: 20 additions & 0 deletions src/cascadia/TerminalSettingsEditor/CommonResources.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Terminal.Settings.Editor">

<Style x:Key="GridViewItemStyle" TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,12,12" />
</Style>
<Style x:Key="IndentedGridViewItemStyle" TargetType="GridViewItem">
<Setter Property="Margin" Value="12,0,0,12" />
</Style>
<Style x:Key="GridViewItemStyleSmall" TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,0,12" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
<Style x:Key="IndentedGridViewItemStyleSmall" TargetType="GridViewItem">
<Setter Property="Margin" Value="12,0,12,12" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsEditor/GlobalAppearance.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ namespace Microsoft.Terminal.Settings.Editor
[default_interface] runtimeclass GlobalAppearance : Windows.UI.Xaml.Controls.Page
{
GlobalAppearance();
Microsoft.Terminal.Settings.Model.GlobalSettingsModel GlobalSettingsModel { get; };
Microsoft.Terminal.Settings.Editor.Model.GlobalSettingsModel GlobalSettingsModel { get; };
}
}
8 changes: 8 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Home.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ the MIT License. See LICENSE in the project root for license information. -->
xmlns:Controls="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">

<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CommonResources.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>

<Frame x:Name="frame">
<Frame.ContentTransitions>
<TransitionCollection>
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsEditor/Interaction.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ namespace Microsoft.Terminal.Settings.Editor
{
Interaction();

Microsoft.Terminal.Settings.Model.GlobalSettingsModel GlobalSettingsModel { get; };
Microsoft.Terminal.Settings.Editor.Model.GlobalSettingsModel GlobalSettingsModel { get; };
}
}
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsEditor/Launch.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ namespace Microsoft.Terminal.Settings.Editor
{
Launch();

Microsoft.Terminal.Settings.Model.GlobalSettingsModel GlobalSettingsModel { get; };
Microsoft.Terminal.Settings.Editor.Model.GlobalSettingsModel GlobalSettingsModel { get; };
}
}
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsEditor/MainPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace winrt

using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::UI::Xaml;
using namespace winrt::Microsoft::Terminal::Settings::Model::implementation;
using namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation;

namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
the MIT License. See LICENSE in the project root for license information. -->
<Page
<Grid
x:Class="Microsoft.Terminal.Settings.Editor.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -175,4 +175,4 @@ the MIT License. See LICENSE in the project root for license information. -->
Margin="20"></Frame>
</muxc:NavigationView>
</Grid>
</Page>
</Grid>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "pch.h"
#include "AppSettings.h"

using namespace winrt::Microsoft::Terminal::Settings::Model::implementation;
using namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation;

// uncomment and edit these to test data binding

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "GlobalSettings.h"
#include "Profile.h"

namespace winrt::Microsoft::Terminal::Settings::Model::implementation
namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation
{
enum class Modifiers
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "pch.h"
#include "ColorScheme.h"
#include "Microsoft.Terminal.Settings.Model.ColorScheme.g.cpp"
#include "Model.ColorScheme.g.cpp"

using namespace winrt;
using namespace winrt::Windows::UI;
using namespace winrt::Windows::UI::Core;
using namespace winrt::Windows::UI::Xaml::Data;
using namespace winrt::Windows::UI::Xaml::Media;

namespace winrt::Microsoft::Terminal::Settings::Model::implementation
namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation
{
ColorScheme::ColorScheme()
{
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/ObjectModel/ColorScheme.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "Microsoft.Terminal.Settings.Model.ColorScheme.g.h"
#include "Model.ColorScheme.g.h"

namespace winrt::Microsoft::Terminal::Settings::Model::implementation
namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation
{
struct ColorScheme : ColorSchemeT<ColorScheme>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Microsoft.Terminal.Settings.Model
namespace Microsoft.Terminal.Settings.Editor.Model
{
runtimeclass ColorScheme : Windows.UI.Xaml.Data.INotifyPropertyChanged
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "pch.h"
#include "ColorScheme.h"
#include "Microsoft.Terminal.Settings.Model.ColorSchemeModel.g.cpp"
#include "Model.ColorSchemeModel.g.cpp"
#include "ColorSchemeModel.h"

namespace winrt::Microsoft::Terminal::Settings::Model::implementation
namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation
{
ColorSchemeModel::ColorSchemeModel()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include "Microsoft.Terminal.Settings.Model.ColorSchemeModel.g.h"
#include "Model.ColorSchemeModel.g.h"
#include "ColorScheme.h"

namespace winrt::Microsoft::Terminal::Settings::Model::implementation
namespace winrt::Microsoft::Terminal::Settings::Editor::Model::implementation
{
struct ColorSchemeModel : ColorSchemeModelT<ColorSchemeModel>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "ObjectModel/ColorScheme.idl";

namespace Microsoft.Terminal.Settings.Model
namespace Microsoft.Terminal.Settings.Editor.Model
{
runtimeclass ColorSchemeModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "pch.h"
#include "GlobalSettings.h"
#include "Microsoft.Terminal.Settings.Model.GlobalSettings.g.cpp"
#include "Model.GlobalSettings.g.cpp"
Loading