author | tille <tille> | 2002-05-08 17:36:13 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-08 17:36:13 (UTC) |
commit | 4216d2833503440d25ee40683cd563f379f125a6 (patch) (side-by-side diff) | |
tree | 54a7a5a88e0cb4ae0064197141717ebdd98d204d | |
parent | 8a293a84b7119bab0b84b5241c665ff5892faffc (diff) | |
download | opie-4216d2833503440d25ee40683cd563f379f125a6.zip opie-4216d2833503440d25ee40683cd563f379f125a6.tar.gz opie-4216d2833503440d25ee40683cd563f379f125a6.tar.bz2 |
fixed runwindow open on cancel
-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 | 52 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 2 |
4 files changed, 34 insertions, 28 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 @@ -73,2 +73,5 @@ 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 @@ -27,4 +27,3 @@ class InstallDialog : public QDialog -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(); @@ -36,2 +35,4 @@ public: QCheckBox* _force_remove; + QCheckListItem *toRemoveItem; + QCheckListItem *toInstallItem; 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,7 +216,5 @@ 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 = new InstallDialog(settings,0,0,true); + installDialog->toRemoveItem->setOpen( true ); + installDialog->toInstallItem->setOpen( true ); for (uint i=0; i < to_remove.count(); i++) @@ -224,3 +222,3 @@ void PmIpkg::commit() 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) ); } @@ -229,3 +227,3 @@ void PmIpkg::commit() 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) ); } @@ -235,6 +233,9 @@ void PmIpkg::commit() installDialog->show(); - if ( installDialog->exec() ) doIt(); + if ( installDialog->exec() ) + { + doIt(); + runwindow->showMaximized(); + runwindow->show(); + } installDialog->close(); - runwindow->showMaximized(); - runwindow->show(); out(tr("\nAll done.")); @@ -261,3 +262,3 @@ 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() )) { @@ -265,10 +266,5 @@ void PmIpkg::remove() 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 ); + to_remove.take( i ); + out("\n\n"); @@ -277,2 +273,8 @@ void PmIpkg::remove() } + 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; @@ -293,9 +295,2 @@ void PmIpkg::install() runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress()); - linkOpp = createLink; - if ( to_install.at(i)->link() ) - { - out( "\ncreating links\n" ); - out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"\n" ); - makeLinks( to_install.at(i) ); - } to_install.at(i)->processed(); @@ -306,2 +301,9 @@ void PmIpkg::install() } + linkOpp = createLink; + if ( to_install.at(i)->link() ) + { + out( "\ncreating links\n" ); + out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"\n" ); + makeLinks( to_install.at(i) ); + } } 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 @@ -50,3 +50,3 @@ private: QCheckBox *_force_depends; - void startDialog(); +// void startDialog(); void makeLinks(Package*); |