[PC-BSD Commits] r5148 - pcbsd/trunk/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Wed Nov 25 12:07:49 PST 2009
Author: kris
Date: 2009-11-25 12:07:49 -0800 (Wed, 25 Nov 2009)
New Revision: 5148
Modified:
pcbsd/trunk/SysInstaller/backend.cpp
pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
pcbsd/trunk/SysInstaller/sys-keyboardwidget.cpp
pcbsd/trunk/SysInstaller/sys-userwidget.cpp
pcbsd/trunk/SysInstaller/sysinstaller.cpp
pcbsd/trunk/SysInstaller/sysinstaller.h
Log:
Added loading of components, and fixed a bug with setting the keyboard variant to intl by default, not necessary,
still need to do component selection logic
Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp 2009-11-25 19:26:54 UTC (rev 5147)
+++ pcbsd/trunk/SysInstaller/backend.cpp 2009-11-25 20:07:49 UTC (rev 5148)
@@ -183,22 +183,23 @@
if (p.waitForFinished()) {
while (p.canReadLine()) {
line = p.readLine();
+ line = line.simplified();
if ( line.indexOf("name:") != -1 ) {
name = line.remove(0, line.indexOf(": ") + 2);
}
- if ( line.indexOf("descr:") != -1 ) {
+ if ( line.indexOf("desc:") != -1 ) {
desc = line.remove(0, line.indexOf(": ") + 2);
}
if ( line.indexOf("icon:") != -1 ) {
icon = line.remove(0, line.indexOf(": ") + 2);
singleComponent << name << desc << icon;
components << singleComponent;
+ qDebug() << "Found Component:" << singleComponent;
singleComponent.clear();
}
}
}
- components << singleComponent;
return components;
}
Modified: pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-componentwidget.cpp 2009-11-25 19:26:54 UTC (rev 5147)
+++ pcbsd/trunk/SysInstaller/sys-componentwidget.cpp 2009-11-25 20:07:49 UTC (rev 5148)
@@ -3,5 +3,15 @@
void SysInstaller::connectComponentSlots()
{
+ QString name;
+ QIcon cIcon;
+ listAvailComponents->clear();
+ listComponents = Scripts::Backend::availComponents();
+ for ( int i=0; i<listComponents.count(); ++i) {
+ cIcon.addFile(listComponents.at(i).at(2));
+ name = listComponents.at(i).at(1) + " - (" + listComponents.at(i).at(0) + ")";
+ new QListWidgetItem(cIcon, name, listAvailComponents);
+ }
+
}
Modified: pcbsd/trunk/SysInstaller/sys-keyboardwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-keyboardwidget.cpp 2009-11-25 19:26:54 UTC (rev 5147)
+++ pcbsd/trunk/SysInstaller/sys-keyboardwidget.cpp 2009-11-25 20:07:49 UTC (rev 5148)
@@ -54,8 +54,12 @@
layout.truncate(layout.size() -1 );
variant = listKbVariants->currentItem()->text();
- variant = variant.remove(0, variant.indexOf("- (") + 3 );
- variant.truncate(variant.size() -1 );
+ if ( variant != "<none>" ) {
+ variant = variant.remove(0, variant.indexOf("- (") + 3 );
+ variant.truncate(variant.size() -1 );
+ } else {
+ variant = "";
+ }
Scripts::Backend::changeKbMap(model, layout, variant);
}
@@ -77,12 +81,10 @@
laycode = laycode.remove(0, laycode.indexOf("(") + 1);
laycode.truncate(laycode.indexOf(")") );
+ listKbVariants->addItem("<none>");
listKbVariants->addItems(Scripts::Backend::keyVariants(laycode, savedKeyVariants));
- if ( laycode == "us" )
- listKbVariants->setCurrentRow(2);
- else
- listKbVariants->setCurrentRow(0);
+ listKbVariants->setCurrentRow(0);
}
void SysInstaller::slotSelectedKbItemChanged()
Modified: pcbsd/trunk/SysInstaller/sys-userwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-userwidget.cpp 2009-11-25 19:26:54 UTC (rev 5147)
+++ pcbsd/trunk/SysInstaller/sys-userwidget.cpp 2009-11-25 20:07:49 UTC (rev 5148)
@@ -30,6 +30,11 @@
//Setup any regular expressions we will need
passwordRegExp.setPattern("([a-z]*[A-Z]*[0-9]*[!\"\xef\xbf\xbd$%^&*()_+=\xef\xbf\xbd#'`@~:?<>|{}\\-.]*)+");
+
+ // Disable add / apply buttons
+ pushAddUser->setEnabled(false);
+ pushApplyUser->setEnabled(false);
+
}
void SysInstaller::slotPasswordTextChanged()
Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp 2009-11-25 19:26:54 UTC (rev 5147)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp 2009-11-25 20:07:49 UTC (rev 5148)
@@ -131,6 +131,9 @@
slotChangedInstallSource();
slotChangedNic();
+ // Load the components
+ connectComponentSlots();
+
// Load the disks
loadDiskInfo();
Modified: pcbsd/trunk/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.h 2009-11-25 19:26:54 UTC (rev 5147)
+++ pcbsd/trunk/SysInstaller/sysinstaller.h 2009-11-25 20:07:49 UTC (rev 5148)
@@ -137,6 +137,7 @@
int systemMemory; // Ammount of system RAM we have in MB
QStringList savedKeyVariants; // Temp variable to keep key variants in memory
QList<QStringList> listUsers; // QStringList which keeps our users
+ QList<QStringList> listComponents; // QStringList for our available components
};
More information about the Commits
mailing list