~ubuntu-branches/ubuntu/trusty/gnome-shell/trusty-proposed

« back to all changes in this revision

Viewing changes to src/st/st-box-layout.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-03-14 13:47:20 UTC
  • mfrom: (1.1.36) (18.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120314134720-202sbjbu4a3z1fru
Tags: 3.3.90-0ubuntu1
* Sync with Debian experimental svn packaging (LP: #941755, #937709).
  Remaining changes:
  - debian/gnome-shell.gsettings-override: Update for Ubuntu defaults
  - debian/control.in: Recommend cups-pk-helper
  - debian/patches/10-make-NetworkManager-optional.patch: Disabled
  - Don't run dh-autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
};
91
91
 
92
92
/*
93
 
 * ClutterContainer Interface Implementation
94
 
 */
95
 
static void
96
 
st_box_sort_depth_order (ClutterContainer *container)
97
 
{
98
 
  /* The parent class' implementation would mess up the
99
 
   * left-to-right order of the children - do nothing instead
100
 
   */
101
 
}
102
 
 
103
 
/*
104
93
 * StScrollable Interface Implementation
105
94
 */
106
95
static void
195
184
static void
196
185
st_box_container_iface_init (ClutterContainerIface *iface)
197
186
{
198
 
  iface->sort_depth_order = st_box_sort_depth_order;
199
187
  iface->child_meta_type = ST_TYPE_BOX_LAYOUT_CHILD;
200
188
}
201
189
 
628
616
  gboolean flip = (st_widget_get_direction (ST_WIDGET (actor)) == ST_TEXT_DIRECTION_RTL)
629
617
                   && (!priv->is_vertical);
630
618
 
631
 
  CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->allocate (actor, box,
632
 
                                                              flags);
 
619
  clutter_actor_set_allocation (actor, box, flags);
633
620
 
634
621
  children = st_container_get_children_list (ST_CONTAINER (actor));
635
622
  if (children == NULL)
915
902
      cogl_translate ((int)x, (int)y, 0);
916
903
    }
917
904
 
918
 
  CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->paint (actor);
 
905
  st_widget_paint_background (ST_WIDGET (actor));
919
906
 
920
907
  if (x != 0 || y != 0)
921
908
    {
1205
1192
 
1206
1193
  return box->priv->is_pack_start;
1207
1194
}
1208
 
 
1209
 
/**
1210
 
 * st_box_layout_insert_actor:
1211
 
 * @self: A #StBoxLayout
1212
 
 * @actor: A #ClutterActor
1213
 
 * @pos: position to insert actor
1214
 
 *
1215
 
 * Adds @actor to @self at position @pos.  If @pos is
1216
 
 * negative or larger than the number of elements in the
1217
 
 * list then @actor is added after all the others previously
1218
 
 * added.
1219
 
 */
1220
 
void
1221
 
st_box_layout_insert_actor (StBoxLayout  *self,
1222
 
                            ClutterActor *actor,
1223
 
                            int           pos)
1224
 
{
1225
 
  clutter_container_add_actor((ClutterContainer*) self, actor);
1226
 
  st_container_move_child (ST_CONTAINER (self), actor, pos);
1227
 
}
1228
 
 
1229
 
/**
1230
 
 * st_box_layout_insert_before:
1231
 
 * @self: A #StBoxLayout
1232
 
 * @actor: A #ClutterActor
1233
 
 * @sibling: A previously added #ClutterActor
1234
 
 *
1235
 
 * Adds @actor to @self at the position before @sibling.
1236
 
 * @sibling cannot be %NULL and must be already a child
1237
 
 * of @self.
1238
 
 */
1239
 
void
1240
 
st_box_layout_insert_before (StBoxLayout  *self,
1241
 
                             ClutterActor *actor,
1242
 
                             ClutterActor *sibling)
1243
 
{
1244
 
  g_return_if_fail (ST_IS_BOX_LAYOUT (self));
1245
 
 
1246
 
  clutter_container_add_actor(CLUTTER_CONTAINER (self), actor);
1247
 
  st_container_move_before (ST_CONTAINER (self), actor, sibling);
1248
 
}