[PC-BSD Commits] r7765 - pcbsd/current/src-qt4/pc-sysmanager

svn at pcbsd.org svn at pcbsd.org
Sat Oct 9 06:31:32 PDT 2010


Author: kris
Date: 2010-10-09 06:31:32 -0700 (Sat, 09 Oct 2010)
New Revision: 7765

Modified:
   pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
Log:

Updated Sys Manager, so that it'll be easier to determine if the user has changed meta-pkg
status to install / uninstall. 



Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp	2010-10-09 13:05:40 UTC (rev 7764)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp	2010-10-09 13:31:32 UTC (rev 7765)
@@ -707,7 +707,7 @@
 	deskItem->setToolTip(0, metaPkgList.at(z).at(1));
 	deskItem->setCheckState(0, Qt::Unchecked);
 
-	if ( isMetaPkgInstalled(metaPkgList.at(z).at(0)) )
+	if ( metaPkgList.at(z).at(5) == "YES" )
 		deskItem->setCheckState(0, Qt::Checked);
     }
 
@@ -719,7 +719,7 @@
 	deskItem->setToolTip(0, metaPkgList.at(z).at(1));
 	deskItem->setCheckState(0, Qt::Unchecked);
 
-	if ( isMetaPkgInstalled(metaPkgList.at(z).at(0)) )
+	if ( metaPkgList.at(z).at(5) == "YES" )
 		deskItem->setCheckState(0, Qt::Checked);
 
 	// Now locate the parent app
@@ -759,7 +759,7 @@
 QList<QStringList> PBSystemTab::getPackageData()
 {
   QList<QStringList> metaPkgs;
-  QString tmp, mName, mDesc, mIcon, mParent, mDesktop;
+  QString tmp, mName, mDesc, mIcon, mParent, mDesktop, mInstalled;
   QStringList package;
 
   QProcess pcmp;
@@ -792,9 +792,15 @@
 		// Now add this meta-pkg to the string list
 		package.clear();
 		qDebug() << "Found Package" << mName << mDesc << mIcon << mParent << mDesktop;
-		package << mName << mDesc << mIcon << mParent << mDesktop;
+
+		if ( isMetaPkgInstalled(mName) )
+			mInstalled = "YES";
+		else
+			mInstalled = "NO";
+
+		package << mName << mDesc << mIcon << mParent << mDesktop << mInstalled;
 		metaPkgs.append(package);
-		mName=""; mDesc=""; mIcon=""; mParent=""; mDesktop="";
+		mName=""; mDesc=""; mIcon=""; mParent=""; mDesktop=""; mInstalled="";
 	}
     }
   }



More information about the Commits mailing list