diff options
author | Eric Dong <eric.dong@intel.com> | 2014-01-07 08:07:47 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-07 08:07:47 +0000 |
commit | f0c5095b274b2b35867d5245119aa1aba0acc87e (patch) | |
tree | d83fcf8d8f2f6c320f1a09c81933c05de58109ec /MdeModulePkg | |
parent | eff077992ab3fa9d4a71d11c2f3cf507d2c88e2a (diff) | |
download | edk2-f0c5095b274b2b35867d5245119aa1aba0acc87e.zip edk2-f0c5095b274b2b35867d5245119aa1aba0acc87e.tar.gz edk2-f0c5095b274b2b35867d5245119aa1aba0acc87e.tar.bz2 |
This patch fix date/time op-code shows abnormal.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15055 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 7130dff..5dfc482 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -1,7 +1,7 @@ /** @file
Entry and initialization module for the browser.
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1720,6 +1720,7 @@ HasOptionString ( @param SkipLine The skip line for this menu.
@param BottomRow The bottom row for this form.
@param Highlight Whether this menu will be highlight.
+ @param UpdateCol Whether need to update the column info for Date/Time.
@retval EFI_SUCESSS Process the user selection success.
@@ -1731,7 +1732,8 @@ DisplayOneMenu ( IN UINTN BeginCol,
IN UINTN SkipLine,
IN UINTN BottomRow,
- IN BOOLEAN Highlight
+ IN BOOLEAN Highlight,
+ IN BOOLEAN UpdateCol
)
{
FORM_DISPLAY_ENGINE_STATEMENT *Statement;
@@ -1780,7 +1782,7 @@ DisplayOneMenu ( //
// Adjust option string for date/time opcode.
//
- ProcessStringForDateTime(MenuOption, OptionString, TRUE);
+ ProcessStringForDateTime(MenuOption, OptionString, UpdateCol);
}
Width = (UINT16) gOptionBlockWidth - 1;
@@ -1805,8 +1807,9 @@ DisplayOneMenu ( } else {
//
// For date/ time, print the first and second past (year for date and second for time)
- //
- DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, StrLen (OutputString), Highlight);
+ // The OutputString has a NARROW_CHAR or WIDE_CHAR at the begin of the string,
+ // so need to - 1 to remove it, otherwise, it will clean 1 extr char follow it.
+ DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, StrLen (OutputString) - 1, Highlight);
}
} else {
DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, Width + 1, Highlight);
@@ -2167,7 +2170,8 @@ UiDisplayMenu ( gStatementDimensions.LeftColumn + gModalSkipColumn,
Link == TopOfScreen ? SkipValue : 0,
BottomRow,
- (BOOLEAN) ((Link == NewPos) && IsSelectable(MenuOption))
+ (BOOLEAN) ((Link == NewPos) && IsSelectable(MenuOption)),
+ TRUE
);
} else {
Status = DisplayOneMenu (MenuOption,
@@ -2175,8 +2179,9 @@ UiDisplayMenu ( gStatementDimensions.LeftColumn,
Link == TopOfScreen ? SkipValue : 0,
BottomRow,
- (BOOLEAN) ((Link == NewPos) && IsSelectable(MenuOption))
- );
+ (BOOLEAN) ((Link == NewPos) && IsSelectable(MenuOption)),
+ TRUE
+ );
}
if (EFI_ERROR (Status)) {
@@ -2279,6 +2284,7 @@ UiDisplayMenu ( gStatementDimensions.LeftColumn,
Temp,
BottomRow,
+ FALSE,
FALSE
);
}
@@ -2300,7 +2306,8 @@ UiDisplayMenu ( gStatementDimensions.LeftColumn,
Temp2,
BottomRow,
- TRUE
+ TRUE,
+ FALSE
);
}
break;
@@ -2782,16 +2789,16 @@ UiDisplayMenu ( NewLine = TRUE;
SavedListEntry = NewPos;
-
ASSERT(NewPos != NULL);
+
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ ASSERT (MenuOption != NULL);
+
//
// Adjust Date/Time position before we advance forward.
//
AdjustDateAndTimePosition (TRUE, &NewPos);
- MenuOption = MENU_OPTION_FROM_LINK (NewPos);
- ASSERT (MenuOption != NULL);
-
NewPos = NewPos->BackLink;
//
// Find next selectable menu or the first menu beyond current form.
|