parent
e92d82c5db
commit
f1cfde36d6
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* 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
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* 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( "<h1>Welcome to the %1 installer.</h1>" )
|
||||
ui->mainText->setText( (Calamares::Branding::instance()->welcomeStyleCalamares() ? tr( "<h1>Welcome to the Calamares installer for %1.</h1>" ) : tr( "<h1>Welcome to the %1 installer.</h1>" ))
|
||||
.arg( Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::VersionedName ) ) );
|
||||
ui->retranslateUi( this );
|
||||
|
Loading…
Reference in New Issue
Block a user