Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | 7 |
1 files changed, 4 insertions, 3 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 | |||
@@ -33,16 +33,17 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac | |||
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Save the current settings, then write out the interfaces file and close. | 37 | * Save the current settings, then write out the interfaces file and close. |
38 | */ | 38 | */ |
39 | void InterfaceSetupImp::saveChanges(){ | 39 | bool InterfaceSetupImp::saveChanges(){ |
40 | if(!saveSettings()) | 40 | if(!saveSettings()) |
41 | return; | 41 | return false; |
42 | interfaces->write(); | 42 | interfaces->write(); |
43 | return true; | ||
43 | } | 44 | } |
44 | 45 | ||
45 | /** | 46 | /** |
46 | * Save the settings for the current Interface. | 47 | * Save the settings for the current Interface. |
47 | * @return bool true if successfull, false otherwise | 48 | * @return bool true if successfull, false otherwise |
48 | */ | 49 | */ |
@@ -56,13 +57,13 @@ bool InterfaceSetupImp::saveSettings(){ | |||
56 | if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ | 57 | if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ |
57 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); | 58 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); |
58 | return true; | 59 | return true; |
59 | } | 60 | } |
60 | 61 | ||
61 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ | 62 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ |
62 | QMessageBox::information(this, "Not Saved.", "Please fill in address, subnet,\n and gateway entries.", "Ok"); | 63 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", "Ok"); |
63 | return false; | 64 | return false; |
64 | } | 65 | } |
65 | interfaces->removeAllInterfaceOptions(); | 66 | interfaces->removeAllInterfaceOptions(); |
66 | 67 | ||
67 | // DHCP | 68 | // DHCP |
68 | if(dhcpCheckBox->isChecked()){ | 69 | if(dhcpCheckBox->isChecked()){ |