diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp index 4a2923081..cb0fe7734 100644 --- a/src/modules/locale/Config.cpp +++ b/src/modules/locale/Config.cpp @@ -170,18 +170,28 @@ Config::Config( QObject* parent ) connect( this, &Config::currentLocationChanged, [&]() { auto* gs = Calamares::JobQueue::instance()->globalStorage(); + + // Update the GS region and zone (and possibly the live timezone) const auto* location = currentLocation(); bool locationChanged = ( location->region() != gs->value( "locationRegion" ) ) || ( location->zone() != gs->value( "locationZone" ) ); gs->insert( "locationRegion", location->region() ); gs->insert( "locationZone", location->zone() ); - if ( locationChanged && m_adjustLiveTimezone ) { QProcess::execute( "timedatectl", // depends on systemd { "set-timezone", location->region() + '/' + location->zone() } ); } + + // Update GS localeConf (the LC_ variables) + auto map = localeConfiguration().toMap(); + QVariantMap vm; + for ( auto it = map.constBegin(); it != map.constEnd(); ++it ) + { + vm.insert( it.key(), it.value() ); + } + gs->insert( "localeConf", vm ); } ); } diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 31f8eb8bd..5baf68b43 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -147,7 +147,7 @@ LocaleViewStep::isAtEnd() const Calamares::JobList LocaleViewStep::jobs() const { - return m_jobs; + return m_config->createJobs(); } @@ -165,24 +165,6 @@ LocaleViewStep::onActivate() void LocaleViewStep::onLeave() { - if ( m_actualWidget ) - { - m_jobs = m_config->createJobs(); - - auto map = m_config->localeConfiguration().toMap(); - QVariantMap vm; - for ( auto it = map.constBegin(); it != map.constEnd(); ++it ) - { - vm.insert( it.key(), it.value() ); - } - - Calamares::JobQueue::instance()->globalStorage()->insert( "localeConf", vm ); - } - else - { - m_jobs.clear(); - Calamares::JobQueue::instance()->globalStorage()->remove( "localeConf" ); - } } diff --git a/src/modules/locale/LocaleViewStep.h b/src/modules/locale/LocaleViewStep.h index cb1902f2e..a1456764f 100644 --- a/src/modules/locale/LocaleViewStep.h +++ b/src/modules/locale/LocaleViewStep.h @@ -71,8 +71,6 @@ private: LocalePage* m_actualWidget; bool m_nextEnabled; - Calamares::JobList m_jobs; - CalamaresUtils::GeoIP::RegionZonePair m_startingTimezone; std::unique_ptr< CalamaresUtils::GeoIP::Handler > m_geoip;