diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-12 01:16:12 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-12 01:16:12 +0000 |
commit | 0c66bc762aa186a78b3c6ce6c691af31bedec5fd (patch) | |
tree | 7ddf1adf4c526f1bdcf18381991d94c590aa0ec8 /MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | |
parent | 369d5f2e9801c9d768422c7b0acab9b12a00ba5b (diff) | |
download | edk2-platforms-0c66bc762aa186a78b3c6ce6c691af31bedec5fd.tar.xz |
Add SuppressIf form support in SetupBrowser driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9417 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Ui.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index dacc472652..db2bd27df3 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -1669,6 +1669,7 @@ UiDisplayMenu ( UINT8 DigitUint8;
UI_MENU_LIST *CurrentMenu;
UI_MENU_LIST *MenuList;
+ FORM_BROWSER_FORM *RefForm;
CopyMem (&LocalScreen, &gScreenDimensions, sizeof (EFI_SCREEN_DESCRIPTOR));
@@ -1690,6 +1691,7 @@ UiDisplayMenu ( NextMenuOption = NULL;
PreviousMenuOption = NULL;
SavedMenuOption = NULL;
+ RefForm = NULL;
ZeroMem (&Key, sizeof (EFI_INPUT_KEY));
@@ -2494,7 +2496,6 @@ UiDisplayMenu ( //
// Goto another Hii Package list
//
- ControlFlag = CfCheckSelection;
Selection->Action = UI_ACTION_REFRESH_FORMSET;
StringPtr = GetToken (Statement->RefDevicePath, Selection->FormSet->HiiHandle);
@@ -2549,7 +2550,6 @@ UiDisplayMenu ( //
// Goto another Formset, check for uncommitted data
//
- ControlFlag = CfCheckSelection;
Selection->Action = UI_ACTION_REFRESH_FORMSET;
CopyMem (&Selection->FormSetGuid, &Statement->RefFormSetId, sizeof (EFI_GUID));
@@ -2557,6 +2557,30 @@ UiDisplayMenu ( Selection->QuestionId = Statement->RefQuestionId;
} else if (Statement->RefFormId != 0) {
//
+ // Check Ref From is suppressed.
+ //
+ RefForm = IdToForm (Selection->FormSet, Statement->RefFormId);
+
+ if (RefForm->SuppressExpression != NULL) {
+ Status = EvaluateExpression (Selection->FormSet, RefForm, RefForm->SuppressExpression);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ if (RefForm->SuppressExpression->Result.Value.b) {
+ //
+ // Form is suppressed.
+ //
+ do {
+ CreateDialog (4, TRUE, 0, NULL, &Key, gEmptyString, gFormSuppress, gPressEnter, gEmptyString);
+ } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
+
+ Repaint = TRUE;
+ break;
+ }
+ }
+
+ //
// Goto another form inside this formset,
//
Selection->Action = UI_ACTION_REFRESH_FORM;
@@ -2626,9 +2650,9 @@ UiDisplayMenu ( Selection->Action = UI_ACTION_REFRESH_FORM;
}
- if (OptionString != NULL) {
- FreePool (OptionString);
- }
+ if (OptionString != NULL) {
+ FreePool (OptionString);
+ }
break;
}
break;
|