author | benmeyer <benmeyer> | 2002-10-18 16:27:02 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-18 16:27:02 (UTC) |
commit | 12851a09a2761ca6e189f080e9ca69bf4974302f (patch) (side-by-side diff) | |
tree | 1b9a368fc5e424d4bf60f4c582b87b23a975c26a /noncore/net/networksetup/interfacesetupimp.cpp | |
parent | 47e60a8dc20f46dd00b9405f7fde122792018627 (diff) | |
download | opie-12851a09a2761ca6e189f080e9ca69bf4974302f.zip opie-12851a09a2761ca6e189f080e9ca69bf4974302f.tar.gz opie-12851a09a2761ca6e189f080e9ca69bf4974302f.tar.bz2 |
Can now remove mapping and is done so automagicly when you delete a profile
Diffstat (limited to 'noncore/net/networksetup/interfacesetupimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfacesetupimp.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/net/networksetup/interfacesetupimp.cpp b/noncore/net/networksetup/interfacesetupimp.cpp index bdbdfde..1327726 100644 --- a/noncore/net/networksetup/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfacesetupimp.cpp @@ -71,49 +71,48 @@ bool InterfaceSetupImp::saveSettings(){ } 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); } // IP Information interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); return true; } /** * The Profile has changed. * @profile the new profile. */ void InterfaceSetupImp::setProfile(const QString &profile){ QString newInterfaceName = interface->getInterfaceName(); if(profile.length() > 0) newInterfaceName += "_" + profile; - qDebug( newInterfaceName.latin1()); // See if we have to make a interface. if(!interfaces->setInterface(newInterfaceName)){ // Add making for this new interface if need too if(profile != ""){ interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); if(!interfaces->setMapping(interface->getInterfaceName())){ interfaces->addMapping(interface->getInterfaceName()); if(!interfaces->setMapping(interface->getInterfaceName())){ qDebug("InterfaceSetupImp: Added Mapping, but still can't set."); return; } } interfaces->setMap("map", newInterfaceName); interfaces->setScript("getprofile.sh"); } else{ interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); if(!interfaces->setInterface(newInterfaceName)){ qDebug("InterfaceSetupImp: Added interface, but still can't set."); return; } } } |