diff options
Diffstat (limited to 'kweather/kcmweatherservice.cpp')
-rw-r--r-- | kweather/kcmweatherservice.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/kweather/kcmweatherservice.cpp b/kweather/kcmweatherservice.cpp index cf0828c..4e5c7a7 100644 --- a/kweather/kcmweatherservice.cpp +++ b/kweather/kcmweatherservice.cpp @@ -34,6 +34,8 @@ #include <kurlrequester.h> #include <kcombobox.h> #include <kcolorbutton.h> +#include <dcopclient.h> +#include <dcopref.h> #include "dockwidget.h" #include "serviceconfig.h" @@ -101,7 +103,8 @@ void KCMWeatherService::load() mWidget->m_logFile->setURL( config.readPathEntry( "log_file_name" ) ); - mWidget->m_iconTheme->setButton( config.readBoolEntry("use_icon_theme", true) ? 0 : 1 ); + mUseIconTheme = config.readBoolEntry("use_icon_theme", true); + mWidget->m_iconTheme->setButton( mUseIconTheme ? 0 : 1 ); emit changed( false ); } @@ -115,7 +118,9 @@ void KCMWeatherService::save() config.writeEntry( "logging", mWidget->m_enableLog->isChecked() ); config.writeEntry( "log_file_name", mWidget->m_logFile->url() ); - config.writeEntry( "use_icon_theme", mWidget->m_iconTheme->selectedId() == 0 ); + mUseIconTheme = (mWidget->m_iconTheme->selectedId() == 0); + config.writeEntry( "use_icon_theme", mUseIconTheme ); + updateIconTheme(mUseIconTheme); config.sync(); @@ -133,4 +138,12 @@ void KCMWeatherService::defaults() emit changed( true ); } +void KCMWeatherService::updateIconTheme( bool useIconTheme ) +{ + DCOPRef ws( "KWeatherService", "WeatherService" ); + DCOPReply reply = ws.call( "useIconTheme", useIconTheme ); + if( ! reply.isValid() ) + kdDebug(12004) << "[kcmweatherservice::updateIconTheme] DCOP call failed" << endl; +} + #include "kcmweatherservice.moc" |