Diffstat (limited to 'noncore/settings/networksettings2/profile/profile_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/profile/profile_NNI.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/profile/profile_NNI.cpp b/noncore/settings/networksettings2/profile/profile_NNI.cpp index fc2d809..0bc13d1 100644 --- a/noncore/settings/networksettings2/profile/profile_NNI.cpp +++ b/noncore/settings/networksettings2/profile/profile_NNI.cpp | |||
@@ -1,59 +1,61 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include <opie2/odebug.h> | 2 | #include <opie2/odebug.h> |
3 | #include "profileedit.h" | 3 | #include "profileedit.h" |
4 | #include "profile_NNI.h" | 4 | #include "profile_NNI.h" |
5 | #include "profile_NN.h" | 5 | #include "profile_NN.h" |
6 | 6 | ||
7 | AProfile::AProfile( ProfileNetNode * PNN ) : ANetNodeInstance( PNN ) { | 7 | AProfile::AProfile( ProfileNetNode * PNN ) : ANetNodeInstance( PNN ) { |
8 | Data.Automatic = 1; | 8 | Data.Automatic = 1; |
9 | Data.Confirm = 0; | 9 | Data.Confirm = 0; |
10 | Data.Description = ""; | 10 | Data.Description = ""; |
11 | Data.Disabled = 0; | 11 | Data.Enabled = 1; |
12 | Data.TriggerVPN = 0; | 12 | Data.TriggerVPN = 0; |
13 | GUI = 0; | 13 | GUI = 0; |
14 | RT = 0; | 14 | RT = 0; |
15 | } | 15 | } |
16 | 16 | ||
17 | void AProfile::setSpecificAttribute( QString & Attr, QString & Value ) { | 17 | void AProfile::setSpecificAttribute( QString & Attr, QString & Value ) { |
18 | 18 | ||
19 | if ( Attr == "automatic" ) { | 19 | if ( Attr == "automatic" ) { |
20 | Data.Automatic = (Value=="yes"); | 20 | Data.Automatic = (Value=="yes"); |
21 | } else if ( Attr == "preconfirm" ) { | 21 | } else if ( Attr == "preconfirm" ) { |
22 | Data.Confirm = (Value=="yes"); | 22 | Data.Confirm = (Value=="yes"); |
23 | } else if ( Attr == "disabled" ) { | 23 | } else if ( Attr == "disabled" ) { |
24 | Data.Disabled = (Value=="yes"); | 24 | Data.Enabled = (Value=="no"); |
25 | } else if ( Attr == "enabled" ) { | ||
26 | Data.Enabled = (Value=="yes"); | ||
25 | } else if ( Attr == "triggervpn" ) { | 27 | } else if ( Attr == "triggervpn" ) { |
26 | Data.TriggerVPN = (Value=="yes"); | 28 | Data.TriggerVPN = (Value=="yes"); |
27 | } else if ( Attr == "description" ) { | 29 | } else if ( Attr == "description" ) { |
28 | Data.Description = Value; | 30 | Data.Description = Value; |
29 | } | 31 | } |
30 | } | 32 | } |
31 | 33 | ||
32 | void AProfile::saveSpecificAttribute( QTextStream & TS ) { | 34 | void AProfile::saveSpecificAttribute( QTextStream & TS ) { |
33 | TS << "automatic=" << ((Data.Automatic) ? "yes" : "no") << endl; | 35 | TS << "automatic=" << ((Data.Automatic) ? "yes" : "no") << endl; |
34 | TS << "preconfirm=" << ((Data.Confirm) ? "yes" : "no") << endl; | 36 | TS << "preconfirm=" << ((Data.Confirm) ? "yes" : "no") << endl; |
35 | TS << "disabled=" << ((Data.Disabled) ? "yes" : "no") << endl; | 37 | TS << "enabled=" << ((Data.Enabled) ? "yes" : "no") << endl; |
36 | TS << "triggervpn=" << ((Data.TriggerVPN) ? "yes" : "no") << endl; | 38 | TS << "triggervpn=" << ((Data.TriggerVPN) ? "yes" : "no") << endl; |
37 | TS << "description=" << Data.Description << endl; | 39 | TS << "description=" << Data.Description << endl; |
38 | } | 40 | } |
39 | 41 | ||
40 | QWidget * AProfile::edit( QWidget * parent ) { | 42 | QWidget * AProfile::edit( QWidget * parent ) { |
41 | GUI = new ProfileEdit( parent, this ); | 43 | GUI = new ProfileEdit( parent, this ); |
42 | GUI->showData( Data ); | 44 | GUI->showData( Data ); |
43 | return GUI; | 45 | return GUI; |
44 | } | 46 | } |
45 | 47 | ||
46 | QString AProfile::acceptable( void ) { | 48 | QString AProfile::acceptable( void ) { |
47 | return ( GUI ) ? GUI->acceptable( ) : QString(); | 49 | return ( GUI ) ? GUI->acceptable( ) : QString(); |
48 | } | 50 | } |
49 | 51 | ||
50 | void AProfile::commit( void ) { | 52 | void AProfile::commit( void ) { |
51 | if( GUI && GUI->commit( Data ) ) | 53 | if( GUI && GUI->commit( Data ) ) |
52 | setModified( 1 ); | 54 | setModified( 1 ); |
53 | } | 55 | } |
54 | 56 | ||
55 | short AProfile::generateFileEmbedded( SystemFile & SF, | 57 | short AProfile::generateFileEmbedded( SystemFile & SF, |
56 | long DevNr ) { | 58 | long DevNr ) { |
57 | 59 | ||
58 | short rvl, rvd; | 60 | short rvl, rvd; |
59 | 61 | ||