author | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
commit | a9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (unidiff) | |
tree | 13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/ppp/PPPIPedit.cpp | |
parent | 48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff) | |
download | opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2 |
CONTROL files : changed version string
NS2 many changes and first release of OT2
Diffstat (limited to 'noncore/settings/networksettings2/ppp/PPPIPedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/ppp/PPPIPedit.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/noncore/settings/networksettings2/ppp/PPPIPedit.cpp b/noncore/settings/networksettings2/ppp/PPPIPedit.cpp index 6965e5a..ef1b7c0 100644 --- a/noncore/settings/networksettings2/ppp/PPPIPedit.cpp +++ b/noncore/settings/networksettings2/ppp/PPPIPedit.cpp | |||
@@ -6,52 +6,49 @@ | |||
6 | #include "PPPIPedit.h" | 6 | #include "PPPIPedit.h" |
7 | 7 | ||
8 | PPPIPEdit::PPPIPEdit( QWidget * Parent ) : PPPIPGUI( Parent ){ | 8 | PPPIPEdit::PPPIPEdit( QWidget * Parent ) : PPPIPGUI( Parent ){ |
9 | } | 9 | } |
10 | 10 | ||
11 | QString PPPIPEdit::acceptable( void ) { | 11 | QString PPPIPEdit::acceptable( void ) { |
12 | if( IPFixed_RB->isChecked() ) { | 12 | if( GWFixed_RB->isChecked() ) { |
13 | if( IPAddress_LE->text().isEmpty() ) | ||
14 | return tr("IPAddress needed" ); | ||
15 | if( ! validIP( IPAddress_LE->text() ) ) | ||
16 | return tr("IPAddress not valid" ); | ||
17 | if( IPSubMask_LE->text().isEmpty() ) | ||
18 | return tr("Subnet mask needed" ); | ||
19 | if( ! validIP( IPSubMask_LE->text() ) ) | ||
20 | return tr("Subnet mask not valid" ); | ||
21 | } else if( GWFixed_RB->isChecked() ) { | ||
22 | if( GWAddress_LE->text().isEmpty() ) | 13 | if( GWAddress_LE->text().isEmpty() ) |
23 | return tr("Gateway address needed" ); | 14 | return tr("Gateway address needed" ); |
24 | if( ! validIP( GWAddress_LE->text() ) ) | 15 | if( ! validIP( GWAddress_LE->text() ) ) |
25 | return tr("Gateway address not valid" ); | 16 | return tr("Gateway address not valid" ); |
26 | }; | 17 | }; |
27 | 18 | ||
28 | return QString(); | 19 | return QString(); |
29 | } | 20 | } |
30 | 21 | ||
31 | bool PPPIPEdit::commit( PPPData_t & D ) { | 22 | bool PPPIPEdit::commit( PPPData & D ) { |
32 | 23 | ||
33 | bool SM = 0; | 24 | bool SM = 0; |
34 | 25 | ||
35 | CBM( D.IP.IPAutomatic, IPServerAssigned_RB, SM ); | 26 | CBM( D.IP.LocalOverrule, ServerOverrulesLocal_CB, SM ); |
36 | if( ! D.IP.IPAutomatic ) { | 27 | CBM( D.IP.RemoteOverrule, ServerOverrulesRemote_CB, SM ); |
37 | TXTM( D.IP.IPAddress, IPAddress_LE, SM ); | 28 | |
38 | TXTM( D.IP.IPSubMask, IPSubMask_LE, SM ); | 29 | TXTM( D.IP.LocalAddress, LocalAddress_LE, SM ); |
39 | } | 30 | TXTM( D.IP.RemoteAddress, RemoteAddress_LE, SM ); |
40 | 31 | ||
41 | CBM( D.IP.GWAutomatic, GWServerAssigned_RB, SM ); | 32 | CBM( D.IP.GWAutomatic, GWServerAssigned_RB, SM ); |
33 | |||
42 | if( ! D.IP.GWAutomatic ) { | 34 | if( ! D.IP.GWAutomatic ) { |
43 | TXTM( D.IP.GWAddress, GWAddress_LE, SM ); | 35 | TXTM( D.IP.GWAddress, GWAddress_LE, SM ); |
44 | } | 36 | } |
45 | 37 | ||
46 | CBM( D.IP.GWIsDefault, GWIsDefault_CB, SM ); | 38 | CBM( D.IP.GWIsDefault, GWIsDefault_CB, SM ); |
39 | CBM( D.IP.GWIfNotSet, GWIfNotSet_CB, SM ); | ||
40 | |||
47 | return SM; | 41 | return SM; |
48 | } | 42 | } |
49 | 43 | ||
50 | void PPPIPEdit::showData( PPPData_t & D ) { | 44 | void PPPIPEdit::showData( PPPData & D ) { |
51 | IPServerAssigned_RB->setChecked( D.IP.IPAutomatic ); | 45 | ServerOverrulesLocal_CB->setChecked( D.IP.LocalOverrule ); |
52 | IPAddress_LE->setText( D.IP.IPAddress ); | 46 | ServerOverrulesRemote_CB->setChecked( D.IP.RemoteOverrule ); |
53 | IPSubMask_LE->setText( D.IP.IPSubMask ); | 47 | LocalAddress_LE->setText( D.IP.LocalAddress ); |
48 | RemoteAddress_LE->setText( D.IP.RemoteAddress ); | ||
49 | |||
54 | GWServerAssigned_RB->setChecked( D.IP.GWAutomatic ); | 50 | GWServerAssigned_RB->setChecked( D.IP.GWAutomatic ); |
55 | GWAddress_LE->setText( D.IP.GWAddress ); | 51 | GWAddress_LE->setText( D.IP.GWAddress ); |
56 | GWIsDefault_CB->setChecked( D.IP.GWIsDefault ); | 52 | GWIsDefault_CB->setChecked( D.IP.GWIsDefault ); |
53 | GWIfNotSet_CB->setChecked( D.IP.GWIfNotSet ); | ||
57 | } | 54 | } |