From 9d825229c63d8618802749e294126ff6e118042a Mon Sep 17 00:00:00 2001 From: Burt P Date: Sun, 18 Aug 2019 17:14:25 -0500 Subject: various: entry hide flag, fix text format report, fix key_*() funcs * fix key_is_highlighted() and key_wants_details() so that they don't look for flags in the label. * fix -r -f text, g_hash-related warnings from icon cache * add MODULE_FLAG_HIDE flag to hide module entries instead of using the '#' at the beginning of string hack, which didn't work everywhere, and screwed up translated strings. * hide GPU Drawing benchmark See: https://github.com/lpereira/hardinfo/issues/329 Signed-off-by: Burt P --- shell/report.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell/report.c') diff --git a/shell/report.c b/shell/report.c index 549264de..3fcca668 100644 --- a/shell/report.c +++ b/shell/report.c @@ -126,6 +126,7 @@ gchar *make_icon_css(const gchar *file) { } void cache_icon(ReportContext *ctx, const gchar *file) { + if (!ctx->icon_data) return; if (!g_hash_table_lookup(ctx->icon_data, file) ) g_hash_table_insert(ctx->icon_data, g_strdup(file), make_icon_css(file)); } @@ -684,6 +685,7 @@ report_create_inner_from_module_list(ReportContext * ctx, GSList * modules) for (entries = module->entries; entries; entries = entries->next) { ShellModuleEntry *entry = (ShellModuleEntry *) entries->data; + if (entry->flags & MODULE_FLAG_HIDE) continue; if (!params.gui_running) fprintf(stderr, "\033[2K\033[40;32;1m %s\033[0m\n", -- cgit v1.2.3