author | tille <tille> | 2002-06-26 16:34:14 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-26 16:34:14 (UTC) |
commit | 9d692658a94c59889c6e46baaeae971226952eb8 (patch) (side-by-side diff) | |
tree | 4cd8a9cf939a5e096e3c1610feac1678131b1673 | |
parent | 12ec527b60e774d0f794fa98f8b6fdf9c194b7a9 (diff) | |
download | opie-9d692658a94c59889c6e46baaeae971226952eb8.zip opie-9d692658a94c59889c6e46baaeae971226952eb8.tar.gz opie-9d692658a94c59889c6e46baaeae971226952eb8.tar.bz2 |
improved startup
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 3 |
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) TextLabelMainPredTime->hide(); ButtonSetTime->setText( tr("Get time from network") ); connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); if ( ntpDelayElapsed() ) { slotRunNtp(); disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); }else{ disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); } }else{ preditctTime(); ButtonSetTime->setText( tr("Set predicted time") ); if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); } // ntpTimer->start(SpinBoxNtpDelay->value()*1000*60); } void Ntp::slotProbeNtpServer() { - if ( ntpDelayElapsed() ) - ntpSock->connectToHost( getNtpServer() ,123); + ntpSock->connectToHost( getNtpServer() ,123); } void Ntp::slotNtpDelayChanged(int delay) { ntpTimer->changeInterval( delay*1000*60 ); } void Ntp::ntpOutPut(QString out) { MultiLineEditntpOutPut->append(out); MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); } |