Revision: 19440
          http://sourceforge.net/p/edk2/code/19440
Author:   dandanbi
Date:     2015-12-22 09:16:21 +0000 (Tue, 22 Dec 2015)
Log Message:
-----------
MdeModulePkg:Update Boot Manager form when enter it.

Currently BootManager is an independent library,used by UiApp.It only load boot
option when enter UiApp.So when add boot option through boot maintenance 
manager,
it will not display in boot manager. In order to fix this issue,now we update 
the
boot manager form every time we enter it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <[email protected]>
Reviewed-by: Eric Dong <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManager.c
    trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr

Modified: trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManager.c
===================================================================
--- trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManager.c        
2015-12-22 08:41:32 UTC (rev 19439)
+++ trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManager.c        
2015-12-22 09:16:21 UTC (rev 19440)
@@ -681,6 +681,18 @@
   EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;
   UINTN                        BootOptionCount;
   EFI_INPUT_KEY                Key;
+
+  if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
+    //
+    //Means enter the boot manager form.
+    //Update the boot manage page,because the boot option may changed.
+    //
+    if (QuestionId == 0x1212){
+      UpdateBootManager();
+    }
+    return EFI_SUCCESS;
+  }
+
   if (Action != EFI_BROWSER_ACTION_CHANGED) {
     //
     // Do nothing for other UEFI Action. Only do call back when data is 
changed.
@@ -759,10 +771,6 @@
                                     );
   ASSERT (gBootManagerPrivate.HiiHandle != NULL);
 
-  //
-  // Update boot manager page 
-  //
-  UpdateBootManager ();
 
   return EFI_SUCCESS;
 }

Modified: trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr
===================================================================
--- trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr   
2015-12-22 08:41:32 UTC (rev 19439)
+++ trunk/edk2/MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr   
2015-12-22 09:16:21 UTC (rev 19440)
@@ -33,6 +33,17 @@
     subtitle text = STRING_TOKEN(STR_LAST_STRING);
 
     //
+    //Add this invisable text in order to indicate enter Boot Manager form.
+    //
+    suppressif TRUE;
+          text
+              help  = STRING_TOKEN(STR_LAST_STRING ),
+              text  = STRING_TOKEN(STR_LAST_STRING ),
+              flags = INTERACTIVE,
+              key   = 0x1212;
+     endif;
+
+    //
     // This is where we will dynamically add choices for the Boot Manager
     //
     label LABEL_BOOT_OPTION;


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to