diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-05 12:45:45 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-05 12:45:45 +0000 |
commit | febca2e36407e6c7acddb420606d901f28a4b4a9 (patch) | |
tree | 79f2555c2c85047e2933da6cc8164c16c29b1661 /MdeModulePkg/Universal/SetupBrowserDxe | |
parent | 9386c41d1a367fbdfadabfc3988abbc4eab2236f (diff) | |
download | edk2-febca2e36407e6c7acddb420606d901f28a4b4a9.zip edk2-febca2e36407e6c7acddb420606d901f28a4b4a9.tar.gz edk2-febca2e36407e6c7acddb420606d901f28a4b4a9.tar.bz2 |
Disable change value for grayout or readonly menu.
Signed-off-by: ydong10
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12817 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index ebe8fae..ca2ec3b 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -2876,6 +2876,11 @@ UiDisplayMenu ( switch (Key.UnicodeChar) {
case CHAR_CARRIAGE_RETURN:
+ if(MenuOption->GrayOut || MenuOption->ReadOnly) {
+ ControlFlag = CfReadKey;
+ break;
+ }
+
ScreenOperation = UiSelect;
gDirection = 0;
break;
@@ -2890,7 +2895,7 @@ UiDisplayMenu ( // If the screen has no menu items, and the user didn't select UiReset
// ignore the selection and go back to reading keys.
//
- if(IsListEmpty (&gMenuOption)) {
+ if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) {
ControlFlag = CfReadKey;
break;
}
@@ -2943,7 +2948,7 @@ UiDisplayMenu ( }
ASSERT(MenuOption != NULL);
- if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut) {
+ if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut && !MenuOption->ReadOnly) {
ScreenOperation = UiSelect;
}
}
|