author | cniehaus <cniehaus> | 2003-05-18 12:21:27 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-05-18 12:21:27 (UTC) |
commit | 34c5b88459bcf5e02deae6b04e8bc17ee0de74c0 (patch) (side-by-side diff) | |
tree | 81fa2cd128c8bb75554f6443eec685f65412e2db | |
parent | 76cc1bf740e9134f44a1341d8b01cc9f543a4cd4 (diff) | |
download | opie-34c5b88459bcf5e02deae6b04e8bc17ee0de74c0.zip opie-34c5b88459bcf5e02deae6b04e8bc17ee0de74c0.tar.gz opie-34c5b88459bcf5e02deae6b04e8bc17ee0de74c0.tar.bz2 |
fix the fix
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp index 85a46b7..2d240ba 100644 --- a/noncore/settings/netsystemtime/mainwindow.cpp +++ b/noncore/settings/netsystemtime/mainwindow.cpp @@ -119,102 +119,96 @@ MainWindow::~MainWindow() delete ntpProcess; } void MainWindow::accept() { // Turn off the screensaver (Note: needs to be encased in { } so that it deconstructs and sends) { QCopEnvelope disableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); disableScreenSaver << 0 << 0 << 0; } // Update the systemtime timeTab->saveSettings( TRUE ); // Save format options formatTab->saveSettings( TRUE ); // Save settings options settingsTab->saveSettings(); // Since time has changed quickly load in the DateBookDB to allow the alarm server to get a better // grip on itself (example re-trigger alarms for when we travel back in time). DateBookDB db; // Turn back on the screensaver QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); enableScreenSaver << -1 << -1 << -1; // Exit app qApp->quit(); } void MainWindow::reject() { // Reset time settings timeTab->saveSettings( FALSE ); // Send notifications but do not save settings formatTab->saveSettings( FALSE ); // Exit app qApp->quit(); } void MainWindow::runNTP() { if ( !ntpDelayElapsed() && ntpInteractive ) { - QString msg = tr( "You asked for a delay of " ); - msg.append( QString::number( ntpDelay ) ); - msg.append( tr( " minutes, but only " ) ); - msg.append( QString::number( _lookupDiff / 60 ) ); - msg.append( tr(" minutes elapsed since last lookup.<br>Continue?") ); - QString msg = tr( "You asked for a delay of %1 minutes, but only %2 minutes elapsed since last lookup.<br>Continue?" ).arg( QString::number( ntpDelay ) ).arg( QString::number( _lookupDiff / 60 ) ); switch ( QMessageBox::warning( this, tr( "Continue?" ), msg, QMessageBox::Yes, QMessageBox::No ) ) { case QMessageBox::Yes: break; case QMessageBox::No: return; default: return; } } QString srv = settingsTab->ntpServer(); // Send information to time server tab if enabled if ( ntpTabEnabled ) { ntpTab->setStartTime( QDateTime::currentDateTime().toString() ); QString output = tr( "Running:\nntpdate " ); output.append( srv ); ntpTab->addNtpOutput( output ); } if ( !ntpProcess ) { ntpProcess = new OProcess(); connect( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(slotNtpOutput(OProcess*,char*,int)) ); connect( ntpProcess, SIGNAL(processExited(OProcess*)), this, SLOT(slotNtpFinished(OProcess*)) ); } else ntpProcess->clearArguments(); *ntpProcess << "ntpdate" << srv; bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput ); if ( !ret ) { QMessageBox::critical( this, tr( "Error" ), tr( "Error while getting time from network." ) ); if ( ntpTabEnabled ) ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); } } bool MainWindow::ntpDelayElapsed() { // Determine if time elapsed is greater than time delay |