Load lcLocale value into GlobalStorage. Also allow localeGenPath setting
in locale.conf.
This commit is contained in:
parent
2ca58c6f91
commit
6049267cf6
@ -21,6 +21,8 @@
|
||||
#include "LocalePage.h"
|
||||
#include "timezonewidget/localeglobal.h"
|
||||
#include "widgets/WaitingWidget.h"
|
||||
#include "JobQueue.h"
|
||||
#include "GlobalStorage.h"
|
||||
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
|
||||
@ -46,7 +48,9 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
|
||||
connect( &m_initWatcher, &QFutureWatcher< void >::finished,
|
||||
[=]
|
||||
{
|
||||
m_actualWidget->init( m_startingTimezone.first, m_startingTimezone.second );
|
||||
m_actualWidget->init( m_startingTimezone.first,
|
||||
m_startingTimezone.second,
|
||||
m_localeGenPath );
|
||||
m_widget->layout()->removeWidget( waitingWidget );
|
||||
waitingWidget->deleteLater();
|
||||
m_widget->layout()->addWidget( m_actualWidget );
|
||||
@ -92,7 +96,8 @@ LocaleViewStep::widget()
|
||||
void
|
||||
LocaleViewStep::next()
|
||||
{
|
||||
//TODO: actually save those settings somewhere
|
||||
Calamares::JobQueue::instance()->globalStorage()->insert( "lcLocale",
|
||||
m_actualWidget->lcLocale() );
|
||||
emit done();
|
||||
}
|
||||
|
||||
@ -158,4 +163,15 @@ LocaleViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
m_startingTimezone = qMakePair( QStringLiteral( "Europe" ),
|
||||
QStringLiteral( "Berlin" ) );
|
||||
}
|
||||
|
||||
if ( configurationMap.contains( "localeGenPath" ) &&
|
||||
configurationMap.value( "localeGenPath" ).type() == QVariant::String &&
|
||||
!configurationMap.value( "localeGenPath" ).toString().isEmpty() )
|
||||
{
|
||||
m_localeGenPath = configurationMap.value( "localeGenPath" ).toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_localeGenPath = QStringLiteral( "/etc/locale.gen" );
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ private:
|
||||
QString m_prettyStatus;
|
||||
|
||||
QPair< QString, QString > m_startingTimezone;
|
||||
QString m_localeGenPath;
|
||||
|
||||
QList< Calamares::job_ptr > m_jobs;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user