summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime
authortille <tille>2003-01-29 10:09:50 (UTC)
committer tille <tille>2003-01-29 10:09:50 (UTC)
commit59a67d792570e231d2de14cee78ff75fa79453ec (patch) (unidiff)
tree5155aa2a954b6c68d07c69da8dcf495c4bcd45cc /noncore/settings/netsystemtime
parented9991ab41fcf7c8d592796d083d932c44c4a723 (diff)
downloadopie-59a67d792570e231d2de14cee78ff75fa79453ec.zip
opie-59a67d792570e231d2de14cee78ff75fa79453ec.tar.gz
opie-59a67d792570e231d2de14cee78ff75fa79453ec.tar.bz2
fix for adv tab
Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp36
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 )
50 //make tab order 50 //make tab order
51 51
52 TabWidgetMain->removePage( tabMain ); 52 TabWidgetMain->removePage( tabMain );
@@ -63,3 +63,3 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl )
63 63
64 64
65 65
@@ -102,3 +102,3 @@ void Ntp::saveConfig(){
102 bool serversChanged = true; 102 bool serversChanged = true;
103 int curSrv = ComboNtpSrv->currentItem(); 103 int curSrv = ComboNtpSrv->currentItem();
104 QString edit = ComboNtpSrv->currentText(); 104 QString edit = ComboNtpSrv->currentText();
@@ -111,3 +111,3 @@ void Ntp::saveConfig(){
111 ntpSrvs.writeEntry("count", ++srvCount); 111 ntpSrvs.writeEntry("count", ++srvCount);
112 ntpSrvs.setGroup("0"); 112 ntpSrvs.setGroup("0");
113 ntpSrvs.writeEntry( "name", edit ); 113 ntpSrvs.writeEntry( "name", edit );
@@ -133,3 +133,3 @@ bool Ntp::ntpDelayElapsed()
133 _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); 133 _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
134 if (_lookupDiff < 0) return true; 134 if (_lookupDiff < 0) return true;
135 int i =_lookupDiff - (SpinBoxNtpDelay->value()*60); 135 int i =_lookupDiff - (SpinBoxNtpDelay->value()*60);
@@ -174,3 +174,3 @@ void Ntp::slotRunNtp()
174 ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() ); 174 ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() );
175 175
176 ntpProcess->clearArguments(); 176 ntpProcess->clearArguments();
@@ -204,3 +204,3 @@ void Ntp::ntpFinished(OProcess *p)
204 if (p->exitStatus()!=0 || !p->normalExit()) 204 if (p->exitStatus()!=0 || !p->normalExit())
205 { 205 {
206 if ( isVisible() && _interactive ){ 206 if ( isVisible() && _interactive ){
@@ -211,3 +211,3 @@ void Ntp::ntpFinished(OProcess *p)
211 } 211 }
212 212
213 Config cfg("ntp",Config::User); 213 Config cfg("ntp",Config::User);
@@ -219,3 +219,3 @@ void Ntp::ntpFinished(OProcess *p)
219 cfg.writeEntry("time", time); 219 cfg.writeEntry("time", time);
220 220
221 float timeShift = getTimeShift(); 221 float timeShift = getTimeShift();
@@ -331,3 +331,3 @@ void Ntp::slotCheckNtp(int i)
331 } 331 }
332 }else{ 332 }else{
333 preditctTime(); 333 preditctTime();
@@ -352,3 +352,3 @@ void Ntp::ntpOutPut(QString out)
352{ 352{
353 353
354 MultiLineEditntpOutPut->append(out); 354 MultiLineEditntpOutPut->append(out);
@@ -359,3 +359,3 @@ void Ntp::ntpOutPut(QString out)
359void Ntp::makeChannel() 359void Ntp::makeChannel()
360 { 360{
361 channel = new QCopChannel( "QPE/Application/netsystemtime", this ); 361 channel = new QCopChannel( "QPE/Application/netsystemtime", this );
@@ -391,5 +391,7 @@ void Ntp::showAdvancedFeatures(bool advMode)
391 if (advMode) { 391 if (advMode) {
392 392
393 TabWidgetMain->addTab( tabPredict, tr( "Predict" ) ); 393 if ( tabNtp->isVisible() ) {
394 TabWidgetMain->addTab( tabNtp, tr( "NTP" ) ); 394 TabWidgetMain->addTab( tabPredict, tr( "Predict" ) );
395 TabWidgetMain->addTab( tabNtp, tr( "NTP" ) );
396 }
395 TextLabel1_2_2->show(); 397 TextLabel1_2_2->show();
@@ -424,6 +426,6 @@ void Ntp::accept( ){
424 commitTime(); 426 commitTime();
425 writeSettings(); 427 writeSettings();
426 updateSystem(); 428 updateSystem();
427 // Ntp 429 // Ntp
428 saveConfig(); 430 saveConfig();
429 qApp->quit(); 431 qApp->quit();