[gnome-shell/wip/clutter-deprecation-fixes: 14/22] shell, st: Remove custom paint/pick implementations



commit 3596a0879ed61b92bb5c9913838bd2064eb7a8dc
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 13 22:52:01 2012 -0500

    shell, st: Remove custom paint/pick implementations
    
    ClutterActor paints all children by default.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670034

 src/shell-stack.c      |   24 ------------------------
 src/st/st-bin.c        |   28 ----------------------------
 src/st/st-entry.c      |   37 -------------------------------------
 src/st/st-group.c      |   24 ------------------------
 src/st/st-scroll-bar.c |   29 -----------------------------
 src/st/st-table.c      |   36 ------------------------------------
 6 files changed, 0 insertions(+), 178 deletions(-)
---
diff --git a/src/shell-stack.c b/src/shell-stack.c
index e7d4175..76ed475 100644
--- a/src/shell-stack.c
+++ b/src/shell-stack.c
@@ -21,28 +21,6 @@ G_DEFINE_TYPE (ShellStack,
                ST_TYPE_CONTAINER);
 
 static void
-shell_stack_paint (ClutterActor *actor)
-{
-  CLUTTER_ACTOR_CLASS (shell_stack_parent_class)->paint (actor);
-
-  clutter_container_foreach (CLUTTER_CONTAINER (actor),
-                             CLUTTER_CALLBACK (clutter_actor_paint),
-                             NULL);
-}
-
-static void
-shell_stack_pick (ClutterActor       *actor,
-                  const ClutterColor *pick)
-{
-  /* Chain up so we get a bounding box painted (if we are reactive) */
-  CLUTTER_ACTOR_CLASS (shell_stack_parent_class)->pick (actor, pick);
-
-  clutter_container_foreach (CLUTTER_CONTAINER (actor),
-                             CLUTTER_CALLBACK (clutter_actor_paint),
-                             NULL);
-}
-
-static void
 shell_stack_allocate (ClutterActor           *self,
                       const ClutterActorBox  *box,
                       ClutterAllocationFlags  flags)
@@ -206,8 +184,6 @@ shell_stack_class_init (ShellStackClass *klass)
   ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
   StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
 
-  actor_class->paint = shell_stack_paint;
-  actor_class->pick = shell_stack_pick;
   actor_class->get_preferred_width = shell_stack_get_preferred_width;
   actor_class->get_preferred_height = shell_stack_get_preferred_height;
   actor_class->allocate = shell_stack_allocate;
diff --git a/src/st/st-bin.c b/src/st/st-bin.c
index 226bec6..8e86ac6 100644
--- a/src/st/st-bin.c
+++ b/src/st/st-bin.c
@@ -105,32 +105,6 @@ clutter_container_iface_init (ClutterContainerIface *iface)
 }
 
 static void
-st_bin_paint (ClutterActor *self)
-{
-  StBinPrivate *priv = ST_BIN (self)->priv;
-
-  /* allow StWidget to paint the background */
-  CLUTTER_ACTOR_CLASS (st_bin_parent_class)->paint (self);
-
-  /* the pain our child */
-  if (priv->child)
-    clutter_actor_paint (priv->child);
-}
-
-static void
-st_bin_pick (ClutterActor       *self,
-             const ClutterColor *pick_color)
-{
-  StBinPrivate *priv = ST_BIN (self)->priv;
-
-  /* get the default pick implementation */
-  CLUTTER_ACTOR_CLASS (st_bin_parent_class)->pick (self, pick_color);
-
-  if (priv->child)
-    clutter_actor_paint (priv->child);
-}
-
-static void
 st_bin_allocate (ClutterActor          *self,
                  const ClutterActorBox *box,
                  ClutterAllocationFlags flags)
@@ -339,8 +313,6 @@ st_bin_class_init (StBinClass *klass)
   actor_class->get_preferred_width = st_bin_get_preferred_width;
   actor_class->get_preferred_height = st_bin_get_preferred_height;
   actor_class->allocate = st_bin_allocate;
-  actor_class->paint = st_bin_paint;
-  actor_class->pick = st_bin_pick;
 
   widget_class->navigate_focus = st_bin_navigate_focus;
 
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index 1f302ed..95eaf4d 100644
--- a/src/st/st-entry.c
+++ b/src/st/st-entry.c
@@ -511,41 +511,6 @@ clutter_text_password_char_cb (GObject    *object,
 }
 
 static void
-st_entry_paint (ClutterActor *actor)
-{
-  StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
-  ClutterActorClass *parent_class;
-
-  parent_class = CLUTTER_ACTOR_CLASS (st_entry_parent_class);
-  parent_class->paint (actor);
-
-  clutter_actor_paint (priv->entry);
-
-  if (priv->primary_icon)
-    clutter_actor_paint (priv->primary_icon);
-
-  if (priv->secondary_icon)
-    clutter_actor_paint (priv->secondary_icon);
-}
-
-static void
-st_entry_pick (ClutterActor       *actor,
-               const ClutterColor *c)
-{
-  StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
-
-  CLUTTER_ACTOR_CLASS (st_entry_parent_class)->pick (actor, c);
-
-  clutter_actor_paint (priv->entry);
-
-  if (priv->primary_icon)
-    clutter_actor_paint (priv->primary_icon);
-
-  if (priv->secondary_icon)
-    clutter_actor_paint (priv->secondary_icon);
-}
-
-static void
 st_entry_clipboard_callback (StClipboard *clipboard,
                              const gchar *text,
                              gpointer     data)
@@ -658,8 +623,6 @@ st_entry_class_init (StEntryClass *klass)
   actor_class->get_preferred_width = st_entry_get_preferred_width;
   actor_class->get_preferred_height = st_entry_get_preferred_height;
   actor_class->allocate = st_entry_allocate;
-  actor_class->paint = st_entry_paint;
-  actor_class->pick = st_entry_pick;
 
   actor_class->key_press_event = st_entry_key_press_event;
   actor_class->key_focus_in = st_entry_key_focus_in;
diff --git a/src/st/st-group.c b/src/st/st-group.c
index fac0124..172726f 100644
--- a/src/st/st-group.c
+++ b/src/st/st-group.c
@@ -53,28 +53,6 @@
 G_DEFINE_TYPE (StGroup, st_group, ST_TYPE_CONTAINER);
 
 static void
-st_group_paint (ClutterActor *actor)
-{
-  CLUTTER_ACTOR_CLASS (st_group_parent_class)->paint (actor);
-
-  clutter_container_foreach (CLUTTER_CONTAINER (actor),
-                             CLUTTER_CALLBACK (clutter_actor_paint),
-                             NULL);
-}
-
-static void
-st_group_pick (ClutterActor       *actor,
-               const ClutterColor *pick)
-{
-  /* Chain up so we get a bounding box painted (if we are reactive) */
-  CLUTTER_ACTOR_CLASS (st_group_parent_class)->pick (actor, pick);
-
-  clutter_container_foreach (CLUTTER_CONTAINER (actor),
-                             CLUTTER_CALLBACK (clutter_actor_paint),
-                             NULL);
-}
-
-static void
 st_group_get_preferred_width (ClutterActor *actor,
                               gfloat        for_height,
                               gfloat       *min_width_p,
@@ -240,8 +218,6 @@ st_group_class_init (StGroupClass *klass)
   actor_class->get_preferred_width = st_group_get_preferred_width;
   actor_class->get_preferred_height = st_group_get_preferred_height;
   actor_class->allocate = st_group_allocate;
-  actor_class->paint = st_group_paint;
-  actor_class->pick = st_group_pick;
   actor_class->show_all = st_group_show_all;
   actor_class->hide_all = st_group_hide_all;
 }
diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c
index bda341b..0309a8c 100644
--- a/src/st/st-scroll-bar.c
+++ b/src/st/st-scroll-bar.c
@@ -178,33 +178,6 @@ st_scroll_bar_dispose (GObject *gobject)
 }
 
 static void
-st_scroll_bar_paint (ClutterActor *actor)
-{
-  StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;
-
-  CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->paint (actor);
-
-  clutter_actor_paint (priv->trough);
-
-  if (priv->handle && CLUTTER_ACTOR_IS_VISIBLE (priv->handle))
-    clutter_actor_paint (priv->handle);
-}
-
-static void
-st_scroll_bar_pick (ClutterActor       *actor,
-                    const ClutterColor *pick_color)
-{
-  StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;
-
-  CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->pick (actor, pick_color);
-
-  clutter_actor_paint (priv->trough);
-
-  if (priv->handle && priv->adjustment)
-    clutter_actor_paint (priv->handle);
-}
-
-static void
 st_scroll_bar_unmap (ClutterActor *actor)
 {
   CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->unmap (actor);
@@ -525,8 +498,6 @@ st_scroll_bar_class_init (StScrollBarClass *klass)
   actor_class->get_preferred_width  = st_scroll_bar_get_preferred_width;
   actor_class->get_preferred_height = st_scroll_bar_get_preferred_height;
   actor_class->allocate       = st_scroll_bar_allocate;
-  actor_class->paint          = st_scroll_bar_paint;
-  actor_class->pick           = st_scroll_bar_pick;
   actor_class->scroll_event   = st_scroll_bar_scroll_event;
   actor_class->unmap          = st_scroll_bar_unmap;
 
diff --git a/src/st/st-table.c b/src/st/st-table.c
index 8542084..d253a7e 100644
--- a/src/st/st-table.c
+++ b/src/st/st-table.c
@@ -916,40 +916,6 @@ st_table_get_preferred_height (ClutterActor *self,
 }
 
 static void
-st_table_paint (ClutterActor *self)
-{
-  GList *list, *children;
-
-  /* make sure the background gets painted first */
-  CLUTTER_ACTOR_CLASS (st_table_parent_class)->paint (self);
-
-  children = st_container_get_children_list (ST_CONTAINER (self));
-  for (list = children; list; list = list->next)
-    {
-      ClutterActor *child = CLUTTER_ACTOR (list->data);
-      if (CLUTTER_ACTOR_IS_VISIBLE (child))
-        clutter_actor_paint (child);
-    }
-}
-
-static void
-st_table_pick (ClutterActor       *self,
-               const ClutterColor *color)
-{
-  GList *list, *children;
-
-  /* Chain up so we get a bounding box painted (if we are reactive) */
-  CLUTTER_ACTOR_CLASS (st_table_parent_class)->pick (self, color);
-
-  children = st_container_get_children_list (ST_CONTAINER (self));
-  for (list = children; list; list = list->next)
-    {
-      if (CLUTTER_ACTOR_IS_VISIBLE (list->data))
-        clutter_actor_paint (CLUTTER_ACTOR (list->data));
-    }
-}
-
-static void
 st_table_show_all (ClutterActor *table)
 {
   GList *l, *children;
@@ -1009,8 +975,6 @@ st_table_class_init (StTableClass *klass)
   gobject_class->get_property = st_table_get_property;
   gobject_class->finalize = st_table_finalize;
 
-  actor_class->paint = st_table_paint;
-  actor_class->pick = st_table_pick;
   actor_class->allocate = st_table_allocate;
   actor_class->get_preferred_width = st_table_get_preferred_width;
   actor_class->get_preferred_height = st_table_get_preferred_height;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]