author | benmeyer <benmeyer> | 2002-12-16 21:48:37 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-12-16 21:48:37 (UTC) |
commit | 9cb9007f211c22349e3183ba20bb7f817d811005 (patch) (unidiff) | |
tree | 71d929282b4edfff101ef208d6ab4d1512b20960 | |
parent | 05ee76167ad314aea710966e7c93b124da252a95 (diff) | |
download | opie-9cb9007f211c22349e3183ba20bb7f817d811005.zip opie-9cb9007f211c22349e3183ba20bb7f817d811005.tar.gz opie-9cb9007f211c22349e3183ba20bb7f817d811005.tar.bz2 |
Remove the lease time requst. Wasn't realy needed and was uneccessary
6 files changed, 26 insertions, 180 deletions
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 | |||
@@ -23,13 +23,13 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na | |||
23 | 23 | ||
24 | /** | 24 | /** |
25 | * Update the interface information and buttons. | 25 | * Update the interface information and buttons. |
26 | * @param Intarface *i the interface to update (should be the one we already | 26 | * @param Intarface *i the interface to update (should be the one we already |
27 | * know about). | 27 | * know about). |
28 | */ | 28 | */ |
29 | void InterfaceInformationImp::updateInterface(Interface *i){ | 29 | void InterfaceInformationImp::updateInterface(Interface *){ |
30 | if(interface->getStatus()){ | 30 | if(interface->getStatus()){ |
31 | startButton->setEnabled(false); | 31 | startButton->setEnabled(false); |
32 | stopButton->setEnabled(true); | 32 | stopButton->setEnabled(true); |
33 | restartButton->setEnabled(true); | 33 | restartButton->setEnabled(true); |
34 | } | 34 | } |
35 | else{ | 35 | else{ |
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 | |||
@@ -8,13 +8,13 @@ | |||
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>290</width> | 14 | <width>286</width> |
15 | <height>280</height> | 15 | <height>280</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Interface Configuration</string> | 20 | <string>Interface Configuration</string> |
@@ -37,80 +37,25 @@ | |||
37 | <property stdset="1"> | 37 | <property stdset="1"> |
38 | <name>text</name> | 38 | <name>text</name> |
39 | <string>Automatically bring up</string> | 39 | <string>Automatically bring up</string> |
40 | </property> | 40 | </property> |
41 | </widget> | 41 | </widget> |
42 | <widget> | 42 | <widget> |
43 | <class>QLayoutWidget</class> | 43 | <class>QCheckBox</class> |
44 | <property stdset="1"> | 44 | <property stdset="1"> |
45 | <name>name</name> | 45 | <name>name</name> |
46 | <cstring>Layout9</cstring> | 46 | <cstring>dhcpCheckBox</cstring> |
47 | </property> | ||
48 | <property stdset="1"> | ||
49 | <name>text</name> | ||
50 | <string>DHCP</string> | ||
51 | </property> | ||
52 | <property stdset="1"> | ||
53 | <name>checked</name> | ||
54 | <bool>true</bool> | ||
47 | </property> | 55 | </property> |
48 | <hbox> | ||
49 | <property stdset="1"> | ||
50 | <name>margin</name> | ||
51 | <number>0</number> | ||
52 | </property> | ||
53 | <property stdset="1"> | ||
54 | <name>spacing</name> | ||
55 | <number>6</number> | ||
56 | </property> | ||
57 | <widget> | ||
58 | <class>QCheckBox</class> | ||
59 | <property stdset="1"> | ||
60 | <name>name</name> | ||
61 | <cstring>dhcpCheckBox</cstring> | ||
62 | </property> | ||
63 | <property stdset="1"> | ||
64 | <name>text</name> | ||
65 | <string>DHCP</string> | ||
66 | </property> | ||
67 | <property stdset="1"> | ||
68 | <name>checked</name> | ||
69 | <bool>true</bool> | ||
70 | </property> | ||
71 | </widget> | ||
72 | <widget> | ||
73 | <class>QLabel</class> | ||
74 | <property stdset="1"> | ||
75 | <name>name</name> | ||
76 | <cstring>leaseHoursLabel</cstring> | ||
77 | </property> | ||
78 | <property stdset="1"> | ||
79 | <name>text</name> | ||
80 | <string>Requested Lease</string> | ||
81 | </property> | ||
82 | </widget> | ||
83 | <widget> | ||
84 | <class>QSpinBox</class> | ||
85 | <property stdset="1"> | ||
86 | <name>name</name> | ||
87 | <cstring>leaseTime</cstring> | ||
88 | </property> | ||
89 | <property stdset="1"> | ||
90 | <name>suffix</name> | ||
91 | <string> hours</string> | ||
92 | </property> | ||
93 | <property stdset="1"> | ||
94 | <name>maxValue</name> | ||
95 | <number>87600</number> | ||
96 | </property> | ||
97 | <property stdset="1"> | ||
98 | <name>minValue</name> | ||
99 | <number>1</number> | ||
100 | </property> | ||
101 | <property stdset="1"> | ||
102 | <name>lineStep</name> | ||
103 | <number>24</number> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>value</name> | ||
107 | <number>168</number> | ||
108 | </property> | ||
109 | </widget> | ||
110 | </hbox> | ||
111 | </widget> | 56 | </widget> |
112 | <widget> | 57 | <widget> |
113 | <class>QGroupBox</class> | 58 | <class>QGroupBox</class> |
114 | <property stdset="1"> | 59 | <property stdset="1"> |
115 | <name>name</name> | 60 | <name>name</name> |
116 | <cstring>staticGroupBox</cstring> | 61 | <cstring>staticGroupBox</cstring> |
@@ -278,32 +223,19 @@ | |||
278 | </image> | 223 | </image> |
279 | </images> | 224 | </images> |
280 | <connections> | 225 | <connections> |
281 | <connection> | 226 | <connection> |
282 | <sender>dhcpCheckBox</sender> | 227 | <sender>dhcpCheckBox</sender> |
283 | <signal>toggled(bool)</signal> | 228 | <signal>toggled(bool)</signal> |
284 | <receiver>leaseHoursLabel</receiver> | ||
285 | <slot>setEnabled(bool)</slot> | ||
286 | </connection> | ||
287 | <connection> | ||
288 | <sender>dhcpCheckBox</sender> | ||
289 | <signal>toggled(bool)</signal> | ||
290 | <receiver>leaseTime</receiver> | ||
291 | <slot>setEnabled(bool)</slot> | ||
292 | </connection> | ||
293 | <connection> | ||
294 | <sender>dhcpCheckBox</sender> | ||
295 | <signal>toggled(bool)</signal> | ||
296 | <receiver>staticGroupBox</receiver> | 229 | <receiver>staticGroupBox</receiver> |
297 | <slot>setDisabled(bool)</slot> | 230 | <slot>setDisabled(bool)</slot> |
298 | </connection> | 231 | </connection> |
299 | </connections> | 232 | </connections> |
300 | <tabstops> | 233 | <tabstops> |
301 | <tabstop>autoStart</tabstop> | 234 | <tabstop>autoStart</tabstop> |
302 | <tabstop>dhcpCheckBox</tabstop> | 235 | <tabstop>dhcpCheckBox</tabstop> |
303 | <tabstop>leaseTime</tabstop> | ||
304 | <tabstop>ipAddressEdit</tabstop> | 236 | <tabstop>ipAddressEdit</tabstop> |
305 | <tabstop>subnetMaskEdit</tabstop> | 237 | <tabstop>subnetMaskEdit</tabstop> |
306 | <tabstop>gatewayEdit</tabstop> | 238 | <tabstop>gatewayEdit</tabstop> |
307 | <tabstop>firstDNSLineEdit</tabstop> | 239 | <tabstop>firstDNSLineEdit</tabstop> |
308 | <tabstop>secondDNSLineEdit</tabstop> | 240 | <tabstop>secondDNSLineEdit</tabstop> |
309 | </tabstops> | 241 | </tabstops> |
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 | |||
@@ -47,17 +47,14 @@ bool InterfaceSetupImp::saveSettings(){ | |||
47 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok); | 47 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok); |
48 | return false; | 48 | return false; |
49 | } | 49 | } |
50 | interfaces.removeAllInterfaceOptions(); | 50 | interfaces.removeAllInterfaceOptions(); |
51 | 51 | ||
52 | // DHCP | 52 | // DHCP |
53 | if(dhcpCheckBox->isChecked()){ | 53 | if(dhcpCheckBox->isChecked()) |
54 | interfaces.setInterfaceMethod(INTERFACES_METHOD_DHCP); | 54 | interfaces.setInterfaceMethod(INTERFACES_METHOD_DHCP); |
55 | interfaces.setInterfaceOption("leasehours", QString("%1").arg(leaseTime->value())); | ||
56 | interfaces.setInterfaceOption("leasetime", QString("%1").arg(leaseTime->value()*60*60)); | ||
57 | } | ||
58 | else{ | 55 | else{ |
59 | interfaces.setInterfaceMethod("static"); | 56 | interfaces.setInterfaceMethod("static"); |
60 | interfaces.setInterfaceOption("address", ipAddressEdit->text()); | 57 | interfaces.setInterfaceOption("address", ipAddressEdit->text()); |
61 | interfaces.setInterfaceOption("netmask", subnetMaskEdit->text()); | 58 | interfaces.setInterfaceOption("netmask", subnetMaskEdit->text()); |
62 | interfaces.setInterfaceOption("gateway", gatewayEdit->text()); | 59 | interfaces.setInterfaceOption("gateway", gatewayEdit->text()); |
63 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ | 60 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ |
@@ -119,27 +116,21 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
119 | // DHCP | 116 | // DHCP |
120 | bool error = false; | 117 | bool error = false; |
121 | if(interfaces.getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) | 118 | if(interfaces.getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) |
122 | dhcpCheckBox->setChecked(true); | 119 | dhcpCheckBox->setChecked(true); |
123 | else | 120 | else |
124 | dhcpCheckBox->setChecked(false); | 121 | dhcpCheckBox->setChecked(false); |
125 | leaseTime->setValue(interfaces.getInterfaceOption("leasehours", error).toInt()); | ||
126 | if(error) | ||
127 | leaseTime->setValue(interfaces.getInterfaceOption("leasetime", error).toInt()/60/60); | ||
128 | if(error) | ||
129 | leaseTime->setValue(24); | ||
130 | 122 | ||
131 | // IP Information | 123 | // IP Information |
132 | autoStart->setChecked(interfaces.isAuto(interface->getInterfaceName())); | 124 | autoStart->setChecked(interfaces.isAuto(interface->getInterfaceName())); |
133 | QString dns = interfaces.getInterfaceOption("up "DNSSCRIPT" -a", error); | 125 | QString dns = interfaces.getInterfaceOption("up "DNSSCRIPT" -a", error); |
134 | if(dns.contains(" ")){ | 126 | if(dns.contains(" ")){ |
135 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); | 127 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); |
136 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); | 128 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); |
137 | } | 129 | } |
138 | ipAddressEdit->setText(interfaces.getInterfaceOption("address", error)); | 130 | ipAddressEdit->setText(interfaces.getInterfaceOption("address", error)); |
139 | subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error)); | 131 | subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error)); |
140 | gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error)); | 132 | gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error)); |
141 | |||
142 | } | 133 | } |
143 | 134 | ||
144 | // interfacesetup.cpp | 135 | // interfacesetup.cpp |
145 | 136 | ||
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 | |||
@@ -23,13 +23,13 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na | |||
23 | 23 | ||
24 | /** | 24 | /** |
25 | * Update the interface information and buttons. | 25 | * Update the interface information and buttons. |
26 | * @param Intarface *i the interface to update (should be the one we already | 26 | * @param Intarface *i the interface to update (should be the one we already |
27 | * know about). | 27 | * know about). |
28 | */ | 28 | */ |
29 | void InterfaceInformationImp::updateInterface(Interface *i){ | 29 | void InterfaceInformationImp::updateInterface(Interface *){ |
30 | if(interface->getStatus()){ | 30 | if(interface->getStatus()){ |
31 | startButton->setEnabled(false); | 31 | startButton->setEnabled(false); |
32 | stopButton->setEnabled(true); | 32 | stopButton->setEnabled(true); |
33 | restartButton->setEnabled(true); | 33 | restartButton->setEnabled(true); |
34 | } | 34 | } |
35 | else{ | 35 | else{ |
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 | |||
@@ -8,13 +8,13 @@ | |||
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>290</width> | 14 | <width>286</width> |
15 | <height>280</height> | 15 | <height>280</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Interface Configuration</string> | 20 | <string>Interface Configuration</string> |
@@ -37,80 +37,25 @@ | |||
37 | <property stdset="1"> | 37 | <property stdset="1"> |
38 | <name>text</name> | 38 | <name>text</name> |
39 | <string>Automatically bring up</string> | 39 | <string>Automatically bring up</string> |
40 | </property> | 40 | </property> |
41 | </widget> | 41 | </widget> |
42 | <widget> | 42 | <widget> |
43 | <class>QLayoutWidget</class> | 43 | <class>QCheckBox</class> |
44 | <property stdset="1"> | 44 | <property stdset="1"> |
45 | <name>name</name> | 45 | <name>name</name> |
46 | <cstring>Layout9</cstring> | 46 | <cstring>dhcpCheckBox</cstring> |
47 | </property> | ||
48 | <property stdset="1"> | ||
49 | <name>text</name> | ||
50 | <string>DHCP</string> | ||
51 | </property> | ||
52 | <property stdset="1"> | ||
53 | <name>checked</name> | ||
54 | <bool>true</bool> | ||
47 | </property> | 55 | </property> |
48 | <hbox> | ||
49 | <property stdset="1"> | ||
50 | <name>margin</name> | ||
51 | <number>0</number> | ||
52 | </property> | ||
53 | <property stdset="1"> | ||
54 | <name>spacing</name> | ||
55 | <number>6</number> | ||
56 | </property> | ||
57 | <widget> | ||
58 | <class>QCheckBox</class> | ||
59 | <property stdset="1"> | ||
60 | <name>name</name> | ||
61 | <cstring>dhcpCheckBox</cstring> | ||
62 | </property> | ||
63 | <property stdset="1"> | ||
64 | <name>text</name> | ||
65 | <string>DHCP</string> | ||
66 | </property> | ||
67 | <property stdset="1"> | ||
68 | <name>checked</name> | ||
69 | <bool>true</bool> | ||
70 | </property> | ||
71 | </widget> | ||
72 | <widget> | ||
73 | <class>QLabel</class> | ||
74 | <property stdset="1"> | ||
75 | <name>name</name> | ||
76 | <cstring>leaseHoursLabel</cstring> | ||
77 | </property> | ||
78 | <property stdset="1"> | ||
79 | <name>text</name> | ||
80 | <string>Requested Lease</string> | ||
81 | </property> | ||
82 | </widget> | ||
83 | <widget> | ||
84 | <class>QSpinBox</class> | ||
85 | <property stdset="1"> | ||
86 | <name>name</name> | ||
87 | <cstring>leaseTime</cstring> | ||
88 | </property> | ||
89 | <property stdset="1"> | ||
90 | <name>suffix</name> | ||
91 | <string> hours</string> | ||
92 | </property> | ||
93 | <property stdset="1"> | ||
94 | <name>maxValue</name> | ||
95 | <number>87600</number> | ||
96 | </property> | ||
97 | <property stdset="1"> | ||
98 | <name>minValue</name> | ||
99 | <number>1</number> | ||
100 | </property> | ||
101 | <property stdset="1"> | ||
102 | <name>lineStep</name> | ||
103 | <number>24</number> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>value</name> | ||
107 | <number>168</number> | ||
108 | </property> | ||
109 | </widget> | ||
110 | </hbox> | ||
111 | </widget> | 56 | </widget> |
112 | <widget> | 57 | <widget> |
113 | <class>QGroupBox</class> | 58 | <class>QGroupBox</class> |
114 | <property stdset="1"> | 59 | <property stdset="1"> |
115 | <name>name</name> | 60 | <name>name</name> |
116 | <cstring>staticGroupBox</cstring> | 61 | <cstring>staticGroupBox</cstring> |
@@ -278,32 +223,19 @@ | |||
278 | </image> | 223 | </image> |
279 | </images> | 224 | </images> |
280 | <connections> | 225 | <connections> |
281 | <connection> | 226 | <connection> |
282 | <sender>dhcpCheckBox</sender> | 227 | <sender>dhcpCheckBox</sender> |
283 | <signal>toggled(bool)</signal> | 228 | <signal>toggled(bool)</signal> |
284 | <receiver>leaseHoursLabel</receiver> | ||
285 | <slot>setEnabled(bool)</slot> | ||
286 | </connection> | ||
287 | <connection> | ||
288 | <sender>dhcpCheckBox</sender> | ||
289 | <signal>toggled(bool)</signal> | ||
290 | <receiver>leaseTime</receiver> | ||
291 | <slot>setEnabled(bool)</slot> | ||
292 | </connection> | ||
293 | <connection> | ||
294 | <sender>dhcpCheckBox</sender> | ||
295 | <signal>toggled(bool)</signal> | ||
296 | <receiver>staticGroupBox</receiver> | 229 | <receiver>staticGroupBox</receiver> |
297 | <slot>setDisabled(bool)</slot> | 230 | <slot>setDisabled(bool)</slot> |
298 | </connection> | 231 | </connection> |
299 | </connections> | 232 | </connections> |
300 | <tabstops> | 233 | <tabstops> |
301 | <tabstop>autoStart</tabstop> | 234 | <tabstop>autoStart</tabstop> |
302 | <tabstop>dhcpCheckBox</tabstop> | 235 | <tabstop>dhcpCheckBox</tabstop> |
303 | <tabstop>leaseTime</tabstop> | ||
304 | <tabstop>ipAddressEdit</tabstop> | 236 | <tabstop>ipAddressEdit</tabstop> |
305 | <tabstop>subnetMaskEdit</tabstop> | 237 | <tabstop>subnetMaskEdit</tabstop> |
306 | <tabstop>gatewayEdit</tabstop> | 238 | <tabstop>gatewayEdit</tabstop> |
307 | <tabstop>firstDNSLineEdit</tabstop> | 239 | <tabstop>firstDNSLineEdit</tabstop> |
308 | <tabstop>secondDNSLineEdit</tabstop> | 240 | <tabstop>secondDNSLineEdit</tabstop> |
309 | </tabstops> | 241 | </tabstops> |
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 | |||
@@ -47,17 +47,14 @@ bool InterfaceSetupImp::saveSettings(){ | |||
47 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok); | 47 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok); |
48 | return false; | 48 | return false; |
49 | } | 49 | } |
50 | interfaces.removeAllInterfaceOptions(); | 50 | interfaces.removeAllInterfaceOptions(); |
51 | 51 | ||
52 | // DHCP | 52 | // DHCP |
53 | if(dhcpCheckBox->isChecked()){ | 53 | if(dhcpCheckBox->isChecked()) |
54 | interfaces.setInterfaceMethod(INTERFACES_METHOD_DHCP); | 54 | interfaces.setInterfaceMethod(INTERFACES_METHOD_DHCP); |
55 | interfaces.setInterfaceOption("leasehours", QString("%1").arg(leaseTime->value())); | ||
56 | interfaces.setInterfaceOption("leasetime", QString("%1").arg(leaseTime->value()*60*60)); | ||
57 | } | ||
58 | else{ | 55 | else{ |
59 | interfaces.setInterfaceMethod("static"); | 56 | interfaces.setInterfaceMethod("static"); |
60 | interfaces.setInterfaceOption("address", ipAddressEdit->text()); | 57 | interfaces.setInterfaceOption("address", ipAddressEdit->text()); |
61 | interfaces.setInterfaceOption("netmask", subnetMaskEdit->text()); | 58 | interfaces.setInterfaceOption("netmask", subnetMaskEdit->text()); |
62 | interfaces.setInterfaceOption("gateway", gatewayEdit->text()); | 59 | interfaces.setInterfaceOption("gateway", gatewayEdit->text()); |
63 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ | 60 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ |
@@ -119,27 +116,21 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
119 | // DHCP | 116 | // DHCP |
120 | bool error = false; | 117 | bool error = false; |
121 | if(interfaces.getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) | 118 | if(interfaces.getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) |
122 | dhcpCheckBox->setChecked(true); | 119 | dhcpCheckBox->setChecked(true); |
123 | else | 120 | else |
124 | dhcpCheckBox->setChecked(false); | 121 | dhcpCheckBox->setChecked(false); |
125 | leaseTime->setValue(interfaces.getInterfaceOption("leasehours", error).toInt()); | ||
126 | if(error) | ||
127 | leaseTime->setValue(interfaces.getInterfaceOption("leasetime", error).toInt()/60/60); | ||
128 | if(error) | ||
129 | leaseTime->setValue(24); | ||
130 | 122 | ||
131 | // IP Information | 123 | // IP Information |
132 | autoStart->setChecked(interfaces.isAuto(interface->getInterfaceName())); | 124 | autoStart->setChecked(interfaces.isAuto(interface->getInterfaceName())); |
133 | QString dns = interfaces.getInterfaceOption("up "DNSSCRIPT" -a", error); | 125 | QString dns = interfaces.getInterfaceOption("up "DNSSCRIPT" -a", error); |
134 | if(dns.contains(" ")){ | 126 | if(dns.contains(" ")){ |
135 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); | 127 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); |
136 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); | 128 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); |
137 | } | 129 | } |
138 | ipAddressEdit->setText(interfaces.getInterfaceOption("address", error)); | 130 | ipAddressEdit->setText(interfaces.getInterfaceOption("address", error)); |
139 | subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error)); | 131 | subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error)); |
140 | gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error)); | 132 | gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error)); |
141 | |||
142 | } | 133 | } |
143 | 134 | ||
144 | // interfacesetup.cpp | 135 | // interfacesetup.cpp |
145 | 136 | ||