diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-01-29 06:52:38 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-01-29 06:52:38 +0000 |
commit | 0777cea600819daf53dedefe1f922fed927fe71f (patch) | |
tree | 20fb3c9af9a873d459755eac6e403c1713d4f706 | |
parent | 0c504abf90035a514fd65f8e390cc2a11f822bb6 (diff) | |
download | edk2-platforms-0777cea600819daf53dedefe1f922fed927fe71f.tar.xz |
Based on the feature PCD value, browser will decide whether to gray out the read only menu.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14112 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dec | 7 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf | 1 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 710e3e6a04..ba80b809dc 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -4,7 +4,7 @@ # It also provides the defintions(including PPIs/PROTOCOLs/GUIDs and library classes)
# and libraries instances, which are used for those modules.
#
-# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials are licensed and made available under
# the terms and conditions of the BSD License that accompanies this distribution.
# The full text of the license may be found at
@@ -453,6 +453,11 @@ # If FALSE, TEXT statement will be set to GrayOut only when GrayOut condition is TRUE.
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserGrayOutTextStatement|FALSE|BOOLEAN|0x0001004f
+ ## This PCD specifies whether unselectable menu should be gray out in HII Form Browser.
+ # If TRUE, the unselectable menu will be set to GrayOut.
+ # If FALSE, the menu will be show as normal menu entry even if it is not selectable.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowerGrayOutReadOnlyMenu|FALSE|BOOLEAN|0x00010070
+
## If TRUE, recovery from IDE disk will be supported.
gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnIdeDisk|TRUE|BOOLEAN|0x00010060
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf index 2a4cda41e3..7e740bc099 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf +++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf @@ -80,6 +80,7 @@ [FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserGrayOutTextStatement ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowerGrayOutReadOnlyMenu ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor ## CONSUMES
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index 8ff90e1440..e9f9f70eda 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -778,6 +778,9 @@ UiAddMenuOption ( if ((Statement->ValueExpression != NULL) ||
((Statement->QuestionFlags & EFI_IFR_FLAG_READ_ONLY) != 0)) {
MenuOption->ReadOnly = TRUE;
+ if (FeaturePcdGet (PcdBrowerGrayOutReadOnlyMenu)) {
+ MenuOption->GrayOut = TRUE;
+ }
}
InsertTailList (&gMenuOption, &MenuOption->Link);
|