diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 941cbbd36..b21577b85 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -170,20 +170,38 @@ ChoicePage::init( PartitionCoreModule* core, const QStringList& osproberLines ) } else { - m_messageLabel->setText( tr( "This computer currently has multiple operating systems on it. " - "What would you like to do?" ) ); + // m_osproberLines has at least 2 items. - alongsideButton->setText( tr( "Install %1 alongside your current operating systems
" - "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" ) ); + bool atLeastOneCanBeResized = false; - 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" ) ); - alongsideButton->hide(); //FIXME: allow this when we can + foreach ( QString line, m_osproberLines ) + { + QStringList osLine = line.split( ':' ); + if ( canBeResized( osLine ) ) + { + atLeastOneCanBeResized = true; + break; + } + } + + if ( atLeastOneCanBeResized ) + { + m_messageLabel->setText( tr( "This computer currently has multiple operating systems on it. " + "What would you like to do?" ) ); + + alongsideButton->setText( tr( "Install %1 alongside your current operating systems
" + "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" ) ); + + 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" ) ); + } + else + alongsideButton->hide(); } m_itemsLayout->addStretch();