mirror of
https://github.com/KDE/konsole.git
synced 2026-05-01 19:25:46 -04:00
Use customized tab title only when explicitly requested by users
This commit is contained in:
@@ -260,10 +260,14 @@ void Application::createTabFromArgs(KCmdLineArgs* args, MainWindow* window,
|
||||
// Create the new session
|
||||
Session* session = createSession(newProfile, QString(), window->viewManager());
|
||||
|
||||
session->setTabTitleFormat(Session::LocalTabTitle, title);
|
||||
session->setTabTitleFormat(Session::RemoteTabTitle, title);
|
||||
// Ensure that new title is displayed
|
||||
session->setTitle(Session::DisplayedTitleRole, title);
|
||||
// customize tab title only when explicitly requested
|
||||
if (!title.isEmpty()) {
|
||||
session->setTabTitleFormat(Session::LocalTabTitle, title);
|
||||
session->setTabTitleFormat(Session::RemoteTabTitle, title);
|
||||
// Ensure that new title is displayed
|
||||
session->setTitle(Session::DisplayedTitleRole, title);
|
||||
}
|
||||
|
||||
if (!args->isSet("close")) {
|
||||
session->setAutoClose(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user