author | benmeyer <benmeyer> | 2002-10-30 20:43:56 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-30 20:43:56 (UTC) |
commit | 26b5befecbb8a763a7fde36b0b3299bd9dd28f73 (patch) (unidiff) | |
tree | 3170521118daaed4145f12705d52748b4612ae67 | |
parent | 3c1824f39867bc2ada45fe32785267caa5dfb04b (diff) | |
download | opie-26b5befecbb8a763a7fde36b0b3299bd9dd28f73.zip opie-26b5befecbb8a763a7fde36b0b3299bd9dd28f73.tar.gz opie-26b5befecbb8a763a7fde36b0b3299bd9dd28f73.tar.bz2 |
Removed requirment for DNS in setup
-rw-r--r-- | noncore/net/networksetup/interfaces/interfacesetupimp.cpp | 12 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp index d42b45d..6587d6f 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp | |||
@@ -59,6 +59,6 @@ bool InterfaceSetupImp::saveSettings(){ | |||
59 | } | 59 | } |
60 | 60 | ||
61 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty() || firstDNSLineEdit->text().isEmpty())){ | 61 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ |
62 | QMessageBox::information(this, "Empy Fields.", "Please fill in address, subnet,\n gateway and the first dns entries.", "Ok"); | 62 | QMessageBox::information(this, "Empy Fields.", "Please fill in address, subnet,\n and gateway entries.", "Ok"); |
63 | return false; | 63 | return false; |
64 | } | 64 | } |
@@ -76,7 +76,9 @@ bool InterfaceSetupImp::saveSettings(){ | |||
76 | interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); | 76 | interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); |
77 | interfaces->setInterfaceOption("gateway", gatewayEdit->text()); | 77 | interfaces->setInterfaceOption("gateway", gatewayEdit->text()); |
78 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); | 78 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ |
79 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); | 79 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); |
80 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); | 80 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); |
81 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); | ||
82 | } | ||
81 | } | 83 | } |
82 | 84 | ||
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index d42b45d..6587d6f 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -59,6 +59,6 @@ bool InterfaceSetupImp::saveSettings(){ | |||
59 | } | 59 | } |
60 | 60 | ||
61 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty() || firstDNSLineEdit->text().isEmpty())){ | 61 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ |
62 | QMessageBox::information(this, "Empy Fields.", "Please fill in address, subnet,\n gateway and the first dns entries.", "Ok"); | 62 | QMessageBox::information(this, "Empy Fields.", "Please fill in address, subnet,\n and gateway entries.", "Ok"); |
63 | return false; | 63 | return false; |
64 | } | 64 | } |
@@ -76,7 +76,9 @@ bool InterfaceSetupImp::saveSettings(){ | |||
76 | interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); | 76 | interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); |
77 | interfaces->setInterfaceOption("gateway", gatewayEdit->text()); | 77 | interfaces->setInterfaceOption("gateway", gatewayEdit->text()); |
78 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); | 78 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ |
79 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); | 79 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); |
80 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); | 80 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); |
81 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); | ||
82 | } | ||
81 | } | 83 | } |
82 | 84 | ||