mirror of
https://github.com/KDE/konsole.git
synced 2026-05-03 20:26:45 -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:
@@ -211,6 +211,7 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr info)
|
||||
_ui->initialDirEdit->setClearButtonShown(true);
|
||||
_ui->dirSelectButton->setIcon( KIcon("folder-open") );
|
||||
_ui->iconSelectButton->setIcon( KIcon(info->icon()) );
|
||||
_ui->startInSameDirButton->setChecked(info->property<bool>(Profile::StartInCurrentSessionDir));
|
||||
|
||||
// window options
|
||||
_ui->showMenuBarButton->setChecked( info->property<bool>(Profile::ShowMenuBar) );
|
||||
@@ -218,7 +219,8 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr info)
|
||||
// signals and slots
|
||||
connect( _ui->dirSelectButton , SIGNAL(clicked()) , this , SLOT(selectInitialDir()) );
|
||||
connect( _ui->iconSelectButton , SIGNAL(clicked()) , this , SLOT(selectIcon()) );
|
||||
|
||||
connect( _ui->startInSameDirButton , SIGNAL(toggled(bool)) , this ,
|
||||
SLOT(startInSameDir(bool)));
|
||||
connect( _ui->profileNameEdit , SIGNAL(textChanged(const QString&)) , this ,
|
||||
SLOT(profileNameChanged(const QString&)) );
|
||||
connect( _ui->initialDirEdit , SIGNAL(textChanged(const QString&)) , this ,
|
||||
@@ -348,6 +350,10 @@ void EditProfileDialog::profileNameChanged(const QString& text)
|
||||
_tempProfile->setProperty(Profile::Name,text);
|
||||
updateCaption(_tempProfile->name());
|
||||
}
|
||||
void EditProfileDialog::startInSameDir(bool sameDir)
|
||||
{
|
||||
_tempProfile->setProperty(Profile::StartInCurrentSessionDir,sameDir);
|
||||
}
|
||||
void EditProfileDialog::initialDirChanged(const QString& dir)
|
||||
{
|
||||
_tempProfile->setProperty(Profile::Directory,dir);
|
||||
|
||||
Reference in New Issue
Block a user