mirror of
https://github.com/KDE/konsole.git
synced 2026-02-05 04:41:35 -05:00
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:
@@ -239,14 +239,22 @@ void MainWindow::sessionListChanged(const QList<QAction*>& actions)
|
||||
plugActionList("favorite-profiles",actions);
|
||||
}
|
||||
|
||||
QString MainWindow::activeSessionDir() const
|
||||
{
|
||||
if ( _pluggedController )
|
||||
return _pluggedController->currentDir();
|
||||
else
|
||||
return QString();
|
||||
}
|
||||
|
||||
void MainWindow::newTab()
|
||||
{
|
||||
emit newSessionRequest( _defaultProfile , _viewManager);
|
||||
emit newSessionRequest( _defaultProfile , activeSessionDir() , _viewManager);
|
||||
}
|
||||
|
||||
void MainWindow::newWindow()
|
||||
{
|
||||
emit newWindowRequest( _defaultProfile );
|
||||
emit newWindowRequest( _defaultProfile , activeSessionDir() );
|
||||
}
|
||||
|
||||
void MainWindow::showShortcutsDialog()
|
||||
@@ -257,7 +265,7 @@ void MainWindow::showShortcutsDialog()
|
||||
|
||||
void MainWindow::newFromProfile(const QString& key)
|
||||
{
|
||||
emit newSessionRequest(key,_viewManager);
|
||||
emit newSessionRequest(key,QString(),_viewManager);
|
||||
}
|
||||
void MainWindow::showManageProfilesDialog()
|
||||
{
|
||||
@@ -269,7 +277,7 @@ void MainWindow::showRemoteConnectionDialog()
|
||||
{
|
||||
RemoteConnectionDialog dialog(this);
|
||||
if ( dialog.exec() == QDialog::Accepted )
|
||||
emit newSessionRequest(dialog.sessionKey(),_viewManager);
|
||||
emit newSessionRequest(dialog.sessionKey(),QString(),_viewManager);
|
||||
}
|
||||
|
||||
void MainWindow::setupWidgets()
|
||||
|
||||
Reference in New Issue
Block a user