From 2e2bd78deb4a8fa563d6dac2c012f0b62d6395e4 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 16 Oct 2014 17:00:08 +0200 Subject: [PATCH] Use Branding in partition viewmodule. --- src/modules/partition/gui/AlongsidePage.cpp | 11 +++++---- src/modules/partition/gui/ChoicePage.cpp | 25 ++++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/modules/partition/gui/AlongsidePage.cpp b/src/modules/partition/gui/AlongsidePage.cpp index 2aff2e5ef..d896ec2b7 100644 --- a/src/modules/partition/gui/AlongsidePage.cpp +++ b/src/modules/partition/gui/AlongsidePage.cpp @@ -32,6 +32,7 @@ #include "GlobalStorage.h" #include "utils/Logger.h" #include "utils/CalamaresUtilsGui.h" +#include "Branding.h" #include #include @@ -137,7 +138,8 @@ AlongsidePage::init( PartitionCoreModule* core , const OsproberEntryList& osprob candidate->used() * 1.1, candidate->capacity() - requiredStorageB, candidate->capacity() / 2, - tr( "$RELEASE" ) ); + Calamares::Branding::instance()-> + string( Calamares::Branding::ProductName ) ); m_splitterWidget->setFixedHeight( qMax< int >( CalamaresUtils::defaultFontHeight() * 1.5, 30 ) ); if ( ok ) @@ -158,12 +160,13 @@ AlongsidePage::init( PartitionCoreModule* core , const OsproberEntryList& osprob { m_sizeLabel->setText( tr( "With this operation, the partition %1 which contains " "%4 will be shrunk " - "to %2MB and a new %3MB partition will be created for " - "$RELEASE." ) + "to %2MB and a new %3MB partition will be created for %5." ) .arg( path ) .arg( size / ( 1024 * 1024 ) ) .arg( sizeNext / ( 1024 * 1024 ) ) - .arg( m_partitionsComboBox->currentText() ) ); + .arg( m_partitionsComboBox->currentText() ) + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::ProductName ) ) ); } ); foreach ( const OsproberEntry& e, osproberEntries ) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 2ba59cace..396293284 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -27,6 +27,7 @@ #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" +#include "Branding.h" #include #include @@ -107,7 +108,8 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn eraseButton->setText( tr( "Erase disk and install %1
" "Warning: This will delete all of your programs, " "documents, photos, music, and any other files." ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); alongsideButton->hide(); } @@ -126,14 +128,16 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn "You can choose which operating system you want each time the " "computer starts up." ) .arg( osName ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); eraseButton->setText( tr( "Replace %1 with %2
" "Warning: This will erase the whole disk and " "delete all of your %1 programs, " "documents, photos, music, and any other files." ) .arg( osName ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); } else { @@ -144,12 +148,14 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn "Documents, music and other personal files will be kept. " "You can choose which operating system you want each time the " "computer starts up." ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); eraseButton->setText( tr( "Erase disk and install %1
" "Warning: This will delete all of your Windows 7 programs, " "documents, photos, music, and any other files." ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); } if ( !osproberEntries.first().canBeResized ) alongsideButton->hide(); @@ -176,12 +182,14 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn "Documents, music and other personal files will be kept. " "You can choose which operating system you want each time the " "computer starts up." ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); eraseButton->setText( tr( "Erase disk and install %1
" "Warning: This will delete all of your Windows 7 programs, " "documents, photos, music, and any other files." ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::VersionedName ) ) ); if ( !atLeastOneCanBeResized ) alongsideButton->hide(); @@ -195,7 +203,8 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn somethingElseButton->setText( tr( "Something else
" "You can create or resize partitions yourself, or choose " "multiple partitions for %1." ) - .arg( "$RELEASE" ) ); + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::ShortVersionedName ) ) ); somethingElseButton->setIconSize( iconSize ); somethingElseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::Partitions, CalamaresUtils::Original,