comparison scid/theme.c @ 40:752bb1cd2dd8

themes: improve status page
author David Demelier <markand@malikania.fr>
date Sun, 07 Aug 2022 08:43:32 +0200
parents 1d0ddf9e6efd
children 00b9af607524
comparison
equal deleted inserted replaced
39:27f039a790f4 40:752bb1cd2dd8
358 358
359 return call(json, "onPageIndex"); 359 return call(json, "onPageIndex");
360 } 360 }
361 361
362 char * 362 char *
363 theme_page_status(enum khttp status) 363 theme_page_status(int status, const char *message)
364 { 364 {
365 json_t *doc; 365 json_t *doc;
366 char *ret; 366 char *ret;
367 367
368 doc = util_json_pack("{si}", "status", status); 368 doc = util_json_pack("{si ss}", "status", status, "message", message);
369 ret = call(doc, "onPageStatus"); 369 ret = call(doc, "onPageStatus");
370 370
371 json_decref(doc); 371 json_decref(doc);
372 372
373 return ret; 373 return ret;