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 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. | 3 | =. |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
@@ -53,3 +53,3 @@ using namespace Opie::Core; | |||
53 | MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) | 53 | MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) |
54 | : QDialog( 0x0, 0x0, TRUE, 0 ) | 54 | : QDialog( parent, name, modal, f ) |
55 | { | 55 | { |
@@ -189,2 +189,7 @@ void MainWindow::runNTP() | |||
189 | 189 | ||
190 | // Disable set time buttons & change app caption to indicate time update is happening | ||
191 | ntpTab->setNTPBtnEnabled( false ); | ||
192 | timeTab->setNTPBtnEnabled( false ); | ||
193 | setCaption( tr( "Retrieving time from network..." ) ); | ||
194 | |||
190 | if ( !ntpProcess ) | 195 | if ( !ntpProcess ) |
@@ -208,2 +213,7 @@ void MainWindow::runNTP() | |||
208 | ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); | 213 | ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); |
214 | |||
215 | // Re-enable set time buttons & change app caption to indicate time update is happening | ||
216 | ntpTab->setNTPBtnEnabled( true ); | ||
217 | timeTab->setNTPBtnEnabled( true ); | ||
218 | setCaption( tr( "SystemTime" ) ); | ||
209 | } | 219 | } |
@@ -300,2 +310,7 @@ void MainWindow::slotNtpFinished( OProcess *p ) | |||
300 | 310 | ||
311 | // Re-enable set time buttons & change app caption to indicate time update is happening | ||
312 | ntpTab->setNTPBtnEnabled( true ); | ||
313 | timeTab->setNTPBtnEnabled( true ); | ||
314 | setCaption( tr( "SystemTime" ) ); | ||
315 | |||
301 | // Verify run was successful | 316 | // Verify run was successful |
@@ -353,3 +368,3 @@ void MainWindow::slotNtpFinished( OProcess *p ) | |||
353 | lookupCount++; | 368 | lookupCount++; |
354 | predictTab->setShiftPerSec( timeShift / secsSinceLast ); | 369 | predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) ); |
355 | config.writeEntry( "secsSinceLast", secsSinceLast ); | 370 | config.writeEntry( "secsSinceLast", secsSinceLast ); |