-rw-r--r-- | noncore/net/networksetup/interfaces/interfacesetupimp.cpp | 7 | ||||
-rw-r--r-- | noncore/net/networksetup/interfaces/interfacesetupimp.h | 5 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp index 550e909..a19aaeb 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp @@ -38,6 +38,7 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac */ -void InterfaceSetupImp::saveChanges(){ +bool InterfaceSetupImp::saveChanges(){ if(!saveSettings()) - return; + return false; interfaces->write(); + return true; } @@ -61,3 +62,3 @@ bool InterfaceSetupImp::saveSettings(){ if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ - QMessageBox::information(this, "Not Saved.", "Please fill in address, subnet,\n and gateway entries.", "Ok"); + QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", "Ok"); return false; diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.h b/noncore/net/networksetup/interfaces/interfacesetupimp.h index 3bbf34e..a88e190 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.h +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.h @@ -14,3 +14,3 @@ public: InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, WFlags fl = 0); - void saveChanges(); + bool saveChanges(); @@ -19,2 +19,3 @@ public slots: bool saveSettings(); + private: @@ -45,3 +46,3 @@ protected slots: void accept(){ - interfaceSetup->saveChanges(); + if(interfaceSetup->saveChanges()) QDialog::accept(); diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 74bf390..01d7e36 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp @@ -123,3 +123,3 @@ void WLANImp::accept() if ( writeConfig() ){ - interfaceSetup->saveChanges(); + if(interfaceSetup->saveChanges()) QDialog::accept(); |