summaryrefslogtreecommitdiff
path: root/clients/bokftui.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/bokftui.c')
-rw-r--r--clients/bokftui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clients/bokftui.c b/clients/bokftui.c
index 69d6690..867e63e 100644
--- a/clients/bokftui.c
+++ b/clients/bokftui.c
@@ -20,6 +20,7 @@
#include "version.h"
#include "yyjson.h"
#include "ui.h"
+#include "vlist.h"
/* Screen names for ^R restoration and --screen. Only the top-level
views; sub-screens unwind to their parent. */
@@ -149,6 +150,8 @@ static void config_load(struct app *a)
else if (strcmp(line, "attachment_dir") == 0 &&
!a->attachment_dir[0])
snprintf(a->attachment_dir, sizeof a->attachment_dir, "%s", val);
+ else if (strcmp(line, "voucher_sort") == 0)
+ a->voucher_sort = vlist_sort_parse(val);
}
fclose(f);
}
@@ -166,6 +169,8 @@ void config_save(struct app *a)
fprintf(f, "user=%s\n", a->username);
if (a->attachment_dir[0])
fprintf(f, "attachment_dir=%s\n", a->attachment_dir);
+ if (a->voucher_sort != VSORT_NUMBER)
+ fprintf(f, "voucher_sort=%s\n", vlist_sort_name(a->voucher_sort));
fclose(f);
chmod(path, 0600);
}