[layout] Rename Box::add to Box::pack

Since ClutterBox is a ClutterContainer we should avoid naming
collisions between methods.
This commit is contained in:
Emmanuele Bassi 2009-09-16 11:10:45 +01:00
parent c6f67bf872
commit f58bdbad15
4 changed files with 28 additions and 28 deletions

View File

@ -443,7 +443,7 @@ clutter_box_get_layout_manager (ClutterBox *box)
} }
/** /**
* clutter_box_addv: * clutter_box_packv:
* @box: a #ClutterBox * @box: a #ClutterBox
* @actor: a #ClutterActor * @actor: a #ClutterActor
* @n_properties: the number of properties to set * @n_properties: the number of properties to set
@ -452,17 +452,17 @@ clutter_box_get_layout_manager (ClutterBox *box)
* @values: (array length=n_properties): a vector containing the property * @values: (array length=n_properties): a vector containing the property
* values to set * values to set
* *
* Vector-based variant of clutter_box_add(), intended for language * Vector-based variant of clutter_box_pack(), intended for language
* bindings to use * bindings to use
* *
* Since: 1.2 * Since: 1.2
*/ */
void void
clutter_box_addv (ClutterBox *box, clutter_box_packv (ClutterBox *box,
ClutterActor *actor, ClutterActor *actor,
guint n_properties, guint n_properties,
const gchar * const properties[], const gchar * const properties[],
const GValue *values) const GValue *values)
{ {
ClutterContainer *container; ClutterContainer *container;
ClutterBoxPrivate *priv; ClutterBoxPrivate *priv;
@ -522,7 +522,7 @@ clutter_box_addv (ClutterBox *box,
} }
/** /**
* clutter_box_add: * clutter_box_pack:
* @box: a #ClutterBox * @box: a #ClutterBox
* @actor: a #ClutterActor * @actor: a #ClutterActor
* @first_property: the name of the first property to set, or %NULL * @first_property: the name of the first property to set, or %NULL
@ -540,10 +540,10 @@ clutter_box_addv (ClutterBox *box,
* Since: 1.2 * Since: 1.2
*/ */
void void
clutter_box_add (ClutterBox *box, clutter_box_pack (ClutterBox *box,
ClutterActor *actor, ClutterActor *actor,
const gchar *first_property, const gchar *first_property,
...) ...)
{ {
ClutterBoxPrivate *priv; ClutterBoxPrivate *priv;
ClutterContainer *container; ClutterContainer *container;

View File

@ -40,11 +40,11 @@ ClutterActor * clutter_box_new (ClutterLayoutManager *mana
ClutterLayoutManager *clutter_box_get_layout_manager (ClutterBox *box); ClutterLayoutManager *clutter_box_get_layout_manager (ClutterBox *box);
void clutter_box_add (ClutterBox *box, void clutter_box_pack (ClutterBox *box,
ClutterActor *actor, ClutterActor *actor,
const gchar *first_property, const gchar *first_property,
...) G_GNUC_NULL_TERMINATED; ...) G_GNUC_NULL_TERMINATED;
void clutter_box_addv (ClutterBox *box, void clutter_box_packv (ClutterBox *box,
ClutterActor *actor, ClutterActor *actor,
guint n_properties, guint n_properties,
const gchar * const properties[], const gchar * const properties[],

View File

@ -1806,8 +1806,8 @@ ClutterBox
ClutterBoxClass ClutterBoxClass
clutter_box_new clutter_box_new
clutter_box_get_layout_manager clutter_box_get_layout_manager
clutter_box_add clutter_box_pack
clutter_box_addv clutter_box_packv
<SUBSECTION Standard> <SUBSECTION Standard>
CLUTTER_TYPE_BOX CLUTTER_TYPE_BOX

View File

@ -117,10 +117,10 @@ test_box_main (int argc, char *argv[])
clutter_actor_set_name (box, "box"); clutter_actor_set_name (box, "box");
rect = make_background (&bg_color, 200, 200); rect = make_background (&bg_color, 200, 200);
clutter_box_add (CLUTTER_BOX (box), rect, clutter_box_pack (CLUTTER_BOX (box), rect,
"x-align", CLUTTER_BIN_ALIGNMENT_FILL, "x-align", CLUTTER_BIN_ALIGNMENT_FILL,
"y-align", CLUTTER_BIN_ALIGNMENT_FILL, "y-align", CLUTTER_BIN_ALIGNMENT_FILL,
NULL); NULL);
clutter_actor_lower_bottom (rect); clutter_actor_lower_bottom (rect);
clutter_actor_set_name (rect, "background"); clutter_actor_set_name (rect, "background");
@ -135,10 +135,10 @@ test_box_main (int argc, char *argv[])
g_error ("Unable to create texture: %s", error->message); g_error ("Unable to create texture: %s", error->message);
clutter_texture_set_keep_aspect_ratio (CLUTTER_TEXTURE (tex), TRUE); clutter_texture_set_keep_aspect_ratio (CLUTTER_TEXTURE (tex), TRUE);
clutter_box_add (CLUTTER_BOX (box), tex, clutter_box_pack (CLUTTER_BOX (box), tex,
"x-align", CLUTTER_BIN_ALIGNMENT_CENTER, "x-align", CLUTTER_BIN_ALIGNMENT_CENTER,
"y-align", CLUTTER_BIN_ALIGNMENT_CENTER, "y-align", CLUTTER_BIN_ALIGNMENT_CENTER,
NULL); NULL);
clutter_actor_raise (tex, rect); clutter_actor_raise (tex, rect);
clutter_actor_set_width (tex, 175); clutter_actor_set_width (tex, 175);
clutter_actor_set_name (tex, "texture"); clutter_actor_set_name (tex, "texture");
@ -150,10 +150,10 @@ test_box_main (int argc, char *argv[])
224); 224);
rect = clutter_rectangle_new_with_color (color); rect = clutter_rectangle_new_with_color (color);
clutter_box_add (CLUTTER_BOX (box), rect, clutter_box_pack (CLUTTER_BOX (box), rect,
"x-align", CLUTTER_BIN_ALIGNMENT_END, "x-align", CLUTTER_BIN_ALIGNMENT_END,
"y-align", CLUTTER_BIN_ALIGNMENT_END, "y-align", CLUTTER_BIN_ALIGNMENT_END,
NULL); NULL);
clutter_actor_set_size (rect, 50, 50); clutter_actor_set_size (rect, 50, 50);
clutter_actor_set_opacity (rect, 0); clutter_actor_set_opacity (rect, 0);
clutter_actor_raise_top (rect); clutter_actor_raise_top (rect);