summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index 486257f..01d9a98 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -75,4 +75,4 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags
config.setGroup( "settings" );
- slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", FALSE ) );
- slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", FALSE ) );
+ slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", false ) );
+ slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", false ) );
@@ -130,6 +130,6 @@ void MainWindow::accept()
// Update the systemtime
- timeTab->saveSettings( TRUE );
+ timeTab->saveSettings( true );
// Save format options
- formatTab->saveSettings( TRUE );
+ formatTab->saveSettings( true );
@@ -153,6 +153,6 @@ void MainWindow::reject()
// Reset time settings
- timeTab->saveSettings( FALSE );
+ timeTab->saveSettings( false );
// Send notifications but do not save settings
- formatTab->saveSettings( FALSE );
+ formatTab->saveSettings( false );
@@ -187,2 +187,3 @@ void MainWindow::runNTP()
ntpTab->addNtpOutput( output );
+ ntpTab->setNTPBtnEnabled( false );
}
@@ -190,3 +191,2 @@ void MainWindow::runNTP()
// Disable set time buttons & change app caption to indicate time update is happening
- ntpTab->setNTPBtnEnabled( false );
timeTab->setNTPBtnEnabled( false );
@@ -212,6 +212,8 @@ void MainWindow::runNTP()
if ( ntpTabEnabled )
+ {
ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) );
+ ntpTab->setNTPBtnEnabled( true );
+ }
// Re-enable set time buttons & change app caption to indicate time update is happening
- ntpTab->setNTPBtnEnabled( true );
timeTab->setNTPBtnEnabled( true );
@@ -281,3 +283,3 @@ void MainWindow::slotGetNTPTime()
{
- ntpInteractive = TRUE;
+ ntpInteractive = true;
runNTP();
@@ -287,3 +289,3 @@ void MainWindow::slotTimerGetNTPTime()
{
- ntpInteractive = FALSE;
+ ntpInteractive = false;
runNTP();
@@ -311,3 +313,4 @@ void MainWindow::slotNtpFinished( OProcess *p )
// Re-enable set time buttons & change app caption to indicate time update is happening
- ntpTab->setNTPBtnEnabled( true );
+ if ( ntpTabEnabled )
+ ntpTab->setNTPBtnEnabled( true );
timeTab->setNTPBtnEnabled( true );
@@ -336,3 +339,3 @@ void MainWindow::slotNtpFinished( OProcess *p )
int lookupCount = config.readNumEntry( "count", 0 );
- bool lastNtp = config.readBoolEntry( "lastNtp", FALSE );
+ bool lastNtp = config.readBoolEntry( "lastNtp", false );
int time = TimeConversion::toUTC( QDateTime::currentDateTime() );
@@ -373,3 +376,3 @@ void MainWindow::slotNtpFinished( OProcess *p )
config.writeEntry( "count", lookupCount );
- config.writeEntry( "lastNtp", TRUE );
+ config.writeEntry( "lastNtp", true );
}