diff options
Diffstat (limited to 'hardinfo')
-rw-r--r-- | hardinfo/hardinfo.c | 18 | ||||
-rw-r--r-- | hardinfo/util.c | 4 |
2 files changed, 13 insertions, 9 deletions
diff --git a/hardinfo/hardinfo.c b/hardinfo/hardinfo.c index e1783315..d1d228b3 100644 --- a/hardinfo/hardinfo.c +++ b/hardinfo/hardinfo.c @@ -92,13 +92,17 @@ int main(int argc, char **argv) } if (!params.create_report && !params.run_benchmark) { - /* we only try to open the UI if the user didn't ask for a report. */ - params.gui_running = ui_init(&argc, &argv); - - /* as a fallback, if GTK+ initialization failed, run in report - generation mode. */ - if (!params.gui_running) - params.create_report = TRUE; + /* we only try to open the UI if the user didn't ask for a report. */ + params.gui_running = ui_init(&argc, &argv); + + /* as a fallback, if GTK+ initialization failed, run in report + generation mode. */ + if (!params.gui_running) { + params.create_report = TRUE; + /* ... it is possible to -f html without -r */ + if (params.report_format != REPORT_FORMAT_HTML) + params.markup_ok = FALSE; + } } if (params.use_modules) { diff --git a/hardinfo/util.c b/hardinfo/util.c index c58e2e1a..4acb28be 100644 --- a/hardinfo/util.c +++ b/hardinfo/util.c @@ -508,9 +508,9 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) * report html: yes * report text: no * anything else? */ - param->html_ok = TRUE; + param->markup_ok = TRUE; if (param->create_report && param->report_format != REPORT_FORMAT_HTML) - param->html_ok = FALSE; + param->markup_ok = FALSE; gchar *confdir = g_build_filename(g_get_user_config_dir(), "hardinfo", NULL); if (!g_file_test(confdir, G_FILE_TEST_EXISTS)) { |