author | tille <tille> | 2003-06-17 13:05:55 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-17 13:05:55 (UTC) |
commit | 154d6deef15b9f7f83ea7a25f2079d9fca034910 (patch) (unidiff) | |
tree | 2cb0428922d8d2a4a2adc49b2c62e44cbbdd3b82 | |
parent | e3aff4e49db15c44faf874ee96d666ad56c1d37a (diff) | |
download | opie-154d6deef15b9f7f83ea7a25f2079d9fca034910.zip opie-154d6deef15b9f7f83ea7a25f2079d9fca034910.tar.gz opie-154d6deef15b9f7f83ea7a25f2079d9fca034910.tar.bz2 |
wellenreiter qcop call works now
dns are saved and read in again
3 files changed, 42 insertions, 27 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index 49a47ae..8de30de 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -23,3 +23,3 @@ | |||
23 | * Constuctor. Set up the connection. A profile must be set. | 23 | * Constuctor. Set up the connection. A profile must be set. |
24 | */ | 24 | */ |
25 | InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ | 25 | InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ |
@@ -33,3 +33,3 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac | |||
33 | * Destructor | 33 | * Destructor |
34 | */ | 34 | */ |
35 | InterfaceSetupImp::~InterfaceSetupImp(){ | 35 | InterfaceSetupImp::~InterfaceSetupImp(){ |
@@ -41,3 +41,3 @@ InterfaceSetupImp::~InterfaceSetupImp(){ | |||
41 | /** | 41 | /** |
42 | * Save the current settings, then write out the interfaces file and close. | 42 | * Save the current settings, then write out the interfaces file and close. |
43 | */ | 43 | */ |
@@ -58,3 +58,3 @@ bool InterfaceSetupImp::saveChanges(){ | |||
58 | ifup += ";"; | 58 | ifup += ";"; |
59 | 59 | ||
60 | OProcess restart; | 60 | OProcess restart; |
@@ -63,9 +63,9 @@ bool InterfaceSetupImp::saveChanges(){ | |||
63 | restart << ifup; | 63 | restart << ifup; |
64 | 64 | ||
65 | OWait *owait = new OWait(); | 65 | OWait *owait = new OWait(); |
66 | Global::statusMessage( tr( "Restarting interface" ) ); | 66 | Global::statusMessage( tr( "Restarting interface" ) ); |
67 | 67 | ||
68 | owait->show(); | 68 | owait->show(); |
69 | qApp->processEvents(); | 69 | qApp->processEvents(); |
70 | 70 | ||
71 | if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { | 71 | if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { |
@@ -73,6 +73,6 @@ bool InterfaceSetupImp::saveChanges(){ | |||
73 | } | 73 | } |
74 | 74 | ||
75 | owait->hide(); | 75 | owait->hide(); |
76 | delete owait; | 76 | delete owait; |
77 | 77 | ||
78 | interface->refresh(); | 78 | interface->refresh(); |
@@ -85,3 +85,3 @@ bool InterfaceSetupImp::saveChanges(){ | |||
85 | * @return bool true if successfull, false otherwise | 85 | * @return bool true if successfull, false otherwise |
86 | */ | 86 | */ |
87 | bool InterfaceSetupImp::saveSettings(){ | 87 | bool InterfaceSetupImp::saveSettings(){ |
@@ -90,3 +90,3 @@ bool InterfaceSetupImp::saveSettings(){ | |||
90 | return true; | 90 | return true; |
91 | 91 | ||
92 | bool error = false; | 92 | bool error = false; |
@@ -97,3 +97,3 @@ bool InterfaceSetupImp::saveSettings(){ | |||
97 | } | 97 | } |
98 | 98 | ||
99 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ | 99 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ |
@@ -101,3 +101,3 @@ bool InterfaceSetupImp::saveSettings(){ | |||
101 | return false; | 101 | return false; |
102 | } | 102 | } |
103 | // DHCP | 103 | // DHCP |
@@ -121,3 +121,3 @@ bool InterfaceSetupImp::saveSettings(){ | |||
121 | } | 121 | } |
122 | 122 | ||
123 | // IP Information | 123 | // IP Information |
@@ -130,3 +130,3 @@ bool InterfaceSetupImp::saveSettings(){ | |||
130 | * @param QString profile the new profile. | 130 | * @param QString profile the new profile. |
131 | */ | 131 | */ |
132 | void InterfaceSetupImp::setProfile(const QString &profile){ | 132 | void InterfaceSetupImp::setProfile(const QString &profile){ |
@@ -164,3 +164,3 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
164 | qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); | 164 | qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); |
165 | return; | 165 | return; |
166 | } | 166 | } |
@@ -168,5 +168,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
168 | } | 168 | } |
169 | 169 | ||
170 | // We must have a valid interface to get this far so read some settings. | 170 | // We must have a valid interface to get this far so read some settings. |
171 | 171 | ||
172 | // DHCP | 172 | // DHCP |
@@ -181,5 +181,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
181 | QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); | 181 | QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); |
182 | qDebug("dns >%s<",dns.latin1()); | ||
182 | if(dns.contains(" ")){ | 183 | if(dns.contains(" ")){ |
183 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); | 184 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); |
184 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); | 185 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); |
185 | } | 186 | } |
@@ -187,3 +188,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
187 | subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); | 188 | subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); |
188 | gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); | 189 | gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); |
190 | |||
191 | |||
189 | 192 | ||
@@ -191,5 +194,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
191 | qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); | 194 | qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); |
192 | 195 | ||
193 | } | 196 | } |
194 | 197 | ||
195 | // interfacesetup.cpp | 198 | // interfacesetup.cpp |
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 8ea241d..2d714ca 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -642,2 +642,7 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) | |||
642 | 642 | ||
643 | if (msg == "raise") { | ||
644 | raise(); | ||
645 | return; | ||
646 | } | ||
647 | |||
643 | QString dest = msg.left(msg.find("(")); | 648 | QString dest = msg.left(msg.find("(")); |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 371b689..7bded85 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -72,3 +72,3 @@ bool WLANModule::isOwner(Interface *i){ | |||
72 | QWidget *WLANModule::configure(Interface *i){ | 72 | QWidget *WLANModule::configure(Interface *i){ |
73 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); | 73 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose); |
74 | wlanconfig->setProfile(profile); | 74 | wlanconfig->setProfile(profile); |
@@ -134,2 +134,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
134 | QString action; | 134 | QString action; |
135 | QDialog *toShow; | ||
135 | while (! stream.atEnd() ){ | 136 | while (! stream.atEnd() ){ |
@@ -149,4 +150,4 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
149 | qDebug("WLANModule Did not find %s",interface.latin1()); | 150 | qDebug("WLANModule Did not find %s",interface.latin1()); |
150 | qDebug("returning"); | 151 | qDebug("skipping"); |
151 | return; | 152 | count = 0; |
152 | } | 153 | } |
@@ -172,2 +173,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
172 | wlanconfigWiget = (WLANImp*) configure(ifa); | 173 | wlanconfigWiget = (WLANImp*) configure(ifa); |
174 | toShow = (QDialog*) wlanconfigWiget; | ||
173 | } | 175 | } |
@@ -193,4 +195,8 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
193 | }else if (action.contains("Channel")){ | 195 | }else if (action.contains("Channel")){ |
194 | wlanconfigWiget->specifyChan->setChecked( true ); | 196 | bool ok; |
195 | wlanconfigWiget->networkChannel->setValue( value.toInt() ); | 197 | int chan = value.toInt( &ok ); |
198 | if (ok){ | ||
199 | wlanconfigWiget->specifyChan->setChecked( true ); | ||
200 | wlanconfigWiget->networkChannel->setValue( chan ); | ||
201 | } | ||
196 | }else if (action.contains("MacAddr")){ | 202 | }else if (action.contains("MacAddr")){ |
@@ -202,2 +208,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
202 | }// while stream | 208 | }// while stream |
209 | if (toShow) toShow->exec(); | ||
203 | } | 210 | } |