mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[locale] Update global locale setting when it changes
- use debugging to be a little more chatty - when changing the system language on the locale page, the global locale setting should change, too.
This commit is contained in:
parent
bc398756f5
commit
9d871fb9db
1 changed files with 4 additions and 0 deletions
|
@ -137,6 +137,7 @@ LocalePage::LocalePage( QWidget* parent )
|
|||
connect( m_tzWidget, &TimeZoneWidget::locationChanged,
|
||||
[this]( LocaleGlobal::Location location )
|
||||
{
|
||||
cDebug() << "Updating location from TZ widget to" << location;
|
||||
m_blockTzWidgetSet = true;
|
||||
|
||||
// Set region index
|
||||
|
@ -173,6 +174,7 @@ LocalePage::LocalePage( QWidget* parent )
|
|||
{
|
||||
m_selectedLocaleConfiguration.lang = dlg->selectedLCLocale();
|
||||
m_selectedLocaleConfiguration.explicit_lang = true;
|
||||
this->updateGlobalLocale();
|
||||
this->updateLocaleLabels();
|
||||
}
|
||||
|
||||
|
@ -441,6 +443,7 @@ LocalePage::onActivate()
|
|||
{
|
||||
auto newLocale = guessLocaleConfiguration();
|
||||
m_selectedLocaleConfiguration.lang = newLocale.lang;
|
||||
updateGlobalLocale();
|
||||
updateLocaleLabels();
|
||||
}
|
||||
}
|
||||
|
@ -487,6 +490,7 @@ LocalePage::updateGlobalLocale()
|
|||
{
|
||||
auto *gs = Calamares::JobQueue::instance()->globalStorage();
|
||||
const QString bcp47 = m_selectedLocaleConfiguration.toBcp47();
|
||||
cDebug() << "Updating global locale setting to" << bcp47;
|
||||
gs->insert( "locale", bcp47 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue