[welcome] Chase Branding API change
This commit is contained in:
parent
0046c3f161
commit
70054e5db4
@ -41,7 +41,7 @@ Config::Config( QObject* parent )
|
|||||||
void
|
void
|
||||||
Config::retranslate()
|
Config::retranslate()
|
||||||
{
|
{
|
||||||
m_genericWelcomeMessage = genericWelcomeMessage().arg( *Calamares::Branding::VersionedName );
|
m_genericWelcomeMessage = genericWelcomeMessage().arg( Calamares::Branding::instance()->versionedName() );
|
||||||
emit genericWelcomeMessageChanged( m_genericWelcomeMessage );
|
emit genericWelcomeMessageChanged( m_genericWelcomeMessage );
|
||||||
|
|
||||||
if ( !m_requirementsModel->satisfiedRequirements() )
|
if ( !m_requirementsModel->satisfiedRequirements() )
|
||||||
@ -72,13 +72,13 @@ Config::retranslate()
|
|||||||
"might be disabled." );
|
"might be disabled." );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_warningMessage = message.arg( *Calamares::Branding::ShortVersionedName );
|
m_warningMessage = message.arg( Calamares::Branding::instance()->shortVersionedName() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_warningMessage = tr( "This program will ask you some questions and "
|
m_warningMessage = tr( "This program will ask you some questions and "
|
||||||
"set up %2 on your computer." )
|
"set up %2 on your computer." )
|
||||||
.arg( *Calamares::Branding::ProductName );
|
.arg( Calamares::Branding::instance()->productName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
emit warningMessageChanged( m_warningMessage );
|
emit warningMessageChanged( m_warningMessage );
|
||||||
|
@ -56,9 +56,7 @@ WelcomePage::WelcomePage( Config* conf, QWidget* parent )
|
|||||||
const int defaultFontHeight = CalamaresUtils::defaultFontHeight();
|
const int defaultFontHeight = CalamaresUtils::defaultFontHeight();
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
ui->aboutButton->setIcon( CalamaresUtils::defaultPixmap(
|
ui->aboutButton->setIcon( CalamaresUtils::defaultPixmap(
|
||||||
CalamaresUtils::Information,
|
CalamaresUtils::Information, CalamaresUtils::Original, 2 * QSize( defaultFontHeight, defaultFontHeight ) ) );
|
||||||
CalamaresUtils::Original,
|
|
||||||
2 * QSize( defaultFontHeight, defaultFontHeight ) ) );
|
|
||||||
|
|
||||||
// insert system-check widget below welcome text
|
// insert system-check widget below welcome text
|
||||||
const int welcome_text_idx = ui->verticalLayout->indexOf( ui->mainText );
|
const int welcome_text_idx = ui->verticalLayout->indexOf( ui->mainText );
|
||||||
@ -85,8 +83,6 @@ WelcomePage::WelcomePage( Config* conf, QWidget* parent )
|
|||||||
|
|
||||||
initLanguages();
|
initLanguages();
|
||||||
|
|
||||||
cDebug() << "Welcome string" << Calamares::Branding::instance()->welcomeStyleCalamares()
|
|
||||||
<< *Calamares::Branding::VersionedName;
|
|
||||||
CALAMARES_RETRANSLATE_SLOT( &WelcomePage::retranslate )
|
CALAMARES_RETRANSLATE_SLOT( &WelcomePage::retranslate )
|
||||||
|
|
||||||
connect( ui->aboutButton, &QPushButton::clicked, this, &WelcomePage::showAboutBox );
|
connect( ui->aboutButton, &QPushButton::clicked, this, &WelcomePage::showAboutBox );
|
||||||
@ -235,9 +231,9 @@ WelcomePage::retranslate()
|
|||||||
: tr( "<h1>Welcome to the %1 installer.</h1>" );
|
: tr( "<h1>Welcome to the %1 installer.</h1>" );
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->mainText->setText( message.arg( *Calamares::Branding::VersionedName ) );
|
ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
|
||||||
ui->retranslateUi( this );
|
ui->retranslateUi( this );
|
||||||
ui->supportButton->setText( tr( "%1 support" ).arg( *Calamares::Branding::ShortProductName ) );
|
ui->supportButton->setText( tr( "%1 support" ).arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -261,7 +257,7 @@ WelcomePage::showAboutBox()
|
|||||||
"Liberating Software." )
|
"Liberating Software." )
|
||||||
.arg( CALAMARES_APPLICATION_NAME )
|
.arg( CALAMARES_APPLICATION_NAME )
|
||||||
.arg( CALAMARES_VERSION )
|
.arg( CALAMARES_VERSION )
|
||||||
.arg( *Calamares::Branding::VersionedName ),
|
.arg( Calamares::Branding::instance()->versionedName() ),
|
||||||
QMessageBox::Ok,
|
QMessageBox::Ok,
|
||||||
this );
|
this );
|
||||||
mb.setIconPixmap( CalamaresUtils::defaultPixmap(
|
mb.setIconPixmap( CalamaresUtils::defaultPixmap(
|
||||||
|
@ -129,7 +129,7 @@ jobOrBrandingSetting( Calamares::Branding::StringEntry e, const QVariantMap& map
|
|||||||
auto v = map.value( key );
|
auto v = map.value( key );
|
||||||
if ( v.type() == QVariant::Bool )
|
if ( v.type() == QVariant::Bool )
|
||||||
{
|
{
|
||||||
return v.toBool() ? ( *e ) : QString();
|
return v.toBool() ? ( Calamares::Branding::instance()->string( e ) ) : QString();
|
||||||
}
|
}
|
||||||
if ( v.type() == QVariant::String )
|
if ( v.type() == QVariant::String )
|
||||||
{
|
{
|
||||||
|
@ -278,13 +278,13 @@ ResultsListWidget::retranslate()
|
|||||||
"Installation can continue, but some features "
|
"Installation can continue, but some features "
|
||||||
"might be disabled." );
|
"might be disabled." );
|
||||||
}
|
}
|
||||||
m_explanation->setText( message.arg( *Calamares::Branding::ShortVersionedName ) );
|
m_explanation->setText( message.arg( Calamares::Branding::instance()->shortVersionedName() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_explanation->setText( tr( "This program will ask you some questions and "
|
m_explanation->setText( tr( "This program will ask you some questions and "
|
||||||
"set up %2 on your computer." )
|
"set up %2 on your computer." )
|
||||||
.arg( *Calamares::Branding::ProductName ) );
|
.arg( Calamares::Branding::instance()->productName() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ jobOrBrandingSetting( Calamares::Branding::StringEntry e, const QVariantMap& map
|
|||||||
auto v = map.value( key );
|
auto v = map.value( key );
|
||||||
if ( v.type() == QVariant::Bool )
|
if ( v.type() == QVariant::Bool )
|
||||||
{
|
{
|
||||||
return v.toBool() ? ( *e ) : QString();
|
return v.toBool() ? ( Calamares::Branding::instance()->string( e ) ) : QString();
|
||||||
}
|
}
|
||||||
if ( v.type() == QVariant::String )
|
if ( v.type() == QVariant::String )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user