Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 5e15874..459a75b 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp | |||
@@ -510,49 +510,49 @@ void MainWindow::slotApply() | |||
510 | } | 510 | } |
511 | } | 511 | } |
512 | } | 512 | } |
513 | } | 513 | } |
514 | 514 | ||
515 | // If nothing is selected, display message and exit | 515 | // If nothing is selected, display message and exit |
516 | if ( removeList.isEmpty() && installList.isEmpty() && upgradeList.isEmpty() ) | 516 | if ( removeList.isEmpty() && installList.isEmpty() && upgradeList.isEmpty() ) |
517 | { | 517 | { |
518 | QMessageBox::information( this, tr( "Nothing to do" ), tr( "No packages selected" ), tr( "OK" ) ); | 518 | QMessageBox::information( this, tr( "Nothing to do" ), tr( "No packages selected" ), tr( "OK" ) ); |
519 | return; | 519 | return; |
520 | } | 520 | } |
521 | 521 | ||
522 | // Send command only if there are packages to process | 522 | // Send command only if there are packages to process |
523 | OPackage::Command removeCmd = OPackage::NotDefined; | 523 | OPackage::Command removeCmd = OPackage::NotDefined; |
524 | if ( !removeList.isEmpty() ) | 524 | if ( !removeList.isEmpty() ) |
525 | removeCmd = OPackage::Remove; | 525 | removeCmd = OPackage::Remove; |
526 | OPackage::Command installCmd = OPackage::NotDefined; | 526 | OPackage::Command installCmd = OPackage::NotDefined; |
527 | if ( !installList.isEmpty() ) | 527 | if ( !installList.isEmpty() ) |
528 | installCmd = OPackage::Install; | 528 | installCmd = OPackage::Install; |
529 | OPackage::Command upgradeCmd = OPackage::NotDefined; | 529 | OPackage::Command upgradeCmd = OPackage::NotDefined; |
530 | if ( !upgradeList.isEmpty() ) | 530 | if ( !upgradeList.isEmpty() ) |
531 | upgradeCmd = OPackage::Upgrade; | 531 | upgradeCmd = OPackage::Upgrade; |
532 | 532 | ||
533 | // Create package manager output widget | 533 | // Create package manager output widget |
534 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), true, | 534 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), !installList.isEmpty(), |
535 | removeCmd, removeList, | 535 | removeCmd, removeList, |
536 | installCmd, installList, | 536 | installCmd, installList, |
537 | upgradeCmd, upgradeList ); | 537 | upgradeCmd, upgradeList ); |
538 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); | 538 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
539 | 539 | ||
540 | // Display widget | 540 | // Display widget |
541 | m_widgetStack.addWidget( dlg, 3 ); | 541 | m_widgetStack.addWidget( dlg, 3 ); |
542 | m_widgetStack.raiseWidget( dlg ); | 542 | m_widgetStack.raiseWidget( dlg ); |
543 | } | 543 | } |
544 | 544 | ||
545 | void MainWindow::slotInstallLocal() | 545 | void MainWindow::slotInstallLocal() |
546 | { | 546 | { |
547 | // Display file open dialog with only package files | 547 | // Display file open dialog with only package files |
548 | MimeTypes type; | 548 | MimeTypes type; |
549 | QStringList packages; | 549 | QStringList packages; |
550 | packages << "application/ipkg"; | 550 | packages << "application/ipkg"; |
551 | type.insert( tr( "Application Packages" ), packages ); | 551 | type.insert( tr( "Application Packages" ), packages ); |
552 | QString package = Opie::Ui::OFileDialog::getOpenFileName( Opie::Ui::OFileSelector::NORMAL, | 552 | QString package = Opie::Ui::OFileDialog::getOpenFileName( Opie::Ui::OFileSelector::NORMAL, |
553 | "/", QString::null, type ); | 553 | "/", QString::null, type ); |
554 | if ( !package.isNull() ) | 554 | if ( !package.isNull() ) |
555 | installLocalPackage( package ); | 555 | installLocalPackage( package ); |
556 | } | 556 | } |
557 | 557 | ||
558 | void MainWindow::slotCloseDlg() | 558 | void MainWindow::slotCloseDlg() |