diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-02 01:23:52 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-02 01:23:52 +0000 |
commit | ebe43565f9f7ace6d19410c397c0df7482b022f3 (patch) | |
tree | 66a46de58287fd6ba8e92d2d067acaa620b62aa2 /MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | |
parent | 08e6463a72f816b51793327ab5b0f2af08b9db1c (diff) | |
download | edk2-platforms-ebe43565f9f7ace6d19410c397c0df7482b022f3.tar.xz |
Merged in the bug fixes from EDK I.
*** Press F9 in Uefi64 FrontPage shouldnot enter sub-menu
** [FT] Some UI error on multiple platforms on framework_20080811
** [FT] UI test of How tall are you(Hex) on framework_20080811
To improve backward compatibility, add gEfiPrint2ProtocolGuid and rename gEfiPrintProtocolGuid to the previous GUID value used in EDK I. gEfiPrint2ProtocolGuid is a enhanced version of gEfiPrintProtocolGuid.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5768 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index a35ca35df9..404bb31e10 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -597,6 +597,7 @@ InitializeBrowserStrings ( gPlusString = GetToken (STRING_TOKEN (PLUS_STRING), gHiiHandle);
gMinusString = GetToken (STRING_TOKEN (MINUS_STRING), gHiiHandle);
gAdjustNumber = GetToken (STRING_TOKEN (ADJUST_NUMBER), gHiiHandle);
+ gSaveChanges = GetToken (STRING_TOKEN (SAVE_CHANGES), gHiiHandle);
return ;
}
@@ -637,6 +638,7 @@ FreeBrowserStrings ( SafeFreePool (gPlusString);
SafeFreePool (gMinusString);
SafeFreePool (gAdjustNumber);
+ SafeFreePool (gSaveChanges);
return ;
}
@@ -857,6 +859,9 @@ SetupBrowser ( EFI_HII_VALUE *HiiValue;
FORM_BROWSER_STATEMENT *Statement;
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
+ EFI_INPUT_KEY Key;
+ CHAR16 YesResponse;
+ CHAR16 NoResponse;
gMenuRefreshHead = NULL;
gResetRequired = FALSE;
@@ -990,6 +995,32 @@ SetupBrowser ( // Force to reparse IFR binary of target Formset
//
Selection->Action = UI_ACTION_REFRESH_FORMSET;
+
+ //
+ // Uncommitted data will be lost after IFR binary re-pasing, so confirm on whether to save
+ //
+ if (gNvUpdateRequired) {
+ Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
+
+ YesResponse = gYesResponse[0];
+ NoResponse = gNoResponse[0];
+
+ do {
+ CreateDialog (3, TRUE, 0, NULL, &Key, gEmptyString, gSaveChanges, gEmptyString);
+ } while
+ (
+ (Key.ScanCode != SCAN_ESC) &&
+ ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (NoResponse | UPPER_LOWER_CASE_OFFSET)) &&
+ ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (YesResponse | UPPER_LOWER_CASE_OFFSET))
+ );
+
+ if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (YesResponse | UPPER_LOWER_CASE_OFFSET)) {
+ //
+ // If the user hits the YesResponse key
+ //
+ SubmitForm (Selection->FormSet, Selection->Form);
+ }
+ }
}
}
} while (Selection->Action == UI_ACTION_REFRESH_FORM);
|