From 703cd4ff5b504fd97b8f5b0173bcf8f52b08a70a Mon Sep 17 00:00:00 2001 From: Burt P Date: Tue, 13 Aug 2019 20:55:47 -0500 Subject: report: show icons for module entry in HTML report Signed-off-by: Burt P --- shell/report.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'shell') diff --git a/shell/report.c b/shell/report.c index 8649d2a9..549264de 100644 --- a/shell/report.c +++ b/shell/report.c @@ -414,7 +414,7 @@ static void report_html_header(ReportContext * ctx) "\n" "\n" "\n", VERSION); } @@ -462,11 +464,22 @@ static void report_html_subtitle(ReportContext * ctx, gchar * text) ctx->first_table = FALSE; } - ctx->output = h_strdup_cprintf("
entry->icon_file) { + gchar *icon_class = icon_name_css_id(ctx->entry->icon_file); + icon = g_strdup_printf("
", icon_class); + g_free(icon_class); + } else { + icon = g_strdup(""); + } + + ctx->output = h_strdup_cprintf("\n", ctx->output, - columns+1, + icon, + columns, text); + g_free(icon); } static void report_html_subsubtitle(ReportContext * ctx, gchar * text) @@ -676,6 +689,9 @@ report_create_inner_from_module_list(ReportContext * ctx, GSList * modules) fprintf(stderr, "\033[2K\033[40;32;1m %s\033[0m\n", entry->name); + if (entry->icon_file) + cache_icon(ctx, entry->icon_file); + ctx->entry = entry; report_subtitle(ctx, entry->name); module_entry_scan(entry); -- cgit v1.2.3
%s%s