diff options
author | Joursoir <chat@joursoir.net> | 2021-11-29 16:22:43 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-11-29 16:22:43 +0300 |
commit | 07a9d2830240a63a23ab7f7f29ac405e34eb9756 (patch) | |
tree | 9d6633c8469a6dc0adaa72d806d7a54fa88d3680 /Library/UefiShellUfmCommandLib/panel.c | |
parent | e18f5bd2646f1a8158740d8d7d87bd2b34562cca (diff) | |
download | ufm-07a9d2830240a63a23ab7f7f29ac405e34eb9756.tar.gz ufm-07a9d2830240a63a23ab7f7f29ac405e34eb9756.tar.bz2 ufm-07a9d2830240a63a23ab7f7f29ac405e34eb9756.zip |
panel: make update_file_info()
Diffstat (limited to 'Library/UefiShellUfmCommandLib/panel.c')
-rw-r--r-- | Library/UefiShellUfmCommandLib/panel.c | 16 |
1 files changed, 16 insertions, 0 deletions
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); |