-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 06d944d..aecefc1 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp @@ -50,3 +50,3 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) //make tab order - + TabWidgetMain->removePage( tabMain ); @@ -63,3 +63,3 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) - + @@ -102,3 +102,3 @@ void Ntp::saveConfig(){ bool serversChanged = true; - int curSrv = ComboNtpSrv->currentItem(); + int curSrv = ComboNtpSrv->currentItem(); QString edit = ComboNtpSrv->currentText(); @@ -111,3 +111,3 @@ void Ntp::saveConfig(){ ntpSrvs.writeEntry("count", ++srvCount); - ntpSrvs.setGroup("0"); + ntpSrvs.setGroup("0"); ntpSrvs.writeEntry( "name", edit ); @@ -133,3 +133,3 @@ bool Ntp::ntpDelayElapsed() _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); - if (_lookupDiff < 0) return true; + if (_lookupDiff < 0) return true; int i =_lookupDiff - (SpinBoxNtpDelay->value()*60); @@ -174,3 +174,3 @@ void Ntp::slotRunNtp() ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() ); - + ntpProcess->clearArguments(); @@ -204,3 +204,3 @@ void Ntp::ntpFinished(OProcess *p) if (p->exitStatus()!=0 || !p->normalExit()) - { + { if ( isVisible() && _interactive ){ @@ -211,3 +211,3 @@ void Ntp::ntpFinished(OProcess *p) } - + Config cfg("ntp",Config::User); @@ -219,3 +219,3 @@ void Ntp::ntpFinished(OProcess *p) cfg.writeEntry("time", time); - + float timeShift = getTimeShift(); @@ -331,3 +331,3 @@ void Ntp::slotCheckNtp(int i) } - }else{ + }else{ preditctTime(); @@ -352,3 +352,3 @@ void Ntp::ntpOutPut(QString out) { - + MultiLineEditntpOutPut->append(out); @@ -359,3 +359,3 @@ void Ntp::ntpOutPut(QString out) void Ntp::makeChannel() -{ +{ channel = new QCopChannel( "QPE/Application/netsystemtime", this ); @@ -391,5 +391,7 @@ void Ntp::showAdvancedFeatures(bool advMode) if (advMode) { - - TabWidgetMain->addTab( tabPredict, tr( "Predict" ) ); - TabWidgetMain->addTab( tabNtp, tr( "NTP" ) ); + + if ( tabNtp->isVisible() ) { + TabWidgetMain->addTab( tabPredict, tr( "Predict" ) ); + TabWidgetMain->addTab( tabNtp, tr( "NTP" ) ); + } TextLabel1_2_2->show(); @@ -424,6 +426,6 @@ void Ntp::accept( ){ commitTime(); - writeSettings(); + writeSettings(); updateSystem(); // Ntp - saveConfig(); + saveConfig(); qApp->quit(); |