[PC-BSD Commits] r15903 - pcbsd/current/src-qt4/pc-sysmanager
svn at pcbsd.org
svn at pcbsd.org
Wed Mar 21 20:18:57 PDT 2012
Author: kris
Date: 2012-03-22 03:18:57 +0000 (Thu, 22 Mar 2012)
New Revision: 15903
Removed:
pcbsd/current/src-qt4/pc-sysmanager/dialogInfoBox.cpp
pcbsd/current/src-qt4/pc-sysmanager/dialogInfoBox.h
pcbsd/current/src-qt4/pc-sysmanager/dialogInfoBox.ui
pcbsd/current/src-qt4/pc-sysmanager/dialogMetaProgress.cpp
pcbsd/current/src-qt4/pc-sysmanager/dialogMetaProgress.h
pcbsd/current/src-qt4/pc-sysmanager/dialogMetaProgress.ui
Modified:
pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.h
pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui
pcbsd/current/src-qt4/pc-sysmanager/pc-sysmanager.pro
Log:
Switch pc-sysmanager to use metaWidget from libpcbsd
Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp 2012-03-22 02:30:59 UTC (rev 15902)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp 2012-03-22 03:18:57 UTC (rev 15903)
@@ -61,7 +61,6 @@
connect(pushRefreshList, SIGNAL( clicked() ), this, SLOT( slotUpdateMirrorList() ) );
connect(pushMirrorSave, SIGNAL( clicked() ), this, SLOT( slotMirrorSave() ) );
connect(pushMiscSave, SIGNAL( clicked() ), this, SLOT( slotMiscSave() ) );
- connect(pushApplyMeta, SIGNAL( clicked() ), this, SLOT( slotApplyMetaChanges() ) );
connect(fetchSourceBut, SIGNAL( clicked() ), this, SLOT( fetchSourcePressed() ) );
connect(fetchPortsBut, SIGNAL( clicked() ), this, SLOT( fetchPortsPressed() ) );
@@ -70,12 +69,13 @@
// Connect the mirror radio buttons, so we can enable disable objects based on status
connect(radioSelectMirror, SIGNAL( clicked() ), this, SLOT( slotCheckMirrorRadio() ) );
connect(radioCustomMirror, SIGNAL( clicked() ), this, SLOT( slotCheckMirrorRadio() ) );
- treeMetaPkgs->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(treeMetaPkgs, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(slotMetaRightClick()) );
- // Display the meta-pkgs
- populateMetaPkgs();
-
+ // Use the metaWidget from libpcbsd
+ pkgWidget = new metaWidget();
+ pkgWidget->init(QString());
+ QVBoxLayout *mWLayout = new QVBoxLayout();
+ mWLayout->addWidget(pkgWidget);
+ widgetMetaPkgs->setLayout(mWLayout);
}
@@ -581,625 +581,6 @@
tabWidget->setCurrentIndex(tab);
}
-
-// Display found meta-pkg data
-void PBSystemTab::populateMetaPkgs()
-{
- pushApplyMeta->setEnabled(false);
- treeMetaPkgs->clear();
- tmpMetaPkgList.clear();
- new QTreeWidgetItem(treeMetaPkgs, QStringList() << tr("Loading... Please wait...") );
-
- if ( ! metaPkgList.isEmpty() )
- disconnect(treeMetaPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), 0, 0);
- metaPkgList.clear();
-
- // Start the process to get meta-pkg info
- getMetaProc = new QProcess();
- qDebug() << "Searching for meta-pkgs...";
- connect( getMetaProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotGetPackageDataOutput()) );
- connect( getMetaProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotFinishLoadingMetaPkgs()) );
- getMetaProc->setProcessChannelMode(QProcess::MergedChannels);
- getMetaProc->start(QString("pc-metapkgmanager"), QStringList() << "list");
-
-}
-
-// Display found meta-pkg data
-void PBSystemTab::slotFinishLoadingMetaPkgs()
-{
-
- // Populate the metaPkgList
- parseTmpMetaList();
-
- treeMetaPkgs->clear();
-
- addTreeItems(QString());
-
- connect(treeMetaPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDeskPkgsChanged(QTreeWidgetItem *, int)));
-}
-
-void PBSystemTab::addTreeItems(QString parent)
-{
- for (int z=0; z < metaPkgList.count(); ++z) {
- if ( metaPkgList.at(z).at(3) != parent )
- continue;
-
- // Hide the "base-system" package, since we are installing it anyway
- if (metaPkgList.at(z).at(0) == "base-system" )
- return;
-
- QTreeWidgetItem *deskItem = new QTreeWidgetItem(QStringList() << metaPkgList.at(z).at(0) );
- deskItem->setIcon(0, QIcon(metaPkgList.at(z).at(2)));
- deskItem->setToolTip(0, metaPkgList.at(z).at(1));
- deskItem->setCheckState(0, Qt::Unchecked);
-
- if ( metaPkgList.at(z).at(5) == "YES" )
- deskItem->setCheckState(0, Qt::Checked);
-
- if ( parent.isEmpty() ) {
- treeMetaPkgs->addTopLevelItem(deskItem);
- } else {
- // Locate the parent to attach to
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- if ((*it)->text(0) == parent ) {
- (*it)->addChild(deskItem);
- if ( metaPkgList.at(z).at(5) == "YES" && (*it)->checkState(0) == Qt::Unchecked)
- (*it)->setCheckState(0, Qt::PartiallyChecked);
- if ( metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::Checked)
- (*it)->setCheckState(0, Qt::PartiallyChecked);
- break;
- }
- it++;
- }
- }
-
- // Now look for any possible children
- addTreeItems(metaPkgList.at(z).at(0));
- }
-}
-
-// Check if a meta-pkg is installed
-bool PBSystemTab::isMetaPkgInstalled(QString mPkg)
-{
- QString tmp;
- QProcess pcmp;
- pcmp.start(QString("pc-metapkgmanager"), QStringList() << "status" << mPkg);
- while ( pcmp.state() != QProcess::NotRunning ) {
- pcmp.waitForFinished(50);
- QCoreApplication::processEvents();
- }
-
- while (pcmp.canReadLine()) {
- tmp = pcmp.readLine().simplified();
- if ( tmp.indexOf("is installed") != -1 )
- return true;
- }
-
- return false;
-}
-
-// Function which checks for our GUI package schema data
-void PBSystemTab::slotGetPackageDataOutput()
-{
- while (getMetaProc->canReadLine())
- tmpMetaPkgList << getMetaProc->readLine().simplified();
-}
-
-// Parse the pc-metapkg saved output
-void PBSystemTab::parseTmpMetaList()
-{
- QString tmp, mName, mDesc, mIcon, mParent, mDesktop, mInstalled, mPkgFileList;
- QStringList package;
-
- for ( int i = 0 ; i < tmpMetaPkgList.size(); i++ )
- {
- QApplication::processEvents();
-
- tmp = tmpMetaPkgList.at(i);
-
- if ( tmp.indexOf("Meta Package: ") == 0) {
- mName = tmp.replace("Meta Package: ", "");
- continue;
- }
- if ( tmp.indexOf("Description: ") == 0) {
- mDesc = tmp.replace("Description: ", "");
- continue;
- }
- if ( tmp.indexOf("Icon: ") == 0) {
- mIcon = tmp.replace("Icon: ", "");
- mPkgFileList = mIcon;
- mPkgFileList.replace("pkg-icon.png", "pkg-list");
- continue;
- }
- if ( tmp.indexOf("Parent: ") == 0) {
- mParent = tmp.replace("Parent: ", "");
- continue;
- }
- if ( tmp.indexOf("Desktop: ") == 0) {
- mDesktop = tmp.replace("Desktop: ", "");
- continue;
- }
-
- // This is an empty category
- if ( tmp.indexOf("Category Entry") == 0) {
- // Now add this category to the string list
- package.clear();
- qDebug() << "Found Package" << mName << mDesc << mIcon << mParent << mDesktop;
- mInstalled = "CATEGORY";
- package << mName << mDesc << mIcon << mParent << mDesktop << mInstalled;
- metaPkgList.append(package);
- mName=""; mDesc=""; mIcon=""; mParent=""; mDesktop=""; mInstalled=""; mPkgFileList="";
- }
-
- // We have a Meta-Pkg
- if ( tmp.indexOf("Required Packages:") == 0) {
- // Now add this meta-pkg to the string list
- package.clear();
- qDebug() << "Found Package" << mName << mDesc << mIcon << mParent << mDesktop << mPkgFileList;
-
- if ( isMetaPkgInstalled(mName) )
- mInstalled = "YES";
- else
- mInstalled = "NO";
-
- package << mName << mDesc << mIcon << mParent << mDesktop << mInstalled << mPkgFileList;
- metaPkgList.append(package);
- mName=""; mDesc=""; mIcon=""; mParent=""; mDesktop=""; mInstalled=""; mPkgFileList="";
- }
-
- }
-
-}
-
-void PBSystemTab::saveMetaPkgs()
-{
- if ( ! haveMetaPkgChanges() )
- return;
-
- if ( ! haveAMetaDesktop() )
- return;
-
- addPkgs = getAddPkgs();
- delPkgs = getDelPkgs();
-
- // If adding pkgs, then we need an installation source
- if ( ! addPkgs.isEmpty() ) {
- if ( ! getMediaLocation(pkgSource, rDir) )
- return;
- } else
- rDir="NONE";
-
- startMetaChanges();
-
-}
-
-void PBSystemTab::startMetaChanges()
-{
-
- // We've gotten this far, now time to do the actual meta pkg changes
- if ( ! delPkgs.isEmpty() ) {
-
- metaProgressDel = new dialogMetaProgress();
- metaProgressDel->programInit(tr("Performing system-package changes."));
- metaProgressDel->setWindowModality(Qt::ApplicationModal);
- metaProgressDel->show();
-
- delMetaProc = new QProcess();
- delMetaProc->setProcessChannelMode(QProcess::MergedChannels);
- connect( delMetaProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotMetaDelRead()) );
- connect( delMetaProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotMetaDelDone()) );
- delMetaProc->start("pc-metapkgmanager", QStringList() << "del" << delPkgs);
- } else
- slotMetaDelDone();
-
-
-}
-
-void PBSystemTab::slotMetaDelRead()
-{
- bool ok;
-
- while ( delMetaProc->canReadLine() ) {
- QString line = delMetaProc->readLine();
- if ( line.indexOf("Pending Meta-Package changes: ") != -1 ) {
- line = line.replace("Pending Meta-Package changes: ", "");
- line.toInt(&ok);
- if ( ok ) {
- metaProgressDel->setTotalRange(0, line.toInt(&ok) + 1);
- metaProgressDel->setTotalVal(0);
- }
- continue;
- }
-
- if ( line.indexOf("Removing Meta-Package: ") != -1 ) {
- metaProgressDel->setTotalVal(metaProgressDel->getTotalVal() + 1);
- metaProgressDel->setTotalDesc(line);
- continue;
- }
-
- if ( line.indexOf("Pending package changes: ") != -1 ) {
- line = line.replace("Pending package changes: ", "");
- line.toInt(&ok);
- if ( ok ) {
- metaProgressDel->setSubRange(0, line.toInt(&ok) + 1);
- metaProgressDel->setSubVal(0);
- }
- continue;
-
- } else {
- metaProgressDel->setSubVal(metaProgressDel->getSubVal() + 1);
- metaProgressDel->setSubDesc(line);
- }
- }
-}
-
-void PBSystemTab::slotMetaDelDone()
-{
- if ( ! delPkgs.isEmpty() )
- metaProgressDel->close();
-
- // We've gotten this far, now time to do the actual meta pkg changes
- if ( ! addPkgs.isEmpty() ) {
-
- metaProgressAdd = new dialogMetaProgress();
- metaProgressAdd->programInit(tr("Performing system-package changes."));
- metaProgressAdd->setWindowModality(Qt::ApplicationModal);
- metaProgressAdd->show();
-
- addMetaProc = new QProcess();
- addMetaProc->setProcessChannelMode(QProcess::MergedChannels);
- connect( addMetaProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotMetaAddRead()) );
- connect( addMetaProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotMetaAddDone()) );
- addMetaProc->start("pc-metapkgmanager", QStringList() << "add" << addPkgs << rDir);
- qDebug() << "pc-metapkgmanager" << "add" << addPkgs << rDir;
- } else {
- populateMetaPkgs();
- }
-}
-
-void PBSystemTab::slotMetaAddRead()
-{
- bool ok;
-
- // This functionality needs to be re-written to not loop, uses to much CPU
- while ( addMetaProc->canReadLine() ) {
- QString line = addMetaProc->readLine();
-
- // Read the number of meta-pkgs we will be adding
- if ( line.indexOf("Pending Meta-Package changes: ") != -1 ) {
- line = line.replace("Pending Meta-Package changes: ", "");
- line.toInt(&ok);
- if ( ok ) {
- metaProgressAdd->setTotalRange(0, line.toInt(&ok) + 1);
- metaProgressAdd->setTotalVal(0);
- }
- continue;
- }
-
- // Check if on a new meta-pkg now
- if ( line.indexOf("Installing Meta-Package: ") != -1 ) {
- metaProgressAdd->setTotalVal(metaProgressAdd->getTotalVal() + 1);
- metaProgressAdd->setTotalDesc(line);
- continue;
- }
-
- if ( line.indexOf("Pending package changes: ") != -1 ) {
- line = line.replace("Pending package changes: ", "");
- line.toInt(&ok);
- if ( ok ) {
- metaProgressAdd->setSubRange(0, line.toInt(&ok) + 1 );
- metaProgressAdd->setSubVal(0);
- }
-
- } else {
- metaProgressAdd->setSubVal(metaProgressAdd->getSubVal() + 1);
- metaProgressAdd->setSubDesc(line);
- }
- }
-
-}
-
-void PBSystemTab::slotMetaAddDone()
-{
- if ( ! addPkgs.isEmpty() )
- metaProgressAdd->close();
-
- populateMetaPkgs();
-
- if ( addMetaProc->exitCode() != 0 )
- QMessageBox::critical(this, tr("System Packages"),
- tr("The meta-pkg manager returned an error. For more details please look at the log file:") + " /tmp/.pc-metapkgmanager.log",
- QMessageBox::Ok,
- QMessageBox::Ok);
- else
- QMessageBox::information(this, tr("System Packages"),
- tr("System packages updated successfully."),
- QMessageBox::Ok,
- QMessageBox::Ok);
-}
-
-bool PBSystemTab::getMediaLocation(QString &source, QString &dir)
-{
- // Set the mirror URL for fetching pkgs
- source="MIRROR";
- dir = Utils::getMasterMirror() + "/" + Version + "/" + Arch + "/netinstall/packages/";
-
- return true;
-}
-
-// Function which starts script to locate installation media
-QString PBSystemTab::findLocalInstallMedia()
-{
- return getLineFromCommandOutput(PREFIX + "/share/pcbsd/scripts/find-install-media.sh").simplified();
-}
-
-bool PBSystemTab::haveAMetaDesktop()
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- if ( ((*it)->checkState(0) == Qt::Checked) || ((*it)->checkState(0) == Qt::PartiallyChecked) )
- for (int z=0; z < metaPkgList.count(); ++z)
- if ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(4) == "YES" )
- return true;
- ++it;
- }
-
- QMessageBox::warning(this, tr("No Desktop"),
- tr("No desktops have been selected! Please choose at least one desktop before saving."),
- QMessageBox::Ok,
- QMessageBox::Ok);
-
- return false;
-}
-
-bool PBSystemTab::haveMetaPkgChanges()
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- for (int z=0; z < metaPkgList.count(); ++z)
- // See if any packages status have changed
- if ( ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "YES" && (*it)->checkState(0) == Qt::Unchecked ) \
- || ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "YES" && (*it)->checkState(0) == Qt::PartiallyChecked ) \
- || ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::Checked ) )
- return true;
- ++it;
- }
-
- return false;
-}
-
-QString PBSystemTab::getAddPkgs()
-{
- QString tmp;
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- for (int z=0; z < metaPkgList.count(); ++z)
- // See if any packages status have changed
- if ( ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::Checked ) || \
- ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::PartiallyChecked ) )
- if ( tmp.isEmpty() )
- tmp = (*it)->text(0);
- else
- tmp = tmp + "," + (*it)->text(0);
- ++it;
- }
-
- return tmp;
-}
-
-QString PBSystemTab::getDelPkgs()
-{
- QString tmp;
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- for (int z=0; z < metaPkgList.count(); ++z)
- // See if any packages status have changed
- if ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "YES" && (*it)->checkState(0) == Qt::Unchecked )
- if ( tmp.isEmpty() )
- tmp = (*it)->text(0);
- else
- tmp = tmp + "," + (*it)->text(0);
- ++it;
- }
-
- return tmp;
-}
-
-
-// Time to save meta-pkgs
-void PBSystemTab::slotApplyMetaChanges() {
- saveMetaPkgs();
-}
-
-
-
-// The User changed the tree widget checked / unchecked stuff sanity check
-void PBSystemTab::slotDeskPkgsChanged(QTreeWidgetItem *aItem, int __unused)
-{
- if (!aItem)
- return;
-
- disconnect(treeMetaPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), 0, 0);
-
- if (aItem->childCount() == 0) {
- if (aItem->checkState(0) == Qt::Checked && aItem->parent() )
- if ( allChildrenPkgsChecked(aItem->parent()->text(0)))
- aItem->parent()->setCheckState(0, Qt::Checked);
- else
- aItem->parent()->setCheckState(0, Qt::PartiallyChecked);
- if (aItem->checkState(0) == Qt::Unchecked && aItem->parent() )
- if ( ! allChildrenPkgsUnchecked(aItem->parent()->text(0)))
- aItem->parent()->setCheckState(0, Qt::PartiallyChecked);
-
-
- } else {
- if (aItem->checkState(0) == Qt::Checked )
- checkAllChildrenPkgs(aItem->text(0));
- else
- uncheckAllChildrenPkgs(aItem->text(0));
- }
-
-
- connect(treeMetaPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDeskPkgsChanged(QTreeWidgetItem *, int)));
-
- if ( haveMetaPkgChanges() )
- pushApplyMeta->setEnabled(true);
- else
- pushApplyMeta->setEnabled(false);
-}
-
-// Check the "parent" app to see if all its children are checked or not
-bool PBSystemTab::allChildrenPkgsChecked(QString parent)
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- if ((*it)->text(0) == parent ) {
- if ( (*it)->childCount() <= 0)
- return true;
-
- for ( int i = 0; i < (*it)->childCount() ; ++i) {
- if ( ! allChildrenPkgsChecked((*it)->child(i)->text(0)))
- return false;
-
- if ((*it)->child(i)->checkState(0) != Qt::Checked )
- return false;
- }
- }
- ++it;
- }
- return true;
-}
-
-// Check the "parent" app to see if all its children are unchecked or not
-bool PBSystemTab::allChildrenPkgsUnchecked(QString parent)
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- if ((*it)->text(0) == parent ) {
- if ( (*it)->childCount() <= 0)
- return true;
-
- for ( int i = 0; i < (*it)->childCount() ; ++i) {
- if ( ! allChildrenPkgsUnchecked((*it)->child(i)->text(0)))
- return false;
-
- if ((*it)->child(i)->checkState(0) != Qt::Unchecked )
- return false;
- }
- }
- ++it;
- }
- return true;
-}
-
-// Check all children of parent
-void PBSystemTab::checkAllChildrenPkgs(QString parent)
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- if (! (*it)->parent()) {
- ++it;
- continue;
- }
-
- // Lets walk the tree see what pops up
- bool pFound=false;
- QTreeWidgetItem *itP = (*it)->parent();
- do {
- pFound=false;
- if (itP->text(0) == parent) {
- (*it)->setCheckState(0, Qt::Checked);
- break;
- }
- if ( itP->parent() ) {
- itP = itP->parent();
- pFound=true;
- }
- } while (pFound);
-
- ++it;
- }
-}
-
-// UnCheck all children of parent
-void PBSystemTab::uncheckAllChildrenPkgs(QString parent)
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- if (! (*it)->parent()) {
- ++it;
- continue;
- }
-
- // Lets walk the tree see what pops up
- bool pFound=false;
- QTreeWidgetItem *itP = (*it)->parent();
- do {
- pFound=false;
- if (itP->text(0) == parent) {
- (*it)->setCheckState(0, Qt::Unchecked);
- break;
- }
- if ( itP->parent() ) {
- itP = itP->parent();
- pFound=true;
- }
- } while (pFound);
-
- ++it;
- }
-}
-
-void PBSystemTab::slotMetaRightClick()
-{
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- for (int z=0; z < metaPkgList.count(); ++z) {
- if ( (*it)->isSelected() && (*it)->text(0) == metaPkgList.at(z).at(0) ) {
- if (metaPkgList.at(z).at(5) == "CATEGORY")
- return;
- popup = new QMenu;
- popup->setTitle((*it)->text(0));
- popup->addAction(tr("View Packages"), this, SLOT(slotMetaViewPkgs()));
- popup->exec( QCursor::pos() );
- }
- }
- ++it;
- }
-}
-
-void PBSystemTab::slotMetaViewPkgs()
-{
- QStringList packageList;
- QTreeWidgetItemIterator it(treeMetaPkgs);
- while (*it) {
- for (int z=0; z < metaPkgList.count(); ++z) {
- if ( (*it)->isSelected() && (*it)->text(0) == metaPkgList.at(z).at(0) ) {
-
- QFile pList(metaPkgList.at(z).at(6));
- if ( ! pList.exists() )
- return;
-
- if ( ! pList.open(QIODevice::ReadOnly | QIODevice::Text))
- return;
-
- while ( !pList.atEnd() )
- packageList << pList.readLine().simplified();
-
- pList.close();
- packageList.sort();
-
- dIB = new dialogInfoBox();
- dIB->programInit(tr("Package Listing for:") + " " + (*it)->text(0));
- dIB->setInfoText(packageList.join("\n"));
- dIB->show();
- }
- }
- ++it;
- }
-}
-
void PBSystemTab::checkProxy()
{
bool ok;
Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.h
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.h 2012-03-22 02:30:59 UTC (rev 15902)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.h 2012-03-22 03:18:57 UTC (rev 15903)
@@ -77,18 +77,6 @@
void slotMiscSave();
void slotClose();
- // Meta Package Slots
- void slotApplyMetaChanges();
- void slotDeskPkgsChanged(QTreeWidgetItem *aItem, int aCol);
- void slotFinishLoadingMetaPkgs();
- void slotGetPackageDataOutput();
- void slotMetaAddDone();
- void slotMetaAddRead();
- void slotMetaDelDone();
- void slotMetaDelRead();
- void slotMetaRightClick();
- void slotMetaViewPkgs();
-
private:
CVSUpProgress *cvsUpUi;
QString KernDescr[50];
@@ -122,39 +110,7 @@
QNetworkReply *mirrorReply;
void checkProxy();
- // Meta pkg stuff
- bool allChildrenPkgsChecked(QString parent);
- bool allChildrenPkgsUnchecked(QString parent);
- bool isMetaPkgInstalled(QString mPkg);
- bool haveAMetaDesktop();
- bool haveMetaPkgChanges();
- bool getMediaLocation(QString &pkgsource, QString &rDir);
- void parseTmpMetaList();
- QList<QStringList> metaPkgList;
- QStringList tmpMetaPkgList;
- QProcess *addMetaProc;
- QProcess *delMetaProc;
- QProcess *getMetaProc;
- QProgressDialog *delprogress;
- QProgressDialog *addprogress;
- QString addPkgs;
- QString delPkgs;
- QString findLocalInstallMedia();
- QString getAddPkgs();
- QString getDelPkgs();
- QString pkgSource;
- QString rDir;
- void checkAllChildrenPkgs(QString parent);
- void populateMetaPkgs();
- void saveMetaPkgs();
- void startMetaChanges();
- void uncheckAllChildrenPkgs(QString parent);
- void addTreeItems(QString);
-
updaterStatus *UpdaterStatusDialog;
- dialogMetaProgress *metaProgressDel;
- dialogMetaProgress *metaProgressAdd;
- dialogInfoBox *dIB;
QMenu *popup;
QNetworkAccessManager *sysFetchJob;
@@ -199,6 +155,7 @@
QString SysUpdateReboot[500];
QString SysUpdateDetailsURL[500];
QString SysUpdatesShown[501];
+ metaWidget *pkgWidget;
signals:
Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui 2012-03-22 02:30:59 UTC (rev 15902)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui 2012-03-22 03:18:57 UTC (rev 15903)
@@ -561,55 +561,10 @@
<attribute name="title">
<string>System Packages</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_11">
- <item row="0" column="0" colspan="2">
- <widget class="QTreeWidget" name="treeMetaPkgs">
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <column>
- <property name="text">
- <string>Available System Packages</string>
- </property>
- </column>
- </widget>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QWidget" name="widgetMetaPkgs" native="true"/>
</item>
- <item row="1" column="0" colspan="2">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Above you may select the base system packages you wish to have installed. Adding new packages will require your original installation medium, or a properly configured mirror server.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QPushButton" name="pushApplyMeta">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&Apply Changes</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <spacer name="horizontalSpacer_6">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
Modified: pcbsd/current/src-qt4/pc-sysmanager/pc-sysmanager.pro
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pc-sysmanager.pro 2012-03-22 02:30:59 UTC (rev 15902)
+++ pcbsd/current/src-qt4/pc-sysmanager/pc-sysmanager.pro 2012-03-22 03:18:57 UTC (rev 15903)
@@ -7,17 +7,14 @@
INCLUDEPATH += ../libpcbsd/ /usr/local/include
-HEADERS += cvsupprogress.h dialogMetaProgress.h fastestcvsup.h pbsystemtab.h portsnapprogress.h updaterDialog.h dialogInfoBox.h
+HEADERS += cvsupprogress.h fastestcvsup.h pbsystemtab.h portsnapprogress.h updaterDialog.h
-SOURCES += main.cpp cvsupprogress.cpp dialogMetaProgress.cpp fastestcvsup.cpp pbsystemtab.cpp portsnapprogress.cpp dialogInfoBox.cpp \
- updaterDialog.cpp
+SOURCES += main.cpp cvsupprogress.cpp fastestcvsup.cpp pbsystemtab.cpp portsnapprogress.cpp updaterDialog.cpp
FORMS = pbsystemtab.ui \
cvsupprogress.ui \
- dialogMetaProgress.ui \
portsnapprogress.ui \
updaterDialog.ui \
- dialogInfoBox.ui \
fastestcvsup.ui
RESOURCES = PBSystem.qrc
More information about the Commits
mailing list