mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
[keyboard] Implemented X11 config writing for additional layout
This commit is contained in:
parent
0dd027af90
commit
bfc60ad2cf
7 changed files with 72 additions and 27 deletions
|
@ -30,9 +30,9 @@
|
|||
#include <QTextStream>
|
||||
|
||||
|
||||
SetKeyboardLayoutJob::SetKeyboardLayoutJob( const QString& model,
|
||||
SetKeyboardLayoutJob::SetKeyboardLayoutJob(const QString& model,
|
||||
const QString& layout,
|
||||
const QString& variant,
|
||||
const QString& variant, const AdditionalLayoutInfo &additionaLayoutInfo,
|
||||
const QString& xOrgConfFileName,
|
||||
const QString& convertedKeymapPath,
|
||||
bool writeEtcDefaultKeyboard )
|
||||
|
@ -40,6 +40,7 @@ SetKeyboardLayoutJob::SetKeyboardLayoutJob( const QString& model,
|
|||
, m_model( model )
|
||||
, m_layout( layout )
|
||||
, m_variant( variant )
|
||||
, m_additionalLayoutInfo( additionaLayoutInfo )
|
||||
, m_xOrgConfFileName( xOrgConfFileName )
|
||||
, m_convertedKeymapPath( convertedKeymapPath )
|
||||
, m_writeEtcDefaultKeyboard( writeEtcDefaultKeyboard )
|
||||
|
@ -250,19 +251,32 @@ SetKeyboardLayoutJob::writeX11Data( const QString& keyboardConfPath ) const
|
|||
" Identifier \"system-keyboard\"\n"
|
||||
" MatchIsKeyboard \"on\"\n";
|
||||
|
||||
if ( !m_layout.isEmpty() )
|
||||
{
|
||||
stream << " Option \"XkbLayout\" \"" << m_layout << "\"\n";
|
||||
}
|
||||
|
||||
if ( !m_model.isEmpty() )
|
||||
if ( m_additionalLayoutInfo.additionalLayout.isEmpty() )
|
||||
{
|
||||
stream << " Option \"XkbModel\" \"" << m_model << "\"\n";
|
||||
}
|
||||
if ( !m_layout.isEmpty() )
|
||||
{
|
||||
stream << " Option \"XkbLayout\" \"" << m_layout << "\"\n";
|
||||
}
|
||||
|
||||
if ( !m_variant.isEmpty() )
|
||||
if ( !m_variant.isEmpty() )
|
||||
{
|
||||
stream << " Option \"XkbVariant\" \"" << m_variant << "\"\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stream << " Option \"XkbVariant\" \"" << m_variant << "\"\n";
|
||||
if ( !m_layout.isEmpty() )
|
||||
{
|
||||
stream << " Option \"XkbLayout\" \"" << m_additionalLayoutInfo.additionalLayout << "," << m_layout << "\"\n";
|
||||
}
|
||||
|
||||
if ( !m_variant.isEmpty() )
|
||||
{
|
||||
stream << " Option \"XkbVariant\" \"" << m_additionalLayoutInfo.additionalVariant << "," << m_variant << "\"\n";
|
||||
}
|
||||
|
||||
stream << " Option \"XkbOptions\" \"" << m_additionalLayoutInfo.groupSwitcher << "\"\n";
|
||||
}
|
||||
|
||||
stream << "EndSection\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue