|
|
|
@ -63,7 +63,9 @@ KonqSidebarWeather::KonqSidebarWeather(TDEInstance* inst, TQObject* parent,
|
|
|
|
|
kdDebug() << "attached dcop signals..." << endl;
|
|
|
|
|
|
|
|
|
|
timeOut = new TQTimer(this, "timeOut" );
|
|
|
|
|
updateWidgets(true);
|
|
|
|
|
connect(timeOut, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateWidgets()));
|
|
|
|
|
|
|
|
|
|
updateWidgets();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -114,10 +116,12 @@ void KonqSidebarWeather::handlePreviewOnMouseOver(const KFileItem& item)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KonqSidebarWeather::updateWidgets( bool firstTime )
|
|
|
|
|
void KonqSidebarWeather::updateWidgets()
|
|
|
|
|
{
|
|
|
|
|
kdDebug() << "updating station widgets" << endl;
|
|
|
|
|
|
|
|
|
|
timeOut->stop();
|
|
|
|
|
|
|
|
|
|
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
|
|
|
|
|
DCOPReply reply = dcopCall.call("listStations()", true );
|
|
|
|
|
|
|
|
|
@ -173,13 +177,7 @@ void KonqSidebarWeather::updateWidgets( bool firstTime )
|
|
|
|
|
KMessageBox::sorry(0, i18n("The weather service is unreachable!"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( firstTime )
|
|
|
|
|
timeOut->start(15*60000);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
timeOut->changeInterval(15*60000);
|
|
|
|
|
connect(timeOut, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateWidgets()));
|
|
|
|
|
}
|
|
|
|
|
timeOut->start(15*60000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool KonqSidebarWeather::startWeatherService()
|
|
|
|
|