Compare commits
4 commits
main
...
cinnamon/f
Author | SHA1 | Date | |
---|---|---|---|
08905d91ca | |||
b46bae22fb | |||
2ab10ea452 | |||
de5749ade2 |
|
@ -662,6 +662,9 @@
|
|||
<data name="DropPathTabRun.Text" xml:space="preserve">
|
||||
<value>Open a new tab in given starting directory</value>
|
||||
</data>
|
||||
<data name="FindText" xml:space="preserve">
|
||||
<value>Find...</value>
|
||||
</data>
|
||||
<data name="SplitTabText" xml:space="preserve">
|
||||
<value>Split Tab</value>
|
||||
</data>
|
||||
|
|
|
@ -204,6 +204,16 @@ namespace winrt::TerminalApp::implementation
|
|||
}
|
||||
});
|
||||
|
||||
newTabImpl->FindRequested([weakTab, weakThis{ get_weak() }]() {
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
|
||||
if (page && tab)
|
||||
{
|
||||
page->_Find();
|
||||
}
|
||||
});
|
||||
|
||||
auto tabViewItem = newTabImpl->TabViewItem();
|
||||
_tabView.TabItems().Append(tabViewItem);
|
||||
|
||||
|
|
|
@ -957,6 +957,23 @@ namespace winrt::TerminalApp::implementation
|
|||
duplicateTabMenuItem.Icon(duplicateTabSymbol);
|
||||
}
|
||||
|
||||
Controls::MenuFlyoutItem findMenuItem;
|
||||
{
|
||||
// "Find..."
|
||||
Controls::FontIcon findSymbol;
|
||||
findSymbol.FontFamily(Media::FontFamily{ L"Segoe MDL2 Assets" });
|
||||
findSymbol.Glyph(L"\xE721"); // Search
|
||||
|
||||
findMenuItem.Click([weakThis](auto&&, auto&&) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->_FindRequestedHandlers();
|
||||
}
|
||||
});
|
||||
findMenuItem.Text(RS_(L"FindText"));
|
||||
findMenuItem.Icon(findSymbol);
|
||||
}
|
||||
|
||||
Controls::MenuFlyoutItem splitTabMenuItem;
|
||||
{
|
||||
// "Split Tab"
|
||||
|
@ -977,11 +994,14 @@ namespace winrt::TerminalApp::implementation
|
|||
// Build the menu
|
||||
Controls::MenuFlyout contextMenuFlyout;
|
||||
Controls::MenuFlyoutSeparator menuSeparator;
|
||||
Controls::MenuFlyoutSeparator menuSeparator2;
|
||||
contextMenuFlyout.Items().Append(chooseColorMenuItem);
|
||||
contextMenuFlyout.Items().Append(renameTabMenuItem);
|
||||
contextMenuFlyout.Items().Append(duplicateTabMenuItem);
|
||||
contextMenuFlyout.Items().Append(splitTabMenuItem);
|
||||
contextMenuFlyout.Items().Append(menuSeparator);
|
||||
contextMenuFlyout.Items().Append(findMenuItem);
|
||||
contextMenuFlyout.Items().Append(menuSeparator2);
|
||||
|
||||
// GH#5750 - When the context menu is dismissed with ESC, toss the focus
|
||||
// back to our control.
|
||||
|
@ -1354,5 +1374,6 @@ namespace winrt::TerminalApp::implementation
|
|||
DEFINE_EVENT(TerminalTab, ColorCleared, _colorCleared, winrt::delegate<>);
|
||||
DEFINE_EVENT(TerminalTab, TabRaiseVisualBell, _TabRaiseVisualBellHandlers, winrt::delegate<>);
|
||||
DEFINE_EVENT(TerminalTab, DuplicateRequested, _DuplicateRequestedHandlers, winrt::delegate<>);
|
||||
DEFINE_EVENT(TerminalTab, FindRequested, _FindRequestedHandlers, winrt::delegate<>);
|
||||
DEFINE_EVENT(TerminalTab, SplitTabRequested, _SplitTabRequestedHandlers, winrt::delegate<>);
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ namespace winrt::TerminalApp::implementation
|
|||
DECLARE_EVENT(ColorCleared, _colorCleared, winrt::delegate<>);
|
||||
DECLARE_EVENT(TabRaiseVisualBell, _TabRaiseVisualBellHandlers, winrt::delegate<>);
|
||||
DECLARE_EVENT(DuplicateRequested, _DuplicateRequestedHandlers, winrt::delegate<>);
|
||||
DECLARE_EVENT(FindRequested, _FindRequestedHandlers, winrt::delegate<>);
|
||||
DECLARE_EVENT(SplitTabRequested, _SplitTabRequestedHandlers, winrt::delegate<>);
|
||||
TYPED_EVENT(TaskbarProgressChanged, IInspectable, IInspectable);
|
||||
|
||||
|
|
Loading…
Reference in a new issue