summaryrefslogtreecommitdiff
authortille <tille>2002-06-26 16:34:14 (UTC)
committer tille <tille>2002-06-26 16:34:14 (UTC)
commit9d692658a94c59889c6e46baaeae971226952eb8 (patch) (unidiff)
tree4cd8a9cf939a5e096e3c1610feac1678131b1673
parent12ec527b60e774d0f794fa98f8b6fdf9c194b7a9 (diff)
downloadopie-9d692658a94c59889c6e46baaeae971226952eb8.zip
opie-9d692658a94c59889c6e46baaeae971226952eb8.tar.gz
opie-9d692658a94c59889c6e46baaeae971226952eb8.tar.bz2
improved startup
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index bcbf7a1..b2f5332 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -245,38 +245,37 @@ void Ntp::slotCheckNtp(int i)
245 TextLabelMainPredTime->hide(); 245 TextLabelMainPredTime->hide();
246 ButtonSetTime->setText( tr("Get time from network") ); 246 ButtonSetTime->setText( tr("Get time from network") );
247 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); 247 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) );
248 if ( ntpDelayElapsed() ) 248 if ( ntpDelayElapsed() )
249 { 249 {
250 slotRunNtp(); 250 slotRunNtp();
251 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); 251 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) );
252 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); 252 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) );
253 }else{ 253 }else{
254 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); 254 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) );
255 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); 255 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) );
256 } 256 }
257 }else{ 257 }else{
258 preditctTime(); 258 preditctTime();
259 ButtonSetTime->setText( tr("Set predicted time") ); 259 ButtonSetTime->setText( tr("Set predicted time") );
260 if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); 260 if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer());
261 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); 261 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) );
262 connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); 262 connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) );
263 } 263 }
264 //ntpTimer->start(SpinBoxNtpDelay->value()*1000*60); 264 //ntpTimer->start(SpinBoxNtpDelay->value()*1000*60);
265} 265}
266 266
267void Ntp::slotProbeNtpServer() 267void Ntp::slotProbeNtpServer()
268{ 268{
269 if ( ntpDelayElapsed() ) 269 ntpSock->connectToHost( getNtpServer() ,123);
270 ntpSock->connectToHost( getNtpServer() ,123);
271} 270}
272 271
273void Ntp::slotNtpDelayChanged(int delay) 272void Ntp::slotNtpDelayChanged(int delay)
274{ 273{
275 ntpTimer->changeInterval( delay*1000*60 ); 274 ntpTimer->changeInterval( delay*1000*60 );
276} 275}
277 276
278void Ntp::ntpOutPut(QString out) 277void Ntp::ntpOutPut(QString out)
279{ 278{
280 MultiLineEditntpOutPut->append(out); 279 MultiLineEditntpOutPut->append(out);
281 MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); 280 MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE);
282} 281}