author | wimpie <wimpie> | 2005-01-12 01:55:32 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-12 01:55:32 (UTC) |
commit | c48160f6ac67b2f2fc4b6f982b641861ad078237 (patch) (side-by-side diff) | |
tree | 2922ac7b627091ef32f36d4e8b32630c255b00e1 /noncore/settings/networksettings2/profile | |
parent | f9a83585111afa08a47176097a150d9f468bfcdf (diff) | |
download | opie-c48160f6ac67b2f2fc4b6f982b641861ad078237.zip opie-c48160f6ac67b2f2fc4b6f982b641861ad078237.tar.gz opie-c48160f6ac67b2f2fc4b6f982b641861ad078237.tar.bz2 |
Fixed problem with enabling profile from edit environment
rename disable to enable (much more clear)
Diffstat (limited to 'noncore/settings/networksettings2/profile') (more/less context) (ignore whitespace changes)
5 files changed, 21 insertions, 19 deletions
diff --git a/noncore/settings/networksettings2/profile/profileGUI.ui b/noncore/settings/networksettings2/profile/profileGUI.ui index 8b421e8..eeb2e75 100644 --- a/noncore/settings/networksettings2/profile/profileGUI.ui +++ b/noncore/settings/networksettings2/profile/profileGUI.ui @@ -12,5 +12,5 @@ <x>0</x> <y>0</y> - <width>551</width> + <width>547</width> <height>547</height> </rect> @@ -133,5 +133,5 @@ <property stdset="1"> <name>name</name> - <cstring>Disabled_CB</cstring> + <cstring>Enabled_CB</cstring> </property> <property stdset="1"> @@ -141,5 +141,5 @@ <property stdset="1"> <name>text</name> - <string>Disabled</string> + <string>Enabled</string> </property> <property> 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 @@ -9,5 +9,5 @@ AProfile::AProfile( ProfileNetNode * PNN ) : ANetNodeInstance( PNN ) { Data.Confirm = 0; Data.Description = ""; - Data.Disabled = 0; + Data.Enabled = 1; Data.TriggerVPN = 0; GUI = 0; @@ -22,5 +22,7 @@ void AProfile::setSpecificAttribute( QString & Attr, QString & Value ) { Data.Confirm = (Value=="yes"); } else if ( Attr == "disabled" ) { - Data.Disabled = (Value=="yes"); + Data.Enabled = (Value=="no"); + } else if ( Attr == "enabled" ) { + Data.Enabled = (Value=="yes"); } else if ( Attr == "triggervpn" ) { Data.TriggerVPN = (Value=="yes"); @@ -33,5 +35,5 @@ void AProfile::saveSpecificAttribute( QTextStream & TS ) { TS << "automatic=" << ((Data.Automatic) ? "yes" : "no") << endl; TS << "preconfirm=" << ((Data.Confirm) ? "yes" : "no") << endl; - TS << "disabled=" << ((Data.Disabled) ? "yes" : "no") << endl; + TS << "enabled=" << ((Data.Enabled) ? "yes" : "no") << endl; TS << "triggervpn=" << ((Data.TriggerVPN) ? "yes" : "no") << endl; TS << "description=" << Data.Description << endl; diff --git a/noncore/settings/networksettings2/profile/profiledata.h b/noncore/settings/networksettings2/profile/profiledata.h index 2f7060d..376b393 100644 --- a/noncore/settings/networksettings2/profile/profiledata.h +++ b/noncore/settings/networksettings2/profile/profiledata.h @@ -10,6 +10,6 @@ public : // if started up automatically, ask user for confirmation bool Confirm; - // Do not bring this networkSetup up - bool Disabled; + // bring this networkSetup up + bool Enabled; bool TriggerVPN; } ; diff --git a/noncore/settings/networksettings2/profile/profileedit.cpp b/noncore/settings/networksettings2/profile/profileedit.cpp index 1713f0c..818bad6 100644 --- a/noncore/settings/networksettings2/profile/profileedit.cpp +++ b/noncore/settings/networksettings2/profile/profileedit.cpp @@ -71,5 +71,5 @@ void ProfileEdit::showData( ProfileData & Data ) { TriggersVPN_CB->setChecked( Data.TriggerVPN ); Confirm_CB->setChecked( Data.Confirm ); - Disabled_CB->setChecked( Data.Disabled ); + Enabled_CB->setChecked( Data.Enabled ); } @@ -81,5 +81,5 @@ bool ProfileEdit::commit( ProfileData & Data ) { CBM( Data.Automatic, Automatic_CB, SM ); CBM( Data.TriggerVPN, TriggersVPN_CB, SM ); - CBM( Data.Disabled, Disabled_CB, SM ); + CBM( Data.Enabled, Enabled_CB, SM ); CBM( Data.Confirm, Confirm_CB, SM ); diff --git a/noncore/settings/networksettings2/profile/profilerun.cpp b/noncore/settings/networksettings2/profile/profilerun.cpp index 77bf9ac..faa7d66 100644 --- a/noncore/settings/networksettings2/profile/profilerun.cpp +++ b/noncore/settings/networksettings2/profile/profilerun.cpp @@ -5,22 +5,22 @@ State_t ProfileRun::detectState( void ) { - Log(( "Profile %sabled\n", (Data->Disabled) ? "dis" : "en" )); + Log(( "Profile %sabled\n", (Data->Enabled) ? "en" : "dis" )); - if( Data->Disabled ) { - return Disabled; + if( Data->Enabled ) { + return Unknown; } - return Unknown; + return Disabled; } QString ProfileRun::setMyState( NetworkSetup * NC, Action_t A, bool ) { - odebug << "Profile " << Data->Disabled << oendl; + odebug << "Profile " << Data->Enabled << oendl; if( A == Disable ) { - if( ! Data->Disabled ) { - Data->Disabled = 1; + if( Data->Enabled ) { + Data->Enabled = 0; NC->setModified( 1 ); } } else if( A == Enable ) { - if( Data->Disabled ) { - Data->Disabled = 0; + if( ! Data->Enabled ) { + Data->Enabled = 1; NC->setModified( 1 ); } |