Enable resize+alongside radiobutton if osprober reports multiple lines.

main
Teo Mrnjavac 10 years ago
parent 0801756cd1
commit faa39e1746

@ -170,20 +170,38 @@ ChoicePage::init( PartitionCoreModule* core, const QStringList& osproberLines )
} }
else else
{ {
m_messageLabel->setText( tr( "This computer currently has multiple operating systems on it. " // m_osproberLines has at least 2 items.
"What would you like to do?" ) );
alongsideButton->setText( tr( "<b>Install %1 alongside your current operating systems</b><br/>" bool atLeastOneCanBeResized = false;
"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( "<b>Erase disk and install %1</b><br/>" foreach ( QString line, m_osproberLines )
"<font color=\"red\">Warning: </font>This will delete all of your Windows 7 programs, " {
"documents, photos, music, and any other files." ) QStringList osLine = line.split( ':' );
.arg( "$RELEASE" ) ); if ( canBeResized( osLine ) )
alongsideButton->hide(); //FIXME: allow this when we can {
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( "<b>Install %1 alongside your current operating systems</b><br/>"
"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( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your Windows 7 programs, "
"documents, photos, music, and any other files." )
.arg( "$RELEASE" ) );
}
else
alongsideButton->hide();
} }
m_itemsLayout->addStretch(); m_itemsLayout->addStretch();

Loading…
Cancel
Save