[PC-BSD Commits] r13457 - pcbsd/current/src-qt4/pc-sysinstaller
svn at pcbsd.org
svn at pcbsd.org
Thu Oct 20 09:49:00 PDT 2011
Author: kris
Date: 2011-10-20 09:49:00 -0700 (Thu, 20 Oct 2011)
New Revision: 13457
Modified:
pcbsd/current/src-qt4/pc-sysinstaller/sys-keyboardwidget.cpp
pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
Log:
Add new button to toggle between pc104 / us keyboard layout during installation, so user can easily
input user name with different layouts
Modified: pcbsd/current/src-qt4/pc-sysinstaller/sys-keyboardwidget.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sys-keyboardwidget.cpp 2011-10-20 13:03:18 UTC (rev 13456)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sys-keyboardwidget.cpp 2011-10-20 16:49:00 UTC (rev 13457)
@@ -19,7 +19,7 @@
connect(listKbLayouts, SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectedKbItemChanged()));
connect(listKbVariants,SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectedKbItemChanged()));
connect(comboBoxKeyboardModel,SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateKbOnSys()));
-
+ connect(pushToggleKeyLayout, SIGNAL(clicked()), this, SLOT(slotToggleKeyLayout()));
}
void SysInstaller::slotCurrentKbLayoutChanged(int row)
@@ -32,6 +32,17 @@
slotUpdateKbOnSys();
}
+void SysInstaller::slotToggleKeyLayout()
+{
+ if ( toggleKeyLayout) {
+ Scripts::Backend::changeKbMap("pc104", "us", QString());
+ toggleKeyLayout = false;
+ } else {
+ slotUpdateKbOnSys();
+ toggleKeyLayout = true;
+ }
+}
+
void SysInstaller::slotUpdateKbOnSys()
{
QString model, layout, variant;
Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp 2011-10-20 13:03:18 UTC (rev 13456)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp 2011-10-20 16:49:00 UTC (rev 13457)
@@ -131,6 +131,9 @@
// Hide the restore button for rsync, this works differently in 9
//radioRestore->setEnabled(false);
//radioRestore->setVisible(false);
+
+ // Set the key toggle
+ toggleKeyLayout = true;
// Is this a LIVE disk?
if ( QFile::exists("/usr/pcbsd-live") )
Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h 2011-10-20 13:03:18 UTC (rev 13456)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h 2011-10-20 16:49:00 UTC (rev 13457)
@@ -126,6 +126,8 @@
// Grab checked / unchecked status of hostname
void slotHostnameClicked();
+ // Toggle key layout slot
+ void slotToggleKeyLayout();
private:
void initSteps();
void initAnteInstall();
@@ -206,6 +208,7 @@
bool hasPkgsOnMedia;
bool hasInstallOnMedia;
bool hasFreeBSDOnMedia;
+ bool toggleKeyLayout;
QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
// Help Stuff
Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui 2011-10-20 13:03:18 UTC (rev 13456)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui 2011-10-20 16:49:00 UTC (rev 13457)
@@ -7969,6 +7969,29 @@
</widget>
</item>
<item>
+ <widget class="QPushButton" name="pushToggleKeyLayout">
+ <property name="toolTip">
+ <string>Switch between US layout and user selected layout</string>
+ </property>
+ <property name="text">
+ <string>Toggle Keyboard Layout</string>
+ </property>
+ <property name="icon">
+ <iconset resource="sysinstaller.qrc">
+ <normaloff>:/modules/images/keyboard.png</normaloff>:/modules/images/keyboard.png</iconset>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -8045,7 +8068,6 @@
<tabstop>comboShell</tabstop>
<tabstop>pushAddUser</tabstop>
<tabstop>listWidgetUsers</tabstop>
- <tabstop>pushApplyUser</tabstop>
<tabstop>pushRemoveUser</tabstop>
<tabstop>checkHostname</tabstop>
<tabstop>lineHostname</tabstop>
More information about the Commits
mailing list