git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40200 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2011-01-11 00:53:33 +00:00
parent 4535495d80
commit 177d3b66f0

View File

@ -304,27 +304,25 @@ DrivesPage::_UpdateWizardButtons(DriveItem* item)
if (fHasInstallableItems) {
fWizardView->SetPreviousButtonLabel(
B_TRANSLATE_COMMENT("Uninstall", "Button"));
if (fDrivesView->CurrentSelection() == -1) {
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"));
}
if (item == NULL) {
fWizardView->SetPreviousButtonEnabled(false);
fWizardView->SetNextButtonEnabled(false);
return;
}
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"));
}