From 1a6086f6e16db1536e04050a0ac2637cc0f7d8b8 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 6 Jul 2019 23:20:30 -0500 Subject: Add SVG icon support in report HTML and Xubuntu icon to demonstrate Signed-off-by: Burt P --- shell/report.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/report.c b/shell/report.c index 429d0746..89fcc4a3 100644 --- a/shell/report.c +++ b/shell/report.c @@ -107,7 +107,9 @@ gchar *make_icon_css(const gchar *file) { gsize length = 0; if ( g_file_get_contents(path, &contents, &length, NULL) ) { gchar *css_class = icon_name_css_id(file); - const char ctype[] = "image/png"; + const char *ctype = "image/png"; + if (g_str_has_suffix(file, ".svg") ) + ctype = "image/svg+xml"; gchar *b64data = g_base64_encode(contents, length); ret = g_strdup_printf( ".%s\n" -- cgit v1.2.3