summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/interfaces
authorbenmeyer <benmeyer>2002-10-31 20:05:57 (UTC)
committer benmeyer <benmeyer>2002-10-31 20:05:57 (UTC)
commit16d3fac9169e400f5542ca0e3aa993cc5c5db574 (patch) (side-by-side diff)
treeac8587cb0faed786bcb362e47949b0ade5d81ada /noncore/settings/networksettings/interfaces
parent6f6bf05d544a579d513c476453483ef9bedad49f (diff)
downloadopie-16d3fac9169e400f5542ca0e3aa993cc5c5db574.zip
opie-16d3fac9169e400f5542ca0e3aa993cc5c5db574.tar.gz
opie-16d3fac9169e400f5542ca0e3aa993cc5c5db574.tar.bz2
Fixed error message and made window stay if error message doesn't go away.
Diffstat (limited to 'noncore/settings/networksettings/interfaces') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp7
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.h7
2 files changed, 8 insertions, 6 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 550e909..a19aaeb 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -36,10 +36,11 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac
/**
* Save the current settings, then write out the interfaces file and close.
*/
-void InterfaceSetupImp::saveChanges(){
+bool InterfaceSetupImp::saveChanges(){
if(!saveSettings())
- return;
+ return false;
interfaces->write();
+ return true;
}
/**
@@ -59,7 +60,7 @@ 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;
}
interfaces->removeAllInterfaceOptions();
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
index 3bbf34e..a88e190 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
@@ -12,11 +12,12 @@ class InterfaceSetupImp : public InterfaceSetup {
public:
InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, WFlags fl = 0);
- void saveChanges();
+ bool saveChanges();
public slots:
void setProfile(const QString &profile);
bool saveSettings();
+
private:
Interfaces *interfaces;
Interface *interface;
@@ -43,8 +44,8 @@ private:
protected slots:
void accept(){
- interfaceSetup->saveChanges();
- QDialog::accept();
+ if(interfaceSetup->saveChanges())
+ QDialog::accept();
};
};