From e603acae4b6cf020307b149f9874bf41d1da5337 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 27 Jan 2023 13:40:12 +0200 Subject: [PATCH] status bar --- src/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 0334910..c360dd7 100644 --- a/src/main.c +++ b/src/main.c @@ -73,11 +73,15 @@ int main(int argc, char **argv) tg_bgchar(' '); tg_clear(); - uilist[0] = tui_list("Remote", 0, 0, 40, 23, 0, 0); - uilist[1] = tui_list("Local", 40, 0, 40, 23, 0, 0); + uilist[0] = tui_list("Remote", 0, 1, 40, 21, 0, 0); + uilist[1] = tui_list("Local", 40, 1, 40, 21, 0, 0); focus = 0; tui_focus(uilist[focus], 1); + tg_fgcolor(TGFX_RED); + tg_bgcolor(TGFX_BLACK); + tg_rect("No conn.", 0, 0, 80, 1, 0); + tg_setcursor(0, 23); tui_draw(uilist[0]); @@ -141,6 +145,12 @@ void updateui(void) char buf[128]; const char *remdir; + if(ftp->status != FTP_DISC) { + tg_fgcolor(TGFX_GREEN); + tg_bgcolor(TGFX_BLACK); + tg_text(0, 0, "Conn: %s", host); + } + remdir = ftp_curdir(ftp); if(remdir && strcmp(tui_get_title(uilist[0]), remdir) != 0) { tui_set_title(uilist[0], remdir); -- 1.7.10.4