From 9d871fb9dbf7e3af3589d28a945c900994203769 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 7 Jan 2019 18:49:08 +0100 Subject: [PATCH] [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. --- src/modules/locale/LocalePage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index d5bd8147a..cfd7eb2fa 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -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 ); }