boot loader: blacklist menu: Set different title when disabled

When booting from CD (or when no boot volume has been selected)
blacklisting isn't supported. In that case let the menu title indicated
that.
This commit is contained in:
Ingo Weinhold 2013-11-30 19:58:41 +01:00
parent e2c5cf691d
commit 65947ae5ae

View File

@ -608,7 +608,7 @@ class BlacklistMenu : public Menu {
public:
BlacklistMenu()
:
Menu(STANDARD_MENU, "Mark the entries to blacklist"),
Menu(STANDARD_MENU, kDefaultMenuTitle),
fDirectory(NULL)
{
}
@ -706,9 +706,16 @@ private:
private:
Directory* fDirectory;
protected:
static const char* const kDefaultMenuTitle;
};
const char* const BlacklistMenu::kDefaultMenuTitle
= "Mark the entries to blacklist";
class BlacklistRootMenu : public BlacklistMenu {
public:
BlacklistRootMenu()
@ -724,8 +731,13 @@ public:
if (sBootVolume != NULL && sBootVolume->IsValid()
&& sBootVolume->IsPackaged()) {
SetDirectory(sBootVolume->SystemDirectory());
} else
SetTitle(kDefaultMenuTitle);
} else {
SetDirectory(NULL);
SetTitle(sBootVolume != NULL && sBootVolume->IsValid()
? "The selected boot volume doesn't support blacklisting!"
: "No boot volume selected!");
}
BlacklistMenu::Entered();