Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index e717d6f..97c05cc 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -11,13 +11,13 @@ | |||
11 | #include <qlabel.h> | 11 | #include <qlabel.h> |
12 | 12 | ||
13 | #include <qmessagebox.h> | 13 | #include <qmessagebox.h> |
14 | 14 | ||
15 | #include <assert.h> | 15 | #include <assert.h> |
16 | 16 | ||
17 | #define DNSSCRIPT "interfacednsscript" | 17 | #define DNSSCRIPT "changedns" |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * Constuctor. Set up the connection and load the first profile. | 20 | * Constuctor. Set up the connection and load the first profile. |
21 | */ | 21 | */ |
22 | InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, WFlags fl) : InterfaceSetup(parent, name, fl){ | 22 | InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, WFlags fl) : InterfaceSetup(parent, name, fl){ |
23 | assert(parent); | 23 | assert(parent); |
@@ -73,14 +73,14 @@ bool InterfaceSetupImp::saveSettings(){ | |||
73 | else{ | 73 | else{ |
74 | interfaces->setInterfaceMethod("static"); | 74 | interfaces->setInterfaceMethod("static"); |
75 | interfaces->setInterfaceOption("address", ipAddressEdit->text()); | 75 | interfaces->setInterfaceOption("address", ipAddressEdit->text()); |
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 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); |
79 | interfaces->setInterfaceOption("up "DNSSCRIPT" add ", dns); | 79 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); |
80 | interfaces->setInterfaceOption("down "DNSSCRIPT" remove ", dns); | 80 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); |
81 | } | 81 | } |
82 | 82 | ||
83 | // IP Information | 83 | // IP Information |
84 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); | 84 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); |
85 | return true; | 85 | return true; |
86 | } | 86 | } |
@@ -130,13 +130,13 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
130 | leaseTime->setValue(interfaces->getInterfaceOption("leasetime", error).toInt()/60/60); | 130 | leaseTime->setValue(interfaces->getInterfaceOption("leasetime", error).toInt()/60/60); |
131 | if(error) | 131 | if(error) |
132 | leaseTime->setValue(24); | 132 | leaseTime->setValue(24); |
133 | 133 | ||
134 | // IP Information | 134 | // IP Information |
135 | autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); | 135 | autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); |
136 | QString dns = interfaces->getInterfaceOption("up interfacednsscript add", error); | 136 | QString dns = interfaces->getInterfaceOption("up interfacednsscript -a", error); |
137 | if(dns.contains(" ")){ | 137 | if(dns.contains(" ")){ |
138 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); | 138 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); |
139 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); | 139 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); |
140 | } | 140 | } |
141 | ipAddressEdit->setText(interfaces->getInterfaceOption("address", error)); | 141 | ipAddressEdit->setText(interfaces->getInterfaceOption("address", error)); |
142 | subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); | 142 | subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); |