summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -23,8 +23,9 @@
* #1384 - Battery status updated improperly when charging (skyhusker)
* #1476 - Wrong order of application entries in the O-menu (skyhusker)
* #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
* #1535 - Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
+ * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
* #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
* #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
* #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
* #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
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
@@ -66,14 +66,14 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags
// Default object pointers to null
ntpProcess = 0x0;
ntpTab = 0x0;
+ predictTab = 0x0;
// Add tab widgets
mainWidget->addTab( timeTab = new TimeTabWidget( mainWidget ), "netsystemtime/DateTime", tr( "Time" ) );
mainWidget->addTab( formatTab = new FormatTabWidget( mainWidget ), "netsystemtime/formattab", tr( "Format" ) );
mainWidget->addTab( settingsTab = new SettingsTabWidget( mainWidget ), "SettingsIcon", tr( "Settings" ) );
- mainWidget->addTab( predictTab = new PredictTabWidget( mainWidget ), "netsystemtime/predicttab", tr( "Predict" ) );
Config config( "ntp" );
config.setGroup( "settings" );
slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", false ) );
slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", false ) );
@@ -274,8 +274,9 @@ void MainWindow::slotDisplayPredictTab( bool display )
// Create widget if it hasn't needed
if ( display && !predictTab )
{
+ predictTab = new PredictTabWidget( mainWidget );
}
// Display/hide tab
display ? mainWidget->addTab( predictTab, "netsystemtime/predicttab", tr( "Predict" ) )
: mainWidget->removePage( predictTab );
@@ -370,9 +371,14 @@ void MainWindow::slotNtpFinished( OProcess *p )
{
QString grpname = QString( "lookup_" ).append( QString::number( lookupCount ) );
config.setGroup( grpname );
lookupCount++;
+
+ if(predictTab)
+ {
predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) );
+ }
+
config.writeEntry( "secsSinceLast", secsSinceLast );
config.writeEntry( "timeShift", QString::number( timeShift ) );
config.setGroup( "lookups" );
config.writeEntry( "count", lookupCount );
@@ -403,9 +409,13 @@ void MainWindow::slotCheckNtp( int i )
}
}
else
{
+ if(predictTab)
+ {
predictTab->slotPredictTime();
+ }
+
if ( i > 0 )
{
QString output = tr( "Could not connect to server " );
output.append( settingsTab->ntpServer() );