boot loader: blacklist menu: Add "Return to ..." item

This commit is contained in:
Ingo Weinhold
2013-11-30 19:56:13 +01:00
parent cbfc38c62d
commit ccfc7bea50
+10 -3
View File
@@ -622,9 +622,7 @@ public:
{
_DeleteItems();
if (fDirectory == NULL)
return;
if (fDirectory != NULL) {
void* cookie;
if (fDirectory->Open(&cookie, O_RDONLY) == B_OK) {
Node* node;
@@ -644,6 +642,11 @@ public:
SortItems(&BlacklistMenuItem::Less);
}
if (CountItems() > 0)
AddSeparatorItem();
AddItem(new(nothrow) MenuItem("Return to parent directory"));
}
virtual void Exited()
{
_DeleteItems();
@@ -725,6 +728,10 @@ public:
SetDirectory(NULL);
BlacklistMenu::Entered();
// rename last item
if (MenuItem* item = ItemAt(CountItems() - 1))
item->SetLabel("Return to safe mode menu");
}
virtual void Exited()