[PC-BSD Commits] r12717 - pcbsd/current/src-qt4/pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Thu Sep 8 08:56:48 PDT 2011


Author: kris
Date: 2011-09-08 08:56:48 -0700 (Thu, 08 Sep 2011)
New Revision: 12717

Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
Log:

When starting PBI install, show "Pending" in status instead of already installed



Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp	2011-09-08 15:27:16 UTC (rev 12716)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp	2011-09-08 15:56:48 UTC (rev 12717)
@@ -229,13 +229,18 @@
 	// See if this PBI is installed already
 	installed = checkPBILoaded(pbi);
 
+	bool isPending = false;
+
         // If this PBI is loaded, see of we have a update status
 	if ( installed ) {
 		PBI *pbiItem = getPBIFromName(pbi);
-		if ( pbiItem )
+		if ( pbiItem ) {
 			autoUpdate = pbiItem->getAutoUpdateStatus();
-		else
+			if ( pbiItem->getWorkingStatus() == PBINEWDOWNLOAD)
+				isPending = true;
+		} else {
 			autoUpdate = false;
+		}
 	}
 	
 
@@ -311,7 +316,9 @@
 	dLayout->addWidget(dIcon, 0, 0);
 
 	QLabel *dLabel = new QLabel();
-	if ( installed )
+	if ( installed && isPending )
+		dLabel->setText("<b>" + tr("Pending") + "</b>");
+	else if ( installed )
 		dLabel->setText("<b>" + tr("Installed") + "</b>");
 	else
 		dLabel->setText(tr("Download"));
@@ -321,7 +328,7 @@
 	dLayout->addWidget(dLabel, 0, 1);
 
 	// Show the auto-updating checkbox if installed
-	if ( installed ) {
+	if ( installed && ! isPending) {
 		QCheckBox *dCheck = new QCheckBox(tr("Automatic Updating"));
 		dCheck->setChecked(autoUpdate);
 		connect(dCheck, SIGNAL( clicked(bool) ), this, SLOT(slotAutoUpdateClicked(bool) ) );



More information about the Commits mailing list