mirror of
https://github.com/KDE/konsole.git
synced 2026-05-01 19:25:46 -04:00
Add an option to the profile editor to control whether new sessions start in the same directory as the current session.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=791273
This commit is contained in:
@@ -278,8 +278,12 @@ void Application::createWindow(Profile::Ptr profile , const QString& directory)
|
||||
|
||||
Session* Application::createSession(Profile::Ptr profile, const QString& directory , ViewManager* view)
|
||||
{
|
||||
if (!profile)
|
||||
profile = SessionManager::instance()->defaultProfile();
|
||||
|
||||
Session* session = SessionManager::instance()->createSession(profile);
|
||||
if (!directory.isEmpty() && session->initialWorkingDirectory().isEmpty())
|
||||
|
||||
if (!directory.isEmpty() && profile->property<bool>(Profile::StartInCurrentSessionDir))
|
||||
session->setInitialWorkingDirectory(directory);
|
||||
|
||||
// create view before starting the session process so that the session doesn't suffer
|
||||
|
||||
Reference in New Issue
Block a user