[PC-BSD Commits] r3365 - pbibuild/pbi-source/PBCsource

svn at pcbsd.org svn at pcbsd.org
Thu Jan 29 12:25:02 PST 2009


Author: kris
Date: 2009-01-29 12:25:02 -0800 (Thu, 29 Jan 2009)
New Revision: 3365

Modified:
   pbibuild/pbi-source/PBCsource/pbcwizard.cpp
Log:

Updated PBC GUI to use QSettings to pull down directory path, much more reliable than argv[0]



Modified: pbibuild/pbi-source/PBCsource/pbcwizard.cpp
===================================================================
--- pbibuild/pbi-source/PBCsource/pbcwizard.cpp	2009-01-29 19:31:23 UTC (rev 3364)
+++ pbibuild/pbi-source/PBCsource/pbcwizard.cpp	2009-01-29 20:25:02 UTC (rev 3365)
@@ -23,6 +23,7 @@
 #include <qtextstream.h>
 #include <kfiledialog.h>
 #include <qwizard.h>
+#include <qsettings.h>
 #include <kurl.h>
 #include <qvariant.h>
 #include "mimedialog.h"
@@ -403,9 +404,13 @@
 // Set the application directory
 void PBCwizard::SetAppDir( QString Dir )
 {
+    QSettings settings("PCBSD"); 
+    PBCAppDir  = settings.readEntry("/PBC/ProgramDir", "NONE");
+    if ( PBCAppDir == "NONE" )
+    {
+       KMessageBox::information(this, tr("/PBC/ProgramDir is unset! Please re-install the application!"));
+    }
     
-    PBCAppDir = Dir;
-    
 }
 
 
@@ -1004,7 +1009,7 @@
 
 void PBCwizard::help()
 {
-    runCommand("kedit " + PBCAppDir + "/PBC-Readme.txt &");
+    runCommand("kwrite " + PBCAppDir + "/PBC-Readme.txt &");
 }
 
 



More information about the Commits mailing list