Commit 38ba5d0e authored by Robert Knight's avatar Robert Knight
Browse files

Do not 'un-preview' profile properties which have been changed. Read and...

Do not 'un-preview' profile properties which have been changed.  Read and write initial working directory setting.

svn path=/branches/work/konsole-split-view/; revision=661271
parent d36b16c6
......@@ -303,7 +303,11 @@ void EditProfileDialog::hideEvent(QHideEvent* event)
while ( iter.hasNext() )
{
iter.next();
map.insert((Profile::Property)iter.key(),iter.value());
// only reset preview changes for temporary changes
// ( changes saved in _tempProfile are considered permanent )
if ( !_tempProfile->isPropertySet( (Profile::Property)iter.key() ) )
map.insert((Profile::Property)iter.key(),iter.value());
}
// undo any preview changes
......
......@@ -178,6 +178,9 @@ bool KDE4ProfileWriter::writeProfile(const QString& path , const Profile* profil
general.writeEntry("Command",
ShellCommand(profile->command(),profile->arguments()).fullCommand());
if ( profile->isPropertySet(Profile::Directory) )
general.writeEntry("Directory",profile->defaultWorkingDirectory());
writeStandardElement( general , "Icon" , profile , Profile::Icon );
writeStandardElement( general , "LocalTabTitleFormat" , profile , Profile::LocalTabTitleFormat );
writeStandardElement( general , "RemoteTabTitleFormat" , profile , Profile::RemoteTabTitleFormat );
......@@ -244,6 +247,8 @@ bool KDE4ProfileReader::readProfile(const QString& path , Profile* profile)
profile->setProperty(Profile::Arguments,shellCommand.arguments());
}
readStandardElement<QString>(general,"Directory",profile,Profile::Directory);
readStandardElement<QString>(general,"Icon",profile,Profile::Icon);
readStandardElement<QString>(general,"LocalTabTitleFormat",profile,Profile::LocalTabTitleFormat);
readStandardElement<QString>(general,"RemoteTabTitleFormat",profile,Profile::RemoteTabTitleFormat);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment