-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/ppp.pro | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 9efc8c2..0ddc489 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -362,97 +362,97 @@ void MainWindowImp::informationClicked(){ | |||
362 | } | 362 | } |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * Update this interface. If no QListViewItem exists create one. | 365 | * Update this interface. If no QListViewItem exists create one. |
366 | * @param Interface* pointer to the interface that needs to be updated. | 366 | * @param Interface* pointer to the interface that needs to be updated. |
367 | */ | 367 | */ |
368 | void MainWindowImp::updateInterface(Interface *i){ | 368 | void MainWindowImp::updateInterface(Interface *i){ |
369 | if(!advancedUserMode){ | 369 | if(!advancedUserMode){ |
370 | if(i->getInterfaceName() == "lo") | 370 | if(i->getInterfaceName() == "lo") |
371 | return; | 371 | return; |
372 | } | 372 | } |
373 | 373 | ||
374 | QListViewItem *item = NULL; | 374 | QListViewItem *item = NULL; |
375 | 375 | ||
376 | // Find the interface, making it if needed. | 376 | // Find the interface, making it if needed. |
377 | if(items.find(i) == items.end()){ | 377 | if(items.find(i) == items.end()){ |
378 | item = new QListViewItem(connectionList, "", "", ""); | 378 | item = new QListViewItem(connectionList, "", "", ""); |
379 | // See if you can't find a module owner for this interface | 379 | // See if you can't find a module owner for this interface |
380 | QMap<Module*, QLibrary*>::Iterator it; | 380 | QMap<Module*, QLibrary*>::Iterator it; |
381 | for( it = libraries.begin(); it != libraries.end(); ++it ){ | 381 | for( it = libraries.begin(); it != libraries.end(); ++it ){ |
382 | if(it.key()->isOwner(i)) | 382 | if(it.key()->isOwner(i)) |
383 | i->setModuleOwner(it.key()); | 383 | i->setModuleOwner(it.key()); |
384 | } | 384 | } |
385 | items.insert(i, item); | 385 | items.insert(i, item); |
386 | interfaceItems.insert(item, i); | 386 | interfaceItems.insert(item, i); |
387 | } | 387 | } |
388 | else | 388 | else |
389 | item = items[i]; | 389 | item = items[i]; |
390 | 390 | ||
391 | // Update the icons and information | 391 | // Update the icons and information |
392 | item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); | 392 | item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); |
393 | 393 | ||
394 | QString typeName = "lan"; | 394 | QString typeName = "lan"; |
395 | if(i->getHardwareName().contains("Local Loopback")) | 395 | if(i->getHardwareName().contains("Local Loopback")) |
396 | typeName = "lo"; | 396 | typeName = "lo"; |
397 | if(i->getInterfaceName().contains("irda")) | 397 | if(i->getInterfaceName().contains("irda")) |
398 | typeName = "irda"; | 398 | typeName = "irda"; |
399 | if(i->getInterfaceName().contains("wlan")) | 399 | if(i->getInterfaceName().contains("wlan")) |
400 | typeName = "wlan"; | 400 | typeName = "wlan"; |
401 | if(i->getInterfaceName().contains("usb")) | 401 | if(i->getInterfaceName().contains("usb")) |
402 | typeName = "usb"; | 402 | typeName = "usb"; |
403 | 403 | ||
404 | if(!i->isAttached()) | 404 | if(!i->isAttached()) |
405 | typeName = "connect_no"; | 405 | typeName = "connect_no"; |
406 | // Actually try to use the Module | 406 | // Actually try to use the Module |
407 | if(i->getModuleOwner() != NULL) | 407 | if(i->getModuleOwner() != NULL) |
408 | typeName = i->getModuleOwner()->getPixmapName(i); | 408 | typeName = i->getModuleOwner()->getPixmapName(i); |
409 | 409 | ||
410 | item->setPixmap(1, (Resource::loadPixmap(QString("networksetup/") + typeName))); | 410 | item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName))); |
411 | item->setText(2, i->getHardwareName()); | 411 | item->setText(2, i->getHardwareName()); |
412 | item->setText(3, QString("(%1)").arg(i->getInterfaceName())); | 412 | item->setText(3, QString("(%1)").arg(i->getInterfaceName())); |
413 | item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); | 413 | item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); |
414 | } | 414 | } |
415 | 415 | ||
416 | void MainWindowImp::newProfileChanged(const QString& newText){ | 416 | void MainWindowImp::newProfileChanged(const QString& newText){ |
417 | if(newText.length() > 0) | 417 | if(newText.length() > 0) |
418 | newProfileButton->setEnabled(true); | 418 | newProfileButton->setEnabled(true); |
419 | else | 419 | else |
420 | newProfileButton->setEnabled(false); | 420 | newProfileButton->setEnabled(false); |
421 | } | 421 | } |
422 | 422 | ||
423 | /** | 423 | /** |
424 | * Adds a new profile to the list of profiles. | 424 | * Adds a new profile to the list of profiles. |
425 | * Don't add profiles that already exists. | 425 | * Don't add profiles that already exists. |
426 | * Appends to the list and QStringList | 426 | * Appends to the list and QStringList |
427 | */ | 427 | */ |
428 | void MainWindowImp::addProfile(){ | 428 | void MainWindowImp::addProfile(){ |
429 | QString newProfileName = newProfile->text(); | 429 | QString newProfileName = newProfile->text(); |
430 | if(profiles.grep(newProfileName).count() > 0){ | 430 | if(profiles.grep(newProfileName).count() > 0){ |
431 | QMessageBox::information(this, "Can't Add","Profile already exists.", QMessageBox::Ok); | 431 | QMessageBox::information(this, "Can't Add","Profile already exists.", QMessageBox::Ok); |
432 | return; | 432 | return; |
433 | } | 433 | } |
434 | profiles.append(newProfileName); | 434 | profiles.append(newProfileName); |
435 | profilesList->insertItem(newProfileName); | 435 | profilesList->insertItem(newProfileName); |
436 | } | 436 | } |
437 | 437 | ||
438 | /** | 438 | /** |
439 | * Removes the currently selected profile in the combo. | 439 | * Removes the currently selected profile in the combo. |
440 | * Doesn't delete if there are less then 2 profiles. | 440 | * Doesn't delete if there are less then 2 profiles. |
441 | */ | 441 | */ |
442 | void MainWindowImp::removeProfile(){ | 442 | void MainWindowImp::removeProfile(){ |
443 | if(profilesList->count() <= 1){ | 443 | if(profilesList->count() <= 1){ |
444 | QMessageBox::information(this, "Can't remove.","At least one profile\nis needed.", QMessageBox::Ok); | 444 | QMessageBox::information(this, "Can't remove.","At least one profile\nis needed.", QMessageBox::Ok); |
445 | return; | 445 | return; |
446 | } | 446 | } |
447 | QString profileToRemove = profilesList->currentText(); | 447 | QString profileToRemove = profilesList->currentText(); |
448 | if(profileToRemove == "All"){ | 448 | if(profileToRemove == "All"){ |
449 | QMessageBox::information(this, "Can't remove.","Can't remove default.", QMessageBox::Ok); | 449 | QMessageBox::information(this, "Can't remove.","Can't remove default.", QMessageBox::Ok); |
450 | return; | 450 | return; |
451 | } | 451 | } |
452 | // Can't remove the curent profile | 452 | // Can't remove the curent profile |
453 | if(profileToRemove == currentProfileLabel->text()){ | 453 | if(profileToRemove == currentProfileLabel->text()){ |
454 | QMessageBox::information(this, "Can't remove.",QString("%1 is the current profile.").arg(profileToRemove), QMessageBox::Ok); | 454 | QMessageBox::information(this, "Can't remove.",QString("%1 is the current profile.").arg(profileToRemove), QMessageBox::Ok); |
455 | return; | 455 | return; |
456 | 456 | ||
457 | } | 457 | } |
458 | 458 | ||
diff --git a/noncore/settings/networksettings/ppp/ppp.pro b/noncore/settings/networksettings/ppp/ppp.pro index ec18a59..0e9e5b8 100644 --- a/noncore/settings/networksettings/ppp/ppp.pro +++ b/noncore/settings/networksettings/ppp/ppp.pro | |||
@@ -1,16 +1,16 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | #CONFIG += qt warn_on debug | 3 | #CONFIG += qt warn_on debug |
4 | DESTDIR = $(OPIEDIR)/plugins/networksetup | 4 | DESTDIR = $(OPIEDIR)/plugins/networksettings |
5 | HEADERS = pppimp.h pppmodule.h | 5 | HEADERS = pppimp.h pppmodule.h |
6 | SOURCES = pppimp.cpp pppmodule.cpp | 6 | SOURCES = pppimp.cpp pppmodule.cpp |
7 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ | 7 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ |
8 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
9 | LIBS += -lqpe -L../interfaces/ -linterfaces | 9 | LIBS += -lqpe -L../interfaces/ -linterfaces |
10 | INTERFACES= ppp.ui | 10 | INTERFACES= ppp.ui |
11 | TARGET = pppplugin | 11 | TARGET = pppplugin |
12 | VERSION = 1.0.0 | 12 | VERSION = 1.0.0 |
13 | 13 | ||
14 | 14 | ||
15 | 15 | ||
16 | include ( $(OPIEDIR)/include.pro ) | 16 | include ( $(OPIEDIR)/include.pro ) |