mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 08:04:07 +02:00
Move the check refresh attribute logical out of the option string check logical.
Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11871 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8f766f6eec
commit
090f3fdbf9
@ -1910,34 +1910,6 @@ UiDisplayMenu (
|
||||
Temp = 0;
|
||||
Row = OriginalRow;
|
||||
|
||||
Status = ProcessOptions (Selection, MenuOption, FALSE, &OptionString);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Repaint to clear possible error prompt pop-up
|
||||
//
|
||||
Repaint = TRUE;
|
||||
NewLine = TRUE;
|
||||
ControlFlag = CfRepaint;
|
||||
break;
|
||||
}
|
||||
|
||||
if (OptionString != NULL) {
|
||||
if (Statement->Operand == EFI_IFR_DATE_OP || Statement->Operand == EFI_IFR_TIME_OP) {
|
||||
//
|
||||
// If leading spaces on OptionString - remove the spaces
|
||||
//
|
||||
for (Index = 0; OptionString[Index] == L' '; Index++) {
|
||||
MenuOption->OptCol++;
|
||||
}
|
||||
|
||||
for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {
|
||||
OptionString[Count] = OptionString[Index];
|
||||
Count++;
|
||||
}
|
||||
|
||||
OptionString[Count] = CHAR_NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// If Question has refresh guid, register the op-code.
|
||||
//
|
||||
@ -1951,6 +1923,7 @@ UiDisplayMenu (
|
||||
MenuUpdateEntry = MenuUpdateEntry->Next;
|
||||
}
|
||||
MenuUpdateEntry->Next = AllocateZeroPool (sizeof (MENU_REFRESH_ENTRY));
|
||||
MenuUpdateEntry = MenuUpdateEntry->Next;
|
||||
}
|
||||
ASSERT (MenuUpdateEntry != NULL);
|
||||
Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_NOTIFY, RefreshQuestionNotify, MenuUpdateEntry, &Statement->RefreshGuid, &MenuUpdateEntry->Event);
|
||||
@ -1980,6 +1953,15 @@ UiDisplayMenu (
|
||||
|
||||
if (gMenuRefreshHead == NULL) {
|
||||
MenuRefreshEntry = AllocateZeroPool (sizeof (MENU_REFRESH_ENTRY));
|
||||
gMenuRefreshHead = MenuRefreshEntry;
|
||||
} else {
|
||||
MenuRefreshEntry = gMenuRefreshHead;
|
||||
while (MenuRefreshEntry->Next != NULL) {
|
||||
MenuRefreshEntry = MenuRefreshEntry->Next;
|
||||
}
|
||||
MenuRefreshEntry->Next = AllocateZeroPool (sizeof (MENU_REFRESH_ENTRY));
|
||||
MenuRefreshEntry = MenuRefreshEntry->Next;
|
||||
}
|
||||
ASSERT (MenuRefreshEntry != NULL);
|
||||
MenuRefreshEntry->MenuOption = MenuOption;
|
||||
MenuRefreshEntry->Selection = Selection;
|
||||
@ -1990,29 +1972,34 @@ UiDisplayMenu (
|
||||
} else {
|
||||
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
|
||||
}
|
||||
gMenuRefreshHead = MenuRefreshEntry;
|
||||
} else {
|
||||
//
|
||||
// Advance to the last entry
|
||||
//
|
||||
for (MenuRefreshEntry = gMenuRefreshHead;
|
||||
MenuRefreshEntry->Next != NULL;
|
||||
MenuRefreshEntry = MenuRefreshEntry->Next
|
||||
)
|
||||
;
|
||||
MenuRefreshEntry->Next = AllocateZeroPool (sizeof (MENU_REFRESH_ENTRY));
|
||||
ASSERT (MenuRefreshEntry->Next != NULL);
|
||||
MenuRefreshEntry = MenuRefreshEntry->Next;
|
||||
MenuRefreshEntry->MenuOption = MenuOption;
|
||||
MenuRefreshEntry->Selection = Selection;
|
||||
MenuRefreshEntry->CurrentColumn = MenuOption->OptCol;
|
||||
MenuRefreshEntry->CurrentRow = MenuOption->Row;
|
||||
if (MenuOption->GrayOut) {
|
||||
MenuRefreshEntry->CurrentAttribute = FIELD_TEXT_GRAYED | FIELD_BACKGROUND;
|
||||
} else {
|
||||
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
|
||||
}
|
||||
|
||||
Status = ProcessOptions (Selection, MenuOption, FALSE, &OptionString);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Repaint to clear possible error prompt pop-up
|
||||
//
|
||||
Repaint = TRUE;
|
||||
NewLine = TRUE;
|
||||
ControlFlag = CfRepaint;
|
||||
break;
|
||||
}
|
||||
|
||||
if (OptionString != NULL) {
|
||||
if (Statement->Operand == EFI_IFR_DATE_OP || Statement->Operand == EFI_IFR_TIME_OP) {
|
||||
//
|
||||
// If leading spaces on OptionString - remove the spaces
|
||||
//
|
||||
for (Index = 0; OptionString[Index] == L' '; Index++) {
|
||||
MenuOption->OptCol++;
|
||||
}
|
||||
|
||||
for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {
|
||||
OptionString[Count] = OptionString[Index];
|
||||
Count++;
|
||||
}
|
||||
|
||||
OptionString[Count] = CHAR_NULL;
|
||||
}
|
||||
|
||||
Width = (UINT16) gOptionBlockWidth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user