[libcalamares] Introduce slideshowAPI setting
This commit is contained in:
parent
9188eab66f
commit
148b829591
@ -93,6 +93,17 @@ images:
|
||||
# The slideshow is displayed during execution steps (e.g. when the
|
||||
# installer is actually writing to disk and doing other slow things).
|
||||
slideshow: "show.qml"
|
||||
# There are two available APIs for the slideshow:
|
||||
# - 1 (the default) loads the entire slideshow when the installation-
|
||||
# slideshow page is shown and starts the QML then. The QML
|
||||
# is never stopped (after installation is done, times etc.
|
||||
# continue to fire).
|
||||
# - 2 loads the slideshow on startup and calls onActivate() and
|
||||
# onLeave() in the root object. After the installation is done,
|
||||
# the show is stopped (first by calling onLeave(), then destroying
|
||||
# the QML components).
|
||||
slideshowAPI: 2
|
||||
|
||||
|
||||
# Colors for text and background components.
|
||||
#
|
||||
|
@ -127,6 +127,7 @@ Branding::Branding( const QString& brandingFilePath,
|
||||
, m_descriptorPath( brandingFilePath )
|
||||
, m_welcomeStyleCalamares( false )
|
||||
, m_welcomeExpandingLogo( true )
|
||||
, m_slideshowAPI( 1 )
|
||||
{
|
||||
cDebug() << "Using Calamares branding file at" << brandingFilePath;
|
||||
|
||||
@ -234,6 +235,14 @@ Branding::Branding( const QString& brandingFilePath,
|
||||
}
|
||||
else
|
||||
bail( "Syntax error in slideshow sequence." );
|
||||
|
||||
int api = doc[ "slideshowAPI" ].IsScalar() ? doc[ "slideshowAPI" ].as<int>() : -1;
|
||||
if ( ( api < 1 ) || ( api > 2 ) )
|
||||
{
|
||||
cWarning() << "Invalid or missing *slideshowAPI* in branding file.";
|
||||
api = 1;
|
||||
}
|
||||
m_slideshowAPI = api;
|
||||
}
|
||||
catch ( YAML::Exception& e )
|
||||
{
|
||||
|
@ -118,6 +118,7 @@ public:
|
||||
|
||||
/** @brief Path to the slideshow QML file, if any. */
|
||||
QString slideshowPath() const { return m_slideshowPath; }
|
||||
int slideshowAPI() const { return m_slideshowAPI; }
|
||||
|
||||
QString string( Branding::StringEntry stringEntry ) const;
|
||||
QString styleString( Branding::StyleEntry styleEntry ) const;
|
||||
@ -172,6 +173,7 @@ private:
|
||||
QMap< QString, QString > m_images;
|
||||
QMap< QString, QString > m_style;
|
||||
QString m_slideshowPath;
|
||||
int m_slideshowAPI;
|
||||
QString m_translationsPathPrefix;
|
||||
|
||||
/** @brief Initialize the simple settings below */
|
||||
|
Loading…
Reference in New Issue
Block a user