[PC-BSD Commits] r7913 - in pcbsd/current/src-qt4: pc-systemupdatertray pc-usermanager pc-xgui

svn at pcbsd.org svn at pcbsd.org
Tue Oct 26 10:10:55 PDT 2010


Author: kris
Date: 2010-10-26 10:10:55 -0700 (Tue, 26 Oct 2010)
New Revision: 7913

Modified:
   pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
   pcbsd/current/src-qt4/pc-systemupdatertray/main.cpp
   pcbsd/current/src-qt4/pc-usermanager/main.cpp
   pcbsd/current/src-qt4/pc-usermanager/simpledlgcode.cpp
   pcbsd/current/src-qt4/pc-xgui/main.cpp
   pcbsd/current/src-qt4/pc-xgui/xgui.cpp
Log:

Finish switching src-qt4 to use config.h / PREFIX



Modified: pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2010-10-26 17:05:41 UTC (rev 7912)
+++ pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2010-10-26 17:10:55 UTC (rev 7913)
@@ -17,12 +17,13 @@
 #include <QDebug>
 
 #include "UpdaterTray.h"
+#include "../config.h"
 
 /* Update interval in ms  - Every 6 hours */
 #define  UPDATE_MSEC 1000 * 60 * 60 * 6 
 
 /* Change this to switch the default patch tmpdir */
-#define  PATCHTMPDIR_DEFAULT "/usr/local/tmp"
+const QString PATCHTMPDIR_DEFAULT( PREFIX + "/tmp" );
 
 
 

Modified: pcbsd/current/src-qt4/pc-systemupdatertray/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-systemupdatertray/main.cpp	2010-10-26 17:05:41 UTC (rev 7912)
+++ pcbsd/current/src-qt4/pc-systemupdatertray/main.cpp	2010-10-26 17:10:55 UTC (rev 7913)
@@ -9,8 +9,8 @@
 #include <QMessageBox>
 #include <QtGui>
 
-
 #include "UpdaterTray.h"
+#include "../config.h"
 
 int  main(int argc, char ** argv)
 {
@@ -19,9 +19,9 @@
    QTranslator translator;
    QLocale mylocale;
    QString langCode = mylocale.name();
-   if ( ! QFile::exists("/usr/local/share/pcbsd/i18n/SystemUpdaterTray_" + langCode + ".qm" ) )
+   if ( ! QFile::exists(PREFIX + "/share/pcbsd/i18n/SystemUpdaterTray_" + langCode + ".qm" ) )
      langCode.truncate(langCode.indexOf("_"));
-   translator.load( QString("SystemUpdaterTray_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+   translator.load( QString("SystemUpdaterTray_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
    a.installTranslator( &translator );
    qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-usermanager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-usermanager/main.cpp	2010-10-26 17:05:41 UTC (rev 7912)
+++ pcbsd/current/src-qt4/pc-usermanager/main.cpp	2010-10-26 17:10:55 UTC (rev 7913)
@@ -3,6 +3,7 @@
 #include <qlocale.h>
 #include <QDebug>
 #include "pcbsdusermanager.h"
+#include "../config.h"
 
 int main( int argc, char ** argv )
 {
@@ -12,9 +13,9 @@
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/share/pcbsd/i18n/pcbsdusermanager_" + langCode + ".qm" ) )
+    if ( ! QFile::exists(PREFIX + "/share/pcbsd/i18n/pcbsdusermanager_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("pcbsdusermanager_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+    translator.load( QString("pcbsdusermanager_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-usermanager/simpledlgcode.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-usermanager/simpledlgcode.cpp	2010-10-26 17:05:41 UTC (rev 7912)
+++ pcbsd/current/src-qt4/pc-usermanager/simpledlgcode.cpp	2010-10-26 17:10:55 UTC (rev 7913)
@@ -31,11 +31,12 @@
 #include <qtooltip.h>
 #include <qcolor.h>
 #include <QDebug>
+#include "../config.h"
 
 void SimpleDlgCode::programInit(UserManagerBackend *back)
 {
     this->back = back;
-    userImage = QPixmap("/usr/local/share/icons/crystalsvg/48x48/kdm/user_male.png");
+    userImage = QPixmap(PREFIX + "/share/icons/crystalsvg/48x48/kdm/user_male.png");
     systemChange = false;
     
     refreshUsers();

Modified: pcbsd/current/src-qt4/pc-xgui/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-xgui/main.cpp	2010-10-26 17:05:41 UTC (rev 7912)
+++ pcbsd/current/src-qt4/pc-xgui/main.cpp	2010-10-26 17:10:55 UTC (rev 7913)
@@ -6,6 +6,7 @@
 #include <QDebug>
 #include "xgui.h"
 #include "dialogconfirm.h"
+#include "../config.h"
 
 int main( int argc, char ** argv )
 {
@@ -14,9 +15,9 @@
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/share/apps/pcbsd/i18n/XGUISource_" + langCode + ".qm" ) )
+    if ( ! QFile::exists(PREFIX + "/share/apps/pcbsd/i18n/XGUISource_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("XGUISource_") + langCode, "/usr/local/share/apps/pcbsd/i18n/" );
+    translator.load( QString("XGUISource_") + langCode, PREFIX + "/share/apps/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-xgui/xgui.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-xgui/xgui.cpp	2010-10-26 17:05:41 UTC (rev 7912)
+++ pcbsd/current/src-qt4/pc-xgui/xgui.cpp	2010-10-26 17:10:55 UTC (rev 7913)
@@ -15,8 +15,9 @@
 #include <QTextStream>
 #include <QDir>
 #include <QDebug>
+#include "../config.h"
 
-#define PROGDIR QString("/usr/local/share/pcbsd/xorg-gui")
+const QString PROGDIR( PREFIX + "/share/pcbsd/xorg-gui" );
 #define TMPDIR QString("/tmp/.xgui")
 
 



More information about the Commits mailing list