[keyboard] Simplified variable name
This commit is contained in:
parent
3552233bf1
commit
4434e85d4d
@ -176,28 +176,28 @@ Config::Config( QObject* parent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] {
|
connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] {
|
||||||
m_selectedLayoutsAdditionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout );
|
m_additionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout );
|
||||||
|
|
||||||
if ( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() )
|
if ( !m_additionalLayoutInfo.additionalLayout.isEmpty() )
|
||||||
{
|
{
|
||||||
m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option();
|
m_additionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option();
|
||||||
|
|
||||||
if( m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() )
|
if( m_additionalLayoutInfo.groupSwitcher.isEmpty() )
|
||||||
{
|
{
|
||||||
m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle";
|
m_additionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle";
|
||||||
}
|
}
|
||||||
|
|
||||||
QProcess::execute( "setxkbmap", xkbmap_layout_args(
|
QProcess::execute( "setxkbmap", xkbmap_layout_args(
|
||||||
{ m_selectedLayoutsAdditionalLayoutInfo.additionalLayout, m_selectedLayout },
|
{ m_additionalLayoutInfo.additionalLayout, m_selectedLayout },
|
||||||
{ m_selectedLayoutsAdditionalLayoutInfo.additionalVariant, m_selectedVariant },
|
{ m_additionalLayoutInfo.additionalVariant, m_selectedVariant },
|
||||||
m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher )
|
m_additionalLayoutInfo.groupSwitcher )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant
|
cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant
|
||||||
<< "(added " << m_selectedLayoutsAdditionalLayoutInfo.additionalLayout << "-"
|
<< "(added " << m_additionalLayoutInfo.additionalLayout << "-"
|
||||||
<< m_selectedLayoutsAdditionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)";
|
<< m_additionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)";
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -343,7 +343,7 @@ Config::createJobs()
|
|||||||
Calamares::Job* j = new SetKeyboardLayoutJob( m_selectedModel,
|
Calamares::Job* j = new SetKeyboardLayoutJob( m_selectedModel,
|
||||||
m_selectedLayout,
|
m_selectedLayout,
|
||||||
m_selectedVariant,
|
m_selectedVariant,
|
||||||
m_selectedLayoutsAdditionalLayoutInfo,
|
m_additionalLayoutInfo,
|
||||||
m_xOrgConfFileName,
|
m_xOrgConfFileName,
|
||||||
m_convertedKeymapPath,
|
m_convertedKeymapPath,
|
||||||
m_writeEtcDefaultKeyboard );
|
m_writeEtcDefaultKeyboard );
|
||||||
@ -495,11 +495,11 @@ Config::finalize()
|
|||||||
gs->insert( "keyboardLayout", m_selectedLayout );
|
gs->insert( "keyboardLayout", m_selectedLayout );
|
||||||
gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant
|
gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant
|
||||||
|
|
||||||
if ( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() )
|
if ( !m_additionalLayoutInfo.additionalLayout.isEmpty() )
|
||||||
{
|
{
|
||||||
gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalLayout);
|
gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalLayout);
|
||||||
gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalVariant);
|
gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalVariant);
|
||||||
gs->insert( "keyboardVConsoleKeymap", m_selectedLayoutsAdditionalLayoutInfo.vconsoleKeymap );
|
gs->insert( "keyboardVConsoleKeymap", m_additionalLayoutInfo.vconsoleKeymap );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,10 @@ private:
|
|||||||
QString m_selectedLayout;
|
QString m_selectedLayout;
|
||||||
QString m_selectedModel;
|
QString m_selectedModel;
|
||||||
QString m_selectedVariant;
|
QString m_selectedVariant;
|
||||||
AdditionalLayoutInfo m_selectedLayoutsAdditionalLayoutInfo;
|
|
||||||
|
// Layout (and corresponding info) added if current one doesn't support ASCII (e.g. Russian or Japanese)
|
||||||
|
AdditionalLayoutInfo m_additionalLayoutInfo;
|
||||||
|
|
||||||
QTimer m_setxkbmapTimer;
|
QTimer m_setxkbmapTimer;
|
||||||
|
|
||||||
// From configuration
|
// From configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user