Skip to content

Commit 5fd1100

Browse files
committed
Rename this, so the code doesn't reflect the old name
1 parent e923513 commit 5fd1100

File tree

8 files changed

+33
-34
lines changed

8 files changed

+33
-34
lines changed

src/cascadia/TerminalApp/AppActionHandlers.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#include "TerminalPage.h"
88
#include "ScratchpadContent.h"
9-
#include "TasksPaneContent.h"
109
#include "../WinRTUtils/inc/WtExeUtils.h"
1110
#include "../../types/inc/utils.hpp"
1211
#include "Utils.h"

src/cascadia/TerminalApp/TasksPaneContent.cpp renamed to src/cascadia/TerminalApp/SnippetsPaneContent.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the MIT license.
33

44
#include "pch.h"
5-
#include "TasksPaneContent.h"
6-
#include "TasksPaneContent.g.cpp"
5+
#include "SnippetsPaneContent.h"
6+
#include "SnippetsPaneContent.g.cpp"
77
#include "FilteredTask.g.cpp"
88

99
using namespace winrt::Windows::Foundation;
@@ -19,7 +19,7 @@ namespace winrt
1919

2020
namespace winrt::TerminalApp::implementation
2121
{
22-
TasksPaneContent::TasksPaneContent()
22+
SnippetsPaneContent::SnippetsPaneContent()
2323
{
2424
InitializeComponent();
2525

@@ -28,7 +28,7 @@ namespace winrt::TerminalApp::implementation
2828
Background(bg.try_as<WUX::Media::Brush>());
2929
}
3030

31-
void TasksPaneContent::_updateFilteredCommands()
31+
void SnippetsPaneContent::_updateFilteredCommands()
3232
{
3333
const auto& queryString = _filterBox().Text();
3434

@@ -41,7 +41,7 @@ namespace winrt::TerminalApp::implementation
4141
}
4242
}
4343

44-
void TasksPaneContent::UpdateSettings(const CascadiaSettings& settings)
44+
void SnippetsPaneContent::UpdateSettings(const CascadiaSettings& settings)
4545
{
4646
_settings = settings;
4747

@@ -62,53 +62,53 @@ namespace winrt::TerminalApp::implementation
6262
_updateFilteredCommands();
6363
}
6464

65-
void TasksPaneContent::_filterTextChanged(const IInspectable& /*sender*/,
66-
const Windows::UI::Xaml::RoutedEventArgs& /*args*/)
65+
void SnippetsPaneContent::_filterTextChanged(const IInspectable& /*sender*/,
66+
const Windows::UI::Xaml::RoutedEventArgs& /*args*/)
6767
{
6868
_updateFilteredCommands();
6969
}
7070

71-
winrt::Windows::UI::Xaml::FrameworkElement TasksPaneContent::GetRoot()
71+
winrt::Windows::UI::Xaml::FrameworkElement SnippetsPaneContent::GetRoot()
7272
{
7373
return *this;
7474
}
75-
winrt::Windows::Foundation::Size TasksPaneContent::MinimumSize()
75+
winrt::Windows::Foundation::Size SnippetsPaneContent::MinimumSize()
7676
{
7777
return { 1, 1 };
7878
}
79-
void TasksPaneContent::Focus(winrt::Windows::UI::Xaml::FocusState reason)
79+
void SnippetsPaneContent::Focus(winrt::Windows::UI::Xaml::FocusState reason)
8080
{
8181
reason;
8282
// _box.Focus(reason);
8383
}
84-
void TasksPaneContent::Close()
84+
void SnippetsPaneContent::Close()
8585
{
8686
CloseRequested.raise(*this, nullptr);
8787
}
8888

89-
INewContentArgs TasksPaneContent::GetNewTerminalArgs(BuildStartupKind /*kind*/) const
89+
INewContentArgs SnippetsPaneContent::GetNewTerminalArgs(BuildStartupKind /*kind*/) const
9090
{
9191
return BaseContentArgs(L"snippets");
9292
}
9393

94-
winrt::hstring TasksPaneContent::Icon() const
94+
winrt::hstring SnippetsPaneContent::Icon() const
9595
{
9696
static constexpr std::wstring_view glyph{ L"\xe70b" }; // QuickNote
9797
return winrt::hstring{ glyph };
9898
}
9999

100-
winrt::Windows::UI::Xaml::Media::Brush TasksPaneContent::BackgroundBrush()
100+
winrt::Windows::UI::Xaml::Media::Brush SnippetsPaneContent::BackgroundBrush()
101101
{
102102
return Background();
103103
}
104104

105-
void TasksPaneContent::SetLastActiveControl(const Microsoft::Terminal::Control::TermControl& control)
105+
void SnippetsPaneContent::SetLastActiveControl(const Microsoft::Terminal::Control::TermControl& control)
106106
{
107107
_control = control;
108108
}
109109

110-
void TasksPaneContent::_runCommandButtonClicked(const Windows::Foundation::IInspectable& sender,
111-
const Windows::UI::Xaml::RoutedEventArgs&)
110+
void SnippetsPaneContent::_runCommandButtonClicked(const Windows::Foundation::IInspectable& sender,
111+
const Windows::UI::Xaml::RoutedEventArgs&)
112112
{
113113
if (const auto& taskVM{ sender.try_as<WUX::Controls::Button>().DataContext().try_as<FilteredTask>() })
114114
{

src/cascadia/TerminalApp/TasksPaneContent.h renamed to src/cascadia/TerminalApp/SnippetsPaneContent.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
// Licensed under the MIT license.
33

44
#pragma once
5-
#include "TasksPaneContent.g.h"
5+
#include "SnippetsPaneContent.g.h"
66
#include "FilteredTask.g.h"
77
#include "FilteredCommand.h"
88
#include "ActionPaletteItem.h"
99
#include <LibraryResources.h>
1010

1111
namespace winrt::TerminalApp::implementation
1212
{
13-
struct TasksPaneContent : TasksPaneContentT<TasksPaneContent>
13+
struct SnippetsPaneContent : SnippetsPaneContentT<SnippetsPaneContent>
1414
{
15-
TasksPaneContent();
15+
SnippetsPaneContent();
1616

1717
winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
1818

@@ -45,7 +45,7 @@ namespace winrt::TerminalApp::implementation
4545
til::typed_event<winrt::Windows::Foundation::IInspectable, Microsoft::Terminal::Settings::Model::Command> DispatchCommandRequested;
4646

4747
private:
48-
friend struct TasksPaneContentT<TasksPaneContent>; // for Xaml to bind events
48+
friend struct SnippetsPaneContentT<SnippetsPaneContent>; // for Xaml to bind events
4949

5050
winrt::weak_ref<Microsoft::Terminal::Control::TermControl> _control{ nullptr };
5151
winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings _settings{ nullptr };
@@ -136,5 +136,5 @@ namespace winrt::TerminalApp::implementation
136136

137137
namespace winrt::TerminalApp::factory_implementation
138138
{
139-
BASIC_FACTORY(TasksPaneContent);
139+
BASIC_FACTORY(SnippetsPaneContent);
140140
}

src/cascadia/TerminalApp/TasksPaneContent.xaml renamed to src/cascadia/TerminalApp/SnippetsPaneContent.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
33
the MIT License. See LICENSE in the project root for license information.
44
-->
5-
<UserControl x:Class="TerminalApp.TasksPaneContent"
5+
<UserControl x:Class="TerminalApp.SnippetsPaneContent"
66
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
77
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
88
xmlns:SettingsModel="using:Microsoft.Terminal.Settings.Model"

src/cascadia/TerminalApp/TerminalAppLib.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<Page Include="SuggestionsControl.xaml">
7272
<SubType>Designer</SubType>
7373
</Page>
74-
<Page Include="TasksPaneContent.xaml">
74+
<Page Include="SnippetsPaneContent.xaml">
7575
<SubType>Designer</SubType>
7676
</Page>
7777
</ItemGroup>
@@ -164,8 +164,8 @@
164164
<ClInclude Include="ScratchpadContent.h">
165165
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
166166
</ClInclude>
167-
<ClInclude Include="TasksPaneContent.h">
168-
<DependentUpon>TasksPaneContent.xaml</DependentUpon>
167+
<ClInclude Include="SnippetsPaneContent.h">
168+
<DependentUpon>SnippetsPaneContent.xaml</DependentUpon>
169169
</ClInclude>
170170
<ClInclude Include="SettingsPaneContent.h">
171171
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
@@ -280,8 +280,8 @@
280280
<ClCompile Include="ScratchpadContent.cpp">
281281
<DependentUpon>TerminalPaneContent.idl</DependentUpon>
282282
</ClCompile>
283-
<ClCompile Include="TasksPaneContent.cpp">
284-
<DependentUpon>TasksPaneContent.xaml</DependentUpon>
283+
<ClCompile Include="SnippetsPaneContent.cpp">
284+
<DependentUpon>SnippetsPaneContent.xaml</DependentUpon>
285285
</ClCompile>
286286
<ClCompile Include="SettingsPaneContent.cpp">
287287
<DependentUpon>TerminalPaneContent.idl</DependentUpon>

src/cascadia/TerminalApp/TerminalPage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "DebugTapConnection.h"
2424
#include "SettingsPaneContent.h"
2525
#include "ScratchpadContent.h"
26-
#include "TasksPaneContent.h"
26+
#include "SnippetsPaneContent.h"
2727
#include "TabRowControl.h"
2828
#include "Utils.h"
2929

@@ -3183,7 +3183,7 @@ namespace winrt::TerminalApp::implementation
31833183
}
31843184
else if (paneType == L"snippets")
31853185
{
3186-
const auto& tasksContent{ winrt::make_self<TasksPaneContent>() };
3186+
const auto& tasksContent{ winrt::make_self<SnippetsPaneContent>() };
31873187
tasksContent->UpdateSettings(_settings);
31883188
tasksContent->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
31893189
tasksContent->DispatchCommandRequested({ this, &TerminalPage::_OnDispatchCommandRequested });

src/cascadia/TerminalApp/TerminalPaneContent.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ namespace TerminalApp
2626
Windows.UI.Xaml.Visibility Visibility { get; };
2727
}
2828

29-
[default_interface] runtimeclass TasksPaneContent : Windows.UI.Xaml.Controls.UserControl, IPaneContent
29+
[default_interface] runtimeclass SnippetsPaneContent : Windows.UI.Xaml.Controls.UserControl, IPaneContent
3030
{
31-
TasksPaneContent();
31+
SnippetsPaneContent();
3232
void SetLastActiveControl(Microsoft.Terminal.Control.TermControl control);
3333

3434
event Windows.Foundation.TypedEventHandler<Object, Microsoft.Terminal.Settings.Model.Command> DispatchCommandRequested;

src/cascadia/TerminalApp/TerminalTab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ namespace winrt::TerminalApp::implementation
12551255
{
12561256
const auto& termControl{ termContent.GetTermControl() };
12571257
_rootPane->WalkTree([termControl](const auto& p) {
1258-
if (const auto& taskPane{ p->GetContent().try_as<TasksPaneContent>() })
1258+
if (const auto& taskPane{ p->GetContent().try_as<SnippetsPaneContent>() })
12591259
{
12601260
taskPane.SetLastActiveControl(termControl);
12611261
}

0 commit comments

Comments
 (0)