diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index 0f1752db2..81f6511e4 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2015, 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 @@ -106,6 +107,8 @@ Branding::Branding( const QString& brandingFilePath, if ( !doc[ "strings" ].IsMap() ) bail( "Syntax error in strings map." ); + m_welcomeStyleCalamares = doc[ "welcomeStyleCalamares" ].as< bool >( false ); + QVariantMap strings = CalamaresUtils::yamlMapToVariant( doc[ "strings" ] ).toMap(); m_strings.clear(); @@ -264,6 +267,11 @@ Branding::slideshowPath() const return m_slideshowPath; } +bool +Branding::welcomeStyleCalamares() const +{ + return m_welcomeStyleCalamares; +} void Branding::setGlobals( GlobalStorage* globalStorage ) const diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 0561793f6..36534ea44 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2015, 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 @@ -82,6 +83,8 @@ public: QPixmap image( Branding::ImageEntry imageEntry, const QSize& size ) const; QString slideshowPath() const; + bool welcomeStyleCalamares() const; + /** * Creates a map called "branding" in the global storage, and inserts an * entry for each of the branding strings. This makes the branding @@ -105,6 +108,8 @@ private: QMap< QString, QString > m_style; QString m_slideshowPath; QString m_translationsPathPrefix; + + bool m_welcomeStyleCalamares; }; } diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 986e38de5..0ddf267ee 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2015, Teo Mrnjavac * Copyright 2015, Anke Boersma + * 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 @@ -52,8 +53,11 @@ WelcomePage::WelcomePage( RequirementsChecker* requirementsChecker, QWidget* par ui->mainText->setWordWrap( true ); ui->mainText->setOpenExternalLinks( true ); + cDebug() << "Welcome string" << Calamares::Branding::instance()->welcomeStyleCalamares() + << Calamares::Branding::instance()->string( Calamares::Branding::VersionedName ); + CALAMARES_RETRANSLATE( - ui->mainText->setText( tr( "

Welcome to the %1 installer.

" ) + ui->mainText->setText( (Calamares::Branding::instance()->welcomeStyleCalamares() ? tr( "

Welcome to the Calamares installer for %1.

" ) : tr( "

Welcome to the %1 installer.

" )) .arg( Calamares::Branding::instance()-> string( Calamares::Branding::VersionedName ) ) ); ui->retranslateUi( this );