diff options
author | Pablo Barciela <[email protected]> | 2018-12-08 11:31:00 +0100 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-12-08 19:16:36 +0000 |
commit | 57b690699a0033398a7978dfc2607e62aaac8be3 (patch) | |
tree | 3081a0939f5fe49c49d1ab410bf650ea73165219 /src | |
parent | 10ec64a8b0ddee7f5de7f3c1ddaaad9f8095df86 (diff) | |
download | engrampa-57b690699a0033398a7978dfc2607e62aaac8be3.tar.bz2 engrampa-57b690699a0033398a7978dfc2607e62aaac8be3.tar.xz |
fr-window: hide the progress bar if the process is paused
Diffstat (limited to 'src')
-rw-r--r-- | src/fr-window.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fr-window.c b/src/fr-window.c index 775df6f..c0ff272 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -2292,15 +2292,16 @@ fr_window_view_extraction_destination_folder (FrWindow *window) open_folder (GTK_WINDOW (window), fr_archive_get_last_extraction_destination (window->archive)); } -static void change_button_label (FrArchive *archive, - GtkWidget *button) +static void change_button_label (FrWindow *window, + GtkWidget *button) { const gchar *state; state = gtk_button_get_label (GTK_BUTTON (button)); if (g_strrstr ("_Pause", state) != NULL) { - fr_command_message (archive->command, _("Process paused")); + gtk_widget_set_visible (window->priv->pd_progress_bar, FALSE); + fr_command_message (window->archive->command, _("Process paused")); gtk_button_set_label (GTK_BUTTON (button), _("_Resume")); gtk_button_set_image (GTK_BUTTON (button), @@ -2309,7 +2310,8 @@ static void change_button_label (FrArchive *archive, } else { - fr_command_message (archive->command, _("Please wait…")); + gtk_widget_set_visible (window->priv->pd_progress_bar, TRUE); + fr_command_message (window->archive->command, _("Please wait…")); gtk_button_set_label (GTK_BUTTON(button), _("_Pause")); gtk_button_set_image (GTK_BUTTON (button), @@ -2325,7 +2327,7 @@ static void fr_state_switch (FrWindow *window) ret = start_switch_state (window->archive->process); if (ret == 0) { - change_button_label (window->archive ,window->priv->pd_state_button); + change_button_label (window, window->priv->pd_state_button); } } } |