From a5154d610fa7610fa2bd1d03b171c6e85ed55720 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 21 Dec 2018 00:39:43 -0500 Subject: [PATCH] Cleaner progress display With the new solid Unicode progress bar, we no longer need the [] around it. Drop it. Closes: #2453 Approved by: alexlarsson --- app/flatpak-cli-transaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/flatpak-cli-transaction.c b/app/flatpak-cli-transaction.c index 69f12fd0..990edb77 100644 --- a/app/flatpak-cli-transaction.c +++ b/app/flatpak-cli-transaction.c @@ -288,7 +288,7 @@ progress_changed_cb (FlatpakTransactionProgress *progress, spin_op_progress (cli, op); - bar_length = MIN (20, cli->table_width - (strlen (cli->progress_msg) + 4 + 4 + cli->speed_len)); + bar_length = MIN (20, cli->table_width - (strlen (cli->progress_msg) + 6 + cli->speed_len)); n_full = (bar_length * percent) / 100; partial = (((bar_length * percent) % 100) * G_N_ELEMENTS(partial_blocks) ) / 100; @@ -297,7 +297,7 @@ progress_changed_cb (FlatpakTransactionProgress *progress, g_assert (partial < G_N_ELEMENTS(partial_blocks)); g_string_append (str, cli->progress_msg); - g_string_append (str, " ["); + g_string_append (str, " "); for (i = 0; i < n_full; i++) g_string_append (str, full_block); @@ -311,7 +311,7 @@ progress_changed_cb (FlatpakTransactionProgress *progress, for (; i < bar_length; i++) g_string_append (str, " "); - g_string_append (str, "] "); + g_string_append (str, " "); g_string_append_printf (str, "%3d%%", percent); if (speed)