From 5ddf73edf0822f22aa091325b89d286161ad3340 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sat, 3 Apr 2021 16:05:30 -0700 Subject: Add command-line parameter to quieten HardInfo when in non-GUI mode --- shell/shell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shell/shell.c') diff --git a/shell/shell.c b/shell/shell.c index bfa5dc8c..1de2a661 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -245,7 +245,7 @@ void shell_status_pulse(void) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(shell->progress)); while (gtk_events_pending()) gtk_main_iteration(); - } else { + } else if (!params.quiet) { static gint counter = 0; fprintf(stderr, "\033[2K\033[40;37;1m %c\033[0m\r", @@ -260,7 +260,7 @@ void shell_status_set_percentage(gint percentage) (float) percentage / 100.0); while (gtk_events_pending()) gtk_main_iteration(); - } else { + } else if (!params.quiet) { if (percentage < 1 || percentage >= 100) { fprintf(stderr, "\033[2K"); } else { @@ -336,7 +336,7 @@ void shell_status_update(const gchar * message) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(shell->progress)); while (gtk_events_pending()) gtk_main_iteration(); - } else { + } else if (!params.quiet) { fprintf(stderr, "\033[2K\033[40;37;1m %s\033[0m\r", message); } } -- cgit v1.2.3