author | drw <drw> | 2005-02-23 16:14:09 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-23 16:14:09 (UTC) |
commit | e5b1e010c321ba1edac704f9d668df75b22fd074 (patch) (unidiff) | |
tree | c76221c7d8292f66ef05040721edf816a04fbeba /noncore/settings/netsystemtime/ntptabwidget.cpp | |
parent | 30857db6ca3f355aa3d50b59f03a13c82f265af2 (diff) | |
download | opie-e5b1e010c321ba1edac704f9d668df75b22fd074.zip opie-e5b1e010c321ba1edac704f9d668df75b22fd074.tar.gz opie-e5b1e010c321ba1edac704f9d668df75b22fd074.tar.bz2 |
Fix UI to prevent error dialog from displaying when it shouldn't
Diffstat (limited to 'noncore/settings/netsystemtime/ntptabwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntptabwidget.cpp | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/noncore/settings/netsystemtime/ntptabwidget.cpp b/noncore/settings/netsystemtime/ntptabwidget.cpp index d71c230..616bc22 100644 --- a/noncore/settings/netsystemtime/ntptabwidget.cpp +++ b/noncore/settings/netsystemtime/ntptabwidget.cpp | |||
@@ -1,25 +1,25 @@ | |||
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, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
@@ -47,5 +47,5 @@ NTPTabWidget::NTPTabWidget( QWidget *parent ) | |||
47 | QWidget *container = new QWidget( sv->viewport() ); | 47 | QWidget *container = new QWidget( sv->viewport() ); |
48 | sv->addChild( container ); | 48 | sv->addChild( container ); |
49 | 49 | ||
50 | QGridLayout *layout = new QGridLayout( container ); | 50 | QGridLayout *layout = new QGridLayout( container ); |
51 | layout->setMargin( 2 ); | 51 | layout->setMargin( 2 ); |
@@ -71,13 +71,13 @@ NTPTabWidget::NTPTabWidget( QWidget *parent ) | |||
71 | QFont font( mleNtpOutput->font() ); | 71 | QFont font( mleNtpOutput->font() ); |
72 | font.setPointSize( 7 ); | 72 | font.setPointSize( 7 ); |
73 | mleNtpOutput->setFont( font ); | 73 | mleNtpOutput->setFont( font ); |
74 | mleNtpOutput->setWordWrap( QMultiLineEdit::WidgetWidth ); | 74 | mleNtpOutput->setWordWrap( QMultiLineEdit::WidgetWidth ); |
75 | layout->addMultiCellWidget( mleNtpOutput, 3, 3, 0, 1 ); | 75 | layout->addMultiCellWidget( mleNtpOutput, 3, 3, 0, 1 ); |
76 | 76 | ||
77 | // Set NTP time button | 77 | // Set NTP time button |
78 | QPushButton *pb = new QPushButton( Resource::loadPixmap( "netsystemtime/ntptab" ), | 78 | m_ntpBtn = new QPushButton( Resource::loadPixmap( "netsystemtime/ntptab" ), |
79 | tr( "Get time from the network" ), container ); | 79 | tr( "Get time from the network" ), container ); |
80 | connect( pb, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) ); | 80 | connect( m_ntpBtn, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) ); |
81 | layout->addMultiCellWidget( pb, 4, 4, 0, 1 ); | 81 | layout->addMultiCellWidget( m_ntpBtn, 4, 4, 0, 1 ); |
82 | } | 82 | } |
83 | 83 | ||
@@ -106,2 +106,7 @@ void NTPTabWidget::addNtpOutput( const QString &str ) | |||
106 | mleNtpOutput->setCursorPosition( mleNtpOutput->numLines() + 1, 0, FALSE ); | 106 | mleNtpOutput->setCursorPosition( mleNtpOutput->numLines() + 1, 0, FALSE ); |
107 | } | 107 | } |
108 | |||
109 | void NTPTabWidget::setNTPBtnEnabled( bool enabled ) | ||
110 | { | ||
111 | m_ntpBtn->setEnabled( enabled ); | ||
112 | } | ||