@@ -3931,65 +3931,6 @@ namespace winrt::TerminalApp::implementation
3931
3931
// Create the tab
3932
3932
auto resultPane = std::make_shared<Pane>(*settingsContent);
3933
3933
_settingsTab = _CreateNewTabFromPane (resultPane);
3934
-
3935
- // auto newTabImpl = winrt::make_self<SettingsTab>(sui, _settings.GlobalSettings().CurrentTheme().RequestedTheme());
3936
-
3937
- // // Add the new tab to the list of our tabs.
3938
- // _tabs.Append(*newTabImpl);
3939
- // _mruTabs.Append(*newTabImpl);
3940
-
3941
- // newTabImpl->SetDispatch(*_actionDispatch);
3942
- // newTabImpl->SetActionMap(_settings.ActionMap());
3943
-
3944
- // // Give the tab its index in the _tabs vector so it can manage its own SwitchToTab command.
3945
- // _UpdateTabIndices();
3946
-
3947
- // // Don't capture a strong ref to the tab. If the tab is removed as this
3948
- // // is called, we don't really care anymore about handling the event.
3949
- // auto weakTab = make_weak(newTabImpl);
3950
-
3951
- // auto tabViewItem = newTabImpl->TabViewItem();
3952
- // _tabView.TabItems().Append(tabViewItem);
3953
-
3954
- // tabViewItem.PointerPressed({ this, &TerminalPage::_OnTabClick });
3955
-
3956
- // // When the tab requests close, try to close it (prompt for approval, if required)
3957
- // newTabImpl->CloseRequested([weakTab, weakThis{ get_weak() }](auto&& /*s*/, auto&& /*e*/) {
3958
- // auto page{ weakThis.get() };
3959
- // auto tab{ weakTab.get() };
3960
- // if (page && tab)
3961
- // {
3962
- // page->_HandleCloseTabRequested(*tab);
3963
- // }
3964
- // });
3965
-
3966
- // TODO! Make sure we remove the _settingsTab if it is closed!
3967
- // ---------------------- main
3968
- // newTabImpl->Closed([weakTab, weakThis{ get_weak() }](auto&& /*s*/, auto&& /*e*/) {
3969
- // const auto page = weakThis.get();
3970
- // const auto tab = weakTab.get();
3971
-
3972
- // if (page && tab)
3973
- // {
3974
- // page->_RemoveTab(*tab);
3975
- // }
3976
- // });
3977
- // =======
3978
- // // When the tab is closed, remove it from our list of tabs.
3979
- // newTabImpl->Closed([tabViewItem, weakThis{ get_weak() }](auto&& /*s*/, auto&& /*e*/) {
3980
- // if (auto page{ weakThis.get() })
3981
- // {
3982
- // page->_settingsTab = nullptr;
3983
- // page->_RemoveOnCloseRoutine(tabViewItem, page);
3984
- // }
3985
- // });
3986
- // -------------------------- dev/migrie/fhl/scratchpad-pane
3987
-
3988
- // _settingsTab = *newTabImpl;
3989
-
3990
- // // This kicks off TabView::SelectionChanged, in response to which
3991
- // // we'll attach the terminal's Xaml control to the Xaml root.
3992
- // _tabView.SelectedItem(tabViewItem);
3993
3934
}
3994
3935
else
3995
3936
{
0 commit comments