Make new sessions start in the same directory as the previously active session. Does not apply when creating a new tab from a specific profile.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=670566
This commit is contained in:
Robert Knight
2007-06-02 02:17:14 +00:00
parent 3f1f8cac41
commit 942ecb745c
8 changed files with 63 additions and 17 deletions

View File

@@ -192,6 +192,20 @@ void SessionController::snapshot()
_session->setTitle(Session::DisplayedTitleRole,_session->title(Session::NameRole));
}
QString SessionController::currentDir() const
{
ProcessInfo* info = ProcessInfo::newInstance(_session->processId());
info->update();
bool ok = false;
QString path = info->currentDir(&ok);
if ( ok )
return path;
else
return QString();
}
KUrl SessionController::url() const
{
ProcessInfo* info = ProcessInfo::newInstance(_session->processId());