Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index d014378..78a18f7 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -415,63 +415,65 @@ void OIpkgConfigDlg::initData() | |||
415 | m_proxyUsername->setText( config->value() ); | 415 | m_proxyUsername->setText( config->value() ); |
416 | } | 416 | } |
417 | else if ( config->name() == "proxy_password" ) | 417 | else if ( config->name() == "proxy_password" ) |
418 | { | 418 | { |
419 | m_proxyPassword->setText( config->value() ); | 419 | m_proxyPassword->setText( config->value() ); |
420 | } | 420 | } |
421 | } | 421 | } |
422 | break; | 422 | break; |
423 | case OConfItem::Other : | 423 | case OConfItem::Other : |
424 | { | 424 | { |
425 | if ( config->name() == "lists_dir" ) | 425 | if ( config->name() == "lists_dir" ) |
426 | m_optSourceLists->setText( config->value() ); | 426 | m_optSourceLists->setText( config->value() ); |
427 | else // TODO - use proper libipkg define | 427 | else // TODO - use proper libipkg define |
428 | m_optSourceLists->setText( "/usr/lib/ipkg/lists" ); | 428 | m_optSourceLists->setText( "/usr/lib/ipkg/lists" ); |
429 | } | 429 | } |
430 | break; | 430 | break; |
431 | default : break; | 431 | default : break; |
432 | }; | 432 | }; |
433 | } | 433 | } |
434 | } | 434 | } |
435 | } | 435 | } |
436 | } | 436 | } |
437 | 437 | ||
438 | // Get Ipkg execution options | 438 | // Get Ipkg execution options |
439 | int options = m_ipkg->ipkgExecOptions(); | 439 | int options = 0; |
440 | if ( m_ipkg ) | ||
441 | options = m_ipkg->ipkgExecOptions(); | ||
440 | if ( options & FORCE_DEPENDS ) | 442 | if ( options & FORCE_DEPENDS ) |
441 | m_optForceDepends->setChecked( true ); | 443 | m_optForceDepends->setChecked( true ); |
442 | if ( options & FORCE_REINSTALL ) | 444 | if ( options & FORCE_REINSTALL ) |
443 | m_optForceReinstall->setChecked( true ); | 445 | m_optForceReinstall->setChecked( true ); |
444 | if ( options & FORCE_REMOVE ) | 446 | if ( options & FORCE_REMOVE ) |
445 | m_optForceRemove->setChecked( true ); | 447 | m_optForceRemove->setChecked( true ); |
446 | if ( options & FORCE_OVERWRITE ) | 448 | if ( options & FORCE_OVERWRITE ) |
447 | m_optForceOverwrite->setChecked( true ); | 449 | m_optForceOverwrite->setChecked( true ); |
448 | if ( options & FORCE_RECURSIVE ) | 450 | if ( options & FORCE_RECURSIVE ) |
449 | m_optForceRecursive->setChecked( true ); | 451 | m_optForceRecursive->setChecked( true ); |
450 | if ( options & FORCE_VERBOSE_WGET ) | 452 | if ( options & FORCE_VERBOSE_WGET ) |
451 | m_optVerboseWget->setChecked( true ); | 453 | m_optVerboseWget->setChecked( true ); |
452 | 454 | ||
453 | m_optVerboseIpkg->setCurrentItem( m_ipkg->ipkgExecVerbosity() ); | 455 | m_optVerboseIpkg->setCurrentItem( ( m_ipkg ? m_ipkg->ipkgExecVerbosity() : 0 ) ); |
454 | } | 456 | } |
455 | 457 | ||
456 | void OIpkgConfigDlg::slotServerSelected( int index ) | 458 | void OIpkgConfigDlg::slotServerSelected( int index ) |
457 | { | 459 | { |
458 | m_serverCurrent = index; | 460 | m_serverCurrent = index; |
459 | 461 | ||
460 | // Enable Edit and Delete buttons | 462 | // Enable Edit and Delete buttons |
461 | m_serverEditBtn->setEnabled( true ); | 463 | m_serverEditBtn->setEnabled( true ); |
462 | m_serverDeleteBtn->setEnabled( true ); | 464 | m_serverDeleteBtn->setEnabled( true ); |
463 | } | 465 | } |
464 | 466 | ||
465 | void OIpkgConfigDlg::slotServerNew() | 467 | void OIpkgConfigDlg::slotServerNew() |
466 | { | 468 | { |
467 | OConfItem *server = new OConfItem( OConfItem::Source ); | 469 | OConfItem *server = new OConfItem( OConfItem::Source ); |
468 | 470 | ||
469 | OIpkgServerDlg dlg( server, this ); | 471 | OIpkgServerDlg dlg( server, this ); |
470 | if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) | 472 | if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) |
471 | { | 473 | { |
472 | // Add to configuration option list | 474 | // Add to configuration option list |
473 | m_configs->append( server ); | 475 | m_configs->append( server ); |
474 | m_configs->sort(); | 476 | m_configs->sort(); |
475 | 477 | ||
476 | // Add to server list | 478 | // Add to server list |
477 | m_serverList->insertItem( server->name() ); | 479 | m_serverList->insertItem( server->name() ); |