Set session title to profile name when created. Rename tab dialog changes the tab title format rather than the session's title itself.

svn path=/branches/work/konsole-split-view/; revision=661587
This commit is contained in:
Robert Knight
2007-05-06 00:58:27 +00:00
parent 63bc8dcf3d
commit 0f9cdfe2db
2 changed files with 9 additions and 4 deletions

View File

@@ -127,8 +127,10 @@ void SessionController::snapshot()
else
title = process->format(_session->tabTitleFormat(Session::LocalTabTitle) ) ;
if ( !title.isEmpty() )
_session->setTitle(title);
if ( !title.simplified().isEmpty() )
setTitle(title);
else
setTitle(_session->title());
if ( snapshot != process )
{
@@ -493,10 +495,10 @@ void SessionController::renameSession()
bool ok = false;
const QString& text = KInputDialog::getText( i18n("Rename Tab") ,
i18n("Enter new tab text:") ,
_session->title() ,
_session->tabTitleFormat(Session::LocalTabTitle) ,
&ok );
if ( ok )
_session->setTitle(text);
_session->setTabTitleFormat(Session::LocalTabTitle,text);
}
void SessionController::saveSession()
{