|
|
|
@ -28,6 +28,7 @@
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
#include <QBoxLayout>
|
|
|
|
|
#include <QDesktopServices>
|
|
|
|
|
#include <QFocusEvent>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QListWidget>
|
|
|
|
@ -121,38 +122,15 @@ GreetingPage::GreetingPage( QWidget* parent )
|
|
|
|
|
ui->mainText->setWordWrap( true );
|
|
|
|
|
ui->mainText->setOpenExternalLinks( true );
|
|
|
|
|
|
|
|
|
|
if ( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductUrl ).isEmpty() ||
|
|
|
|
|
Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductUrlText ).isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
CALAMARES_RETRANSLATE(
|
|
|
|
|
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
|
|
|
|
|
"This program will ask you some questions and "
|
|
|
|
|
"set up %2 on your computer." )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::VersionedName ) )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductName ) ) );
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CALAMARES_RETRANSLATE(
|
|
|
|
|
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
|
|
|
|
|
"This program will ask you some questions and "
|
|
|
|
|
"set up %2 on your computer.<br/>"
|
|
|
|
|
"<a href=\"%3\"> %4 </a>" )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::VersionedName ) )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductName ) )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductUrl ) )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductUrlText ) ) );
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
CALAMARES_RETRANSLATE(
|
|
|
|
|
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
|
|
|
|
|
"This program will ask you some questions and "
|
|
|
|
|
"set up %2 on your computer." )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::VersionedName ) )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductName ) ) );
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
ui->aboutButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::Information,
|
|
|
|
|
CalamaresUtils::Original,
|
|
|
|
@ -184,6 +162,55 @@ GreetingPage::GreetingPage( QWidget* parent )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
GreetingPage::setUpLinks( bool showSupportUrl,
|
|
|
|
|
bool showKnownIssuesUrl,
|
|
|
|
|
bool showReleaseNotesUrl )
|
|
|
|
|
{
|
|
|
|
|
using namespace Calamares;
|
|
|
|
|
Branding* b = Branding::instance();
|
|
|
|
|
if ( showSupportUrl && !b->string( Branding::SupportUrl ).isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
CALAMARES_RETRANSLATE(
|
|
|
|
|
ui->supportButton->setText( tr( "%1 support" )
|
|
|
|
|
.arg( b->string( Branding::ShortProductName ) ) );
|
|
|
|
|
)
|
|
|
|
|
connect( ui->supportButton, &QPushButton::clicked, []
|
|
|
|
|
{
|
|
|
|
|
QDesktopServices::openUrl( Branding::instance()->string( Branding::SupportUrl ) );
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui->supportButton->hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( showKnownIssuesUrl && !b->string( Branding::KnownIssuesUrl ).isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
connect( ui->knownIssuesButton, &QPushButton::clicked, []
|
|
|
|
|
{
|
|
|
|
|
QDesktopServices::openUrl( Branding::instance()->string( Branding::KnownIssuesUrl ) );
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui->knownIssuesButton->hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( showReleaseNotesUrl && !b->string( Branding::ReleaseNotesUrl ).isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
connect( ui->releaseNotesButton, &QPushButton::clicked, []
|
|
|
|
|
{
|
|
|
|
|
QDesktopServices::openUrl( Branding::instance()->string( Branding::ReleaseNotesUrl ) );
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui->releaseNotesButton->hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
GreetingPage::focusInEvent( QFocusEvent* e )
|
|
|
|
|
{
|
|
|
|
|