[PC-BSD Commits] r6462 - pcbsd/trunk/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Mon Mar 29 07:44:20 PDT 2010


Author: kris
Date: 2010-03-29 07:44:20 -0700 (Mon, 29 Mar 2010)
New Revision: 6462

Modified:
   pcbsd/trunk/SysInstaller/backend.cpp
   pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
Log:

Don't display PBI components when doing FreeBSD install, they aren't intended for that



Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp	2010-03-29 14:10:07 UTC (rev 6461)
+++ pcbsd/trunk/SysInstaller/backend.cpp	2010-03-29 14:44:20 UTC (rev 6462)
@@ -260,7 +260,7 @@
    QList<QStringList> components;
    QStringList singleComponent;
 
-   QString tmp, name, desc, icon, line;
+   QString tmp, name, desc, icon, type, line;
    QString selected = "off";
 
    Process p(QStringList() << "list-components");
@@ -269,15 +269,15 @@
        while (p.canReadLine()) {
           line = p.readLine();
           line = line.simplified();
-          if ( line.indexOf("name:") != -1 ) {
+          if ( line.indexOf("name:") != -1 )
             name = line.remove(0, line.indexOf(": ") + 2); 
-          }
-          if ( line.indexOf("desc:") != -1 ) {
+          if ( line.indexOf("desc:") != -1 )
             desc = line.remove(0, line.indexOf(": ") + 2); 
-          }
+          if ( line.indexOf("type:") != -1 )
+            type = line.remove(0, line.indexOf(": ") + 2); 
           if ( line.indexOf("icon:") != -1 ) {
             icon = line.remove(0, line.indexOf(": ") + 2); 
-            singleComponent << name << desc << icon << selected;
+            singleComponent << name << desc << icon << type << selected;
             components << singleComponent;
             qDebug() << "Found Component:" << singleComponent;
             singleComponent.clear();

Modified: pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-componentwidget.cpp	2010-03-29 14:10:07 UTC (rev 6461)
+++ pcbsd/trunk/SysInstaller/sys-componentwidget.cpp	2010-03-29 14:44:20 UTC (rev 6462)
@@ -19,10 +19,12 @@
 
   for ( int i=0; i<listComponents.count(); ++i) {
      name = listComponents.at(i).at(1) + " - (" + listComponents.at(i).at(0) + ")";
-     if ( listComponents.at(i).at(3) == "off" )
-       new QListWidgetItem(QIcon(listComponents.at(i).at(2)), name, listAvailComponents);
-     else 
-       new QListWidgetItem(QIcon(listComponents.at(i).at(2)), name, listSelComponents);
+     if ( ! (radioInstallFreeBSD->isChecked() && listComponents.at(i).at(3) == "PBI")) {
+       if ( listComponents.at(i).at(4) == "off" )
+         new QListWidgetItem(QIcon(listComponents.at(i).at(2)), name, listAvailComponents);
+       else 
+         new QListWidgetItem(QIcon(listComponents.at(i).at(2)), name, listSelComponents);
+     }
   }
 
 }
@@ -41,7 +43,7 @@
       name = name.remove(0, name.indexOf(" (") + 2 );
       for ( int i=0; i<listComponents.count(); ++i) {
          if ( listComponents.at(i).at(0) == name )
-           listComponents[i][3] = "on";
+           listComponents[i][4] = "on";
       }
     }
   }
@@ -65,7 +67,7 @@
       name = name.remove(0, name.indexOf(" (") + 2 );
       for ( int i=0; i<listComponents.count(); ++i) {
          if ( listComponents.at(i).at(0) == name )
-           listComponents[i][3] = "off";
+           listComponents[i][4] = "off";
       }
     }
   }
@@ -80,7 +82,7 @@
   QStringList componentList;
   QString tmpList;
   for ( int i=0; i<listComponents.count(); ++i) {
-     if ( listComponents.at(i).at(3) == "on" )
+     if ( listComponents.at(i).at(4) == "on" )
        tmpList = tmpList + listComponents.at(i).at(0) + ",";
   }
 



More information about the Commits mailing list