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) (unidiff)
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) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp12
1 files changed, 9 insertions, 3 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(){
228 228
229 Interface *i = interfaceItems[item]; 229 Interface *i = interfaceItems[item];
230 if(i->getModuleOwner()){ 230 if(i->getModuleOwner()){
231 i->getModuleOwner()->setProfile(currentProfileLabel->text()); 231 i->getModuleOwner()->setProfile(currentProfile);
232 QTabWidget *tabWidget = NULL; 232 QTabWidget *tabWidget = NULL;
233 QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget); 233 QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget);
234 if(moduleConfigure != NULL){ 234 if(moduleConfigure != NULL){
235 if(tabWidget != NULL){ 235 if(tabWidget != NULL){
236 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); 236 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true);
237 configure->setProfile(currentProfileLabel->text()); 237 configure->setProfile(currentProfile);
238 tabWidget->insertTab(configure, "TCP/IP"); 238 tabWidget->insertTab(configure, "TCP/IP");
239 239
240 } 240 }
@@ -245,7 +245,7 @@ void MainWindowImp::configureClicked(){
245 } 245 }
246 246
247 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true); 247 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true);
248 configure->setProfile(currentProfileLabel->text()); 248 configure->setProfile(currentProfile);
249 configure->showMaximized(); 249 configure->showMaximized();
250 configure->show(); 250 configure->show();
251} 251}
@@ -377,6 +377,7 @@ void MainWindowImp::jobDone(KProcess *process){
377 found = true; 377 found = true;
378 } 378 }
379 if(!found){ 379 if(!found){
380 if(!(*ni).contains("_")){
380 Interface *i = new Interface(this, *ni, false); 381 Interface *i = new Interface(this, *ni, false);
381 i->setAttached(false); 382 i->setAttached(false);
382 i->setHardwareName("Disconnected"); 383 i->setHardwareName("Disconnected");
@@ -387,6 +388,7 @@ void MainWindowImp::jobDone(KProcess *process){
387 } 388 }
388 } 389 }
389} 390}
391}
390 392
391/** 393/**
392 * Update this interface. If no QListViewItem exists create one. 394 * Update this interface. If no QListViewItem exists create one.
@@ -489,6 +491,9 @@ void MainWindowImp::removeProfile(){
489 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) 491 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
490 profilesList->insertItem((*it)); 492 profilesList->insertItem((*it));
491 } 493 }
494
495 // Remove any interface settings and mappings.
496 //TODO
492} 497}
493 498
494/** 499/**
@@ -503,6 +508,7 @@ void MainWindowImp::changeProfile(){
503 QString newProfile = profilesList->text(profilesList->currentItem()); 508 QString newProfile = profilesList->text(profilesList->currentItem());
504 if(newProfile != currentProfileLabel->text()){ 509 if(newProfile != currentProfileLabel->text()){
505 currentProfileLabel->setText(newProfile); 510 currentProfileLabel->setText(newProfile);
511 QFile::remove(SCHEME);
506 QFile file(SCHEME); 512 QFile file(SCHEME);
507 if ( file.open(IO_ReadWrite) ) { 513 if ( file.open(IO_ReadWrite) ) {
508 QTextStream stream( &file ); 514 QTextStream stream( &file );