summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/mainwindowimp.cpp
authorbenmeyer <benmeyer>2002-12-16 16:21:51 (UTC)
committer benmeyer <benmeyer>2002-12-16 16:21:51 (UTC)
commitdabe9c5ee8c2d51fe13b4e3a8b160afacf0f539f (patch) (unidiff)
tree2c9a68097931a6f603be4a62e4ea002dad560dcd /noncore/settings/networksettings/mainwindowimp.cpp
parentc7c8bf3d2fd133fa05ff7a5daed977c05429c4c1 (diff)
downloadopie-dabe9c5ee8c2d51fe13b4e3a8b160afacf0f539f.zip
opie-dabe9c5ee8c2d51fe13b4e3a8b160afacf0f539f.tar.gz
opie-dabe9c5ee8c2d51fe13b4e3a8b160afacf0f539f.tar.bz2
Fixed icon bug, removed some extra uneeded code, fixed WEP config bug
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 7b93554..9a17743 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -315,28 +315,26 @@ void MainWindowImp::configureClicked(){
315 return; 315 return;
316 } 316 }
317 317
318 Interface *i = interfaceItems[item]; 318 Interface *i = interfaceItems[item];
319 if(i->getModuleOwner()){ 319 if(i->getModuleOwner()){
320 QWidget *moduleConfigure = i->getModuleOwner()->configure(i); 320 QWidget *moduleConfigure = i->getModuleOwner()->configure(i);
321 if(moduleConfigure != NULL){ 321 if(moduleConfigure != NULL){
322 moduleConfigure->showMaximized(); 322 moduleConfigure->showMaximized();
323 moduleConfigure->show();
324 return; 323 return;
325 } 324 }
326 } 325 }
327 326
328 InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); 327 InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose);
329 QString currentProfileText = currentProfileLabel->text(); 328 QString currentProfileText = currentProfileLabel->text();
330 if(currentProfileText.upper() == "ALL"); 329 if(currentProfileText.upper() == "ALL");
331 currentProfileText = ""; 330 currentProfileText = "";
332 configure->setProfile(currentProfileText); 331 configure->setProfile(currentProfileText);
333 configure->showMaximized(); 332 configure->showMaximized();
334 configure->show();
335} 333}
336 334
337/** 335/**
338 * Pull up the information about the currently selected interface. 336 * Pull up the information about the currently selected interface.
339 * Report an error if no interface is selected. 337 * Report an error if no interface is selected.
340 * If the interface has a module owner then request its configure. 338 * If the interface has a module owner then request its configure.
341 */ 339 */
342void MainWindowImp::informationClicked(){ 340void MainWindowImp::informationClicked(){
@@ -351,23 +349,21 @@ void MainWindowImp::informationClicked(){
351 QMessageBox::information(this, "Sorry","No information about\na disconnected interface.", QMessageBox::Ok); 349 QMessageBox::information(this, "Sorry","No information about\na disconnected interface.", QMessageBox::Ok);
352 return; 350 return;
353 } 351 }
354 352
355 if(i->getModuleOwner()){ 353 if(i->getModuleOwner()){
356 QWidget *moduleInformation = i->getModuleOwner()->information(i); 354 QWidget *moduleInformation = i->getModuleOwner()->information(i);
357 if(moduleInformation != NULL){ 355 if(moduleInformation != NULL){
358 moduleInformation->showMaximized(); 356 moduleInformation->showMaximized();
359 moduleInformation->show();
360 return; 357 return;
361 } 358 }
362 } 359 }
363 InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i, true); 360 InterfaceInformationImp information(0, "InterfaceSetupImp", i);
364 information->showMaximized(); 361 information.showMaximized();
365 information->show();
366} 362}
367 363
368/** 364/**
369 * Update this interface. If no QListViewItem exists create one. 365 * Update this interface. If no QListViewItem exists create one.
370 * @param Interface* pointer to the interface that needs to be updated. 366 * @param Interface* pointer to the interface that needs to be updated.
371 */ 367 */
372void MainWindowImp::updateInterface(Interface *i){ 368void MainWindowImp::updateInterface(Interface *i){
373 if(!advancedUserMode){ 369 if(!advancedUserMode){
@@ -406,17 +402,17 @@ void MainWindowImp::updateInterface(Interface *i){
406 typeName = "usb"; 402 typeName = "usb";
407 403
408 if(!i->isAttached()) 404 if(!i->isAttached())
409 typeName = "connect_no"; 405 typeName = "connect_no";
410 // Actually try to use the Module 406 // Actually try to use the Module
411 if(i->getModuleOwner() != NULL) 407 if(i->getModuleOwner() != NULL)
412 typeName = i->getModuleOwner()->getPixmapName(i); 408 typeName = i->getModuleOwner()->getPixmapName(i);
413 409
414 item->setPixmap(1, (Resource::loadPixmap(typeName))); 410 item->setPixmap(1, (Resource::loadPixmap(QString("networksetup/") + typeName)));
415 item->setText(2, i->getHardwareName()); 411 item->setText(2, i->getHardwareName());
416 item->setText(3, QString("(%1)").arg(i->getInterfaceName())); 412 item->setText(3, QString("(%1)").arg(i->getInterfaceName()));
417 item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); 413 item->setText(4, (i->getStatus()) ? i->getIp() : QString(""));
418} 414}
419 415
420void MainWindowImp::newProfileChanged(const QString& newText){ 416void MainWindowImp::newProfileChanged(const QString& newText){
421 if(newText.length() > 0) 417 if(newText.length() > 0)
422 newProfileButton->setEnabled(true); 418 newProfileButton->setEnabled(true);