Changeset View
Changeset View
Standalone View
Standalone View
app/sessionstack.cpp
Context not available. | |||||
51 | 51 | | |||
---|---|---|---|---|---|
52 | int SessionStack::addSessionImpl(Session::SessionType type) | 52 | int SessionStack::addSessionImpl(Session::SessionType type) | ||
53 | { | 53 | { | ||
54 | Session* session = new Session(type, this); | 54 | Session* currentSession = m_sessions[m_activeSessionId]; | ||
55 | QString currentPath; | ||||
56 | if (currentSession) | ||||
57 | { | ||||
58 | currentPath = currentSession->getTerminal(currentSession->activeTerminalId())->getCurrentWorkingDirectory(); | ||||
59 | } else | ||||
60 | { | ||||
61 | QDir::homePath(); | ||||
62 | } | ||||
63 | Session* session = new Session(type, currentPath, this); | ||||
55 | connect(session, SIGNAL(titleChanged(int,QString)), this, SIGNAL(titleChanged(int,QString))); | 64 | connect(session, SIGNAL(titleChanged(int,QString)), this, SIGNAL(titleChanged(int,QString))); | ||
56 | connect(session, SIGNAL(terminalManuallyActivated(Terminal*)), this, SLOT(handleManualTerminalActivation(Terminal*))); | 65 | connect(session, SIGNAL(terminalManuallyActivated(Terminal*)), this, SLOT(handleManualTerminalActivation(Terminal*))); | ||
57 | connect(session, SIGNAL(keyboardInputBlocked(Terminal*)), m_visualEventOverlay, SLOT(indicateKeyboardInputBlocked(Terminal*))); | 66 | connect(session, SIGNAL(keyboardInputBlocked(Terminal*)), m_visualEventOverlay, SLOT(indicateKeyboardInputBlocked(Terminal*))); | ||
Context not available. |