[gimp/wip/animation: 277/373] plug-ins: get rid of unblock_ui().
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/animation: 277/373] plug-ins: get rid of unblock_ui().
- Date: Sat, 7 Oct 2017 02:18:00 +0000 (UTC)
commit 50c903cdceb38ae75e66445b05a77b1c2a4c3ee0
Author: Jehan <jehan girinstud io>
Date: Tue Nov 15 23:25:56 2016 +0100
plug-ins: get rid of unblock_ui().
It doesn't even do anymore what the name says and calls only a single
function on the data parameter.
Let's directly call this function with g_signal_connect_swapped().
plug-ins/animation-play/widgets/animation-dialog.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/plug-ins/animation-play/widgets/animation-dialog.c
b/plug-ins/animation-play/widgets/animation-dialog.c
index 1279b5f..5c97786 100755
--- a/plug-ins/animation-play/widgets/animation-dialog.c
+++ b/plug-ins/animation-play/widgets/animation-dialog.c
@@ -209,8 +209,6 @@ static gboolean popup_menu (GtkWidget *widget,
static void show_loading_progress (Animation *animation,
gdouble load_rate,
AnimationDialog *dialog);
-static void unblock_ui (Animation *animation,
- AnimationDialog *dialog);
static void playback_range_changed (AnimationPlayback *playback,
gint playback_start,
gint playback_stop,
@@ -1181,7 +1179,7 @@ animation_dialog_set_animation (AnimationDialog *dialog,
(GCallback) show_loading_progress,
dialog);
g_signal_handlers_disconnect_by_func (priv->animation,
- (GCallback) unblock_ui,
+ (GCallback) update_progress,
dialog);
g_signal_handlers_disconnect_by_func (priv->animation,
G_CALLBACK (render_callback),
@@ -1370,9 +1368,9 @@ animation_dialog_set_animation (AnimationDialog *dialog,
g_signal_connect (priv->animation, "loading",
(GCallback) show_loading_progress,
dialog);
- g_signal_connect (priv->animation, "loaded",
- (GCallback) unblock_ui,
- dialog);
+ g_signal_connect_swapped (priv->animation, "loaded",
+ (GCallback) update_progress,
+ dialog);
g_signal_connect (priv->playback, "render",
G_CALLBACK (render_callback),
dialog);
@@ -1982,13 +1980,6 @@ show_loading_progress (Animation *animation,
}
static void
-unblock_ui (Animation *animation,
- AnimationDialog *dialog)
-{
- update_progress (dialog);
-}
-
-static void
playback_range_changed (AnimationPlayback *playback,
gint playback_start,
gint playback_stop,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]