[gimp] plug-ins: change the icon when playing in animation-play.
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: change the icon when playing in animation-play.
- Date: Fri, 2 Nov 2012 22:54:56 +0000 (UTC)
commit 7978506eb4478344cab29a7ca59fe29f12e09fa0
Author: Jehan <jehan girinstud io>
Date: Thu Sep 27 15:46:51 2012 +0900
plug-ins: change the icon when playing in animation-play.
Change the STOCK id from GTK_STOCK_MEDIA_PLAY to GTK_STOCK_MEDIA_PAUSE
when playing, and revert when pausing.
plug-ins/common/animation-play.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/common/animation-play.c b/plug-ins/common/animation-play.c
index a9ebb5d..721ad02 100644
--- a/plug-ins/common/animation-play.c
+++ b/plug-ins/common/animation-play.c
@@ -1220,9 +1220,17 @@ play_callback (GtkToggleAction *action)
playing = gtk_toggle_action_get_active (action);
if (playing)
- timer = g_timeout_add (get_frame_duration (frame_number) *
- get_duration_factor (duration_index),
- advance_frame_callback, NULL);
+ {
+ timer = g_timeout_add (get_frame_duration (frame_number) *
+ get_duration_factor (duration_index),
+ advance_frame_callback, NULL);
+
+ gtk_action_set_stock_id (GTK_ACTION (action), GTK_STOCK_MEDIA_PAUSE);
+ }
+ else
+ {
+ gtk_action_set_stock_id (GTK_ACTION (action), GTK_STOCK_MEDIA_PLAY);
+ }
g_object_set (action,
"tooltip", playing ? _("Stop playback") : _("Start playback"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]