BootMan: Don't rename the "Install" button to "Quit"

... when there are no installable disks.

The button is disabled anyway, and it is not useful to rename it. The
program can be exited by closing the window anyway, so a "Quit" button
is useless.
This commit is contained in:
Adrien Destugues 2014-11-18 15:10:49 +01:00
parent 5946ab012e
commit dc7bdd5597

View File

@ -314,28 +314,20 @@ void
DrivesPage::_UpdateWizardButtons(DriveItem* item)
{
fWizardView->SetPreviousButtonHidden(!fHasInstallableItems);
if (fHasInstallableItems) {
fWizardView->SetPreviousButtonLabel(
B_TRANSLATE_COMMENT("Uninstall", "Button"));
if (item == NULL) {
fWizardView->SetPreviousButtonEnabled(false);
fWizardView->SetNextButtonEnabled(false);
} else {
fWizardView->SetPreviousButtonEnabled(
item->CanBeInstalled() && item->IsInstalled());
fWizardView->SetNextButtonEnabled(item->CanBeInstalled());
fWizardView->SetNextButtonLabel(
item->IsInstalled() && item->CanBeInstalled()
? B_TRANSLATE_COMMENT("Update", "Button")
: B_TRANSLATE_COMMENT("Install", "Button"));
}
} else {
fWizardView->SetNextButtonLabel(
B_TRANSLATE_COMMENT("Quit", "Button"));
fWizardView->SetPreviousButtonLabel(
B_TRANSLATE_COMMENT("Uninstall", "Button"));
if (item == NULL) {
fWizardView->SetPreviousButtonEnabled(false);
fWizardView->SetNextButtonEnabled(false);
return;
} else {
fWizardView->SetPreviousButtonEnabled(
item->CanBeInstalled() && item->IsInstalled());
fWizardView->SetNextButtonEnabled(item->CanBeInstalled());
fWizardView->SetNextButtonLabel(
item->IsInstalled() && item->CanBeInstalled()
? B_TRANSLATE_COMMENT("Update", "Button")
: B_TRANSLATE_COMMENT("Install", "Button"));
}
}