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

svn at pcbsd.org svn at pcbsd.org
Tue Nov 17 13:38:22 PST 2009


Author: kris
Date: 2009-11-17 13:38:22 -0800 (Tue, 17 Nov 2009)
New Revision: 5050

Modified:
   pcbsd/trunk/SysInstaller/backend.cpp
   pcbsd/trunk/SysInstaller/sysinstaller.cpp
   pcbsd/trunk/SysInstaller/sysinstaller.ui
Log:

More updates to SysInstaller, started adding disk detection, which works now



Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp	2009-11-17 21:08:47 UTC (rev 5049)
+++ pcbsd/trunk/SysInstaller/backend.cpp	2009-11-17 21:38:22 UTC (rev 5050)
@@ -40,23 +40,19 @@
     return _layouts;
 }
 
+// Function which gets the key Variants for the target layout
 QStringList Backend::keyVariants(const QString &layout)
 {
     QStringList _variants;
-    QString code, desc, line, laycode;
+    QString code, desc, line;
 
-    // Get the code we should search for
-    laycode = layout;
-    laycode = laycode.remove(0, layout.indexOf("(") + 1);
-    laycode.truncate(laycode.indexOf(")") );
-
     Process p(QStringList() << "xkeyboard-variants");
 
     if (p.waitForFinished()) {
         while (p.canReadLine()) {
             line = p.readLine();
             // Look for variants for this particular layout
-            if ( line.indexOf(laycode + ":") != -1 )
+            if ( line.indexOf(" " + layout + ":") != -1 )
             {
               code = line.simplified();
               code.truncate(code.indexOf(" "));

Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-17 21:08:47 UTC (rev 5049)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-17 21:38:22 UTC (rev 5050)
@@ -106,8 +106,9 @@
     // load drives
     comboDiskList->clear();
     sysDisks = Scripts::Backend::hardDrives();
-    //comboDiskList->addItems(disks);
-    
+    for (int i=0; i < sysDisks.count(); ++i) {
+      comboDiskList->addItem(sysDisks.at(i).at(0) + " - " + sysDisks.at(i).at(1) + " " + sysDisks.at(i).at(2));
+    }
 
 }
 
@@ -190,8 +191,19 @@
 
 void SysInstaller::setKbVariants(const QString &kbLayout)
 {
+    QString laycode = kbLayout;
     listKbVariants->clear();
-    listKbVariants->addItems(Scripts::Backend::keyVariants(kbLayout));
+
+    // Get the code we should search for
+    laycode = laycode.remove(0, laycode.indexOf("(") + 1);
+    laycode.truncate(laycode.indexOf(")") );
+
+    listKbVariants->addItems(Scripts::Backend::keyVariants(laycode));
+     
+    if ( laycode == "us" )
+      listKbVariants->setCurrentRow(2);
+    else
+      listKbVariants->setCurrentRow(0);
 }
 
 void SysInstaller::slotSelectedKbItemChanged()
@@ -210,7 +222,6 @@
 {
     // set the keyboard layout and variant defaults; :)
     listKbLayouts->setCurrentRow(0);
-    listKbVariants->setCurrentRow(0);
 }
 
 void SysInstaller::slotChangeOS()

Modified: pcbsd/trunk/SysInstaller/sysinstaller.ui
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.ui	2009-11-17 21:08:47 UTC (rev 5049)
+++ pcbsd/trunk/SysInstaller/sysinstaller.ui	2009-11-17 21:38:22 UTC (rev 5050)
@@ -300,7 +300,7 @@
              <item>
               <widget class="QStackedWidget" name="anteInstallStack">
                <property name="currentIndex">
-                <number>0</number>
+                <number>3</number>
                </property>
                <widget class="QWidget" name="aiStep0">
                 <layout class="QVBoxLayout" name="verticalLayout_6">
@@ -1015,7 +1015,7 @@
                        </spacer>
                       </item>
                       <item>
-                       <widget class="QRadioButton" name="radioButton_4">
+                       <widget class="QRadioButton" name="radioEntireDisk">
                         <property name="sizePolicy">
                          <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                           <horstretch>0</horstretch>
@@ -1031,7 +1031,7 @@
                        </widget>
                       </item>
                       <item>
-                       <widget class="QRadioButton" name="radioButton_5">
+                       <widget class="QRadioButton" name="radioCustomDisk">
                         <property name="sizePolicy">
                          <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                           <horstretch>0</horstretch>
@@ -1042,7 +1042,7 @@
                          <enum>Qt::RightToLeft</enum>
                         </property>
                         <property name="text">
-                         <string>Customize Slices</string>
+                         <string>Customize Disk Layout</string>
                         </property>
                        </widget>
                       </item>
@@ -1071,7 +1071,7 @@
                       <enum>QFrame::Sunken</enum>
                      </property>
                      <property name="currentIndex">
-                      <number>0</number>
+                      <number>1</number>
                      </property>
                      <widget class="QWidget" name="page">
                       <layout class="QVBoxLayout" name="verticalLayout_20">



More information about the Commits mailing list