author | benmeyer <benmeyer> | 2002-10-29 15:59:44 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-29 15:59:44 (UTC) |
commit | 5ca0a08f9f27391370b291df28b3de71db3bb175 (patch) (side-by-side diff) | |
tree | f0730ad64e0dfc84494cc86813a40854b504ee12 /noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |
parent | bad66a2ea2aea8bec1c7895b0e1a461e2f4859c2 (diff) | |
download | opie-5ca0a08f9f27391370b291df28b3de71db3bb175.zip opie-5ca0a08f9f27391370b291df28b3de71db3bb175.tar.gz opie-5ca0a08f9f27391370b291df28b3de71db3bb175.tar.bz2 |
Added changedns
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.cpp') (more/less context) (ignore 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 @@ -5,25 +5,25 @@ #include <qdialog.h> #include <qcombobox.h> #include <qcheckbox.h> #include <qlineedit.h> #include <qspinbox.h> #include <qgroupbox.h> #include <qlabel.h> #include <qmessagebox.h> #include <assert.h> -#define DNSSCRIPT "interfacednsscript" +#define DNSSCRIPT "changedns" /** * Constuctor. Set up the connection and load the first profile. */ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, WFlags fl) : InterfaceSetup(parent, name, fl){ assert(parent); assert(i); interface = i; interfaces = new Interfaces(); bool error = false; if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ staticGroupBox->hide(); @@ -67,26 +67,26 @@ bool InterfaceSetupImp::saveSettings(){ // DHCP if(dhcpCheckBox->isChecked()){ interfaces->setInterfaceMethod(INTERFACES_METHOD_DHCP); interfaces->setInterfaceOption("leasehours", QString("%1").arg(leaseTime->value())); interfaces->setInterfaceOption("leasetime", QString("%1").arg(leaseTime->value()*60*60)); } else{ interfaces->setInterfaceMethod("static"); interfaces->setInterfaceOption("address", ipAddressEdit->text()); interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); interfaces->setInterfaceOption("gateway", gatewayEdit->text()); QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); - interfaces->setInterfaceOption("up "DNSSCRIPT" add ", dns); - interfaces->setInterfaceOption("down "DNSSCRIPT" remove ", dns); + interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); + interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); } // IP Information interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); return true; } /** * The Profile has changed. * @profile the new profile. */ void InterfaceSetupImp::setProfile(const QString &profile){ @@ -124,25 +124,25 @@ void InterfaceSetupImp::setProfile(const QString &profile){ if(interfaces->getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) dhcpCheckBox->setChecked(true); else dhcpCheckBox->setChecked(false); leaseTime->setValue(interfaces->getInterfaceOption("leasehours", error).toInt()); if(error) leaseTime->setValue(interfaces->getInterfaceOption("leasetime", error).toInt()/60/60); if(error) leaseTime->setValue(24); // IP Information autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); - QString dns = interfaces->getInterfaceOption("up interfacednsscript add", error); + QString dns = interfaces->getInterfaceOption("up interfacednsscript -a", error); if(dns.contains(" ")){ firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); } ipAddressEdit->setText(interfaces->getInterfaceOption("address", error)); subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); } // interfacesetup.cpp |