* Reselect the previously chosen disk, if any, otherwise, as before, the boot
drive. * Do not change the wizard buttons after they have been updated already due to the selection when building the UI. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -218,14 +218,15 @@ DrivesPage::DrivesPage(WizardView* wizardView, const BootMenuList& menus,
|
|||||||
.Add(description, 0.5)
|
.Add(description, 0.5)
|
||||||
.Add(scrollView, 1);
|
.Add(scrollView, 1);
|
||||||
|
|
||||||
|
fWizardView->SetPreviousButtonHidden(!any);
|
||||||
if (any) {
|
if (any) {
|
||||||
fWizardView->SetPreviousButtonLabel(
|
fWizardView->SetPreviousButtonLabel(
|
||||||
B_TRANSLATE_COMMENT("Uninstall", "Button"));
|
B_TRANSLATE_COMMENT("Uninstall", "Button"));
|
||||||
fWizardView->SetPreviousButtonHidden(false);
|
if (fDrivesView->CurrentSelection() == -1) {
|
||||||
fWizardView->SetPreviousButtonEnabled(false);
|
|
||||||
fWizardView->SetPreviousButtonEnabled(false);
|
fWizardView->SetPreviousButtonEnabled(false);
|
||||||
|
fWizardView->SetNextButtonEnabled(false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fWizardView->SetPreviousButtonHidden(true);
|
|
||||||
fWizardView->SetNextButtonLabel(
|
fWizardView->SetNextButtonLabel(
|
||||||
B_TRANSLATE_COMMENT("Quit", "Button"));
|
B_TRANSLATE_COMMENT("Quit", "Button"));
|
||||||
}
|
}
|
||||||
@@ -278,6 +279,7 @@ DrivesPage::MessageReceived(BMessage* message)
|
|||||||
bool
|
bool
|
||||||
DrivesPage::_FillDrivesView(const BootMenuList& menus)
|
DrivesPage::_FillDrivesView(const BootMenuList& menus)
|
||||||
{
|
{
|
||||||
|
const char* selected = fSettings->FindString("disk");
|
||||||
bool any = false;
|
bool any = false;
|
||||||
|
|
||||||
BDiskDeviceRoster roster;
|
BDiskDeviceRoster roster;
|
||||||
@@ -288,7 +290,9 @@ DrivesPage::_FillDrivesView(const BootMenuList& menus)
|
|||||||
if (item->CanBeInstalled())
|
if (item->CanBeInstalled())
|
||||||
any = true;
|
any = true;
|
||||||
fDrivesView->AddItem(item);
|
fDrivesView->AddItem(item);
|
||||||
if (item->IsBootDrive()) {
|
|
||||||
|
if ((selected == NULL && item->IsBootDrive())
|
||||||
|
|| (selected != NULL && !strcmp(item->Path(), selected))) {
|
||||||
fDrivesView->Select(fDrivesView->CountItems() - 1);
|
fDrivesView->Select(fDrivesView->CountItems() - 1);
|
||||||
_UpdateWizardButtons(item);
|
_UpdateWizardButtons(item);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user