Merge branch 'issue-1271'
This commit is contained in:
commit
3e4fc281ab
@ -6,8 +6,6 @@
|
||||
# You can pass in directory names, in which case the files
|
||||
# in that directory (NOT below it) are processed.
|
||||
#
|
||||
set -e
|
||||
|
||||
AS=$( which astyle )
|
||||
|
||||
for _cf in clang-format-7 clang-format-8 clang-format70 clang-format80
|
||||
@ -22,6 +20,8 @@ test -n "$CF" || { echo "! No clang-format-7 found in PATH"; exit 1 ; }
|
||||
test -x "$AS" || { echo "! $AS is not executable."; exit 1 ; }
|
||||
test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; }
|
||||
|
||||
set -e
|
||||
|
||||
any_dirs=no
|
||||
for d in "$@"
|
||||
do
|
||||
|
@ -126,7 +126,6 @@ LicensePage::LicensePage( QWidget* parent )
|
||||
CALAMARES_RETRANSLATE( ui->acceptCheckBox->setText( tr( "I accept the terms and conditions above." ) ); )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LicensePage::setEntries( const QList< LicenseEntry >& entriesList )
|
||||
{
|
||||
@ -134,27 +133,36 @@ LicensePage::setEntries( const QList< LicenseEntry >& entriesList )
|
||||
m_entries.clear();
|
||||
m_entries.reserve( entriesList.count() );
|
||||
|
||||
const bool required
|
||||
= std::any_of( entriesList.cbegin(), entriesList.cend(), []( const LicenseEntry& e ) { return e.m_required; } );
|
||||
if ( entriesList.isEmpty() )
|
||||
{
|
||||
m_allLicensesOptional = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_allLicensesOptional = !required;
|
||||
}
|
||||
auto isRequired = []( const LicenseEntry& e ) { return e.m_required; };
|
||||
m_allLicensesOptional = std::none_of( entriesList.cbegin(), entriesList.cend(), isRequired );
|
||||
|
||||
checkAcceptance( false );
|
||||
|
||||
CALAMARES_RETRANSLATE( if ( required ) {
|
||||
for ( const LicenseEntry& entry : entriesList )
|
||||
{
|
||||
LicenseWidget* w = new LicenseWidget( entry );
|
||||
ui->licenseEntriesLayout->addWidget( w );
|
||||
m_entries.append( w );
|
||||
}
|
||||
ui->licenseEntriesLayout->addStretch();
|
||||
|
||||
CALAMARES_RETRANSLATE_SLOT( &LicensePage::retranslate )
|
||||
}
|
||||
|
||||
void
|
||||
LicensePage::retranslate()
|
||||
{
|
||||
if ( !m_allLicensesOptional )
|
||||
{
|
||||
ui->mainText->setText( tr( "<h1>License Agreement</h1>"
|
||||
"This setup procedure will install proprietary "
|
||||
"software that is subject to licensing terms." ) );
|
||||
ui->additionalText->setText( tr( "Please review the End User License "
|
||||
"Agreements (EULAs) above.<br/>"
|
||||
"If you do not agree with the terms, the setup procedure cannot continue." ) );
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->mainText->setText( tr( "<h1>License Agreement</h1>"
|
||||
"This setup procedure can install proprietary "
|
||||
"software that is subject to licensing terms "
|
||||
@ -164,18 +172,13 @@ LicensePage::setEntries( const QList< LicenseEntry >& entriesList )
|
||||
"Agreements (EULAs) above.<br/>"
|
||||
"If you do not agree with the terms, proprietary software will not "
|
||||
"be installed, and open source alternatives will be used instead." ) );
|
||||
} ui->retranslateUi( this );
|
||||
|
||||
for ( const auto& w
|
||||
: m_entries ) w->retranslateUi(); )
|
||||
|
||||
for ( const LicenseEntry& entry : entriesList )
|
||||
{
|
||||
LicenseWidget* w = new LicenseWidget( entry );
|
||||
ui->licenseEntriesLayout->addWidget( w );
|
||||
m_entries.append( w );
|
||||
}
|
||||
ui->licenseEntriesLayout->addStretch();
|
||||
ui->retranslateUi( this );
|
||||
|
||||
for ( const auto& w : m_entries )
|
||||
{
|
||||
w->retranslateUi();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -208,5 +211,5 @@ LicensePage::checkAcceptance( bool checked )
|
||||
{
|
||||
ui->acceptFrame->setStyleSheet( "#acceptFrame { padding: 3px }" );
|
||||
}
|
||||
emit nextStatusChanged( checked );
|
||||
emit nextStatusChanged( m_isNextEnabled );
|
||||
}
|
||||
|
@ -83,10 +83,13 @@ public slots:
|
||||
* - the user has ticked the "OK" box.
|
||||
* This function calls updateGlobalStorage() as needed, and updates
|
||||
* the appearance of the page as needed. @p checked indicates whether
|
||||
* the checkbox has been ticked or not.
|
||||
* the checkbox has been ticked or not. (e.g. when @p checked is true,
|
||||
* you can continue regardless)
|
||||
*/
|
||||
void checkAcceptance( bool checked );
|
||||
|
||||
void retranslate();
|
||||
|
||||
signals:
|
||||
void nextStatusChanged( bool status );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user