From 776dbdf6f6f12289c874fd9d1eada379f1b02a0b Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Mon, 21 Sep 2026 14:03:36 +0200 Subject: tui: flat menu, System hub, remembered attachment directory --- clients/bokftui.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'clients/bokftui.c') diff --git a/clients/bokftui.c b/clients/bokftui.c index a047ef5..2dc23ba 100644 --- a/clients/bokftui.c +++ b/clients/bokftui.c @@ -45,7 +45,7 @@ static const struct scene SCENES[] = { { "audit", audit_screen }, { "company", company_screen }, { "settings", company_screen }, /* ^R/--screen compatibility */ - { "system", system_settings_screen }, + { "system", system_screen }, { "bokslut", bokslut_screen }, { "yearinfo", bokslut_screen }, /* ^R compatibility */ }; @@ -146,11 +146,14 @@ static void config_load(struct app *a) snprintf(a->socket, sizeof a->socket, "%s", val); else if (strcmp(line, "user") == 0 && !a->username[0]) snprintf(a->username, sizeof a->username, "%s", val); + else if (strcmp(line, "attachment_dir") == 0 && + !a->attachment_dir[0]) + snprintf(a->attachment_dir, sizeof a->attachment_dir, "%s", val); } fclose(f); } -static void config_save(const struct app *a) +void config_save(struct app *a) { char path[512]; config_path(path, sizeof path); @@ -161,6 +164,8 @@ static void config_save(const struct app *a) fprintf(f, "server=%s\n", a->socket); if (a->username[0]) fprintf(f, "user=%s\n", a->username); + if (a->attachment_dir[0]) + fprintf(f, "attachment_dir=%s\n", a->attachment_dir); fclose(f); chmod(path, 0600); } -- cgit v1.3