|
|
@ -217,7 +217,6 @@ void kweather::loadPrefs(){
|
|
|
|
fileName = kcConfig->readPathEntry("log_file_name");
|
|
|
|
fileName = kcConfig->readPathEntry("log_file_name");
|
|
|
|
reportLocation = kcConfig->readEntry("report_location");
|
|
|
|
reportLocation = kcConfig->readEntry("report_location");
|
|
|
|
mViewMode = kcConfig->readNumEntry("smallview_mode", dockwidget::ShowAll);
|
|
|
|
mViewMode = kcConfig->readNumEntry("smallview_mode", dockwidget::ShowAll);
|
|
|
|
setUseIconTheme(kcConfig->readBoolEntry("use_icon_theme", true));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static TQColor black(TQt::black);
|
|
|
|
static TQColor black(TQt::black);
|
|
|
|
mTextColor = kcConfig->readColorEntry("textColor", &black);
|
|
|
|
mTextColor = kcConfig->readColorEntry("textColor", &black);
|
|
|
@ -233,23 +232,9 @@ void kweather::savePrefs(){
|
|
|
|
kcConfig->writeEntry("report_location", reportLocation);
|
|
|
|
kcConfig->writeEntry("report_location", reportLocation);
|
|
|
|
kcConfig->writeEntry("smallview_mode", mViewMode);
|
|
|
|
kcConfig->writeEntry("smallview_mode", mViewMode);
|
|
|
|
kcConfig->writePathEntry("log_file_name", fileName );
|
|
|
|
kcConfig->writePathEntry("log_file_name", fileName );
|
|
|
|
kcConfig->writeEntry("use_icon_theme", useIconTheme );
|
|
|
|
|
|
|
|
kcConfig->sync();
|
|
|
|
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()
|
|
|
|
void kweather::showWeather()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug(12004) << "Show weather" << endl;
|
|
|
|
kdDebug(12004) << "Show weather" << endl;
|
|
|
@ -349,7 +334,6 @@ void kweather::slotPrefsAccepted()
|
|
|
|
dockWidget->setLocationCode(reportLocation);
|
|
|
|
dockWidget->setLocationCode(reportLocation);
|
|
|
|
dockWidget->setViewMode(mViewMode);
|
|
|
|
dockWidget->setViewMode(mViewMode);
|
|
|
|
|
|
|
|
|
|
|
|
setUseIconTheme(useIconTheme);
|
|
|
|
|
|
|
|
if ( !mWeatherService )
|
|
|
|
if ( !mWeatherService )
|
|
|
|
initDCOP();
|
|
|
|
initDCOP();
|
|
|
|
mWeatherService->forceUpdateAll();
|
|
|
|
mWeatherService->forceUpdateAll();
|
|
|
|