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

svn at pcbsd.org svn at pcbsd.org
Fri Aug 13 06:56:47 PDT 2010


Author: kris
Date: 2010-08-13 06:56:47 -0700 (Fri, 13 Aug 2010)
New Revision: 7380

Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager.desktop
Log:

Fixed loading of PBI information from pbi_info -v
Fixed setting PBI icon automatically from setIconPath
Fixed desktop link to use pc-softwaremanager properly



Modified: pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp	2010-08-12 20:06:38 UTC (rev 7379)
+++ pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp	2010-08-13 13:56:47 UTC (rev 7380)
@@ -233,7 +233,8 @@
 
 void PBI::setIconPath(QString iconPath)
 {
-	this->savedIconPath = iconPath;
+   this->savedIconPath = iconPath;
+   setIcon(0, QIcon(iconPath));
 }
 
 void PBI::setAuthor(QString author)

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-08-12 20:06:38 UTC (rev 7379)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-08-13 13:56:47 UTC (rev 7380)
@@ -358,7 +358,7 @@
 
     qDebug("Reading PBI List");
     while ( loadPBIs->canReadLine() ) {
-       	line = loadPBIs->readLine(); // line of text excluding '\n'
+       	line = loadPBIs->readLine().simplified(); // line of text excluding '\n'
 	
 	if ( line.isEmpty() && !progIndexName.isEmpty() && !name.isEmpty() && !version.isEmpty() )
 		foundPBI = true;
@@ -400,6 +400,7 @@
              item->setDirty(false);
              item->setDelete(false);
              item->setHidden(false);
+             qDebug() << "Updating PBI:" << name;
            } else {
              // New PBI! Add it to our list
              pbi = new PBI(defaultIcon.scaled(40,40));
@@ -414,9 +415,16 @@
 	     pbi->setDelete(false);
 	     pbi->setHidden(false);
              SoftwareListBox->addTopLevelItem(pbi); 
-             qDebug(pbi->text().toLatin1());
+             qDebug() << "Found PBI:" << name << version;
            }
 
+	   progIndexName="";
+	   name="";
+	   version="";
+	   icon="";
+	   author="";
+	   website="";
+	   arch="";
     	}
 		
     }

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager.desktop
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager.desktop	2010-08-12 20:06:38 UTC (rev 7379)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager.desktop	2010-08-13 13:56:47 UTC (rev 7380)
@@ -2,7 +2,7 @@
 [Desktop Entry]
 Comment[en_US]=
 Comment=
-Exec=kdesu pcSoftwareManager
+Exec=pc-su pc-softwaremanager
 GenericName[en_US]=
 GenericName=
 Icon=applications-other



More information about the Commits mailing list