mirror of
https://github.com/KDE/konsole.git
synced 2026-05-19 12:09:25 -04:00
Define environment variable in new sessions which is set to the initial working directory of the profile used for the session.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=791952
This commit is contained in:
@@ -382,7 +382,14 @@ void SessionManager::applyProfile(Session* session, const Profile::Ptr info , bo
|
||||
session->setInitialWorkingDirectory(info->defaultWorkingDirectory());
|
||||
|
||||
if ( apply.shouldApply(Profile::Environment) )
|
||||
session->setEnvironment(info->property<QStringList>(Profile::Environment));
|
||||
{
|
||||
// add environment variable containing home directory of current profile
|
||||
// (if specified)
|
||||
QStringList environment = info->property<QStringList>(Profile::Environment);
|
||||
environment << QString("PROFILEHOME=%1").arg(info->defaultWorkingDirectory());
|
||||
|
||||
session->setEnvironment(environment);
|
||||
}
|
||||
|
||||
if ( apply.shouldApply(Profile::Icon) )
|
||||
session->setIconName(info->icon());
|
||||
|
||||
Reference in New Issue
Block a user