commit f432f8425f0a4f41660c62ff50b7fcb6df228bde
parent 44b8b83cc652f2308eda4e99651171d3ececa634
Author: Claudio Alessi <smoppy@gmail.com>
Date: Sun, 28 Feb 2016 13:37:49 +0100
Rudimental records list w/ all fields.
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/core.c b/core.c
@@ -331,7 +331,14 @@ records(void) {
stfl_modify(selview->form, L"records", L"replace_inner", L"vbox"); /* clear */
for(item = selview->items; item; item = item->next) {
- snprintf(txt, sizeof txt, "listitem text:\"%s\"", item->fields[0]);
+ strncpy(txt, "listitem text:\"", sizeof txt);
+ for(int i = 0; i < item->nfields; ++i) {
+ if(i)
+ strncat(txt, " | ", sizeof txt);
+ strncat(txt, item->fields[i], sizeof txt);
+ }
+ strncat(txt, "\"", sizeof txt);
+ //snprintf(txt, sizeof txt, "listitem text:\"%s\"", item->fields[0]);
stfl_modify(selview->form, L"records", L"append", stfl_ipool_towc(ipool, txt));
}
stfl_set(selview->form, L"pos", 0);