[PC-BSD Commits] r15859 - in pcbsd/current/src-qt4: . EasyPBI

svn at pcbsd.org svn at pcbsd.org
Tue Mar 20 05:53:30 PDT 2012


Author: kenmoore
Date: 2012-03-20 12:53:29 +0000 (Tue, 20 Mar 2012)
New Revision: 15859

Added:
   pcbsd/current/src-qt4/EasyPBI/
Modified:
   pcbsd/current/src-qt4/EasyPBI/main.cpp
   pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp
   pcbsd/current/src-qt4/EasyPBI/mainwindow.h
   pcbsd/current/src-qt4/EasyPBI/modBuild.cpp
   pcbsd/current/src-qt4/EasyPBI/modBuild.h
   pcbsd/current/src-qt4/src-qt4.pro
Log:
Move EasyPBI from projects into the main src-qt4 tree. Will be included in the base system from now on.



Modified: pcbsd/current/src-qt4/EasyPBI/main.cpp
===================================================================
--- pcbsd-projects/EasyPBI/main.cpp	2012-03-20 09:14:53 UTC (rev 15858)
+++ pcbsd/current/src-qt4/EasyPBI/main.cpp	2012-03-20 12:53:29 UTC (rev 15859)
@@ -3,8 +3,7 @@
 #include <QtGui/QApplication>
 #include <QDebug>
 #include "mainwindow.h"
-#define PREFIX QString("/usr/local")
-//#include "../config.h"
+#include "../config.h"
 
 int main(int argc, char ** argv)
 {

Modified: pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp
===================================================================
--- pcbsd-projects/EasyPBI/mainwindow.cpp	2012-03-20 09:14:53 UTC (rev 15858)
+++ pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp	2012-03-20 12:53:29 UTC (rev 15859)
@@ -977,7 +977,7 @@
 
 void MainWindow::editRefreshLinks(){
   //Update the current links in the file
-  refreshCurrentLinks();
+  refreshCurrentLinks(TRUE);
   //Get the binaries available and populate list
   ui->listLinkBins->clear();
   ui->listLinkBins->addItem(tr("Custom Binary"));
@@ -998,15 +998,16 @@
   ui->listLinkTypesAvailable->addItems(types);
 }
 
-void MainWindow::refreshCurrentLinks(){
+void MainWindow::refreshCurrentLinks(bool forceRead){
   //Read external-links file
   QString filePath = ui->label_module_selected->text() + "/external-links";
-  QStringList bins = ModBuild::getExternalLinksValues(filePath,"Target");
+  QStringList bins = ModBuild::getExternalLinksValues(filePath,"Target",forceRead);
   QStringList types = ModBuild::getExternalLinksValues(filePath,"Action");
   //display info in GUI
   ui->listCurrentLinks->clear();
   //Make sure each line is displayed in the format [(bin) : (types)]
   for(int i=0; i<bins.length(); i++){
+    qDebug() << bins << types;
     if(!bins[i].isEmpty() && !types[i].isEmpty()){
       QString entry = bins[i] + "  :  " + types[i];
       ui->listCurrentLinks->addItem(entry);
@@ -1016,7 +1017,7 @@
 }
 
 void MainWindow::on_pushRefreshLinkList_clicked(){
-  refreshCurrentLinks();
+  refreshCurrentLinks(TRUE);
 }
 
 void MainWindow::on_pushClearLinkChanges_clicked(){
@@ -1100,7 +1101,7 @@
   }
 
   //Refresh the GUI
-  editRefreshLinks();
+  refreshCurrentLinks(TRUE);
 }
 
 void MainWindow::on_listLinkBins_currentIndexChanged(int index){

Modified: pcbsd/current/src-qt4/EasyPBI/mainwindow.h
===================================================================
--- pcbsd-projects/EasyPBI/mainwindow.h	2012-03-20 09:14:53 UTC (rev 15858)
+++ pcbsd/current/src-qt4/EasyPBI/mainwindow.h	2012-03-20 12:53:29 UTC (rev 15859)
@@ -82,7 +82,7 @@
     void on_pushAddDesktopEntry_clicked();
     void on_pushAddMenuEntry_clicked();
     void editRefreshLinks();
-    void refreshCurrentLinks();
+    void refreshCurrentLinks(bool);
     void on_pushRefreshLinkList_clicked();
     void on_pushClearLinkChanges_clicked();
     void on_pushAddLink_clicked();

Modified: pcbsd/current/src-qt4/EasyPBI/modBuild.cpp
===================================================================
--- pcbsd-projects/EasyPBI/modBuild.cpp	2012-03-20 09:14:53 UTC (rev 15858)
+++ pcbsd/current/src-qt4/EasyPBI/modBuild.cpp	2012-03-20 12:53:29 UTC (rev 15859)
@@ -441,12 +441,12 @@
   return name;
 }
 
-QString ModBuild::getMenuEntryValue(QString filePath, QString value){
+QString ModBuild::getMenuEntryValue(QString filePath, QString value, bool forceRead){
   if(!filePath.endsWith(".desktop")){
     qDebug() << "Error: Desired file is not a menu entry:" << filePath;
     return "";
   }
-  if(filePath != saveMenuFile){
+  if(filePath != saveMenuFile || forceRead){
     //Read the new file
     QFile file(filePath);
     if(!file.exists()){
@@ -504,12 +504,12 @@
   }
 }
 
-QString ModBuild::getDesktopEntryValue(QString filePath, QString value){
+QString ModBuild::getDesktopEntryValue(QString filePath, QString value, bool forceRead){
   if(!filePath.endsWith(".desktop")){
     qDebug() << "Error: Desired file is not a desktop entry:" << filePath;
     return "";
   }
-  if(filePath != saveDesktopFile){
+  if(filePath != saveDesktopFile || forceRead){
     //Read the new file
     QFile file(filePath);
     if(!file.exists()){
@@ -563,12 +563,12 @@
   }
 }
 
-QStringList ModBuild::getExternalLinksValues(QString filePath, QString value){
+QStringList ModBuild::getExternalLinksValues(QString filePath, QString value, bool forceRead){
   if(!filePath.endsWith("external-links")){
     qDebug() << "Error: Desired file is not an external-links file:" << filePath;
     return QStringList("");
   }
-  if(filePath != saveExternalLinksFile){
+  if(filePath != saveExternalLinksFile || forceRead){
     //Read the new file
     QFile file(filePath);
     if(!file.exists()){

Modified: pcbsd/current/src-qt4/EasyPBI/modBuild.h
===================================================================
--- pcbsd-projects/EasyPBI/modBuild.h	2012-03-20 09:14:53 UTC (rev 15858)
+++ pcbsd/current/src-qt4/EasyPBI/modBuild.h	2012-03-20 12:53:29 UTC (rev 15859)
@@ -25,9 +25,9 @@
   static bool addResource(QString,QString);
   static void compressModule(QString);
   static QString getFilenameFromPath(QString);
-  static QString getMenuEntryValue(QString, QString);
-  static QString getDesktopEntryValue(QString, QString);
-  static QStringList getExternalLinksValues(QString, QString);
+  static QString getMenuEntryValue(QString, QString, bool forceRead = FALSE);
+  static QString getDesktopEntryValue(QString, QString, bool forceRead = FALSE);
+  static QStringList getExternalLinksValues(QString, QString, bool forceRead = FALSE);
 
 };
 

Modified: pcbsd/current/src-qt4/src-qt4.pro
===================================================================
--- pcbsd/current/src-qt4/src-qt4.pro	2012-03-20 09:14:53 UTC (rev 15858)
+++ pcbsd/current/src-qt4/src-qt4.pro	2012-03-20 12:53:29 UTC (rev 15859)
@@ -23,4 +23,5 @@
 	 pc-usermanager \
 	 pc-welcome \
 	 pc-xgui \
-	 warden
+	 warden \
+         EasyPBI



More information about the Commits mailing list