]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update to NOT to use EFI_BROWSER_ACTION_FORM_OPEN in Callback function thus able...
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Aug 2011 10:53:54 +0000 (10:53 +0000)
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Aug 2011 10:53:54 +0000 (10:53 +0000)
Signed-off-by: tye
Reviewed-by: lgao4
Reviewed-by: xdu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12197 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr
MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c
MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigNvData.h
MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni

index 9f29fe838f3f204454ad96fbce19ee3bec945d9c..b6eb95d9ea73432c55bacf1fc9307333c3bbfc69 100644 (file)
@@ -1,7 +1,7 @@
 ///** @file\r
 //  VLAN configuration formset.\r
 //\r
-//  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+//  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
 //  This program and the accompanying materials\r
 //  are licensed and made available under the terms and conditions\r
 //  of the BSD License which accompanies this distribution.  The full\r
@@ -26,6 +26,17 @@ formset
     name  = VlanNvData,\r
     guid  = VLAN_CONFIG_PRIVATE_GUID;\r
 \r
+  form formid = VLAN_HEAD_FORM_ID,\r
+    title  = STRING_TOKEN(STR_VLAN_FORM_TITLE);\r
+\r
+    goto VLAN_CONFIGURATION_FORM_ID,\r
+    prompt = STRING_TOKEN (STR_GET_CURRENT_SETTING),\r
+    help   = STRING_TOKEN (STR_GET_CURRENT_SETTING_HELP),\r
+    flags  = INTERACTIVE,\r
+    key    = VLAN_UPDATE_QUESTION_ID;\r
+\r
+  endform;\r
+\r
   form formid = VLAN_CONFIGURATION_FORM_ID,\r
     title = STRING_TOKEN(STR_VLAN_FORM_TITLE);\r
 \r
index dfcf7a3d9c2c316834bf64d09cb7a231f2831aac..8abe77f4bb028985c4b93882af0a261824b403b1 100644 (file)
@@ -236,21 +236,7 @@ VlanCallback (
 \r
   PrivateData = VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (This);\r
 \r
-  if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {\r
-    if (QuestionId == VLAN_ADD_QUESTION_ID) {\r
-      //\r
-      // Update current VLAN list into Form when Form is opened.\r
-      // This will be done only in FORM_OPEN CallBack of question with VLAN_ADD_QUESTION_ID.\r
-      //\r
-      VlanUpdateForm (PrivateData);\r
-    }\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {\r
-    //\r
-    // Do nothing for UEFI FORM_CLOSE action\r
-    //\r
+  if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -319,6 +305,13 @@ VlanCallback (
       ZeroMem (Configuration->VlanList, MAX_VLAN_NUMBER);\r
       break;\r
 \r
+    case VLAN_UPDATE_QUESTION_ID:\r
+      //\r
+      // Update current VLAN list into Form.\r
+      //\r
+      VlanUpdateForm (PrivateData);\r
+      break;\r
+\r
     default:\r
       break;\r
     }\r
index 5c566151a9cc356f08f9e14676c67a03e10c67d8..61cd535a00f08b7d5ba800061add471f33f8ad8b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for NV data structure definition.\r
 \r
-Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
 of the BSD License which accompanies this distribution.  The full\r
@@ -26,9 +26,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define VLAN_CONFIGURATION_VARSTORE_ID  0x0001\r
 #define VLAN_CONFIGURATION_FORM_ID      0x0001\r
+#define VLAN_HEAD_FORM_ID               0x0002\r
 \r
 #define VLAN_ADD_QUESTION_ID            0x1000\r
 #define VLAN_REMOVE_QUESTION_ID         0x2000\r
+#define VLAN_UPDATE_QUESTION_ID         0x3000\r
 \r
 #define LABEL_VLAN_LIST                 0x0001\r
 #define LABEL_END                       0xffff\r
index e5a6d1620416214eea4ad7c71427187e672bfce0..bf95abd8b8fab2c4996a3393793e00a0bfcf9b18 100644 (file)
Binary files a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni and b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni differ