mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
Store keyboard layout information in GlobalStorage.
This commit is contained in:
parent
7680578b61
commit
cc2e49c6ae
3 changed files with 26 additions and 0 deletions
|
@ -25,6 +25,9 @@
|
|||
#include "ui_KeyboardPage.h"
|
||||
#include "keyboardwidget/keyboardpreview.h"
|
||||
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QProcess>
|
||||
#include <QPushButton>
|
||||
|
@ -184,6 +187,20 @@ KeyboardPage::prettyStatus() const
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
KeyboardPage::finalize()
|
||||
{
|
||||
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
|
||||
if ( !m_selectedLayout.isEmpty() )
|
||||
{
|
||||
gs->insert( "keyboardLayout", m_selectedLayout );
|
||||
gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant
|
||||
}
|
||||
|
||||
//FIXME: also store keyboard model for something?
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
KeyboardPage::onListLayoutCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous )
|
||||
{
|
||||
|
@ -242,5 +259,8 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi
|
|||
// Set Xorg keyboard layout
|
||||
QProcess::execute( QString( "setxkbmap -layout \"%1\" -variant \"%2\"" )
|
||||
.arg( layout, variant ).toUtf8() );
|
||||
|
||||
m_selectedLayout = layout;
|
||||
m_selectedVariant = variant;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue