summaryrefslogtreecommitdiff
authortille <tille>2003-06-17 13:05:55 (UTC)
committer tille <tille>2003-06-17 13:05:55 (UTC)
commit154d6deef15b9f7f83ea7a25f2079d9fca034910 (patch) (side-by-side diff)
tree2cb0428922d8d2a4a2adc49b2c62e44cbbdd3b82
parente3aff4e49db15c44faf874ee96d666ad56c1d37a (diff)
downloadopie-154d6deef15b9f7f83ea7a25f2079d9fca034910.zip
opie-154d6deef15b9f7f83ea7a25f2079d9fca034910.tar.gz
opie-154d6deef15b9f7f83ea7a25f2079d9fca034910.tar.bz2
wellenreiter qcop call works now
dns are saved and read in again
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp47
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp5
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp17
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 @@
* Constuctor. Set up the connection. A profile must be set.
- */
+ */
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
* Destructor
- */
+ */
InterfaceSetupImp::~InterfaceSetupImp(){
@@ -41,3 +41,3 @@ InterfaceSetupImp::~InterfaceSetupImp(){
/**
- * Save the current settings, then write out the interfaces file and close.
+ * Save the current settings, then write out the interfaces file and close.
*/
@@ -58,3 +58,3 @@ bool InterfaceSetupImp::saveChanges(){
ifup += ";";
-
+
OProcess restart;
@@ -63,9 +63,9 @@ bool InterfaceSetupImp::saveChanges(){
restart << ifup;
-
+
OWait *owait = new OWait();
Global::statusMessage( tr( "Restarting interface" ) );
-
+
owait->show();
qApp->processEvents();
-
+
if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) {
@@ -73,6 +73,6 @@ bool InterfaceSetupImp::saveChanges(){
}
-
+
owait->hide();
delete owait;
-
+
interface->refresh();
@@ -85,3 +85,3 @@ bool InterfaceSetupImp::saveChanges(){
* @return bool true if successfull, false otherwise
- */
+ */
bool InterfaceSetupImp::saveSettings(){
@@ -90,3 +90,3 @@ bool InterfaceSetupImp::saveSettings(){
return true;
-
+
bool error = false;
@@ -97,3 +97,3 @@ bool InterfaceSetupImp::saveSettings(){
}
-
+
if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){
@@ -101,3 +101,3 @@ bool InterfaceSetupImp::saveSettings(){
return false;
- }
+ }
// DHCP
@@ -121,3 +121,3 @@ bool InterfaceSetupImp::saveSettings(){
}
-
+
// IP Information
@@ -130,3 +130,3 @@ bool InterfaceSetupImp::saveSettings(){
* @param QString profile the new profile.
- */
+ */
void InterfaceSetupImp::setProfile(const QString &profile){
@@ -164,3 +164,3 @@ void InterfaceSetupImp::setProfile(const QString &profile){
qDebug("InterfaceSetupImp: Added interface, but still can't setInterface.");
- return;
+ return;
}
@@ -168,5 +168,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){
}
-
+
// We must have a valid interface to get this far so read some settings.
-
+
// DHCP
@@ -181,5 +181,6 @@ void InterfaceSetupImp::setProfile(const QString &profile){
QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error);
+ qDebug("dns >%s<",dns.latin1());
if(dns.contains(" ")){
firstDNSLineEdit->setText(dns.mid(0, dns.find(" ")));
- secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length()));
+ secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length()));
}
@@ -187,3 +188,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){
subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error));
- gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error));
+ gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error));
+
+
@@ -191,5 +194,5 @@ void InterfaceSetupImp::setProfile(const QString &profile){
qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1());
-
+
}
-
+
// 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)
+ if (msg == "raise") {
+ raise();
+ return;
+ }
+
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){
QWidget *WLANModule::configure(Interface *i){
- WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose);
+ WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose);
wlanconfig->setProfile(profile);
@@ -134,2 +134,3 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
QString action;
+ QDialog *toShow;
while (! stream.atEnd() ){
@@ -149,4 +150,4 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
qDebug("WLANModule Did not find %s",interface.latin1());
- qDebug("returning");
- return;
+ qDebug("skipping");
+ count = 0;
}
@@ -172,2 +173,3 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
wlanconfigWiget = (WLANImp*) configure(ifa);
+ toShow = (QDialog*) wlanconfigWiget;
}
@@ -193,4 +195,8 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}else if (action.contains("Channel")){
- wlanconfigWiget->specifyChan->setChecked( true );
- wlanconfigWiget->networkChannel->setValue( value.toInt() );
+ bool ok;
+ int chan = value.toInt( &ok );
+ if (ok){
+ wlanconfigWiget->specifyChan->setChecked( true );
+ wlanconfigWiget->networkChannel->setValue( chan );
+ }
}else if (action.contains("MacAddr")){
@@ -202,2 +208,3 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}// while stream
+ if (toShow) toShow->exec();
}