[PC-BSD Commits] r608 - pcbsd/trunk/kcmPBMsource
svn at pcbsd.org
svn at pcbsd.org
Thu Aug 16 16:02:59 PDT 2007
Author: kris
Date: 2007-08-16 16:02:59 -0700 (Thu, 16 Aug 2007)
New Revision: 608
Modified:
pcbsd/trunk/kcmPBMsource/pbm.ui.h
Log:
Fixed some issues in Add / Remove PBI tool, now it'll display the GUI
right away instead of waiting for possible long dir size check. Also fixed
crash problem when reading in the program list
Modified: pcbsd/trunk/kcmPBMsource/pbm.ui.h
===================================================================
--- pcbsd/trunk/kcmPBMsource/pbm.ui.h 2007-08-16 22:09:40 UTC (rev 607)
+++ pcbsd/trunk/kcmPBMsource/pbm.ui.h 2007-08-16 23:02:59 UTC (rev 608)
@@ -41,7 +41,7 @@
fileWatcher->addFile("/Programs/.config/ProgList");
qDebug("Populating list...");
- PopulateList();
+ QTimer::singleShot( 300, this, SLOT(PopulateList()) );
connect(fileWatcher, SIGNAL(dirty(const QString&)), this, SLOT(PopulateList()));
// Loads the username
@@ -108,6 +108,9 @@
{
int i = -1;
int j = 0;
+ QString tmp;
+ QString ProgDirName;
+
qDebug("Opening ProgList");
QFile file( "/Programs/.config/ProgList" );
if ( file.open( IO_ReadOnly ) ) {
@@ -170,8 +173,20 @@
for (int n=0; n<=i; n++)
{
+ if ( ProgName[n].isEmpty() )
+ {
+ break;
+ }
+
+ tmp = ProgName[n];
+ tmp.replace(" ", "");
+ ProgDirName = tmp;
+ tmp = ProgVer[n];
+ tmp.replace(" ", "");
+ ProgDirName = ProgDirName + tmp;
+
// Check if our directory exists or not
- QDir d( "/Programs/" + ProgName[n] + ProgVer[n] );
+ QDir d( "/Programs/" + ProgDirName );
if ( !d.exists() ) {
// If the directory doesn't exist, remove the entry
CleanPackageList(n);
@@ -188,8 +203,6 @@
i = 0;
QString IconPath;
- QString ProgDirName;
- QString tmp;
SoftwareListBox->clear();
while (! ProgName[i].isEmpty() )
More information about the Commits
mailing list