[PC-BSD Commits] r7911 - in pcbsd/current/src-qt4: pc-servicemanager pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Tue Oct 26 09:50:43 PDT 2010


Author: kris
Date: 2010-10-26 09:50:43 -0700 (Tue, 26 Oct 2010)
New Revision: 7911

Modified:
   pcbsd/current/src-qt4/pc-servicemanager/main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
Log:

Updated pc-service / pc-softmanager to use PREFIX / config.h



Modified: pcbsd/current/src-qt4/pc-servicemanager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-servicemanager/main.cpp	2010-10-26 16:46:13 UTC (rev 7910)
+++ pcbsd/current/src-qt4/pc-servicemanager/main.cpp	2010-10-26 16:50:43 UTC (rev 7911)
@@ -5,6 +5,7 @@
 #include <qdesktopwidget.h>
 #include <QDebug>
 #include "servicemanager.h"
+#include "../config.h"
 
 int main( int argc, char ** argv )
 {
@@ -13,9 +14,9 @@
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/share/pcbsd/i18n/ServiceManager_" + langCode + ".qm" ) )
+    if ( ! QFile::exists( PREFIX + "/share/pcbsd/i18n/ServiceManager_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("ServiceManager_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+    translator.load( QString("ServiceManager_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/main.cpp	2010-10-26 16:46:13 UTC (rev 7910)
+++ pcbsd/current/src-qt4/pc-softwaremanager/main.cpp	2010-10-26 16:50:43 UTC (rev 7911)
@@ -3,6 +3,7 @@
 #include <qlocale.h>
 #include <QDebug>
 #include "softmanager-main.h"
+#include "../config.h"
 
 
 int main( int argc, char ** argv )
@@ -11,9 +12,9 @@
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/share/pcbsd/i18n/SoftwareManager_" + langCode + ".qm" ) )
+    if ( ! QFile::exists( PREFIX + "/share/pcbsd/i18n/SoftwareManager_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("SoftwareManager_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+    translator.load( QString("SoftwareManager_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h	2010-10-26 16:46:13 UTC (rev 7910)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h	2010-10-26 16:50:43 UTC (rev 7911)
@@ -6,8 +6,9 @@
 #include <QNetworkReply>
 
 #include "ui_softconfigwidget.h"
+#include "../config.h"
 
-#define PBI_ETCCONF "/usr/local/etc/pbi.conf"
+const QString PBI_ETCCONF( PREFIX + "/etc/pbi.conf" );
 
 class softwareConfigWidget : public QDialog, private Ui::softwareConfigWidget
 {

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-10-26 16:46:13 UTC (rev 7910)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-10-26 16:50:43 UTC (rev 7911)
@@ -38,6 +38,7 @@
 #include "ui_softmanager-main.h"
 #include "softmanager-main.h"
 #include "pbi.h"
+#include "../config.h"
 
 
 void PBM::ProgramInit()
@@ -316,7 +317,7 @@
 {
     PBI *pbi = 0;
     bool foundPBI = false;
-    QPixmap defaultIcon("/usr/local/share/pcbsd/images/pbi.png");
+    QPixmap defaultIcon(PREFIX + "/share/pcbsd/images/pbi.png");
     QString tmp, line, name, progIndexName, version, prefix, author, website, arch, icon, sig;
 
     // Start by marking all PBIs as dirty

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2010-10-26 16:46:13 UTC (rev 7910)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2010-10-26 16:50:43 UTC (rev 7911)
@@ -1,3 +1,5 @@
+#include "../config.h"
+
 #ifndef PBM_H
 #define PBM_H
 
@@ -30,11 +32,8 @@
 #include "ui_softconfigwidget.h"
 
 /* Change this to switch the default patch tmpdir */
-#define PATCHTMPDIR_DEFAULT "/usr/local/tmp"
+const QString PATCHTMPDIR_DEFAULT( PREFIX + "/tmp" );
 
-// The default pbi.conf file
-#define PBI_ETCCONF "/usr/local/etc/pbi.conf"
-
 #define PBI_UPDATED 0
 #define PBI_CHECKING4UPDATES 1
 #define PBI_UPDATING 2



More information about the Commits mailing list