Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 459a75b..8a5b90c 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp | |||
@@ -313,6 +313,6 @@ void MainWindow::installLocalPackage( const QString &ipkFile ) | |||
313 | { | 313 | { |
314 | // Install selected file | 314 | // Install selected file |
315 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true, | 315 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), |
316 | OPackage::Install, ipkFile ); | 316 | OPackage::Install, ipkFile ); |
317 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); | 317 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
318 | 318 | ||
@@ -387,5 +387,5 @@ void MainWindow::slotUpdate() | |||
387 | { | 387 | { |
388 | // Create package manager output widget | 388 | // Create package manager output widget |
389 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false, | 389 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), |
390 | OPackage::Update ); | 390 | OPackage::Update ); |
391 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); | 391 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
@@ -399,5 +399,5 @@ void MainWindow::slotUpgrade() | |||
399 | { | 399 | { |
400 | // Create package manager output widget | 400 | // Create package manager output widget |
401 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false, | 401 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), |
402 | OPackage::Upgrade ); | 402 | OPackage::Upgrade ); |
403 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); | 403 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
@@ -446,6 +446,6 @@ void MainWindow::slotDownload() | |||
446 | 446 | ||
447 | // Create package manager output widget | 447 | // Create package manager output widget |
448 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, | 448 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), |
449 | OPackage::Download, workingPackages ); | 449 | OPackage::Download, workingPackages ); |
450 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); | 450 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
451 | 451 | ||
@@ -521,16 +521,13 @@ void MainWindow::slotApply() | |||
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 = !removeList.isEmpty() ? OPackage::Remove |
524 | if ( !removeList.isEmpty() ) | 524 | : OPackage::NotDefined; |
525 | removeCmd = OPackage::Remove; | 525 | OPackage::Command installCmd = !installList.isEmpty() ? OPackage::Install |
526 | OPackage::Command installCmd = OPackage::NotDefined; | 526 | : OPackage::NotDefined; |
527 | if ( !installList.isEmpty() ) | 527 | OPackage::Command upgradeCmd = !upgradeList.isEmpty() ? OPackage::Upgrade |
528 | installCmd = OPackage::Install; | 528 | : OPackage::NotDefined; |
529 | OPackage::Command upgradeCmd = OPackage::NotDefined; | ||
530 | if ( !upgradeList.isEmpty() ) | ||
531 | upgradeCmd = OPackage::Upgrade; | ||
532 | 529 | ||
533 | // Create package manager output widget | 530 | // Create package manager output widget |
534 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), !installList.isEmpty(), | 531 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), |
535 | removeCmd, removeList, | 532 | removeCmd, removeList, |
536 | installCmd, installList, | 533 | installCmd, installList, |