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

svn at pcbsd.org svn at pcbsd.org
Tue Dec 1 06:19:13 PST 2009


Author: kris
Date: 2009-12-01 06:19:13 -0800 (Tue, 01 Dec 2009)
New Revision: 5171

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

Updated the sys-install.cfg generation, added support for keyboard layout / options



Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-12-01 10:02:50 UTC (rev 5170)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-12-01 14:19:13 UTC (rev 5171)
@@ -331,8 +331,9 @@
 {
 
   QStringList tmpList;
+  QString tmp;
+
   tmpList << "# Auto-Generated pc-sysinstall configuration";
-  tmpList << " ";
   tmpList << "installInteractive=no";
  
   if ( radioUpgrade->isChecked() )
@@ -355,8 +356,34 @@
 
   if ( comboLanguage->currentIndex() != 0 ) {
     QString lang = languages.at(comboLanguage->currentIndex());
+    tmpList << "";
     tmpList << "localizeLang=" + lang;
   }
+
+  // Now figure out of we need to set custom keyboard layouts
+  if ( ! checkKbDefault->isChecked() )
+  {
+    tmpList << "";
+    tmpList << "# Keyboard Layout Options";
+    tmp = comboBoxKeyboardModel->currentText();
+    tmp.truncate(tmp.indexOf(")"));
+    tmp = tmp.remove(0, tmp.indexOf(" (") + 2 );
+    tmpList << "localizeKeyModel=" + tmp;
+
+    tmp = listKbLayouts->currentItem()->text();
+    tmp.truncate(tmp.indexOf(")"));
+    tmp = tmp.remove(0, tmp.indexOf(" (") + 2 );
+    tmpList << "localizeKeyLayout=" + tmp;
+
+    tmp = listKbVariants->currentItem()->text();
+    if ( tmp != "<none>" )
+    {
+      tmp.truncate(tmp.indexOf(")"));
+      tmp = tmp.remove(0, tmp.indexOf(" (") + 2 );
+      tmpList << "localizeKeyVariant=" + tmp;
+    } 
+
+  }
   
 
   tmpList << " ";
@@ -383,4 +410,6 @@
     cfgfile.close();
   }
 
+  textEditSummary->moveCursor(QTextCursor::Start);
+
 }



More information about the Commits mailing list