summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings.cpp4
-rw-r--r--noncore/settings/networksettings2/profile/profileGUI.ui6
-rw-r--r--noncore/settings/networksettings2/profile/profile_NNI.cpp8
-rw-r--r--noncore/settings/networksettings2/profile/profiledata.h4
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.cpp4
-rw-r--r--noncore/settings/networksettings2/profile/profilerun.cpp18
6 files changed, 24 insertions, 20 deletions
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp
index 2714dd5..469cec5 100644
--- a/noncore/settings/networksettings2/networksettings.cpp
+++ b/noncore/settings/networksettings2/networksettings.cpp
@@ -240,3 +240,4 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) {
- // must add it here since change will trigger event
+ // no update (will come later)
+ Profiles_LB->blockSignals( TRUE );
Profiles_LB->changeItem( NC->devicePixmap(),
@@ -245,2 +246,3 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) {
);
+ Profiles_LB->blockSignals( FALSE );
} else {
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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>551</width>
+ <width>547</width>
<height>547</height>
@@ -134,3 +134,3 @@
<name>name</name>
- <cstring>Disabled_CB</cstring>
+ <cstring>Enabled_CB</cstring>
</property>
@@ -142,3 +142,3 @@
<name>text</name>
- <string>Disabled</string>
+ <string>Enabled</string>
</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
@@ -10,3 +10,3 @@ AProfile::AProfile( ProfileNetNode * PNN ) : ANetNodeInstance( PNN ) {
Data.Description = "";
- Data.Disabled = 0;
+ Data.Enabled = 1;
Data.TriggerVPN = 0;
@@ -23,3 +23,5 @@ void AProfile::setSpecificAttribute( QString & Attr, QString & Value ) {
} else if ( Attr == "disabled" ) {
- Data.Disabled = (Value=="yes");
+ Data.Enabled = (Value=="no");
+ } else if ( Attr == "enabled" ) {
+ Data.Enabled = (Value=="yes");
} else if ( Attr == "triggervpn" ) {
@@ -34,3 +36,3 @@ void AProfile::saveSpecificAttribute( QTextStream & TS ) {
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;
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
@@ -11,4 +11,4 @@ public :
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
@@ -72,3 +72,3 @@ void ProfileEdit::showData( ProfileData & Data ) {
Confirm_CB->setChecked( Data.Confirm );
- Disabled_CB->setChecked( Data.Disabled );
+ Enabled_CB->setChecked( Data.Enabled );
}
@@ -82,3 +82,3 @@ bool ProfileEdit::commit( ProfileData & Data ) {
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
@@ -6,8 +6,8 @@ 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;
}
@@ -15,6 +15,6 @@ State_t ProfileRun::detectState( void ) {
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 );
@@ -22,4 +22,4 @@ QString ProfileRun::setMyState( NetworkSetup * NC, Action_t A, bool ) {
} else if( A == Enable ) {
- if( Data->Disabled ) {
- Data->Disabled = 0;
+ if( ! Data->Enabled ) {
+ Data->Enabled = 1;
NC->setModified( 1 );