diff options
author | Pablo Barciela <[email protected]> | 2018-12-06 11:02:50 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-12-08 10:01:23 +0100 |
commit | 10fd1e2c1914c9de90721cd3ccf86d9a05765f38 (patch) | |
tree | b8cb13fcd34a759dc8edc12b151c831c0baf5693 | |
parent | 86bb06650634d7e1e067ee0dfe036c59f865f6c9 (diff) | |
download | engrampa-10fd1e2c1914c9de90721cd3ccf86d9a05765f38.tar.bz2 engrampa-10fd1e2c1914c9de90721cd3ccf86d9a05765f38.tar.xz |
fr-window: change the info label if process is paused/resumed
-rw-r--r-- | src/fr-window.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/fr-window.c b/src/fr-window.c index 90c4af0..775df6f 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -2292,13 +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 (GtkWidget *button) +static void change_button_label (FrArchive *archive, + 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_button_set_label (GTK_BUTTON (button), _("_Resume")); gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("media-playback-start", @@ -2306,21 +2309,23 @@ static void change_button_label (GtkWidget *button) } else { + fr_command_message (archive->command, _("Please wait…")); + gtk_button_set_label (GTK_BUTTON(button), _("_Pause")); gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("media-playback-pause", GTK_ICON_SIZE_BUTTON)); } } -static void fr_state_switch(FrWindow *window) +static void fr_state_switch (FrWindow *window) { int ret; if (window->archive->process != NULL) { ret = start_switch_state (window->archive->process); - if(ret == 0) + if (ret == 0) { - change_button_label(window->priv->pd_state_button); + change_button_label (window->archive ,window->priv->pd_state_button); } } } |