Remove override of map/unmap

Clutter, since version 1.8, does The Right Thing™ inside the default
implementation of ClutterActor::map and ClutterActor::unmap, even for
non-container actors: it will iterate over the list of children and
map, or unmap, each one of them, respectively.

This means that the requirement to override map and unmap for composite
actors to map and unmap the internal children has been dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=669239
This commit is contained in:
Emmanuele Bassi 2012-02-02 12:17:13 +00:00 committed by Emmanuele Bassi
parent c63fe5ee24
commit 5bc042ba6f
3 changed files with 0 additions and 79 deletions

View File

@ -547,38 +547,6 @@ st_entry_pick (ClutterActor *actor,
clutter_actor_paint (priv->secondary_icon); clutter_actor_paint (priv->secondary_icon);
} }
static void
st_entry_map (ClutterActor *actor)
{
StEntryPrivate *priv = ST_ENTRY (actor)->priv;
CLUTTER_ACTOR_CLASS (st_entry_parent_class)->map (actor);
clutter_actor_map (priv->entry);
if (priv->primary_icon)
clutter_actor_map (priv->primary_icon);
if (priv->secondary_icon)
clutter_actor_map (priv->secondary_icon);
}
static void
st_entry_unmap (ClutterActor *actor)
{
StEntryPrivate *priv = ST_ENTRY (actor)->priv;
CLUTTER_ACTOR_CLASS (st_entry_parent_class)->unmap (actor);
clutter_actor_unmap (priv->entry);
if (priv->primary_icon)
clutter_actor_unmap (priv->primary_icon);
if (priv->secondary_icon)
clutter_actor_unmap (priv->secondary_icon);
}
static void static void
st_entry_clipboard_callback (StClipboard *clipboard, st_entry_clipboard_callback (StClipboard *clipboard,
const gchar *text, const gchar *text,
@ -694,8 +662,6 @@ st_entry_class_init (StEntryClass *klass)
actor_class->allocate = st_entry_allocate; actor_class->allocate = st_entry_allocate;
actor_class->paint = st_entry_paint; actor_class->paint = st_entry_paint;
actor_class->pick = st_entry_pick; actor_class->pick = st_entry_pick;
actor_class->map = st_entry_map;
actor_class->unmap = st_entry_unmap;
actor_class->key_press_event = st_entry_key_press_event; actor_class->key_press_event = st_entry_key_press_event;
actor_class->key_focus_in = st_entry_key_focus_in; actor_class->key_focus_in = st_entry_key_focus_in;

View File

@ -253,26 +253,6 @@ st_label_paint (ClutterActor *actor)
clutter_actor_paint (priv->label); clutter_actor_paint (priv->label);
} }
static void
st_label_map (ClutterActor *actor)
{
StLabelPrivate *priv = ST_LABEL (actor)->priv;
CLUTTER_ACTOR_CLASS (st_label_parent_class)->map (actor);
clutter_actor_map (priv->label);
}
static void
st_label_unmap (ClutterActor *actor)
{
StLabelPrivate *priv = ST_LABEL (actor)->priv;
CLUTTER_ACTOR_CLASS (st_label_parent_class)->unmap (actor);
clutter_actor_unmap (priv->label);
}
static void static void
st_label_class_init (StLabelClass *klass) st_label_class_init (StLabelClass *klass)
{ {
@ -291,8 +271,6 @@ st_label_class_init (StLabelClass *klass)
actor_class->allocate = st_label_allocate; actor_class->allocate = st_label_allocate;
actor_class->get_preferred_width = st_label_get_preferred_width; actor_class->get_preferred_width = st_label_get_preferred_width;
actor_class->get_preferred_height = st_label_get_preferred_height; actor_class->get_preferred_height = st_label_get_preferred_height;
actor_class->map = st_label_map;
actor_class->unmap = st_label_unmap;
widget_class->style_changed = st_label_style_changed; widget_class->style_changed = st_label_style_changed;
widget_class->get_accessible_type = st_label_accessible_get_type; widget_class->get_accessible_type = st_label_accessible_get_type;

View File

@ -242,21 +242,6 @@ st_scroll_bar_pick (ClutterActor *actor,
clutter_actor_paint (priv->handle); clutter_actor_paint (priv->handle);
} }
static void
st_scroll_bar_map (ClutterActor *actor)
{
StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;
CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->map (actor);
clutter_actor_map (priv->bw_stepper);
clutter_actor_map (priv->fw_stepper);
clutter_actor_map (priv->trough);
if (priv->handle)
clutter_actor_map (priv->handle);
}
static void static void
st_scroll_bar_unmap (ClutterActor *actor) st_scroll_bar_unmap (ClutterActor *actor)
{ {
@ -265,13 +250,6 @@ st_scroll_bar_unmap (ClutterActor *actor)
CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->unmap (actor); CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->unmap (actor);
stop_scrolling (ST_SCROLL_BAR (actor)); stop_scrolling (ST_SCROLL_BAR (actor));
clutter_actor_unmap (priv->bw_stepper);
clutter_actor_unmap (priv->fw_stepper);
clutter_actor_unmap (priv->trough);
if (priv->handle)
clutter_actor_unmap (priv->handle);
} }
static void static void
@ -687,7 +665,6 @@ st_scroll_bar_class_init (StScrollBarClass *klass)
actor_class->paint = st_scroll_bar_paint; actor_class->paint = st_scroll_bar_paint;
actor_class->pick = st_scroll_bar_pick; actor_class->pick = st_scroll_bar_pick;
actor_class->scroll_event = st_scroll_bar_scroll_event; actor_class->scroll_event = st_scroll_bar_scroll_event;
actor_class->map = st_scroll_bar_map;
actor_class->unmap = st_scroll_bar_unmap; actor_class->unmap = st_scroll_bar_unmap;
widget_class->style_changed = st_scroll_bar_style_changed; widget_class->style_changed = st_scroll_bar_style_changed;