From 866afcfe47da23b455cc24c1017b85b843b37828 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Mon, 8 Apr 2019 13:42:15 +0200 Subject: [PATCH] [welcome] Adjust checker-messages for setup mode Signed-off-by: Arnaud Ferraris --- src/modules/welcome/checker/GeneralRequirements.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp index 07d99d707..dd43baafd 100644 --- a/src/modules/welcome/checker/GeneralRequirements.cpp +++ b/src/modules/welcome/checker/GeneralRequirements.cpp @@ -3,6 +3,7 @@ * Copyright 2014-2017, Teo Mrnjavac * Copyright 2017-2018, Adriaan de Groot * Copyright 2017, Gabriel Craciunescu + * Copyright 2019, Collabora Ltd * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +31,7 @@ #include "utils/Retranslator.h" #include "utils/CalamaresUtilsSystem.h" #include "utils/Units.h" - +#include "Settings.h" #include "JobQueue.h" #include "GlobalStorage.h" @@ -141,7 +142,9 @@ Calamares::RequirementsList GeneralRequirements::checkRequirements() checkEntries.append( { entry, [this]{ return QString(); }, //we hide it - [this]{ return tr( "The installer is not running with administrator rights." ); }, + [this]{ return Calamares::Settings::instance()->isSetupMode() + ? tr( "The setup program is not running with administrator rights." ) + : tr( "The installer is not running with administrator rights." ); }, isRoot, m_entriesToRequire.contains( entry ) } ); @@ -149,7 +152,9 @@ Calamares::RequirementsList GeneralRequirements::checkRequirements() checkEntries.append( { entry, [this]{ return QString(); }, // we hide it - [this]{ return tr( "The screen is too small to display the installer." ); }, + [this]{ return Calamares::Settings::instance()->isSetupMode() + ? tr( "The screen is too small to display the setup program." ) + : tr( "The screen is too small to display the installer." ); }, enoughScreen, false } );