diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index 5cef6f931..1ade3d3bc 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -18,6 +18,8 @@ #include "GlobalStorage.h" +#include "utils/Logger.h" + #ifdef WITH_PYTHON #include "PythonHelper.h" @@ -80,6 +82,15 @@ GlobalStorage::value( const QString& key ) const return m.value( key ); } +void +GlobalStorage::debugDump() const +{ + for ( auto it = m.cbegin(); it != m.cend(); ++it ) + { + cDebug() << it.key() << '\t' << it.value(); + } +} + } // namespace Calamares #ifdef WITH_PYTHON diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index 20af3978c..301800adc 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -57,6 +57,8 @@ public: int remove( const QString& key ); QVariant value( const QString& key ) const; + void debugDump() const; + signals: void changed(); diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index a06ec3fba..ba054a8b1 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,14 +52,14 @@ ViewModule::loadSelf() PluginFactory* pf = qobject_cast< PluginFactory* >( m_loader->instance() ); if ( !pf ) { - cDebug() << Q_FUNC_INFO << m_loader->errorString(); + cDebug() << Q_FUNC_INFO << "No factory:" << m_loader->errorString(); return; } m_viewStep = pf->create< Calamares::ViewStep >(); if ( !m_viewStep ) { - cDebug() << Q_FUNC_INFO << m_loader->errorString(); + cDebug() << Q_FUNC_INFO << "create() failed" << m_loader->errorString(); return; } // cDebug() << "ViewModule loading self for instance" << instanceKey() diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 9dafae8b7..117530a88 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -323,6 +323,7 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi QProcess::execute( QString( "setxkbmap -layout \"%1\" -variant \"%2\"" ) .arg( layout, variant ).toUtf8() ); cDebug() << "xkbmap selection changed to: " << layout << "-" << variant; + m_setxkbmapTimer.disconnect( this ); } ); m_setxkbmapTimer.start( QApplication::keyboardInputInterval() ); diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 97826fa84..81c324021 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2016, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -171,9 +172,7 @@ LocalePage::LocalePage( QWidget* parent ) !dlg->selectedLCLocale().isEmpty() ) { m_selectedLocaleConfiguration.lang = dlg->selectedLCLocale(); - m_localeLabel->setText( tr( "The system language will be set to %1." ) - .arg( prettyLCLocale( - m_selectedLocaleConfiguration.lang ) ) ); + this->updateLocaleLabels(); } dlg->deleteLater(); @@ -203,9 +202,7 @@ LocalePage::LocalePage( QWidget* parent ) m_selectedLocaleConfiguration.lc_measurement = dlg->selectedLCLocale(); m_selectedLocaleConfiguration.lc_identification = dlg->selectedLCLocale(); - m_formatsLabel->setText( tr( "The numbers and dates locale will be set to %1." ) - .arg( prettyLCLocale( - m_selectedLocaleConfiguration.lc_numeric ) ) ); + this->updateLocaleLabels(); } dlg->deleteLater(); @@ -350,14 +347,16 @@ LocalePage::init( const QString& initialRegion, if ( m_localeGenLines.isEmpty() ) { cDebug() << "WARNING: cannot acquire a list of available locales." - << "The locale and localecfg modules will be broken as long as this " + << "The locale and localecfg modules will be broken as long as this " "system does not provide" - << " * a /usr/share/i18n/SUPPORTED file" - << "\tOR" - << " * a well-formed /etc/locale.gen" - << "\tOR" - << " * a complete pre-compiled locale-gen database which allows complete locale -a output."; - + << "\n\t " + << "* a well-formed" + << supported.fileName() + << "\n\tOR" + << "* a well-formed" + << (localeGenPath.isEmpty() ? QLatin1Literal("/etc/locale.gen") : localeGenPath) + << "\n\tOR" + << "* a complete pre-compiled locale-gen database which allows complete locale -a output."; return; // something went wrong and there's nothing we can do about it. } @@ -432,14 +431,7 @@ LocalePage::guessLocaleConfiguration() // If we cannot say anything about available locales if ( m_localeGenLines.isEmpty() ) { - cDebug() << "WARNING: cannot acquire a list of available locales." - << "The locale and localecfg modules will be broken as long as this " - "system does not provide" - << " * a /usr/share/i18n/SUPPORTED file" - << "\tOR" - << " * a well-formed /etc/locale.gen" - << "\tOR" - << " * a complete pre-compiled locale-gen database which allows complete locale -a output."; + cDebug() << "WARNING: guessLocaleConfiguration can't guess from an empty list."; return LocaleConfiguration::createDefault(); } diff --git a/src/modules/locale/images/timezone_0.0.png b/src/modules/locale/images/timezone_0.0.png index 987f6caa3..6178a0ce1 100644 Binary files a/src/modules/locale/images/timezone_0.0.png and b/src/modules/locale/images/timezone_0.0.png differ