From kde-commits Tue Mar 31 23:35:10 2009 From: Jonathan Michael Thomas Date: Tue, 31 Mar 2009 23:35:10 +0000 To: kde-commits Subject: playground/base/plasma/wallpapers/weather Message-Id: <1238542510.348501.9913.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=123854252107535 SVN commit 947631 by jmthomas: Move all the config loading stuff to restore(); where it should be M +9 -2 weather.cpp M +1 -0 weather.h --- trunk/playground/base/plasma/wallpapers/weather/weather.cpp #947630:947631 @@ -51,6 +51,15 @@ void WeatherWallpaper::init(const KConfigGroup & config) { + m_wallpaperName = KStandardDirs::locate("data", "plasma_wallpaper_weather/images/initdialog1280x800.jpg"); + + loadImage(); + emit update(boundingRect()); + restore(config); +} + +void WeatherWallpaper::restore(const KConfigGroup & config) +{ m_weatherUpdateTime = config.readEntry("updateWeather", 30); // Connect to weather engine. @@ -59,8 +68,6 @@ // Set custom options m_ionPlugins = m_weatherEngine->query("ions"); - m_wallpaperName = KStandardDirs::locate("data", "plasma_wallpaper_weather/images/initdialog1280x800.jpg"); - m_activePlace = config.readEntry("place"); m_activeIon = config.readEntry("ion"); m_extraData[m_activePlace] = config.readEntry("data"); --- trunk/playground/base/plasma/wallpapers/weather/weather.h #947630:947631 @@ -59,6 +59,7 @@ protected: void init(const KConfigGroup & config); + void restore(const KConfigGroup & config); protected slots: void configWidgetDestroyed();