Skip to content

Commit 3ac5414

Browse files
committed
last nits before review
1 parent 57930ad commit 3ac5414

File tree

8 files changed

+10
-57
lines changed

8 files changed

+10
-57
lines changed

src/cascadia/TerminalApp/AppActionHandlers.cpp

-20
Original file line numberDiff line numberDiff line change
@@ -1475,24 +1475,4 @@ namespace winrt::TerminalApp::implementation
14751475
args.Handled(true);
14761476
}
14771477

1478-
void TerminalPage::_HandleOpenTasksPane(const IInspectable& sender,
1479-
const ActionEventArgs& args)
1480-
{
1481-
if (Feature_ScratchpadPane::IsEnabled())
1482-
{
1483-
const auto& scratchPane{ winrt::make_self<TasksPaneContent>() };
1484-
scratchPane->UpdateSettings(_settings);
1485-
// This is maybe a little wacky - add our key event handler to the pane
1486-
// we made. So that we can get actions for keys that the content didn't
1487-
// handle.
1488-
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
1489-
1490-
scratchPane->DispatchCommandRequested({ this, &TerminalPage::_OnDispatchCommandRequested });
1491-
1492-
const auto resultPane = std::make_shared<Pane>(*scratchPane);
1493-
_SplitPane(_senderOrFocusedTab(sender), SplitDirection::Automatic, 0.5f, resultPane);
1494-
args.Handled(true);
1495-
}
1496-
}
1497-
14981478
}

src/cascadia/TerminalApp/TabManagement.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,6 @@ namespace winrt::TerminalApp::implementation
137137
// for it. The Title change will be propagated upwards through the tab's
138138
// PropertyChanged event handler.
139139
newTabImpl->ActivePaneChanged([weakTab, weakThis{ get_weak() }]() {
140-
// TODO!
141-
//
142-
// * Make this a method on TerminalPage.
143-
// * Convert ActivePaneChanged to a typed event, so it sends the sender (so we don't need to make all these lambdas)
144-
// * Stash the task pane as a member on the Terminal? if one was opened.
145-
// * If the tab does have a taskpane, then tell the taskpane the active pane changed
146-
//
147-
// wait don't do any of that. just do that in TerminalTab directly
148-
// before we even raise the event you donkey
149-
150140
auto page{ weakThis.get() };
151141
auto tab{ weakTab.get() };
152142

src/cascadia/TerminalApp/TasksPaneContent.h

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ namespace winrt::TerminalApp::implementation
2323
void Close();
2424
winrt::Microsoft::Terminal::Settings::Model::INewContentArgs GetNewTerminalArgs(BuildStartupKind kind) const;
2525

26-
// TODO! lots of strings here and in XAML that need RS_-ifying
2726
winrt::hstring Title() { return RS_(L"SnippetPaneTitle/Text"); }
2827
uint64_t TaskbarState() { return 0; }
2928
uint64_t TaskbarProgress() { return 0; }

src/cascadia/TerminalApp/TasksPaneContent.xaml

+5-22
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,19 @@
3838
BorderBrush="{TemplateBinding BorderBrush}"
3939
BorderThickness="{TemplateBinding BorderThickness}"
4040
CornerRadius="{TemplateBinding CornerRadius}">
41-
<Viewbox Width="20"
42-
Height="20">
41+
<Viewbox Width="14"
42+
Height="14">
4343
<Grid>
4444
<FontIcon x:Name="ButtonBackgroundIcon"
45-
FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets"
45+
FontFamily="{ThemeResource SymbolThemeFontFamily}"
4646
Foreground="{ThemeResource PlayButtonHoveredColor}"
4747
Glyph="&#xF5b0;"
4848
Visibility="Collapsed" />
4949
<FontIcon x:Name="ButtonOutlineIcon"
50-
FontFamily="Segoe UI, Segoe Fluent Icons, Segoe MDL2 Assets"
50+
FontFamily="{ThemeResource SymbolThemeFontFamily}"
5151
Foreground="{ThemeResource PlayButtonNormalColor}"
5252
Glyph="&#xE768;" />
5353
</Grid>
54-
<!-- TODO! FontFamily="{ThemeResource SymbolThemeFontFamily}" -->
5554
</Viewbox>
5655

5756
<VisualStateManager.VisualStateGroups>
@@ -80,22 +79,6 @@
8079
<Setter Target="StatusProgress.IsActive" Value="False" />
8180
</VisualState.Setters>
8281
</VisualState>
83-
<!--
84-
<VisualState x:Name="Running">
85-
<VisualState.Setters>
86-
<Setter Target="ButtonBackgroundIcon.Glyph" Value=" " />
87-
<Setter Target="ButtonOutlineIcon.Glyph" Value=" " />
88-
<Setter Target="StatusProgress.IsActive" Value="True" />
89-
</VisualState.Setters>
90-
</VisualState>
91-
92-
<VisualState x:Name="AlreadyRan">
93-
<VisualState.Setters>
94-
<Setter Target="ButtonBackgroundIcon.Glyph" Value="&#xe72c;" />
95-
<Setter Target="ButtonOutlineIcon.Glyph" Value="&#xe72c;" />
96-
<Setter Target="StatusProgress.IsActive" Value="False" />
97-
</VisualState.Setters>
98-
</VisualState>-->
9982
</VisualStateGroup>
10083

10184
</VisualStateManager.VisualStateGroups>
@@ -142,7 +125,7 @@
142125
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(HasChildren), Mode=OneWay}">
143126

144127
<Button.Content>
145-
<FontIcon FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets"
128+
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}"
146129
FontSize="12"
147130
Glyph="&#xE768;" />
148131
<!--

src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static constexpr std::string_view RestartConnectionKey{ "restartConnection" };
9898
static constexpr std::string_view ToggleBroadcastInputKey{ "toggleBroadcastInput" };
9999
static constexpr std::string_view OpenScratchpadKey{ "experimental.openScratchpad" };
100100
static constexpr std::string_view OpenAboutKey{ "openAbout" };
101-
static constexpr std::string_view OpenTasksPaneKey{ "experimental.openTasks" };
102101

103102
static constexpr std::string_view ActionKey{ "action" };
104103

@@ -435,7 +434,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
435434
{ ShortcutAction::ToggleBroadcastInput, RS_(L"ToggleBroadcastInputCommandKey") },
436435
{ ShortcutAction::OpenScratchpad, RS_(L"OpenScratchpadKey") },
437436
{ ShortcutAction::OpenAbout, RS_(L"OpenAboutCommandKey") },
438-
{ ShortcutAction::OpenTasksPane, RS_(L"OpenTasksPaneCommandKey") },
439437
};
440438
}();
441439

src/cascadia/TerminalSettingsModel/AllShortcutActions.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@
111111
ON_ALL_ACTIONS(RestartConnection) \
112112
ON_ALL_ACTIONS(ToggleBroadcastInput) \
113113
ON_ALL_ACTIONS(OpenScratchpad) \
114-
ON_ALL_ACTIONS(OpenAbout) \
115-
ON_ALL_ACTIONS(OpenTasksPane)
114+
ON_ALL_ACTIONS(OpenAbout)
116115

117116
#define ALL_SHORTCUT_ACTIONS_WITH_ARGS \
118117
ON_ALL_ACTIONS_WITH_ARGS(AdjustFontSize) \

src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw

+3
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@
126126
<data name="SplitPaneParentCommandName" xml:space="preserve">
127127
<value>Split pane</value>
128128
</data>
129+
<data name="SnippetsPaneCommandName" xml:space="preserve">
130+
<value>Open snippets pane</value>
131+
</data>
129132
<data name="ApplicationDisplayNamePortable" xml:space="preserve">
130133
<value>Terminal (Portable)</value>
131134
<comment>This display name is used when the Terminal application is running in a "portable" mode, where settings are not stored in a shared location.</comment>

src/cascadia/TerminalSettingsModel/defaults.json

+1
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@
529529
{ "command": { "action": "movePane", "index": 8 }, "id": "Terminal.MovePaneToTab8" },
530530
{ "command": { "action": "movePane", "window": "new" }, "id": "Terminal.MovePaneToNewWindow" },
531531
{ "command": "restartConnection", "id": "Terminal.RestartConnection" },
532+
{ "command": { "action": "splitPane", "type": "snippets" }, "id": "Terminal.OpenSnippetsPane", "name": { "key": "SnippetsPaneCommandName" } },
532533

533534
// Clipboard Integration
534535
{ "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+shift+c", "id": "Terminal.CopySelectedText" },

0 commit comments

Comments
 (0)