diff options
Diffstat (limited to 'kweather/kweather.cpp')
-rw-r--r-- | kweather/kweather.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kweather/kweather.cpp b/kweather/kweather.cpp index eb87f98..2682a72 100644 --- a/kweather/kweather.cpp +++ b/kweather/kweather.cpp @@ -216,6 +216,7 @@ void kweather::loadPrefs(){ fileName = kcConfig->readPathEntry("log_file_name"); reportLocation = kcConfig->readEntry("report_location"); mViewMode = kcConfig->readNumEntry("smallview_mode", dockwidget::ShowAll); + setUseIconTheme(kcConfig->readBoolEntry("use_icon_theme", true)); static TQColor black(TQt::black); mTextColor = kcConfig->readColorEntry("textColor", &black); @@ -231,9 +232,23 @@ void kweather::savePrefs(){ kcConfig->writeEntry("report_location", reportLocation); kcConfig->writeEntry("smallview_mode", mViewMode); kcConfig->writePathEntry("log_file_name", fileName ); + kcConfig->writeEntry("use_icon_theme", useIconTheme ); kcConfig->sync(); } +void kweather::setUseIconTheme( bool use ) +{ + useIconTheme = use; + + if ( !mWeatherService ) + initDCOP(); + + DCOPRef ws( "KWeatherService", "WeatherService" ); + DCOPReply reply = ws.call( "useIconTheme", useIconTheme ); + if( ! reply.isValid() ) + kdDebug() << "[kweather::setUseIconTheme] DCOP call failed" << endl; +} + void kweather::showWeather() { kdDebug(12004) << "Show weather" << endl; @@ -332,6 +347,10 @@ void kweather::slotPrefsAccepted() dockWidget->setLocationCode(reportLocation); dockWidget->setViewMode(mViewMode); + + setUseIconTheme(useIconTheme); + slotUpdateNow(); + setLabelColor(); emit updateLayout(); |