Commit 8086851f authored by Robert Knight's avatar Robert Knight

Load and save tab-bar, menu-bar modes.

svn path=/branches/work/konsole-split-view/; revision=660230
parent de005e17
......@@ -104,6 +104,17 @@ void EditProfileDialog::setupGeneralPage(const Profile* info)
_ui->remoteTabTitleEdit->setText(
info->property(Profile::RemoteTabTitleFormat).value<QString>());
// tab mode
int tabMode = info->property(Profile::TabBarMode).value<int>();
RadioInt possibleTabModes[] = { RadioInt(_ui->alwaysHideTabBarButton,Profile::AlwaysHideTabBar),
RadioInt(_ui->alwaysShowTabBarButton,Profile::AlwaysShowTabBar),
RadioInt(_ui->autoShowTabBarButton,Profile::ShowTabBarAsNeeded),
RadioInt(0,0) };
setupRadio( possibleTabModes , tabMode );
_ui->showMenuBarButton->setChecked( info->property(Profile::ShowMenuBar).value<bool>() );
// signals and slots
connect( _ui->dirSelectButton , SIGNAL(clicked()) , this , SLOT(selectInitialDir()) );
connect( _ui->iconSelectButton , SIGNAL(clicked()) , this , SLOT(selectIcon()) );
......
......@@ -158,6 +158,9 @@ bool KDE4ProfileWriter::writeProfile(const QString& path , const Profile* profil
writeStandardElement( general , "LocalTabTitleFormat" , profile , Profile::LocalTabTitleFormat );
writeStandardElement( general , "RemoteTabTitleFormat" , profile , Profile::RemoteTabTitleFormat );
writeStandardElement( general , "TabBarMode" , profile , Profile::TabBarMode );
writeStandardElement( general , "ShowMenuBar" , profile , Profile::ShowMenuBar );
KConfigGroup keyboard = config.group("Keyboard");
writeStandardElement( keyboard , "KeyBindings" , profile , Profile::KeyBindings );
......@@ -190,6 +193,7 @@ bool KDE4ProfileReader::readProfile(const QString& path , Profile* profile)
KConfig config(path,KConfig::NoGlobals);
// general
KConfigGroup general = config.group("General");
if ( general.hasKey("Name") )
......@@ -209,9 +213,14 @@ bool KDE4ProfileReader::readProfile(const QString& path , Profile* profile)
readStandardElement(general,"LocalTabTitleFormat",profile,Profile::LocalTabTitleFormat);
readStandardElement(general,"RemoteTabTitleFormat",profile,Profile::RemoteTabTitleFormat);
readStandardElement(general,"TabBarMode",profile,Profile::TabBarMode);
readStandardElement(general,"ShowMenuBar",profile,Profile::ShowMenuBar);
// keyboard
KConfigGroup keyboard = config.group("Keyboard");
readStandardElement(keyboard,"KeyBindings",profile,Profile::KeyBindings);
// appearence
KConfigGroup appearence = config.group("Appearence");
readStandardElement(appearence,"ColorScheme",profile,Profile::ColorScheme);
......
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