[libchamplain] Add clutter_actor_queue_relayout/redraw where necessary
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Add clutter_actor_queue_relayout/redraw where necessary
- Date: Thu, 17 Feb 2011 01:04:52 +0000 (UTC)
commit a5aec5fe165d4dc8da055c60f2c56cc1a602d34b
Author: JiÅ?Ã Techet <techet gmail com>
Date: Thu Feb 17 02:03:37 2011 +0100
Add clutter_actor_queue_relayout/redraw where necessary
Some calls are still missing
champlain/champlain-custom-marker.c | 5 +++++
champlain/champlain-group.c | 2 +-
champlain/champlain-marker-layer.c | 6 ++++++
champlain/champlain-path-layer.c | 2 ++
champlain/champlain-point.c | 4 +++-
champlain/champlain-tile.c | 1 +
champlain/champlain-view.c | 2 ++
7 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-custom-marker.c b/champlain/champlain-custom-marker.c
index 77b2919..dbfa593 100644
--- a/champlain/champlain-custom-marker.c
+++ b/champlain/champlain-custom-marker.c
@@ -77,6 +77,7 @@ add_actor (ClutterContainer *container,
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_add_actor (priv->content_group, actor);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (container));
}
static void
@@ -86,6 +87,7 @@ remove_actor (ClutterContainer *container,
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_remove_actor (priv->content_group, actor);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (container));
}
static void
@@ -106,6 +108,7 @@ raise_actor (ClutterContainer *container,
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_raise_child (priv->content_group, actor, sibling);
+ clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
}
static void
@@ -116,6 +119,7 @@ lower_actor (ClutterContainer *container,
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_lower_child (priv->content_group, actor, sibling);
+ clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
}
static void
@@ -124,6 +128,7 @@ sort_depth_order (ClutterContainer *container)
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_sort_depth_order (priv->content_group);
+ clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
}
static void
diff --git a/champlain/champlain-group.c b/champlain/champlain-group.c
index d7ae605..8704503 100644
--- a/champlain/champlain-group.c
+++ b/champlain/champlain-group.c
@@ -238,7 +238,7 @@ champlain_group_real_sort_depth_order (ClutterContainer *container)
// priv->children = g_list_sort (priv->children, sort_by_depth);
- clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
+// clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
}
static void
diff --git a/champlain/champlain-marker-layer.c b/champlain/champlain-marker-layer.c
index c6fd341..1d8b632 100644
--- a/champlain/champlain-marker-layer.c
+++ b/champlain/champlain-marker-layer.c
@@ -377,6 +377,8 @@ set_marker_position (ChamplainMarkerLayer *layer, ChamplainMarker *marker)
champlain_location_get_latitude (CHAMPLAIN_LOCATION (marker))) + origin_y;
clutter_actor_set_position (CLUTTER_ACTOR (marker), x, y);
+
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (layer));
}
@@ -444,6 +446,7 @@ champlain_marker_layer_add_marker (ChamplainMarkerLayer *layer,
clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), CLUTTER_ACTOR (marker));
set_marker_position (layer, marker);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (layer));
}
@@ -478,6 +481,7 @@ void champlain_marker_layer_remove_all (ChamplainMarkerLayer *layer)
champlain_group_remove_all (CHAMPLAIN_GROUP (priv->content_group));
g_list_free (markers);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (layer));
}
@@ -526,6 +530,7 @@ champlain_marker_layer_remove_marker (ChamplainMarkerLayer *layer,
G_CALLBACK (marker_position_notify), layer);
clutter_container_remove_actor (CLUTTER_CONTAINER (priv->content_group), CLUTTER_ACTOR (marker));
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (layer));
}
@@ -821,6 +826,7 @@ relocate (ChamplainMarkerLayer *layer)
}
g_list_free (markers);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (layer));
}
diff --git a/champlain/champlain-path-layer.c b/champlain/champlain-path-layer.c
index ac70f72..fc92c8f 100644
--- a/champlain/champlain-path-layer.c
+++ b/champlain/champlain-path-layer.c
@@ -689,6 +689,7 @@ redraw_path (ChamplainPathLayer *layer)
if ((guint)width != last_width || (guint)height != last_height)
{
clutter_cairo_texture_set_surface_size (CLUTTER_CAIRO_TEXTURE (priv->path_actor), width, height);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (layer));
}
champlain_view_get_viewport_origin (priv->view, &x, &y);
@@ -739,6 +740,7 @@ redraw_path (ChamplainPathLayer *layer)
cairo_destroy (cr);
priv->redraw_scheduled = FALSE;
+ clutter_actor_queue_redraw (CLUTTER_ACTOR (layer));
return FALSE;
}
diff --git a/champlain/champlain-point.c b/champlain/champlain-point.c
index 15b7e92..a857cfc 100644
--- a/champlain/champlain-point.c
+++ b/champlain/champlain-point.c
@@ -239,6 +239,8 @@ draw_point (ChamplainPoint *point)
cairo_stroke (cr);
cairo_destroy (cr);
+
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (point));
}
@@ -262,11 +264,11 @@ champlain_point_init (ChamplainPoint *point)
priv->size = 12;
priv->content_group = CLUTTER_GROUP (clutter_group_new ());
clutter_actor_set_parent (CLUTTER_ACTOR (priv->content_group), CLUTTER_ACTOR (point));
- clutter_actor_queue_relayout (CLUTTER_ACTOR (point));
draw_point (point);
g_signal_connect (point, "notify::selected", G_CALLBACK (notify_selected), NULL);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (point));
}
diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c
index 1d920b1..46c64e7 100644
--- a/champlain/champlain-tile.c
+++ b/champlain/champlain-tile.c
@@ -904,6 +904,7 @@ champlain_tile_display_content (ChamplainTile *self)
clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), priv->content_actor);
clutter_actor_set_opacity (CLUTTER_ACTOR (self), 0);
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
if (priv->fade_in)
{
animation = clutter_actor_animate (CLUTTER_ACTOR (self),
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index ad1a003..b3da3e2 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1682,6 +1682,7 @@ champlain_view_add_layer (ChamplainView *view,
CLUTTER_ACTOR (layer));
champlain_layer_set_view (layer, view);
clutter_actor_raise_top (CLUTTER_ACTOR (layer));
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (view));
}
@@ -1707,6 +1708,7 @@ champlain_view_remove_layer (ChamplainView *view,
clutter_container_remove_actor (CLUTTER_CONTAINER (view->priv->user_layers),
CLUTTER_ACTOR (layer));
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (view));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]