-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 16 |
2 files changed, 14 insertions, 3 deletions
@@ -15,24 +15,25 @@ | |||
15 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) | 15 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) |
16 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) | 16 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) |
17 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) | 17 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) |
18 | 18 | ||
19 | Fixed Bugs | 19 | Fixed Bugs |
20 | ---------- | 20 | ---------- |
21 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) | 21 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) |
22 | - We actually suspend the complete Opie now in that case. | 22 | - We actually suspend the complete Opie now in that case. |
23 | * #1384 - Battery status updated improperly when charging (skyhusker) | 23 | * #1384 - Battery status updated improperly when charging (skyhusker) |
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) |
30 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 31 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
31 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) | 32 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) |
32 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) | 33 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) |
33 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) | 34 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) |
34 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) | 35 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) |
35 | * #1679 - Security PIN plugin is QVGA sized (hrw) | 36 | * #1679 - Security PIN plugin is QVGA sized (hrw) |
36 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) | 37 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) |
37 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 38 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
38 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 39 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (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 | |||
@@ -58,30 +58,30 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags | |||
58 | setCaption( tr( "SystemTime" ) ); | 58 | setCaption( tr( "SystemTime" ) ); |
59 | 59 | ||
60 | QVBoxLayout *layout = new QVBoxLayout( this ); | 60 | QVBoxLayout *layout = new QVBoxLayout( this ); |
61 | layout->setMargin( 2 ); | 61 | layout->setMargin( 2 ); |
62 | layout->setSpacing( 4 ); | 62 | layout->setSpacing( 4 ); |
63 | 63 | ||
64 | // Create main tabbed control | 64 | // Create main tabbed control |
65 | mainWidget = new OTabWidget( this ); | 65 | mainWidget = new OTabWidget( this ); |
66 | 66 | ||
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 ) ); |
79 | slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", false ) ); | 79 | slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", false ) ); |
80 | 80 | ||
81 | mainWidget->setCurrentTab( tr( "Time" ) ); | 81 | mainWidget->setCurrentTab( tr( "Time" ) ); |
82 | layout->addWidget( mainWidget ); | 82 | layout->addWidget( mainWidget ); |
83 | 83 | ||
84 | connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)), | 84 | connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)), |
85 | this, SLOT(slotQCopReceive(const QCString&,const QByteArray&)) ); | 85 | this, SLOT(slotQCopReceive(const QCString&,const QByteArray&)) ); |
86 | 86 | ||
87 | 87 | ||
@@ -266,24 +266,25 @@ void MainWindow::slotDisplayNTPTab( bool display ) | |||
266 | // Display/hide tab | 266 | // Display/hide tab |
267 | display ? mainWidget->addTab( ntpTab, "netsystemtime/ntptab", tr( "Time Server" ) ) | 267 | display ? mainWidget->addTab( ntpTab, "netsystemtime/ntptab", tr( "Time Server" ) ) |
268 | : mainWidget->removePage( ntpTab ); | 268 | : mainWidget->removePage( ntpTab ); |
269 | } | 269 | } |
270 | 270 | ||
271 | void MainWindow::slotDisplayPredictTab( bool display ) | 271 | void MainWindow::slotDisplayPredictTab( bool display ) |
272 | { | 272 | { |
273 | predictTabEnabled = display; | 273 | predictTabEnabled = display; |
274 | 274 | ||
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" ) ) |
281 | : mainWidget->removePage( predictTab ); | 282 | : mainWidget->removePage( predictTab ); |
282 | } | 283 | } |
283 | 284 | ||
284 | void MainWindow::slotGetNTPTime() | 285 | void MainWindow::slotGetNTPTime() |
285 | { | 286 | { |
286 | ntpInteractive = true; | 287 | ntpInteractive = true; |
287 | runNTP(); | 288 | runNTP(); |
288 | } | 289 | } |
289 | 290 | ||
@@ -362,25 +363,30 @@ void MainWindow::slotNtpFinished( OProcess *p ) | |||
362 | // Display information on time server tab | 363 | // Display information on time server tab |
363 | if ( ntpTabEnabled ) | 364 | if ( ntpTabEnabled ) |
364 | { | 365 | { |
365 | ntpTab->setTimeShift( output ); | 366 | ntpTab->setTimeShift( output ); |
366 | ntpTab->setNewTime( dt.toString() ); | 367 | ntpTab->setNewTime( dt.toString() ); |
367 | } | 368 | } |
368 | 369 | ||
369 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60 * ntpDelay ) | 370 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60 * ntpDelay ) |
370 | { | 371 | { |
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++; |
374 | predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) ); | 375 | |
376 | if(predictTab) | ||
377 | { | ||
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" ); |
378 | config.writeEntry( "count", lookupCount ); | 384 | config.writeEntry( "count", lookupCount ); |
379 | config.writeEntry( "lastNtp", true ); | 385 | config.writeEntry( "lastNtp", true ); |
380 | } | 386 | } |
381 | } | 387 | } |
382 | 388 | ||
383 | void MainWindow::slotNTPDelayChanged( int delay ) | 389 | void MainWindow::slotNTPDelayChanged( int delay ) |
384 | { | 390 | { |
385 | ntpTimer->changeInterval( delay * 1000 * 60 ); | 391 | ntpTimer->changeInterval( delay * 1000 * 60 ); |
386 | ntpDelay = delay; | 392 | ntpDelay = delay; |
@@ -395,24 +401,28 @@ void MainWindow::slotCheckNtp( int i ) | |||
395 | runNTP(); | 401 | runNTP(); |
396 | disconnect( ntpTimer, SIGNAL(timeout()), this, SLOT(slotProbeNTPServer()) ); | 402 | disconnect( ntpTimer, SIGNAL(timeout()), this, SLOT(slotProbeNTPServer()) ); |
397 | connect( ntpTimer, SIGNAL(timeout()), SLOT(slotTimerGetNTPTime()) ); | 403 | connect( ntpTimer, SIGNAL(timeout()), SLOT(slotTimerGetNTPTime()) ); |
398 | } | 404 | } |
399 | else | 405 | else |
400 | { | 406 | { |
401 | disconnect(ntpTimer, SIGNAL(timeout()), this, SLOT(slotTimerGetNTPTime()) ); | 407 | disconnect(ntpTimer, SIGNAL(timeout()), this, SLOT(slotTimerGetNTPTime()) ); |
402 | connect(ntpTimer, SIGNAL(timeout()), SLOT(slotProbeNTPServer()) ); | 408 | connect(ntpTimer, SIGNAL(timeout()), SLOT(slotProbeNTPServer()) ); |
403 | } | 409 | } |
404 | } | 410 | } |
405 | else | 411 | else |
406 | { | 412 | { |
407 | predictTab->slotPredictTime(); | 413 | if(predictTab) |
414 | { | ||
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 " ); |
411 | output.append( settingsTab->ntpServer() ); | 421 | output.append( settingsTab->ntpServer() ); |
412 | ntpOutput.append( output ); | 422 | ntpOutput.append( output ); |
413 | if ( ntpTabEnabled ) | 423 | if ( ntpTabEnabled ) |
414 | ntpTab->addNtpOutput( output ); | 424 | ntpTab->addNtpOutput( output ); |
415 | } | 425 | } |
416 | connect( ntpTimer, SIGNAL(timeout()), SLOT(slotProbeNTPServer()) ); | 426 | connect( ntpTimer, SIGNAL(timeout()), SLOT(slotProbeNTPServer()) ); |
417 | } | 427 | } |
418 | } | 428 | } |