Commit 09750e25 authored by Laurent Montel's avatar Laurent Montel 😁

Now make "apply" in config dialog works

svn path=/trunk/KDE/kdegraphics/kruler/; revision=935478
parent bc2ad26b
......@@ -629,30 +629,35 @@ void KLineal::slotPreferences()
advancedConfig.setupUi( advancedConfigWidget );
dialog->addPage( advancedConfigWidget, i18n( "Advanced" ), "preferences-other" );
connect(dialog, SIGNAL(settingsChanged(const QString&)), SLOT(loadConfig()));
dialog->exec();
mColor = RulerSettings::self()->bgColor();
mScaleFont = RulerSettings::self()->scaleFont();
repaint();
saveSettings();
delete dialog;
}
if ( RulerSettings::self()->trayIcon() ) {
if ( !mTrayIcon ) {
createSystemTray();
//need to adjust button
adjustButtons();
}
else
mTrayIcon->show();
}
else {
if ( mTrayIcon ) {
mTrayIcon->hide();
}
}
void KLineal::loadConfig()
{
mColor = RulerSettings::self()->bgColor();
mScaleFont = RulerSettings::self()->scaleFont();
saveSettings();
if ( RulerSettings::self()->trayIcon() ) {
if ( !mTrayIcon ) {
createSystemTray();
//need to adjust button
adjustButtons();
}
else
mTrayIcon->show();
}
else {
if ( mTrayIcon ) {
mTrayIcon->hide();
}
}
repaint();
}
void KLineal::switchRelativeScale( bool checked )
{
mRelativeScale = checked;
......
......@@ -127,5 +127,6 @@ public slots:
void saveSettings();
void slotClose();
void slotQuit();
void loadConfig();
};
#endif
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