summaryrefslogtreecommitdiff
authordrw <drw>2002-11-22 01:48:26 (UTC)
committer drw <drw>2002-11-22 01:48:26 (UTC)
commit772c1321e4e95a415b9de700c3474f81f98b5482 (patch) (unidiff)
treee220beb65ea90ae7aee52c0ac83ecbc69bd8191a
parent87240f18c4e7b12c56d7f61a3431221d94f59f4c (diff)
downloadopie-772c1321e4e95a415b9de700c3474f81f98b5482.zip
opie-772c1321e4e95a415b9de700c3474f81f98b5482.tar.gz
opie-772c1321e4e95a415b9de700c3474f81f98b5482.tar.bz2
Make sure update frequency is initialized 1st time in (thanks to Simon)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/todayplugins/weather/weatherpluginwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp
index 6444ebf..f4ea0f2 100644
--- a/noncore/todayplugins/weather/weatherpluginwidget.cpp
+++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp
@@ -70,33 +70,33 @@ WeatherPluginWidget::~WeatherPluginWidget()
70} 70}
71 71
72void WeatherPluginWidget::timerEvent( QTimerEvent *e ) 72void WeatherPluginWidget::timerEvent( QTimerEvent *e )
73{ 73{
74 killTimer( e->timerId() ); 74 killTimer( e->timerId() );
75 retreiveData(); 75 retreiveData();
76} 76}
77 77
78 78
79 79
80void WeatherPluginWidget::retreiveData() 80void WeatherPluginWidget::retreiveData()
81{ 81{
82 startTimer( frequency * 60000 );
83
84 Config config( "todayweatherplugin"); 82 Config config( "todayweatherplugin");
85 config.setGroup( "Config" ); 83 config.setGroup( "Config" );
86 84
87 location = config.readEntry( "Location", "" ); 85 location = config.readEntry( "Location", "" );
88 useMetric = config.readBoolEntry( "Metric", TRUE ); 86 useMetric = config.readBoolEntry( "Metric", TRUE );
89 frequency = config.readNumEntry( "Frequency", 5 ); 87 frequency = config.readNumEntry( "Frequency", 5 );
90 88
89 startTimer( frequency * 60000 );
90
91 localFile = "/tmp/"; 91 localFile = "/tmp/";
92 localFile.append( location ); 92 localFile.append( location );
93 localFile.append( ".TXT" ); 93 localFile.append( ".TXT" );
94 94
95 remoteFile = "http://weather.noaa.gov/pub/data/observations/metar/stations/"; 95 remoteFile = "http://weather.noaa.gov/pub/data/observations/metar/stations/";
96 remoteFile.append( location ); 96 remoteFile.append( location );
97 remoteFile.append( ".TXT" ); 97 remoteFile.append( ".TXT" );
98 98
99 QFile file( localFile ); 99 QFile file( localFile );
100 if ( file.exists() ) 100 if ( file.exists() )
101 { 101 {
102 file.remove(); 102 file.remove();