summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/mainwindowimp.cpp
authorbenmeyer <benmeyer>2002-10-18 15:40:50 (UTC)
committer benmeyer <benmeyer>2002-10-18 15:40:50 (UTC)
commitc16dcab3fe45ae7193cbdfb2f62bf7e5482d449b (patch) (side-by-side diff)
tree39e69706b24b032364ad4483d2f33688e7054390 /noncore/settings/networksettings/mainwindowimp.cpp
parent0910b94b5b6618c84b3eb6c457c9137d63a7277f (diff)
downloadopie-c16dcab3fe45ae7193cbdfb2f62bf7e5482d449b.zip
opie-c16dcab3fe45ae7193cbdfb2f62bf7e5482d449b.tar.gz
opie-c16dcab3fe45ae7193cbdfb2f62bf7e5482d449b.tar.bz2
Profiles copy
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 3c0af6a..9f07f0d 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -228,13 +228,13 @@ void MainWindowImp::configureClicked(){
Interface *i = interfaceItems[item];
if(i->getModuleOwner()){
- i->getModuleOwner()->setProfile(currentProfileLabel->text());
+ i->getModuleOwner()->setProfile(currentProfile);
QTabWidget *tabWidget = NULL;
QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget);
if(moduleConfigure != NULL){
if(tabWidget != NULL){
InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true);
- configure->setProfile(currentProfileLabel->text());
+ configure->setProfile(currentProfile);
tabWidget->insertTab(configure, "TCP/IP");
}
@@ -245,7 +245,7 @@ void MainWindowImp::configureClicked(){
}
InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true);
- configure->setProfile(currentProfileLabel->text());
+ configure->setProfile(currentProfile);
configure->showMaximized();
configure->show();
}
@@ -377,12 +377,14 @@ void MainWindowImp::jobDone(KProcess *process){
found = true;
}
if(!found){
- Interface *i = new Interface(this, *ni, false);
- i->setAttached(false);
- i->setHardwareName("Disconnected");
- interfaceNames.insert(i->getInterfaceName(), i);
- updateInterface(i);
- connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *)));
+ if(!(*ni).contains("_")){
+ Interface *i = new Interface(this, *ni, false);
+ i->setAttached(false);
+ i->setHardwareName("Disconnected");
+ interfaceNames.insert(i->getInterfaceName(), i);
+ updateInterface(i);
+ connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *)));
+ }
}
}
}
@@ -489,6 +491,9 @@ void MainWindowImp::removeProfile(){
for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
profilesList->insertItem((*it));
}
+
+ // Remove any interface settings and mappings.
+ //TODO
}
/**
@@ -503,6 +508,7 @@ void MainWindowImp::changeProfile(){
QString newProfile = profilesList->text(profilesList->currentItem());
if(newProfile != currentProfileLabel->text()){
currentProfileLabel->setText(newProfile);
+ QFile::remove(SCHEME);
QFile file(SCHEME);
if ( file.open(IO_ReadWrite) ) {
QTextStream stream( &file );