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

« back to all changes in this revision

Viewing changes to src/st/st-table.c

Tags: upstream-3.3.90
ImportĀ upstreamĀ versionĀ 3.3.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include <clutter/clutter.h>
42
42
 
43
43
#include "st-enum-types.h"
44
 
#include "st-marshal.h"
45
44
#include "st-private.h"
46
45
#include "st-table-child.h"
47
46
#include "st-table-private.h"
718
717
  StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (self));
719
718
  ClutterActorBox content_box;
720
719
 
721
 
  CLUTTER_ACTOR_CLASS (st_table_parent_class)->allocate (self, box, flags);
 
720
  clutter_actor_set_allocation (self, box, flags);
722
721
 
723
722
  if (priv->n_cols < 1 || priv->n_rows < 1)
724
 
    {
725
 
      return;
726
 
    };
 
723
    return;
727
724
 
728
725
  st_theme_node_get_content_box (theme_node, box, &content_box);
729
726
 
919
916
}
920
917
 
921
918
static void
922
 
st_table_paint (ClutterActor *self)
923
 
{
924
 
  GList *list, *children;
925
 
 
926
 
  /* make sure the background gets painted first */
927
 
  CLUTTER_ACTOR_CLASS (st_table_parent_class)->paint (self);
928
 
 
929
 
  children = st_container_get_children_list (ST_CONTAINER (self));
930
 
  for (list = children; list; list = list->next)
931
 
    {
932
 
      ClutterActor *child = CLUTTER_ACTOR (list->data);
933
 
      if (CLUTTER_ACTOR_IS_VISIBLE (child))
934
 
        clutter_actor_paint (child);
935
 
    }
936
 
}
937
 
 
938
 
static void
939
 
st_table_pick (ClutterActor       *self,
940
 
               const ClutterColor *color)
941
 
{
942
 
  GList *list, *children;
943
 
 
944
 
  /* Chain up so we get a bounding box painted (if we are reactive) */
945
 
  CLUTTER_ACTOR_CLASS (st_table_parent_class)->pick (self, color);
946
 
 
947
 
  children = st_container_get_children_list (ST_CONTAINER (self));
948
 
  for (list = children; list; list = list->next)
949
 
    {
950
 
      if (CLUTTER_ACTOR_IS_VISIBLE (list->data))
951
 
        clutter_actor_paint (CLUTTER_ACTOR (list->data));
952
 
    }
953
 
}
954
 
 
955
 
static void
956
919
st_table_show_all (ClutterActor *table)
957
920
{
958
921
  GList *l, *children;
1012
975
  gobject_class->get_property = st_table_get_property;
1013
976
  gobject_class->finalize = st_table_finalize;
1014
977
 
1015
 
  actor_class->paint = st_table_paint;
1016
 
  actor_class->pick = st_table_pick;
1017
978
  actor_class->allocate = st_table_allocate;
1018
979
  actor_class->get_preferred_width = st_table_get_preferred_width;
1019
980
  actor_class->get_preferred_height = st_table_get_preferred_height;