From 9cb9007f211c22349e3183ba20bb7f817d811005 Mon Sep 17 00:00:00 2001 From: benmeyer Date: Mon, 16 Dec 2002 21:48:37 +0000 Subject: Remove the lease time requst. Wasn't realy needed and was uneccessary --- diff --git a/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp b/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp index cf3dba1..1fa5d38 100644 --- a/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp +++ b/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp @@ -26,7 +26,7 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na * @param Intarface *i the interface to update (should be the one we already * know about). */ -void InterfaceInformationImp::updateInterface(Interface *i){ +void InterfaceInformationImp::updateInterface(Interface *){ if(interface->getStatus()){ startButton->setEnabled(false); stopButton->setEnabled(true); diff --git a/noncore/net/networksetup/interfaces/interfacesetup.ui b/noncore/net/networksetup/interfaces/interfacesetup.ui index df55d25..2b45d49 100644 --- a/noncore/net/networksetup/interfaces/interfacesetup.ui +++ b/noncore/net/networksetup/interfaces/interfacesetup.ui @@ -11,7 +11,7 @@ 0 0 - 290 + 286 280 @@ -40,74 +40,19 @@ - QLayoutWidget + QCheckBox name - Layout9 + dhcpCheckBox + + + text + DHCP + + + checked + true - - - margin - 0 - - - spacing - 6 - - - QCheckBox - - name - dhcpCheckBox - - - text - DHCP - - - checked - true - - - - QLabel - - name - leaseHoursLabel - - - text - Requested Lease - - - - QSpinBox - - name - leaseTime - - - suffix - hours - - - maxValue - 87600 - - - minValue - 1 - - - lineStep - 24 - - - value - 168 - - - QGroupBox @@ -281,18 +226,6 @@ dhcpCheckBox toggled(bool) - leaseHoursLabel - setEnabled(bool) - - - dhcpCheckBox - toggled(bool) - leaseTime - setEnabled(bool) - - - dhcpCheckBox - toggled(bool) staticGroupBox setDisabled(bool) @@ -300,7 +233,6 @@ autoStart dhcpCheckBox - leaseTime ipAddressEdit subnetMaskEdit gatewayEdit diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp index 4818e37..56bbe93 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp @@ -50,11 +50,8 @@ bool InterfaceSetupImp::saveSettings(){ interfaces.removeAllInterfaceOptions(); // DHCP - if(dhcpCheckBox->isChecked()){ + 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()); @@ -122,11 +119,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){ 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())); @@ -138,7 +130,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){ ipAddressEdit->setText(interfaces.getInterfaceOption("address", error)); subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error)); gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error)); - } // interfacesetup.cpp diff --git a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp index cf3dba1..1fa5d38 100644 --- a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp @@ -26,7 +26,7 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na * @param Intarface *i the interface to update (should be the one we already * know about). */ -void InterfaceInformationImp::updateInterface(Interface *i){ +void InterfaceInformationImp::updateInterface(Interface *){ if(interface->getStatus()){ startButton->setEnabled(false); stopButton->setEnabled(true); diff --git a/noncore/settings/networksettings/interfaces/interfacesetup.ui b/noncore/settings/networksettings/interfaces/interfacesetup.ui index df55d25..2b45d49 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetup.ui +++ b/noncore/settings/networksettings/interfaces/interfacesetup.ui @@ -11,7 +11,7 @@ 0 0 - 290 + 286 280 @@ -40,74 +40,19 @@ - QLayoutWidget + QCheckBox name - Layout9 + dhcpCheckBox + + + text + DHCP + + + checked + true - - - margin - 0 - - - spacing - 6 - - - QCheckBox - - name - dhcpCheckBox - - - text - DHCP - - - checked - true - - - - QLabel - - name - leaseHoursLabel - - - text - Requested Lease - - - - QSpinBox - - name - leaseTime - - - suffix - hours - - - maxValue - 87600 - - - minValue - 1 - - - lineStep - 24 - - - value - 168 - - - QGroupBox @@ -281,18 +226,6 @@ dhcpCheckBox toggled(bool) - leaseHoursLabel - setEnabled(bool) - - - dhcpCheckBox - toggled(bool) - leaseTime - setEnabled(bool) - - - dhcpCheckBox - toggled(bool) staticGroupBox setDisabled(bool) @@ -300,7 +233,6 @@ autoStart dhcpCheckBox - leaseTime ipAddressEdit subnetMaskEdit gatewayEdit diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index 4818e37..56bbe93 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp @@ -50,11 +50,8 @@ bool InterfaceSetupImp::saveSettings(){ interfaces.removeAllInterfaceOptions(); // DHCP - if(dhcpCheckBox->isChecked()){ + 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()); @@ -122,11 +119,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){ 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())); @@ -138,7 +130,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){ ipAddressEdit->setText(interfaces.getInterfaceOption("address", error)); subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error)); gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error)); - } // interfacesetup.cpp -- cgit v0.9.0.2