From 07a9d2830240a63a23ab7f7f29ac405e34eb9756 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 29 Nov 2021 16:22:43 +0300 Subject: panel: make update_file_info() --- Library/UefiShellUfmCommandLib/panel.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Library/UefiShellUfmCommandLib/panel.c b/Library/UefiShellUfmCommandLib/panel.c index ee80e81..521bdaf 100644 --- a/Library/UefiShellUfmCommandLib/panel.c +++ b/Library/UefiShellUfmCommandLib/panel.c @@ -61,6 +61,22 @@ STATIC VOID set_cwd(struct panel_ctx *p, CONST CHAR16 *path) wrefresh(p->wcwd); } +STATIC VOID update_file_info(struct panel_ctx *p) +{ + EFI_SHELL_FILE_INFO *file; + CONST CHAR16 *name; + + if(!p->cwd) + name = p->fsa->full_name[p->curline - 1]; + else { + file = dirl_getn(p->dirs, p->curline); + name = file->FileName; + } + + mvwprintf(p->wfname, 0, 0, L"%-*s", p->wfname->width, name); + wrefresh(p->wfname); +} + STATIC VOID update_marked_info(struct panel_ctx *p) { mvwhline(p->wmarked, 0, 0, BOXDRAW_HORIZONTAL, p->wmarked->width); -- cgit v1.2.3-18-g5258