[libchamplain/wrap: 13/14] Don't use zoom-level signal to update clones
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain/wrap: 13/14] Don't use zoom-level signal to update clones
- Date: Sun, 13 Apr 2014 16:04:20 +0000 (UTC)
commit fdc769637337b3df9565cf7f78be76fd6efb2cff
Author: Jiří Techet <techet gmail com>
Date: Sun Apr 13 16:21:19 2014 +0200
Don't use zoom-level signal to update clones
The zoom-level signal is emitted immediately when zoom happens which causes
that clones are displayed immediately even when the zoom animation is
still running. This doesn't look nice. Instead, call update_clones()
manually at appropriate places depending on whether zoom animation is
on or off.
champlain/champlain-view.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 2c3514f..cfe5e4f 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2665,15 +2665,9 @@ champlain_view_set_horizontal_wrap (ChamplainView *view,
priv->hwrap = wrap;
if (priv->hwrap)
- {
- g_signal_connect (view, "notify::zoom-level",
- G_CALLBACK (update_clones), NULL);
- update_clones (view);
- }
+ update_clones (view);
else
{
- g_signal_handlers_disconnect_by_func (view,
- G_CALLBACK (update_clones), NULL);
g_list_free_full (priv->clones, (GDestroyNotify) clutter_actor_destroy);
priv->clones = NULL;
}
@@ -2752,6 +2746,8 @@ zoom_animation_completed (ClutterActor *actor,
priv->animating_zoom = FALSE;
position_zoom_actor (view);
clutter_actor_show (priv->user_layers);
+ if (priv->hwrap)
+ update_clones (view);
g_signal_handlers_disconnect_by_func (actor, zoom_animation_completed, view);
}
@@ -2876,7 +2872,11 @@ show_zoom_actor (ChamplainView *view,
priv->animating_zoom = TRUE;
}
else
- clutter_actor_set_scale (zoom_actor, deltazoom, deltazoom);
+ {
+ clutter_actor_set_scale (zoom_actor, deltazoom, deltazoom);
+ if (priv->hwrap)
+ update_clones (view);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]