parent
e92d82c5db
commit
f1cfde36d6
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* 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
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* 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() )
|
if ( !doc[ "strings" ].IsMap() )
|
||||||
bail( "Syntax error in strings map." );
|
bail( "Syntax error in strings map." );
|
||||||
|
|
||||||
|
m_welcomeStyleCalamares = doc[ "welcomeStyleCalamares" ].as< bool >( false );
|
||||||
|
|
||||||
QVariantMap strings =
|
QVariantMap strings =
|
||||||
CalamaresUtils::yamlMapToVariant( doc[ "strings" ] ).toMap();
|
CalamaresUtils::yamlMapToVariant( doc[ "strings" ] ).toMap();
|
||||||
m_strings.clear();
|
m_strings.clear();
|
||||||
@ -264,6 +267,11 @@ Branding::slideshowPath() const
|
|||||||
return m_slideshowPath;
|
return m_slideshowPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Branding::welcomeStyleCalamares() const
|
||||||
|
{
|
||||||
|
return m_welcomeStyleCalamares;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Branding::setGlobals( GlobalStorage* globalStorage ) const
|
Branding::setGlobals( GlobalStorage* globalStorage ) const
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* 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
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* 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;
|
QPixmap image( Branding::ImageEntry imageEntry, const QSize& size ) const;
|
||||||
QString slideshowPath() const;
|
QString slideshowPath() const;
|
||||||
|
|
||||||
|
bool welcomeStyleCalamares() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a map called "branding" in the global storage, and inserts an
|
* Creates a map called "branding" in the global storage, and inserts an
|
||||||
* entry for each of the branding strings. This makes the branding
|
* entry for each of the branding strings. This makes the branding
|
||||||
@ -105,6 +108,8 @@ private:
|
|||||||
QMap< QString, QString > m_style;
|
QMap< QString, QString > m_style;
|
||||||
QString m_slideshowPath;
|
QString m_slideshowPath;
|
||||||
QString m_translationsPathPrefix;
|
QString m_translationsPathPrefix;
|
||||||
|
|
||||||
|
bool m_welcomeStyleCalamares;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
* 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
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* 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->setWordWrap( true );
|
||||||
ui->mainText->setOpenExternalLinks( true );
|
ui->mainText->setOpenExternalLinks( true );
|
||||||
|
|
||||||
|
cDebug() << "Welcome string" << Calamares::Branding::instance()->welcomeStyleCalamares()
|
||||||
|
<< Calamares::Branding::instance()->string( Calamares::Branding::VersionedName );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
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()->
|
.arg( Calamares::Branding::instance()->
|
||||||
string( Calamares::Branding::VersionedName ) ) );
|
string( Calamares::Branding::VersionedName ) ) );
|
||||||
ui->retranslateUi( this );
|
ui->retranslateUi( this );
|
||||||
|
Loading…
Reference in New Issue
Block a user