boot loader: blacklist menu: Add "Return to ..." item
This commit is contained in:
@@ -622,9 +622,7 @@ public:
|
|||||||
{
|
{
|
||||||
_DeleteItems();
|
_DeleteItems();
|
||||||
|
|
||||||
if (fDirectory == NULL)
|
if (fDirectory != NULL) {
|
||||||
return;
|
|
||||||
|
|
||||||
void* cookie;
|
void* cookie;
|
||||||
if (fDirectory->Open(&cookie, O_RDONLY) == B_OK) {
|
if (fDirectory->Open(&cookie, O_RDONLY) == B_OK) {
|
||||||
Node* node;
|
Node* node;
|
||||||
@@ -644,6 +642,11 @@ public:
|
|||||||
SortItems(&BlacklistMenuItem::Less);
|
SortItems(&BlacklistMenuItem::Less);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CountItems() > 0)
|
||||||
|
AddSeparatorItem();
|
||||||
|
AddItem(new(nothrow) MenuItem("Return to parent directory"));
|
||||||
|
}
|
||||||
|
|
||||||
virtual void Exited()
|
virtual void Exited()
|
||||||
{
|
{
|
||||||
_DeleteItems();
|
_DeleteItems();
|
||||||
@@ -725,6 +728,10 @@ public:
|
|||||||
SetDirectory(NULL);
|
SetDirectory(NULL);
|
||||||
|
|
||||||
BlacklistMenu::Entered();
|
BlacklistMenu::Entered();
|
||||||
|
|
||||||
|
// rename last item
|
||||||
|
if (MenuItem* item = ItemAt(CountItems() - 1))
|
||||||
|
item->SetLabel("Return to safe mode menu");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Exited()
|
virtual void Exited()
|
||||||
|
|||||||
Reference in New Issue
Block a user