]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
1.Reposition the platform info. Move from the old position to left one block space...
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.c
index 42edc089704818aa5b9adf96bdb78a9d6a368947..4896a076a57f5ae159242dd5e1d75f8296abe8fc 100644 (file)
@@ -269,7 +269,8 @@ SendForm (
 \r
   gOptionBlockWidth = (CHAR16) ((gScreenDimensions.RightColumn - gScreenDimensions.LeftColumn) / 3);\r
   gHelpBlockWidth   = gOptionBlockWidth;\r
-  gPromptBlockWidth = gOptionBlockWidth;\r
+  gPromptBlockWidth = (CHAR16) (gOptionBlockWidth + LEFT_SKIPPED_COLUMNS);\r
+  gOptionBlockWidth = (CHAR16) (gOptionBlockWidth - LEFT_SKIPPED_COLUMNS);\r
 \r
   //\r
   // Initialize the strings for the browser, upon exit of the browser, the strings will be freed\r
@@ -2076,7 +2077,11 @@ LoadFormConfig (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
+    if ((Question->Operand == EFI_IFR_STRING_OP) || (Question->Operand == EFI_IFR_PASSWORD_OP)) {\r
+      HiiSetString (FormSet->HiiHandle, Question->HiiValue.Value.string, (CHAR16*)Question->BufferValue, NULL);\r
+    }\r
+\r
     //\r
     // Check whether EfiVarstore with CallBack can be got.\r
     //\r
@@ -2108,12 +2113,7 @@ LoadFormConfig (
         ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
         HiiValue = &Question->HiiValue;\r
         BufferValue = (UINT8 *) &Question->HiiValue.Value;\r
-        if (HiiValue->Type == EFI_IFR_TYPE_STRING) {\r
-          //\r
-          // Create String in HII database for Configuration Driver to retrieve\r
-          //\r
-          HiiValue->Value.string = NewString ((CHAR16 *) Question->BufferValue, FormSet->HiiHandle);\r
-        } else if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {\r
+        if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {\r
           BufferValue = Question->BufferValue;\r
         }\r
 \r
@@ -2125,14 +2125,6 @@ LoadFormConfig (
                                  (EFI_IFR_TYPE_VALUE *) BufferValue,\r
                                  &ActionRequest\r
                                  );\r
-\r
-        if (HiiValue->Type == EFI_IFR_TYPE_STRING) {\r
-          //\r
-          // Clean the String in HII Database\r
-          //\r
-          DeleteString (HiiValue->Value.string, FormSet->HiiHandle);\r
-        }\r
-\r
         if (!EFI_ERROR (Status)) {\r
           switch (ActionRequest) {\r
           case EFI_BROWSER_ACTION_REQUEST_RESET:\r