aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/resources.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2018-10-24 00:41:16 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2018-11-04 15:02:27 -0800
commitf6299d9fad21c065d1e4c0f1093770835fb73adf (patch)
treeb0cd1293efe336e40c0dc804fc1aa15285368b4d /modules/devices/resources.c
parent81026a56d57b3e8ee00f2f43003a90cde30664f3 (diff)
params: html_ok -> markup_ok
The html_ok param added in 970174b0897d40b804808632784ffa1544d9da93 is misleading. It turns out that it is not HTML, but Pango Markup that is used by GTK, and a subset of that happens to also work as HTML4 for the HTML report generation. This change renames html_ok to markup_ok in ProgramParameters and adds a comment explaining what common set of tags may be used. Also, if report generation happens as a fallback after GUI initialization failed, then also disable markup, unless report will be generated as HTML. Pango markup info at: https://developer.gnome.org/pango/stable/PangoMarkupFormat.html Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/resources.c')
-rw-r--r--modules/devices/resources.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/devices/resources.c b/modules/devices/resources.c
index 70de2b0d..0e8d728f 100644
--- a/modules/devices/resources.c
+++ b/modules/devices/resources.c
@@ -43,7 +43,7 @@ static gchar *_resource_obtain_name(gchar *name)
if (g_regex_match(_regex_pci, name, 0, NULL)) {
temp = module_call_method_param("devices::getPCIDeviceDescription", name);
if (temp) {
- if (params.html_ok)
+ if (params.markup_ok)
return g_strdup_printf("<b><small>PCI</small></b> %s", (gchar *)idle_free(temp));
else
return g_strdup_printf("PCI %s", (gchar *)idle_free(temp));
@@ -51,7 +51,7 @@ static gchar *_resource_obtain_name(gchar *name)
} else if (g_regex_match(_regex_module, name, 0, NULL)) {
temp = module_call_method_param("computer::getKernelModuleDescription", name);
if (temp) {
- if (params.html_ok)
+ if (params.markup_ok)
return g_strdup_printf("<b><small>Module</small></b> %s", (gchar *)idle_free(temp));
else
return g_strdup_printf("Module %s", (gchar *)idle_free(temp));
@@ -98,7 +98,7 @@ void scan_device_resources(gboolean reload)
if (strstr(temp[0], "0000-0000"))
zero_to_zero_addr++;
- if (params.html_ok)
+ if (params.markup_ok)
_resources = h_strdup_cprintf("<tt>%s</tt>=%s\n", _resources,
temp[0], name);
else