From 177d3b66f0260c4619c6e92e8bea08c45fad09dc Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 11 Jan 2011 00:53:33 +0000 Subject: [PATCH] Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40200 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bootmanager/DrivesPage.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/apps/bootmanager/DrivesPage.cpp b/src/apps/bootmanager/DrivesPage.cpp index 290bdf4524..ee1a5fc57a 100644 --- a/src/apps/bootmanager/DrivesPage.cpp +++ b/src/apps/bootmanager/DrivesPage.cpp @@ -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")); }