summaryrefslogtreecommitdiff
authorhrw <hrw>2005-07-25 14:21:11 (UTC)
committer hrw <hrw>2005-07-25 14:21:11 (UTC)
commitee25393f06291c3d7a1e64f146abc5e5fbadaf60 (patch) (unidiff)
tree110377f4eb42731974048854bbad0c1a34583565
parentb74ea9f8de39d355e2d16b4b685e9de54e2f0b0d (diff)
downloadopie-ee25393f06291c3d7a1e64f146abc5e5fbadaf60.zip
opie-ee25393f06291c3d7a1e64f146abc5e5fbadaf60.tar.gz
opie-ee25393f06291c3d7a1e64f146abc5e5fbadaf60.tar.bz2
Show 'Predict' tab only once - close #1543
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp12
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a32023..ba355ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
24 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 24 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
25 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 25 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
26 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 26 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
27 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
27 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 28 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
28 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 29 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
29 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 30 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index 35d4105..c1cd796 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -67,12 +67,12 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags
67 // Default object pointers to null 67 // Default object pointers to null
68 ntpProcess = 0x0; 68 ntpProcess = 0x0;
69 ntpTab = 0x0; 69 ntpTab = 0x0;
70 predictTab = 0x0;
70 71
71 // Add tab widgets 72 // Add tab widgets
72 mainWidget->addTab( timeTab = new TimeTabWidget( mainWidget ), "netsystemtime/DateTime", tr( "Time" ) ); 73 mainWidget->addTab( timeTab = new TimeTabWidget( mainWidget ), "netsystemtime/DateTime", tr( "Time" ) );
73 mainWidget->addTab( formatTab = new FormatTabWidget( mainWidget ), "netsystemtime/formattab", tr( "Format" ) ); 74 mainWidget->addTab( formatTab = new FormatTabWidget( mainWidget ), "netsystemtime/formattab", tr( "Format" ) );
74 mainWidget->addTab( settingsTab = new SettingsTabWidget( mainWidget ), "SettingsIcon", tr( "Settings" ) ); 75 mainWidget->addTab( settingsTab = new SettingsTabWidget( mainWidget ), "SettingsIcon", tr( "Settings" ) );
75 mainWidget->addTab( predictTab = new PredictTabWidget( mainWidget ), "netsystemtime/predicttab", tr( "Predict" ) );
76 Config config( "ntp" ); 76 Config config( "ntp" );
77 config.setGroup( "settings" ); 77 config.setGroup( "settings" );
78 slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", false ) ); 78 slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", false ) );
@@ -275,6 +275,7 @@ void MainWindow::slotDisplayPredictTab( bool display )
275 // Create widget if it hasn't needed 275 // Create widget if it hasn't needed
276 if ( display && !predictTab ) 276 if ( display && !predictTab )
277 { 277 {
278 predictTab = new PredictTabWidget( mainWidget );
278 } 279 }
279 // Display/hide tab 280 // Display/hide tab
280 display ? mainWidget->addTab( predictTab, "netsystemtime/predicttab", tr( "Predict" ) ) 281 display ? mainWidget->addTab( predictTab, "netsystemtime/predicttab", tr( "Predict" ) )
@@ -371,7 +372,12 @@ void MainWindow::slotNtpFinished( OProcess *p )
371 QString grpname = QString( "lookup_" ).append( QString::number( lookupCount ) ); 372 QString grpname = QString( "lookup_" ).append( QString::number( lookupCount ) );
372 config.setGroup( grpname ); 373 config.setGroup( grpname );
373 lookupCount++; 374 lookupCount++;
375
376 if(predictTab)
377 {
374 predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) ); 378 predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) );
379 }
380
375 config.writeEntry( "secsSinceLast", secsSinceLast ); 381 config.writeEntry( "secsSinceLast", secsSinceLast );
376 config.writeEntry( "timeShift", QString::number( timeShift ) ); 382 config.writeEntry( "timeShift", QString::number( timeShift ) );
377 config.setGroup( "lookups" ); 383 config.setGroup( "lookups" );
@@ -404,7 +410,11 @@ void MainWindow::slotCheckNtp( int i )
404 } 410 }
405 else 411 else
406 { 412 {
413 if(predictTab)
414 {
407 predictTab->slotPredictTime(); 415 predictTab->slotPredictTime();
416 }
417
408 if ( i > 0 ) 418 if ( i > 0 )
409 { 419 {
410 QString output = tr( "Could not connect to server " ); 420 QString output = tr( "Could not connect to server " );