Web browser like tabs (#467)

* Web browser like tabs.

* Turn on AlwaysShowTabs by default.

* removed unused event handler
This commit is contained in:
Max Risuhin authored and Felix committed 2019-07-31 21:16:22 +02:00
1 parent 8d710fe6d7
commit 8b18773da9
27 files changed
+410 -31

No files matched your search

+19 -2
View File
@@ -141,6 +141,13 @@ namespace FluentTerminal.App.ViewModels
public event EventHandler ActivatedMv;
public event EventHandler<TerminalViewModel> TabTearedOff;
public void TearOffTab(TerminalViewModel model)
{
TabTearedOff?.Invoke(this, model);
}
public void FocusWindow()
{
ActivatedMv?.Invoke(this, EventArgs.Empty);
@@ -313,12 +320,12 @@ namespace FluentTerminal.App.ViewModels
}
}
public Task AddTerminalAsync(ShellProfile profile)
public Task AddTerminalAsync(ShellProfile profile, string terminalState)
{
return ApplicationView.RunOnDispatcherThread(() =>
{
var terminal = new TerminalViewModel(_settingsService, _trayProcessCommunicationService, _dialogService, _keyboardCommandService,
_applicationSettings, profile, ApplicationView, _dispatcherTimer, _clipboardService);
_applicationSettings, profile, ApplicationView, _dispatcherTimer, _clipboardService, terminalState);
terminal.Closed += OnTerminalClosed;
terminal.ShellTitleChanged += Terminal_ShellTitleChanged;
@@ -329,6 +336,16 @@ namespace FluentTerminal.App.ViewModels
});
}
public Task AddTerminalAsync(ShellProfile profile)
{
return AddTerminalAsync(profile, "");
}
public Task AddTerminalAsync(string terminalState)
{
return AddTerminalAsync(new ShellProfile(), terminalState);
}
private void Terminal_CustomTitleChanged(object sender, string e)
{
if (sender is TerminalViewModel terminal)