diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-16 05:23:38 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-16 05:23:38 +0000 |
commit | f67c4382ed24928b181160ed32119ac1039ddeb7 (patch) | |
tree | 0690c9b6cd309f6087165fc34f286d6234b13732 /MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | |
parent | 85aa96cd54dadbc974bd1d44f15a8743c588c733 (diff) | |
download | edk2-platforms-f67c4382ed24928b181160ed32119ac1039ddeb7.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Ui.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index baf36a213b..93399c4028 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -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:
|