Skip to content
Permalink
Browse files

fr-window: change the info label if process is paused/resumed

  • Loading branch information...
sc0w authored and raveit65 committed Dec 6, 2018
1 parent 86bb066 commit 10fd1e2c1914c9de90721cd3ccf86d9a05765f38
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/fr-window.c
@@ -2292,35 +2292,40 @@ 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",
GTK_ICON_SIZE_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);
}
}
}

0 comments on commit 10fd1e2

Please sign in to comment.
You can’t perform that action at this time.