2014-07-02 17:59:24 +02:00
|
|
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
|
|
|
*
|
2016-05-27 17:14:17 +02:00
|
|
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
2014-07-02 17:59:24 +02:00
|
|
|
*
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Calamares is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "LocalePage.h"
|
|
|
|
|
|
|
|
#include "timezonewidget/timezonewidget.h"
|
2014-08-01 16:29:19 +02:00
|
|
|
#include "SetTimezoneJob.h"
|
2014-11-25 17:41:27 +01:00
|
|
|
#include "utils/Logger.h"
|
2014-11-11 12:44:06 +01:00
|
|
|
#include "utils/Retranslator.h"
|
2014-11-25 17:41:27 +01:00
|
|
|
#include "GlobalStorage.h"
|
|
|
|
#include "JobQueue.h"
|
|
|
|
#include "LCLocaleDialog.h"
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
#include <QBoxLayout>
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QLabel>
|
2014-11-25 17:41:27 +01:00
|
|
|
#include <QPushButton>
|
2014-11-25 20:03:37 +01:00
|
|
|
#include <QProcess>
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
LocalePage::LocalePage( QWidget* parent )
|
2016-07-27 13:35:03 +02:00
|
|
|
: QWidget( parent )
|
2014-07-02 17:59:24 +02:00
|
|
|
, m_blockTzWidgetSet( false )
|
|
|
|
{
|
2014-07-02 18:12:20 +02:00
|
|
|
QBoxLayout* mainLayout = new QVBoxLayout;
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-07-02 18:12:20 +02:00
|
|
|
QBoxLayout* tzwLayout = new QHBoxLayout;
|
|
|
|
mainLayout->addLayout( tzwLayout );
|
2014-07-02 17:59:24 +02:00
|
|
|
m_tzWidget = new TimeZoneWidget( this );
|
2014-07-02 18:12:20 +02:00
|
|
|
tzwLayout->addStretch();
|
|
|
|
tzwLayout->addWidget( m_tzWidget );
|
|
|
|
tzwLayout->addStretch();
|
|
|
|
setMinimumWidth( m_tzWidget->width() );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-07-02 18:12:20 +02:00
|
|
|
QBoxLayout* bottomLayout = new QHBoxLayout;
|
2014-07-02 17:59:24 +02:00
|
|
|
mainLayout->addLayout( bottomLayout );
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_regionLabel = new QLabel( this );
|
|
|
|
bottomLayout->addWidget( m_regionLabel );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
m_regionCombo = new QComboBox( this );
|
|
|
|
bottomLayout->addWidget( m_regionCombo );
|
|
|
|
m_regionCombo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
2014-11-25 17:41:27 +01:00
|
|
|
m_regionLabel->setBuddy( m_regionCombo );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
bottomLayout->addSpacing( 20 );
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneLabel = new QLabel( this );
|
|
|
|
bottomLayout->addWidget( m_zoneLabel );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo = new QComboBox( this );
|
|
|
|
m_zoneCombo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
|
|
|
bottomLayout->addWidget( m_zoneCombo );
|
|
|
|
m_zoneLabel->setBuddy( m_zoneCombo );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
mainLayout->addStretch();
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
QBoxLayout* localeLayout = new QHBoxLayout;
|
|
|
|
m_localeLabel = new QLabel( this );
|
|
|
|
m_localeLabel->setWordWrap( true );
|
|
|
|
m_localeLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
|
|
|
localeLayout->addWidget( m_localeLabel );
|
|
|
|
|
|
|
|
m_localeChangeButton = new QPushButton( this );
|
|
|
|
m_localeChangeButton->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
|
|
|
|
localeLayout->addWidget( m_localeChangeButton );
|
|
|
|
mainLayout->addLayout( localeLayout );
|
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
setLayout( mainLayout );
|
|
|
|
|
|
|
|
connect( m_regionCombo,
|
2015-02-20 16:09:43 +01:00
|
|
|
static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ),
|
|
|
|
[this]( int currentIndex )
|
2014-07-02 17:59:24 +02:00
|
|
|
{
|
2015-02-20 16:09:43 +01:00
|
|
|
Q_UNUSED( currentIndex );
|
2014-07-02 17:59:24 +02:00
|
|
|
QHash< QString, QList< LocaleGlobal::Location > > regions = LocaleGlobal::getLocations();
|
2015-02-20 16:09:43 +01:00
|
|
|
if ( !regions.contains( m_regionCombo->currentData().toString() ) )
|
2014-07-02 17:59:24 +02:00
|
|
|
return;
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->blockSignals( true );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->clear();
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2015-02-20 16:09:43 +01:00
|
|
|
QList< LocaleGlobal::Location > zones = regions.value( m_regionCombo->currentData().toString() );
|
2014-07-02 17:59:24 +02:00
|
|
|
foreach ( const LocaleGlobal::Location& zone, zones )
|
|
|
|
{
|
2015-02-20 16:09:43 +01:00
|
|
|
m_zoneCombo->addItem( LocaleGlobal::Location::pretty( zone.zone ), zone.zone );
|
2014-07-02 17:59:24 +02:00
|
|
|
}
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->model()->sort( 0 );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->blockSignals( false );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2015-02-20 16:09:43 +01:00
|
|
|
m_zoneCombo->currentIndexChanged( m_zoneCombo->currentIndex() );
|
2014-11-25 17:41:27 +01:00
|
|
|
} );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
connect( m_zoneCombo,
|
2015-02-20 16:09:43 +01:00
|
|
|
static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ),
|
|
|
|
[this]( int currentIndex )
|
2014-07-02 17:59:24 +02:00
|
|
|
{
|
2016-07-27 13:35:03 +02:00
|
|
|
Q_UNUSED( currentIndex )
|
2014-07-02 17:59:24 +02:00
|
|
|
if ( !m_blockTzWidgetSet )
|
2015-02-20 16:09:43 +01:00
|
|
|
m_tzWidget->setCurrentLocation( m_regionCombo->currentData().toString(),
|
|
|
|
m_zoneCombo->currentData().toString() );
|
2015-07-15 17:48:59 +02:00
|
|
|
|
|
|
|
updateGlobalStorage();
|
2014-11-25 17:41:27 +01:00
|
|
|
} );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
connect( m_tzWidget, &TimeZoneWidget::locationChanged,
|
|
|
|
[this]( LocaleGlobal::Location location )
|
|
|
|
{
|
|
|
|
m_blockTzWidgetSet = true;
|
|
|
|
|
|
|
|
// Set region index
|
2015-02-20 16:09:43 +01:00
|
|
|
int index = m_regionCombo->findData( location.region );
|
2014-07-02 17:59:24 +02:00
|
|
|
if ( index < 0 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
m_regionCombo->setCurrentIndex( index );
|
|
|
|
|
|
|
|
// Set zone index
|
2015-02-20 16:09:43 +01:00
|
|
|
index = m_zoneCombo->findData( location.zone );
|
2014-07-02 17:59:24 +02:00
|
|
|
if ( index < 0 )
|
|
|
|
return;
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->setCurrentIndex( index );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
m_blockTzWidgetSet = false;
|
2014-11-25 17:41:27 +01:00
|
|
|
|
2015-07-15 17:48:59 +02:00
|
|
|
updateGlobalStorage();
|
2014-11-25 17:41:27 +01:00
|
|
|
} );
|
|
|
|
|
|
|
|
connect( m_localeChangeButton, &QPushButton::clicked,
|
|
|
|
[this]()
|
|
|
|
{
|
|
|
|
LCLocaleDialog* dlg = new LCLocaleDialog( lcLocale(),
|
|
|
|
m_localeGenLines,
|
|
|
|
this );
|
|
|
|
dlg->exec();
|
|
|
|
if ( dlg->result() == QDialog::Accepted &&
|
|
|
|
!dlg->selectedLCLocale().isEmpty() )
|
|
|
|
{
|
|
|
|
m_selectedLocale = dlg->selectedLCLocale();
|
2014-11-26 11:24:39 +01:00
|
|
|
m_localeLabel->setText( tr( "The system locale is set to %1." )
|
2014-11-25 17:41:27 +01:00
|
|
|
.arg( prettyLCLocale( m_selectedLocale ) ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
dlg->deleteLater();
|
|
|
|
} );
|
2014-11-11 12:44:06 +01:00
|
|
|
|
2014-11-11 15:12:17 +01:00
|
|
|
CALAMARES_RETRANSLATE(
|
2014-11-25 17:41:27 +01:00
|
|
|
m_regionLabel->setText( tr( "Region:" ) );
|
|
|
|
m_zoneLabel->setText( tr( "Zone:" ) );
|
|
|
|
|
2014-11-26 11:24:39 +01:00
|
|
|
m_localeLabel->setText( tr( "The system locale is set to %1." )
|
2014-11-25 17:41:27 +01:00
|
|
|
.arg( prettyLCLocale( lcLocale() ) ) );
|
|
|
|
|
|
|
|
m_localeChangeButton->setText( tr( "&Change..." ) );
|
2014-11-11 15:11:06 +01:00
|
|
|
)
|
2014-07-02 17:59:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
LocalePage::~LocalePage()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
void
|
2014-11-25 17:41:27 +01:00
|
|
|
LocalePage::init( const QString& initialRegion,
|
|
|
|
const QString& initialZone,
|
|
|
|
const QString& localeGenPath )
|
2014-07-02 17:59:24 +02:00
|
|
|
{
|
|
|
|
m_regionCombo->blockSignals( true );
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->blockSignals( true );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
// Setup locations
|
|
|
|
QHash< QString, QList< LocaleGlobal::Location > > regions = LocaleGlobal::getLocations();
|
|
|
|
|
|
|
|
QStringList keys = regions.keys();
|
|
|
|
keys.sort();
|
|
|
|
|
|
|
|
foreach ( const QString& key, keys )
|
|
|
|
{
|
2015-02-20 16:09:43 +01:00
|
|
|
m_regionCombo->addItem( LocaleGlobal::Location::pretty( key ), key );
|
2014-07-02 17:59:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
m_regionCombo->blockSignals( false );
|
2014-11-25 17:41:27 +01:00
|
|
|
m_zoneCombo->blockSignals( false );
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2015-02-20 16:09:43 +01:00
|
|
|
m_regionCombo->currentIndexChanged( m_regionCombo->currentIndex() );
|
2014-07-02 18:12:20 +02:00
|
|
|
|
|
|
|
// Default location
|
2014-07-15 11:35:05 +02:00
|
|
|
auto containsLocation = []( const QList< LocaleGlobal::Location >& locations,
|
|
|
|
const QString& zone ) -> bool
|
|
|
|
{
|
|
|
|
foreach ( const LocaleGlobal::Location& location, locations )
|
|
|
|
{
|
|
|
|
if ( location.zone == zone )
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
if ( keys.contains( initialRegion ) &&
|
|
|
|
containsLocation( regions.value( initialRegion ), initialZone ) )
|
|
|
|
{
|
|
|
|
m_tzWidget->setCurrentLocation( initialRegion, initialZone );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_tzWidget->setCurrentLocation( "Europe", "Berlin" );
|
|
|
|
}
|
2014-07-02 18:12:20 +02:00
|
|
|
emit m_tzWidget->locationChanged( m_tzWidget->getCurrentLocation() );
|
2014-11-25 17:41:27 +01:00
|
|
|
|
2016-05-27 17:14:17 +02:00
|
|
|
// Some distros come with a meaningfully commented and easy to parse locale.gen,
|
|
|
|
// and others ship a separate file /usr/share/i18n/SUPPORTED with a clean list of
|
|
|
|
// supported locales. We first try that one, and if it doesn't exist, we fall back
|
|
|
|
// to parsing the lines from locale.gen
|
2014-11-25 17:41:27 +01:00
|
|
|
m_localeGenLines.clear();
|
2016-05-27 17:14:17 +02:00
|
|
|
QFile supported( "/usr/share/i18n/SUPPORTED" );
|
2014-11-25 20:03:37 +01:00
|
|
|
QByteArray ba;
|
2016-05-27 17:14:17 +02:00
|
|
|
|
|
|
|
if ( supported.exists() &&
|
|
|
|
supported.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
2014-11-25 17:41:27 +01:00
|
|
|
{
|
2016-05-27 17:14:17 +02:00
|
|
|
ba = supported.readAll();
|
|
|
|
supported.close();
|
|
|
|
|
|
|
|
foreach ( QByteArray line, ba.split( '\n' ) )
|
|
|
|
{
|
|
|
|
m_localeGenLines.append( QString::fromLatin1( line.simplified() ) );
|
|
|
|
}
|
2014-11-25 20:03:37 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-05-27 17:14:17 +02:00
|
|
|
QFile localeGen( localeGenPath );
|
|
|
|
if ( localeGen.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
|
|
|
{
|
|
|
|
ba = localeGen.readAll();
|
|
|
|
localeGen.close();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cDebug() << "Cannot open file" << localeGenPath
|
|
|
|
<< ". Assuming the supported languages are already built into "
|
|
|
|
"the locale archive.";
|
|
|
|
QProcess localeA;
|
|
|
|
localeA.start( "locale", QStringList() << "-a" );
|
|
|
|
localeA.waitForFinished();
|
|
|
|
ba = localeA.readAllStandardOutput();
|
|
|
|
}
|
|
|
|
foreach ( QByteArray line, ba.split( '\n' ) )
|
|
|
|
{
|
|
|
|
if ( line.startsWith( "## " ) ||
|
|
|
|
line.startsWith( "# " ) ||
|
|
|
|
line.simplified() == "#" )
|
|
|
|
continue;
|
2014-11-25 17:41:27 +01:00
|
|
|
|
2016-05-27 17:14:17 +02:00
|
|
|
QString lineString = QString::fromLatin1( line.simplified() );
|
|
|
|
if ( lineString.startsWith( "#" ) )
|
|
|
|
lineString.remove( '#' );
|
|
|
|
lineString = lineString.simplified();
|
2016-04-01 15:30:16 +02:00
|
|
|
|
2016-05-27 17:14:17 +02:00
|
|
|
if ( lineString.isEmpty() )
|
|
|
|
continue;
|
2014-11-25 17:41:27 +01:00
|
|
|
|
2016-05-27 17:14:17 +02:00
|
|
|
m_localeGenLines.append( lineString );
|
|
|
|
}
|
2014-11-25 17:41:27 +01:00
|
|
|
}
|
2014-07-02 17:59:24 +02:00
|
|
|
}
|
|
|
|
|
2014-07-08 18:25:54 +02:00
|
|
|
|
|
|
|
QString
|
|
|
|
LocalePage::prettyStatus() const
|
|
|
|
{
|
|
|
|
QString status;
|
|
|
|
status += tr( "Set timezone to %1/%2.<br/>" )
|
|
|
|
.arg( m_regionCombo->currentText() )
|
2014-11-25 17:41:27 +01:00
|
|
|
.arg( m_zoneCombo->currentText() );
|
2014-07-08 18:25:54 +02:00
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2014-08-01 16:29:19 +02:00
|
|
|
|
|
|
|
QList< Calamares::job_ptr >
|
|
|
|
LocalePage::createJobs()
|
|
|
|
{
|
|
|
|
QList< Calamares::job_ptr > list;
|
|
|
|
LocaleGlobal::Location location = m_tzWidget->getCurrentLocation();
|
|
|
|
|
|
|
|
Calamares::Job* j = new SetTimezoneJob( location.region, location.zone );
|
|
|
|
list.append( Calamares::job_ptr( j ) );
|
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
2014-11-10 14:56:29 +01:00
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
|
|
|
|
QString
|
|
|
|
LocalePage::lcLocale()
|
|
|
|
{
|
|
|
|
return m_selectedLocale.isEmpty() ? guessLCLocale() : m_selectedLocale;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-11-26 18:52:44 +01:00
|
|
|
void
|
|
|
|
LocalePage::onActivate()
|
|
|
|
{
|
|
|
|
m_regionCombo->setFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-11-25 17:41:27 +01:00
|
|
|
QString
|
|
|
|
LocalePage::guessLCLocale()
|
|
|
|
{
|
|
|
|
QLocale myLocale = QLocale();
|
|
|
|
|
|
|
|
if ( m_localeGenLines.isEmpty() )
|
|
|
|
return "en_US.UTF-8 UTF-8";
|
|
|
|
|
2014-11-26 17:12:18 +01:00
|
|
|
QString myLanguage = myLocale.name().split( '_' ).first();
|
2014-11-25 17:41:27 +01:00
|
|
|
QStringList linesForLanguage;
|
|
|
|
foreach ( QString line, m_localeGenLines )
|
|
|
|
{
|
2014-11-26 17:12:18 +01:00
|
|
|
if ( line.startsWith( myLanguage ) )
|
2014-11-25 17:41:27 +01:00
|
|
|
linesForLanguage.append( line );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( linesForLanguage.length() == 0 )
|
|
|
|
return "en_US.UTF-8 UTF-8";
|
|
|
|
else if ( linesForLanguage.length() == 1 )
|
|
|
|
return linesForLanguage.first();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
QStringList linesForLanguageUtf;
|
|
|
|
foreach ( QString line, linesForLanguage )
|
|
|
|
{
|
|
|
|
if ( line.contains( "UTF-8" ) )
|
|
|
|
linesForLanguageUtf.append( line );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( linesForLanguageUtf.length() == 1 )
|
|
|
|
return linesForLanguageUtf.first();
|
|
|
|
}
|
|
|
|
|
|
|
|
// FIXME: use reverse geocoding to guess the country
|
2014-11-25 19:44:16 +01:00
|
|
|
QString prefix = myLocale.name();
|
2014-11-25 17:41:27 +01:00
|
|
|
QStringList linesForLanguageAndCountry;
|
|
|
|
foreach ( QString line, linesForLanguage )
|
|
|
|
{
|
|
|
|
if ( line.startsWith( prefix ) )
|
|
|
|
linesForLanguageAndCountry.append( line );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( linesForLanguageAndCountry.length() == 0 )
|
|
|
|
return "en_US.UTF-8 UTF-8";
|
|
|
|
else if ( linesForLanguageAndCountry.length() == 1 )
|
|
|
|
return linesForLanguageAndCountry.first();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
QStringList linesForLanguageAndCountryUtf;
|
|
|
|
foreach ( QString line, linesForLanguageAndCountry )
|
|
|
|
{
|
|
|
|
if ( line.contains( "UTF-8" ) )
|
|
|
|
linesForLanguageAndCountryUtf.append( line );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( linesForLanguageAndCountryUtf.length() == 1 )
|
|
|
|
return linesForLanguageAndCountryUtf.first();
|
|
|
|
}
|
|
|
|
|
|
|
|
return "en_US.UTF-8 UTF-8";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString
|
|
|
|
LocalePage::prettyLCLocale( const QString& lcLocale )
|
|
|
|
{
|
|
|
|
QString localeString = lcLocale;
|
|
|
|
if ( localeString.endsWith( " UTF-8" ) )
|
|
|
|
localeString.remove( " UTF-8" );
|
|
|
|
return localeString;
|
|
|
|
}
|
2015-07-15 17:48:59 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
LocalePage::updateGlobalStorage()
|
|
|
|
{
|
|
|
|
LocaleGlobal::Location location = m_tzWidget->getCurrentLocation();
|
|
|
|
Calamares::JobQueue::instance()->globalStorage()
|
|
|
|
->insert( "locationRegion", location.region );
|
|
|
|
Calamares::JobQueue::instance()->globalStorage()
|
|
|
|
->insert( "locationZone", location.zone );
|
|
|
|
}
|