Diffstat (limited to 'noncore/settings/netsystemtime/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp index 385d355..486257f 100644 --- a/noncore/settings/netsystemtime/mainwindow.cpp +++ b/noncore/settings/netsystemtime/mainwindow.cpp @@ -1,24 +1,24 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. - .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This file is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General -..}^=.= = ; Public License for more details. -++= -. .` .: - : = ...= . :.=- You should have received a copy of the GNU - -. .:....=;==+<; General Public License along with this file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: +: = ...= . :.=- You should have received a copy of the GNU +-. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -53,3 +53,3 @@ using namespace Opie::Core; MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) - : QDialog( 0x0, 0x0, TRUE, 0 ) + : QDialog( parent, name, modal, f ) { @@ -189,2 +189,7 @@ void MainWindow::runNTP() + // Disable set time buttons & change app caption to indicate time update is happening + ntpTab->setNTPBtnEnabled( false ); + timeTab->setNTPBtnEnabled( false ); + setCaption( tr( "Retrieving time from network..." ) ); + if ( !ntpProcess ) @@ -208,2 +213,7 @@ void MainWindow::runNTP() ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); + + // Re-enable set time buttons & change app caption to indicate time update is happening + ntpTab->setNTPBtnEnabled( true ); + timeTab->setNTPBtnEnabled( true ); + setCaption( tr( "SystemTime" ) ); } @@ -300,2 +310,7 @@ void MainWindow::slotNtpFinished( OProcess *p ) + // Re-enable set time buttons & change app caption to indicate time update is happening + ntpTab->setNTPBtnEnabled( true ); + timeTab->setNTPBtnEnabled( true ); + setCaption( tr( "SystemTime" ) ); + // Verify run was successful @@ -353,3 +368,3 @@ void MainWindow::slotNtpFinished( OProcess *p ) lookupCount++; - predictTab->setShiftPerSec( timeShift / secsSinceLast ); + predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) ); config.writeEntry( "secsSinceLast", secsSinceLast ); |