From 162eb04a748a19a93c5dbaaa977c693c961f6ccf Mon Sep 17 00:00:00 2001 From: bigbear Date: Thu, 8 Feb 2024 02:35:30 +0100 Subject: PR405 - icons for computer/security --- modules/computer.c | 9 ++++++++- pixmaps/circle_green_check.svg | 1 + pixmaps/circle_red_x.svg | 1 + pixmaps/circle_yellow_exclaim.svg | 1 + shell/callbacks.c | 1 + 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 pixmaps/circle_green_check.svg create mode 100644 pixmaps/circle_red_x.svg create mode 100644 pixmaps/circle_yellow_exclaim.svg diff --git a/modules/computer.c b/modules/computer.c index a235efc9..cfa6bb3c 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -668,9 +668,16 @@ gchar *callback_security(void) continue; const gchar *icon = NULL; + if (g_strstr_len(contents, -1, "Not affected") ) + icon = "circle_green_check.svg"; + + if (g_str_has_prefix(contents, "Mitigation:") || + g_str_has_prefix(contents, "mitigation:")) + icon = "circle_yellow_exclaim.svg"; + if (g_strstr_len(contents, -1, "Vulnerable") || g_strstr_len(contents, -1, "vulnerable")) - icon = "dialog-warning.png"; + icon = "circle_red_x.svg"; info_group_add_fields(vulns, info_field(g_strdup(vuln), diff --git a/pixmaps/circle_green_check.svg b/pixmaps/circle_green_check.svg new file mode 100644 index 00000000..88f6b567 --- /dev/null +++ b/pixmaps/circle_green_check.svg @@ -0,0 +1 @@ + diff --git a/pixmaps/circle_red_x.svg b/pixmaps/circle_red_x.svg new file mode 100644 index 00000000..05ae1600 --- /dev/null +++ b/pixmaps/circle_red_x.svg @@ -0,0 +1 @@ + diff --git a/pixmaps/circle_yellow_exclaim.svg b/pixmaps/circle_yellow_exclaim.svg new file mode 100644 index 00000000..40424f4c --- /dev/null +++ b/pixmaps/circle_yellow_exclaim.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/shell/callbacks.c b/shell/callbacks.c index db213bb2..1992696d 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -199,6 +199,7 @@ void cb_about() _("The GNOME Project"), _("VMWare, Inc. (USB icon from VMWare Workstation 6)"), _("epicbard (Fan icon, CC BY-SA 3.0)"), + _("Roundicons"), NULL }; -- cgit v1.2.3