diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-21 14:03:36 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-21 14:03:44 +0200 |
| commit | 776dbdf6f6f12289c874fd9d1eada379f1b02a0b (patch) | |
| tree | 8bdf34d311c5a2f02956b1bb94dc2b502eb738fa /clients/bokftui.c | |
| parent | b0189d7d6b58a4761daebe761afeaf4a68a9296c (diff) | |
| download | bokf-0.1.57.tar.gz bokf-0.1.57.zip | |
tui: flat menu, System hub, remembered attachment directoryv0.1.57
Diffstat (limited to 'clients/bokftui.c')
| -rw-r--r-- | clients/bokftui.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); } |
