diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-06 06:41:09 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-06 06:41:09 +0000 |
commit | 40245175993beffd410783a5a2f84d8e264dbb30 (patch) | |
tree | df9725fde27defa2b4eae021e68514746d69b018 /MdeModulePkg | |
parent | cb0a42901a0931869ebcede637acec858be70cb7 (diff) | |
download | edk2-platforms-40245175993beffd410783a5a2f84d8e264dbb30.tar.xz |
Enable SetupBrowser to support multiple form class guid.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9680 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 14 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 21 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.h | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 8 |
4 files changed, 33 insertions, 14 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 69c0496c8d..4e3e9811df 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -208,7 +208,7 @@ DisplayPageFrame ( Buffer[Index] = Character;
}
- if (gClassOfVfr == FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) == FORMSET_CLASS_FRONT_PAGE) {
//
// ClearLines(0, LocalScreen.RightColumn, 0, BANNER_HEIGHT-1, BANNER_TEXT | BANNER_BACKGROUND);
//
@@ -289,7 +289,7 @@ DisplayPageFrame ( KEYHELP_TEXT | KEYHELP_BACKGROUND
);
- if (gClassOfVfr != FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) != FORMSET_CLASS_FRONT_PAGE) {
ClearLines (
LocalScreen.LeftColumn,
LocalScreen.RightColumn,
@@ -324,7 +324,7 @@ DisplayPageFrame ( Character = BOXDRAW_UP_LEFT;
PrintChar (Character);
- if (gClassOfVfr == FORMSET_CLASS_PLATFORM_SETUP) {
+ if ((gClassOfVfr & FORMSET_CLASS_PLATFORM_SETUP) == FORMSET_CLASS_PLATFORM_SETUP) {
//
// Print Bottom border line
// +------------------------------------------------------------------------------+
@@ -472,7 +472,7 @@ DisplayForm ( StringPtr = GetToken (Selection->Form->FormTitle, Handle);
- if (gClassOfVfr != FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) != FORMSET_CLASS_FRONT_PAGE) {
gST->ConOut->SetAttribute (gST->ConOut, TITLE_TEXT | TITLE_BACKGROUND);
PrintStringAt (
(LocalScreen.RightColumn + LocalScreen.LeftColumn - GetStringWidth (StringPtr) / 2) / 2,
@@ -685,7 +685,7 @@ UpdateKeyHelp ( ClearLines (LeftColumnOfHelp, RightColumnOfHelp, TopRowOfHelp, BottomRowOfHelp, KEYHELP_TEXT | KEYHELP_BACKGROUND);
if (!Selected) {
- if (gClassOfVfr == FORMSET_CLASS_PLATFORM_SETUP) {
+ if ((gClassOfVfr & FORMSET_CLASS_PLATFORM_SETUP) == FORMSET_CLASS_PLATFORM_SETUP) {
if (Selection->FormEditable) {
PrintStringAt (SecCol, TopRowOfHelp, gFunctionNineString);
PrintStringAt (ThdCol, TopRowOfHelp, gFunctionTenString);
@@ -742,7 +742,7 @@ UpdateKeyHelp ( case EFI_IFR_CHECKBOX_OP:
ClearLines (LeftColumnOfHelp, RightColumnOfHelp, TopRowOfHelp, BottomRowOfHelp, KEYHELP_TEXT | KEYHELP_BACKGROUND);
- if (gClassOfVfr == FORMSET_CLASS_PLATFORM_SETUP) {
+ if ((gClassOfVfr & FORMSET_CLASS_PLATFORM_SETUP) == FORMSET_CLASS_PLATFORM_SETUP) {
if (Selection->FormEditable) {
PrintStringAt (SecCol, TopRowOfHelp, gFunctionNineString);
PrintStringAt (ThdCol, TopRowOfHelp, gFunctionTenString);
@@ -763,7 +763,7 @@ UpdateKeyHelp ( ClearLines (LeftColumnOfHelp, RightColumnOfHelp, TopRowOfHelp, BottomRowOfHelp, KEYHELP_TEXT | KEYHELP_BACKGROUND);
if (!Selected) {
- if (gClassOfVfr == FORMSET_CLASS_PLATFORM_SETUP) {
+ if ((gClassOfVfr & FORMSET_CLASS_PLATFORM_SETUP) == FORMSET_CLASS_PLATFORM_SETUP) {
if (Selection->FormEditable) {
PrintStringAt (SecCol, TopRowOfHelp, gFunctionNineString);
PrintStringAt (ThdCol, TopRowOfHelp, gFunctionTenString);
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 5b99e7c5dd..da690eb97e 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -277,7 +277,6 @@ SendForm ( InitializeBrowserStrings ();
gFunctionKeySetting = DEFAULT_FUNCTION_KEY_SETTING;
- gClassOfVfr = FORMSET_CLASS_PLATFORM_SETUP;
//
// Ensure we are in Text mode
@@ -942,6 +941,10 @@ ConfigRespToStorage ( break;
case EFI_HII_VARSTORE_NAME_VALUE:
+ StrPtr = StrStr (ConfigResp, L"PATH");
+ if (StrPtr == NULL) {
+ break;
+ }
StrPtr = StrStr (ConfigResp, L"&");
while (StrPtr != NULL) {
//
@@ -2584,9 +2587,25 @@ InitializeFormSet ( return Status;
}
+ //
+ // Set VFR type by FormSet SubClass field
+ //
gClassOfVfr = FORMSET_CLASS_PLATFORM_SETUP;
if (FormSet->SubClass == EFI_FRONT_PAGE_SUBCLASS) {
gClassOfVfr = FORMSET_CLASS_FRONT_PAGE;
+ }
+
+ //
+ // Set VFR type by FormSet class guid
+ //
+ for (Index = 0; Index < 3; Index ++) {
+ if (CompareGuid (&FormSet->ClassGuid[Index], &gEfiHiiPlatformSetupFormsetGuid)) {
+ gClassOfVfr |= FORMSET_CLASS_PLATFORM_SETUP;
+ break;
+ }
+ }
+
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) == FORMSET_CLASS_FRONT_PAGE) {
gFrontPageHandle = FormSet->HiiHandle;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h index b5cbc67028..11714d6be7 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h @@ -193,8 +193,8 @@ typedef struct { #define FORM_INCONSISTENT_VALIDATION 0
#define FORM_NO_SUBMIT_VALIDATION 1
-#define FORMSET_CLASS_PLATFORM_SETUP 0
-#define FORMSET_CLASS_FRONT_PAGE 1
+#define FORMSET_CLASS_PLATFORM_SETUP 0x0001
+#define FORMSET_CLASS_FRONT_PAGE 0x0002
typedef struct {
UINT8 Type;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index 5b1f361d9d..f8d0e07ab6 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -1037,7 +1037,7 @@ UpdateStatusBar ( break;
case NV_UPDATE_REQUIRED:
- if (gClassOfVfr != FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) != FORMSET_CLASS_FRONT_PAGE) {
if (State) {
gST->ConOut->SetAttribute (gST->ConOut, INFO_TEXT);
PrintStringAt (
@@ -1694,7 +1694,7 @@ UiDisplayMenu ( ZeroMem (&Key, sizeof (EFI_INPUT_KEY));
- if (gClassOfVfr == FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) == FORMSET_CLASS_FRONT_PAGE){
TopRow = LocalScreen.TopRow + FRONT_PAGE_HEADER_HEIGHT + SCROLL_ARROW_HEIGHT;
Row = LocalScreen.TopRow + FRONT_PAGE_HEADER_HEIGHT + SCROLL_ARROW_HEIGHT;
} else {
@@ -2404,7 +2404,7 @@ UiDisplayMenu ( break;
case ' ':
- if (gClassOfVfr != FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) != FORMSET_CLASS_FRONT_PAGE) {
if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut) {
ScreenOperation = UiSelect;
}
@@ -2686,7 +2686,7 @@ UiDisplayMenu ( break;
}
- if (gClassOfVfr == FORMSET_CLASS_FRONT_PAGE) {
+ if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) == FORMSET_CLASS_FRONT_PAGE) {
//
// We never exit FrontPage, so skip the ESC
//
|