-rw-r--r-- | noncore/unsupported/oipkg/installdialog.cpp | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/installdialog.h | 5 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 44 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 2 |
4 files changed, 30 insertions, 24 deletions
diff --git a/noncore/unsupported/oipkg/installdialog.cpp b/noncore/unsupported/oipkg/installdialog.cpp index 72f436a..a2c9702 100644 --- a/noncore/unsupported/oipkg/installdialog.cpp +++ b/noncore/unsupported/oipkg/installdialog.cpp @@ -72,4 +72,7 @@ InstallDialog::InstallDialog( PackageManagerSettings* s, QWidget* parent, const InstallDialogLayout->addWidget( GroupBoxOptions, 1, 0 ); + toRemoveItem = new QCheckListItem( ListViewPackages, QObject::tr("To remove") ); + toInstallItem = new QCheckListItem( ListViewPackages, QObject::tr("To install") ); + } diff --git a/noncore/unsupported/oipkg/installdialog.h b/noncore/unsupported/oipkg/installdialog.h index f2164ac..5af2c35 100644 --- a/noncore/unsupported/oipkg/installdialog.h +++ b/noncore/unsupported/oipkg/installdialog.h @@ -26,6 +26,5 @@ class InstallDialog : public QDialog Q_OBJECT -public: - InstallDialog( PackageManagerSettings* s, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); +public: InstallDialog( PackageManagerSettings* s, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~InstallDialog(); @@ -35,4 +34,6 @@ public: QCheckBox* _force_reinstall; QCheckBox* _force_remove; + QCheckListItem *toRemoveItem; + QCheckListItem *toInstallItem; protected: diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 75f93cf..f2852c3 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -216,17 +216,15 @@ void PmIpkg::commit() int sizecount = 0; installDialog = new InstallDialog(settings,0,0,true); - QCheckListItem *toRemoveItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To remove") ); - QCheckListItem *toInstallItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To install") ); - toRemoveItem->setOpen( true ); - toInstallItem->setOpen( true ); + installDialog->toRemoveItem->setOpen( true ); + installDialog->toInstallItem->setOpen( true ); for (uint i=0; i < to_remove.count(); i++) { sizecount += 1; - toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_remove.at(i),settings) ); + installDialog->toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_remove.at(i),settings) ); } for (uint i=0; i < to_install.count(); i++) { sizecount += to_install.at(i)->size().toInt(); - toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_install.at(i),settings) ); + installDialog->toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_install.at(i),settings) ); } runwindow->progress->setTotalSteps(sizecount); @@ -234,8 +232,11 @@ void PmIpkg::commit() installDialog->showMaximized(); installDialog->show(); - if ( installDialog->exec() ) doIt(); - installDialog->close(); + if ( installDialog->exec() ) + { + doIt(); runwindow->showMaximized(); runwindow->show(); + } + installDialog->close(); out(tr("\nAll done.")); } @@ -260,20 +261,21 @@ void PmIpkg::remove() { if ( to_remove.at(i)->link() )fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() ); - if ( runIpkg("remove " + to_remove.at(i)->name(), to_remove.at(i)->dest() )) + if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() )) { runwindow->progress->setProgress( 1 ); linkOpp = removeLink; - if ( to_remove.at(i)->link() ) - { - out( "\nremoving links\n" ); - out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" ); - processFileList( fileList, to_remove.at(i)->dest() ); - } to_remove.at(i)->processed(); to_remove.take( i ); + out("\n\n"); }else{ out(tr("Error while removing")+to_remove.at(i)->name()+"\n"); } + if ( to_remove.at(i)->link() ) + { + out( "\nremoving links\n" ); + out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" ); + processFileList( fileList, to_remove.at(i)->dest() ); + } if ( to_remove.at(i)->link() )delete fileList; } @@ -292,4 +294,10 @@ void PmIpkg::install() { runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress()); + to_install.at(i)->processed(); + to_install.take( i ); + out("\n\n"); + }else{ + out(tr("Error while installing")+to_install.at(i)->name()+"\n"); + } linkOpp = createLink; if ( to_install.at(i)->link() ) @@ -299,10 +307,4 @@ void PmIpkg::install() makeLinks( to_install.at(i) ); } - to_install.at(i)->processed(); - to_install.take( i ); - out("\n\n"); - }else{ - out(tr("Error while installing")+to_install.at(i)->name()+"\n"); - } } out("\n"); diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index f8ac39a..c543304 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h @@ -49,5 +49,5 @@ private: QCheckBox *_force_remove; QCheckBox *_force_depends; - void startDialog(); +// void startDialog(); void makeLinks(Package*); void linkPackage( QString, QString ); |