Enable lock attribute for statement and form; show this attribute same as grayout.
Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12721 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -577,6 +577,7 @@ UiWaitForSingleEvent (
|
||||
|
||||
@param String String description for this option.
|
||||
@param Handle Hii handle for the package list.
|
||||
@param Form The form this statement belong to.
|
||||
@param Statement Statement of this Menu Option.
|
||||
@param NumberOfLines Display lines for this Menu Option.
|
||||
@param MenuItemCount The index for this Option in the Menu.
|
||||
@@ -588,6 +589,7 @@ UI_MENU_OPTION *
|
||||
UiAddMenuOption (
|
||||
IN CHAR16 *String,
|
||||
IN EFI_HII_HANDLE Handle,
|
||||
IN FORM_BROWSER_FORM *Form,
|
||||
IN FORM_BROWSER_STATEMENT *Statement,
|
||||
IN UINT16 NumberOfLines,
|
||||
IN UINT16 MenuItemCount
|
||||
@@ -643,6 +645,13 @@ UiAddMenuOption (
|
||||
MenuOption->GrayOut = Statement->GrayOutExpression->Result.Value.b;
|
||||
}
|
||||
|
||||
//
|
||||
// If the form or the question has the lock attribute, deal same as grayout.
|
||||
//
|
||||
if (Form->Locked || Statement->Locked) {
|
||||
MenuOption->GrayOut = TRUE;
|
||||
}
|
||||
|
||||
switch (Statement->Operand) {
|
||||
case EFI_IFR_ORDERED_LIST_OP:
|
||||
case EFI_IFR_ONE_OF_OP:
|
||||
|
Reference in New Issue
Block a user