diff options
author | Richard Hughes <richard@hughsie.com> | 2015-01-26 19:47:54 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-01-26 19:47:54 +0000 |
commit | eab32072c9a8b20c227d50865be67b12244bdd2b (patch) | |
tree | 22ebcd1060b281c9fcac3eff2bdd2e19d258cda7 | |
parent | e176509a3e6d0ced80cabf1a6378abd115f91afd (diff) | |
download | appstream-glib-eab32072c9a8b20c227d50865be67b12244bdd2b.tar.gz |
trivial: Show the dead applications in matrix a different color
-rw-r--r-- | client/as-util.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/client/as-util.c b/client/as-util.c index 6278643..1b27b3e 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -2118,7 +2118,8 @@ typedef enum { AS_UTIL_PKG_STATE_OK, /* in order of badness */ AS_UTIL_PKG_STATE_INFO, AS_UTIL_PKG_STATE_WARN, - AS_UTIL_PKG_STATE_FAIL + AS_UTIL_PKG_STATE_FAIL, + AS_UTIL_PKG_STATE_DEAD } AsUtilPkgState; /** @@ -2149,6 +2150,9 @@ as_util_matrix_html_write_item (AsUtilPkgState *state_app, case AS_UTIL_PKG_STATE_FAIL: g_string_append (html, "Failed"); break; + case AS_UTIL_PKG_STATE_DEAD: + g_string_append (html, "Dead"); + break; default: break; } @@ -2256,9 +2260,15 @@ as_util_matrix_html_write_app (AsApp *app, GString *html, AsUtilDistro distro) } else { _cleanup_free_ gchar *tmp = NULL; tmp = as_util_status_html_join (arr); - as_util_matrix_html_write_item (&state_app, - AS_UTIL_PKG_STATE_FAIL, - str, tmp); + if (g_strstr_len (tmp, -1, "Dead upstream") != NULL) { + as_util_matrix_html_write_item (&state_app, + AS_UTIL_PKG_STATE_DEAD, + str, tmp); + } else { + as_util_matrix_html_write_item (&state_app, + AS_UTIL_PKG_STATE_FAIL, + str, tmp); + } } /* global state */ @@ -2275,6 +2285,9 @@ as_util_matrix_html_write_app (AsApp *app, GString *html, AsUtilDistro distro) case AS_UTIL_PKG_STATE_FAIL: g_string_prepend (str, "<tr bgcolor=\"#ffa1a5\">\n"); break; + case AS_UTIL_PKG_STATE_DEAD: + g_string_prepend (str, "<tr bgcolor=\"#888888\">\n"); + break; default: g_string_prepend (str, "<tr>\n"); break; |