[PC-BSD Commits] r7908 - in pcbsd/current/src-qt4/pc-netmanager/src: NetworkManager NetworkTray ethernetconfig wificonfig

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


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

Modified:
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/main.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/main.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/ethernetconfig/main.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/main.cpp
Log:

Updated pc-netmanager to use PREFIX / config.h



Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/main.cpp	2010-10-26 16:33:44 UTC (rev 7907)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/main.cpp	2010-10-26 16:43:45 UTC (rev 7908)
@@ -4,6 +4,7 @@
 #include <QFile>
 #include <QApplication>
 #include "networkman.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/NetworkManager_" + langCode + ".qm" ) )
+    if ( ! QFile::exists(PREFIX + "/share/pcbsd/i18n/NetworkManager_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("NetworkManager_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+    translator.load( QString("NetworkManager_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp	2010-10-26 16:33:44 UTC (rev 7907)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp	2010-10-26 16:43:45 UTC (rev 7908)
@@ -20,6 +20,7 @@
 #include <pcbsd-utils.h>
 #include <qstring.h>
 #include <QMenu>
+#include "../../../config.h"
 
 // Set our max number of wlan[0-9] devices we'll support
 #define MAX_WLAN_DEVICES 10
@@ -359,7 +360,7 @@
 
 	
    // Check to see if the network tray icon is enabled or not
-   QString filename = "/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop";
+   QString filename = PREFIX + "/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop";
 
 
    // First run a check to if we need to enable or disable the checkbox
@@ -781,12 +782,12 @@
 		if ( DevsType[i] == "Wireless")
 		{
 		    
-		    QPixmap PixmapIcon("/usr/local/share/pcbsd/pc-netmanager/pics/network_wifi.png");
+		    QPixmap PixmapIcon( PREFIX + "/share/pcbsd/pc-netmanager/pics/network_wifi.png");
 		    listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
 		    
 		 } else {
 		    // If we are looking at a regular Ethernet device  
-		    QPixmap PixmapIcon("/usr/local/share/pcbsd/pc-netmanager/pics/network_local.png");
+		    QPixmap PixmapIcon( PREFIX + "/share/pcbsd/pc-netmanager/pics/network_local.png");
 		    listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
 		}
 	
@@ -809,14 +810,14 @@
     if (checkSysTray->isChecked() )
     { 
 	// Save the new file
-        QFile fileout( "/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop" );
+        QFile fileout( PREFIX + "/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop" );
         if ( fileout.open( QIODevice::WriteOnly ) ) {
           QTextStream streamout( &fileout );
           streamout << "[Desktop Entry]\nExec=pc-nettray " + Devs[sel];
 	  streamout << "\nIcon=network\nStartupNotify=false\nType=Application\n";
           fileout.close();
 	    
-	  runCommand("chmod 644 \"/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop\"");
+	  runCommand("chmod 644 \"" + PREFIX + "/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop\"");
 
           // Now start the tray icon
           //runCommand("pc-nettray " + Devs[sel] + " &");
@@ -825,7 +826,7 @@
 	
     } else {
 	// Kill the tray applet
-	runCommand("rm -f \"/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop\"");
+	runCommand("rm -f \"" + PREFIX + "/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop\"");
     }
 
 }
@@ -1342,7 +1343,7 @@
 
    // KPM Needs finishing, umts_stick needs update to allow providing pin / device from prompt
    QString pDev = "/dev/" + comboPPPOEDev->currentText(); 
-   QString pinout = getLineFromCommandOutput("/usr/local/share/pcbsd/pc-netmanager/umts_stick -a -D " + pDev + " -P " + line3GPin->text() + " 2>&1");
+   QString pinout = getLineFromCommandOutput(PREFIX + "/share/pcbsd/pc-netmanager/umts_stick -a -D " + pDev + " -P " + line3GPin->text() + " 2>&1");
 
    QMessageBox::information( this, tr("Pin Output"),
 	  tr("The PIN setting returned the following output:") + "\n"  + pinout );

Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/main.cpp	2010-10-26 16:33:44 UTC (rev 7907)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/main.cpp	2010-10-26 16:43:45 UTC (rev 7908)
@@ -8,8 +8,8 @@
 #include <qtextcodec.h>
 #include <QApplication>
 #include <QLocale>
-
 #include <NetworkTray.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/NetworkTray_" + langCode + ".qm" ) )
+   if ( ! QFile::exists( PREFIX + "/share/pcbsd/i18n/NetworkTray_" + langCode + ".qm" ) )
      langCode.truncate(langCode.indexOf("_"));
-   translator.load( QString("NetworkTray_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+   translator.load( QString("NetworkTray_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
    a.installTranslator( &translator );
    qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/ethernetconfig/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/ethernetconfig/main.cpp	2010-10-26 16:33:44 UTC (rev 7907)
+++ pcbsd/current/src-qt4/pc-netmanager/src/ethernetconfig/main.cpp	2010-10-26 16:43:45 UTC (rev 7908)
@@ -30,6 +30,7 @@
 #include <qdesktopwidget.h>
 #include <qtextcodec.h>
 #include <QApplication>
+#include "../../../config.h"
 
 int main(int argc, char **argv)
 {
@@ -37,9 +38,9 @@
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/share/pcbsd/i18n/ethernetconfig_" + langCode + ".qm" ) )
+    if ( ! QFile::exists( PREFIX + "/share/pcbsd/i18n/ethernetconfig_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("ethernetconfig_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+    translator.load( QString("ethernetconfig_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/main.cpp	2010-10-26 16:33:44 UTC (rev 7907)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/main.cpp	2010-10-26 16:43:45 UTC (rev 7908)
@@ -4,6 +4,7 @@
 #include <QDebug>
 #include "wificonfigwidgetbase.h"
 #include "ui_wificonfigwidgetbase.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/wificonfig_" + langCode + ".qm" ) )
+    if ( ! QFile::exists( PREFIX + "/share/pcbsd/i18n/wificonfig_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("wificonfig_") + langCode, "/usr/local/share/pcbsd/i18n/" );
+    translator.load( QString("wificonfig_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 



More information about the Commits mailing list