[mutter/gbsneto/clutter-cleanups-part1: 9/22] clutter/actor: Remove clutter_actor_show_all



commit d4953c77c3303cea4fcb1ae299bb4f809e5928f8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Jun 26 15:23:46 2020 -0300

    clutter/actor: Remove clutter_actor_show_all
    
    Actors are visible by default these days, and this function
    is deprecated for a long time.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1332

 clutter/clutter/clutter-actor.c                    | 23 ----------------------
 clutter/clutter/clutter-actor.h                    |  6 ------
 clutter/clutter/clutter-stage.c                    | 17 ----------------
 clutter/clutter/deprecated/clutter-actor.h         |  3 ---
 clutter/clutter/deprecated/clutter-group.c         | 14 -------------
 cogl/tests/conform/test-multitexture.c             |  2 +-
 cogl/tests/conform/test-texture-mipmaps.c          |  2 +-
 cogl/tests/conform/test-texture-pixmap-x11.c       |  2 +-
 .../accessibility/cally-atkeditabletext-example.c  |  2 +-
 .../accessibility/cally-atkevents-example.c        |  4 ++--
 .../clutter/accessibility/cally-atktext-example.c  |  2 +-
 .../clutter/accessibility/cally-clone-example.c    |  4 +---
 .../clutter/interactive/test-cogl-multitexture.c   |  2 +-
 .../clutter/interactive/test-cogl-offscreen.c      |  2 +-
 .../clutter/interactive/test-cogl-tex-convert.c    |  2 +-
 src/tests/clutter/interactive/test-cogl-tex-tile.c |  2 +-
 src/tests/clutter/interactive/test-devices.c       |  2 +-
 src/tests/clutter/interactive/test-events.c        |  3 +--
 src/tests/clutter/interactive/test-grab.c          |  2 +-
 .../clutter/interactive/test-shader-effects.c      |  2 +-
 src/tests/clutter/interactive/test-swipe-action.c  |  2 +-
 src/tests/clutter/micro-bench/test-text-perf.c     |  2 +-
 src/tests/clutter/micro-bench/test-text.c          |  2 +-
 src/tests/clutter/performance/test-text-perf.c     |  2 +-
 24 files changed, 20 insertions(+), 86 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 4fe21686a0..24c5c08aad 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -1973,28 +1973,6 @@ clutter_actor_is_visible (ClutterActor *self)
   return CLUTTER_ACTOR_IS_VISIBLE (self);
 }
 
-/**
- * clutter_actor_show_all:
- * @self: a #ClutterActor
- *
- * Calls clutter_actor_show() on all children of an actor (if any).
- *
- * Since: 0.2
- *
- * Deprecated: 1.10: Actors are visible by default
- */
-void
-clutter_actor_show_all (ClutterActor *self)
-{
-  ClutterActorClass *klass;
-
-  g_return_if_fail (CLUTTER_IS_ACTOR (self));
-
-  klass = CLUTTER_ACTOR_GET_CLASS (self);
-  if (klass->show_all)
-    klass->show_all (self);
-}
-
 static void
 clutter_actor_real_hide (ClutterActor *self)
 {
@@ -6436,7 +6414,6 @@ clutter_actor_class_init (ClutterActorClass *klass)
   object_class->finalize = clutter_actor_finalize;
 
   klass->show = clutter_actor_real_show;
-  klass->show_all = clutter_actor_show;
   klass->hide = clutter_actor_real_hide;
   klass->hide_all = clutter_actor_hide;
   klass->map = clutter_actor_real_map;
diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h
index 616e801699..c6b375e1dc 100644
--- a/clutter/clutter/clutter-actor.h
+++ b/clutter/clutter/clutter-actor.h
@@ -142,11 +142,6 @@ struct _ClutterActor
  * ClutterActorClass:
  * @show: signal class handler for #ClutterActor::show; it must chain
  *   up to the parent's implementation
- * @show_all: virtual function for containers and composite actors, to
- *   determine which children should be shown when calling
- *   clutter_actor_show_all() on the actor. Defaults to calling
- *   clutter_actor_show(). This virtual function is deprecated and it
- *   should not be overridden.
  * @hide: signal class handler for #ClutterActor::hide; it must chain
  *   up to the parent's implementation
  * @hide_all: virtual function for containers and composite actors, to
@@ -226,7 +221,6 @@ struct _ClutterActorClass
 
   /*< public >*/
   void (* show)                 (ClutterActor          *self);
-  void (* show_all)             (ClutterActor          *self);
   void (* hide)                 (ClutterActor          *self);
   void (* hide_all)             (ClutterActor          *self);
   void (* realize)              (ClutterActor          *self);
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 1567bf0937..436ad2e4cb 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1017,22 +1017,6 @@ clutter_stage_unrealize (ClutterActor *self)
   CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
 }
 
-static void
-clutter_stage_show_all (ClutterActor *self)
-{
-  ClutterActorIter iter;
-  ClutterActor *child;
-
-  /* we don't do a recursive show_all(), to maintain the old
-   * invariants from ClutterGroup
-   */
-  clutter_actor_iter_init (&iter, self);
-  while (clutter_actor_iter_next (&iter, &child))
-    clutter_actor_show (child);
-
-  clutter_actor_show (self);
-}
-
 static void
 clutter_stage_show (ClutterActor *self)
 {
@@ -1972,7 +1956,6 @@ clutter_stage_class_init (ClutterStageClass *klass)
   actor_class->realize = clutter_stage_realize;
   actor_class->unrealize = clutter_stage_unrealize;
   actor_class->show = clutter_stage_show;
-  actor_class->show_all = clutter_stage_show_all;
   actor_class->hide = clutter_stage_hide;
   actor_class->hide_all = clutter_stage_hide_all;
   actor_class->queue_relayout = clutter_stage_real_queue_relayout;
diff --git a/clutter/clutter/deprecated/clutter-actor.h b/clutter/clutter/deprecated/clutter-actor.h
index 4dad878eee..72006f2a62 100644
--- a/clutter/clutter/deprecated/clutter-actor.h
+++ b/clutter/clutter/deprecated/clutter-actor.h
@@ -33,9 +33,6 @@
 
 G_BEGIN_DECLS
 
-CLUTTER_DEPRECATED
-void            clutter_actor_show_all                          (ClutterActor          *self);
-
 CLUTTER_DEPRECATED_FOR(clutter_actor_set_rotation_angle)
 void            clutter_actor_set_rotation                      (ClutterActor          *self,
                                                                  ClutterRotateAxis      axis,
diff --git a/clutter/clutter/deprecated/clutter-group.c b/clutter/clutter/deprecated/clutter-group.c
index 8791093657..fedc6a60dd 100644
--- a/clutter/clutter/deprecated/clutter-group.c
+++ b/clutter/clutter/deprecated/clutter-group.c
@@ -365,19 +365,6 @@ clutter_group_dispose (GObject *object)
   G_OBJECT_CLASS (clutter_group_parent_class)->dispose (object);
 }
 
-static void
-clutter_group_real_show_all (ClutterActor *self)
-{
-  ClutterActorIter iter;
-  ClutterActor *actor;
-
-  clutter_actor_iter_init (&iter, self);
-  while (clutter_actor_iter_next (&iter, &actor))
-    clutter_actor_show (actor);
-
-  clutter_actor_show (self);
-}
-
 static void
 clutter_group_real_hide_all (ClutterActor *actor)
 {
@@ -428,7 +415,6 @@ clutter_group_class_init (ClutterGroupClass *klass)
   actor_class->allocate = clutter_group_real_allocate;
   actor_class->paint = clutter_group_real_paint;
   actor_class->pick = clutter_group_real_pick;
-  actor_class->show_all = clutter_group_real_show_all;
   actor_class->hide_all = clutter_group_real_hide_all;
   actor_class->get_paint_volume = clutter_group_real_get_paint_volume;
 
diff --git a/cogl/tests/conform/test-multitexture.c b/cogl/tests/conform/test-multitexture.c
index 5a7a4eca27..391c4e703e 100644
--- a/cogl/tests/conform/test-multitexture.c
+++ b/cogl/tests/conform/test-multitexture.c
@@ -197,7 +197,7 @@ test_multitexture (TestUtilsGTestFixture *fixture,
 
   g_signal_connect (group, "paint", G_CALLBACK (on_paint), &state);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main ();
 
diff --git a/cogl/tests/conform/test-texture-mipmaps.c b/cogl/tests/conform/test-texture-mipmaps.c
index 8db8763155..5345453d2b 100644
--- a/cogl/tests/conform/test-texture-mipmaps.c
+++ b/cogl/tests/conform/test-texture-mipmaps.c
@@ -127,7 +127,7 @@ test_texture_mipmaps (TestUtilsGTestFixture *fixture,
 
   g_signal_connect (group, "paint", G_CALLBACK (on_paint), &state);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main ();
 
diff --git a/cogl/tests/conform/test-texture-pixmap-x11.c b/cogl/tests/conform/test-texture-pixmap-x11.c
index d2b9d7ae59..c43c0db740 100644
--- a/cogl/tests/conform/test-texture-pixmap-x11.c
+++ b/cogl/tests/conform/test-texture-pixmap-x11.c
@@ -224,7 +224,7 @@ test_texture_pixmap_x11 (TestUtilsGTestFixture *fixture,
 
   idle_handler = g_idle_add (queue_redraw, state.stage);
 
-  clutter_actor_show_all (state.stage);
+  clutter_actor_show (state.stage);
 
   clutter_main ();
 
diff --git a/src/tests/clutter/accessibility/cally-atkeditabletext-example.c 
b/src/tests/clutter/accessibility/cally-atkeditabletext-example.c
index 433ee92701..2b31e006c0 100644
--- a/src/tests/clutter/accessibility/cally-atkeditabletext-example.c
+++ b/src/tests/clutter/accessibility/cally-atkeditabletext-example.c
@@ -257,7 +257,7 @@ main (int argc, char *argv[])
 
   make_ui (stage);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   test_atk_text (text_actor);
   test_atk_text (text_editable_actor);
diff --git a/src/tests/clutter/accessibility/cally-atkevents-example.c 
b/src/tests/clutter/accessibility/cally-atkevents-example.c
index 6740cb80f6..e7bf42550f 100644
--- a/src/tests/clutter/accessibility/cally-atkevents-example.c
+++ b/src/tests/clutter/accessibility/cally-atkevents-example.c
@@ -178,7 +178,7 @@ main (int argc, char *argv[])
   g_signal_connect (stage_main, "destroy", G_CALLBACK (clutter_main_quit), NULL);
   make_ui (stage_main);
 
-  clutter_actor_show_all (stage_main);
+  clutter_actor_show (stage_main);
 
   if (clutter_feature_available (CLUTTER_FEATURE_STAGE_MULTIPLE))
     {
@@ -187,7 +187,7 @@ main (int argc, char *argv[])
       g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
       make_ui (stage);
-      clutter_actor_show_all (stage);
+      clutter_actor_show (stage);
     }
 
   clutter_main ();
diff --git a/src/tests/clutter/accessibility/cally-atktext-example.c 
b/src/tests/clutter/accessibility/cally-atktext-example.c
index fce36f1a42..aa540c7bf1 100644
--- a/src/tests/clutter/accessibility/cally-atktext-example.c
+++ b/src/tests/clutter/accessibility/cally-atktext-example.c
@@ -244,7 +244,7 @@ main (int argc, char *argv[])
 
   make_ui (stage);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   test_atk_text (text_actor);
   test_atk_text (text_editable_actor);
diff --git a/src/tests/clutter/accessibility/cally-clone-example.c 
b/src/tests/clutter/accessibility/cally-clone-example.c
index 9cc2d68566..e80a8f1d15 100644
--- a/src/tests/clutter/accessibility/cally-clone-example.c
+++ b/src/tests/clutter/accessibility/cally-clone-example.c
@@ -76,7 +76,6 @@ make_ui (ClutterActor *stage)
   clutter_container_add_actor (CLUTTER_CONTAINER (full_entry), label);
   clutter_container_add_actor (CLUTTER_CONTAINER (full_entry), editable);
   clutter_container_add_actor (CLUTTER_CONTAINER (full_entry), rectangle);
-  clutter_actor_show_all (full_entry);
   clutter_actor_set_scale (full_entry, 2, 1);
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), full_entry);
 
@@ -84,7 +83,6 @@ make_ui (ClutterActor *stage)
   cloned_entry = clutter_clone_new (full_entry);
   clutter_actor_set_position (cloned_entry, 50, 200);
   clutter_actor_set_scale (cloned_entry, 1, 2);
-  clutter_actor_show_all (cloned_entry);
   clutter_actor_set_reactive (cloned_entry, TRUE);
 
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), cloned_entry);
@@ -108,7 +106,7 @@ main (int argc, char *argv[])
 
   make_ui (stage);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main ();
 
diff --git a/src/tests/clutter/interactive/test-cogl-multitexture.c 
b/src/tests/clutter/interactive/test-cogl-multitexture.c
index 5d33e40e3c..b640622254 100644
--- a/src/tests/clutter/interactive/test-cogl-multitexture.c
+++ b/src/tests/clutter/interactive/test-cogl-multitexture.c
@@ -227,7 +227,7 @@ test_cogl_multitexture_main (int argc, char *argv[])
   /* start the timeline and thus the animations */
   clutter_timeline_start (state->timeline);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main();
 
diff --git a/src/tests/clutter/interactive/test-cogl-offscreen.c 
b/src/tests/clutter/interactive/test-cogl-offscreen.c
index bade842d4c..10c0432bd1 100644
--- a/src/tests/clutter/interactive/test-cogl-offscreen.c
+++ b/src/tests/clutter/interactive/test-cogl-offscreen.c
@@ -331,7 +331,7 @@ test_cogl_offscreen_main (int argc, char *argv[])
   coglbox = test_coglbox_new ();
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), coglbox);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main ();
 
diff --git a/src/tests/clutter/interactive/test-cogl-tex-convert.c 
b/src/tests/clutter/interactive/test-cogl-tex-convert.c
index 5f4257d7c2..73f848ac76 100644
--- a/src/tests/clutter/interactive/test-cogl-tex-convert.c
+++ b/src/tests/clutter/interactive/test-cogl-tex-convert.c
@@ -230,7 +230,7 @@ test_cogl_tex_convert_main (int argc, char *argv[])
   coglbox = test_coglbox_new ();
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), coglbox);
   
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
   
   clutter_main ();
   
diff --git a/src/tests/clutter/interactive/test-cogl-tex-tile.c 
b/src/tests/clutter/interactive/test-cogl-tex-tile.c
index a522da4593..5fbd47af1f 100644
--- a/src/tests/clutter/interactive/test-cogl-tex-tile.c
+++ b/src/tests/clutter/interactive/test-cogl-tex-tile.c
@@ -220,7 +220,7 @@ test_cogl_tex_tile_main (int argc, char *argv[])
   g_signal_connect (timeline, "new-frame", G_CALLBACK (frame_cb), coglbox);
   clutter_timeline_start (timeline);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main ();
 
diff --git a/src/tests/clutter/interactive/test-devices.c b/src/tests/clutter/interactive/test-devices.c
index 9b2d0e8d5e..191252ff0e 100644
--- a/src/tests/clutter/interactive/test-devices.c
+++ b/src/tests/clutter/interactive/test-devices.c
@@ -238,7 +238,7 @@ test_devices_main (int argc, char **argv)
                     app);
   app->stage = stage;
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
   g_signal_connect (seat,
diff --git a/src/tests/clutter/interactive/test-events.c b/src/tests/clutter/interactive/test-events.c
index f31c7d228d..16fadfc353 100644
--- a/src/tests/clutter/interactive/test-events.c
+++ b/src/tests/clutter/interactive/test-events.c
@@ -467,7 +467,6 @@ test_events_main (int argc, char *argv[])
   clutter_container_add (CLUTTER_CONTAINER (group), actor, NULL);
   clutter_container_add (CLUTTER_CONTAINER (stage), group, NULL);
   clutter_actor_set_position (group, 100, 350);
-  clutter_actor_show_all (group);
 
   /* border actor */
   actor = clutter_rectangle_new_with_color (CLUTTER_COLOR_Magenta);
@@ -480,7 +479,7 @@ test_events_main (int argc, char *argv[])
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor);
   g_signal_connect (actor, "event", G_CALLBACK (input_cb), NULL);
 
-  clutter_actor_show_all (CLUTTER_ACTOR (stage));
+  clutter_actor_show (CLUTTER_ACTOR (stage));
 
   clutter_main();
 
diff --git a/src/tests/clutter/interactive/test-grab.c b/src/tests/clutter/interactive/test-grab.c
index eabec87783..cceb547e1b 100644
--- a/src/tests/clutter/interactive/test-grab.c
+++ b/src/tests/clutter/interactive/test-grab.c
@@ -288,7 +288,7 @@ test_grab_main (int argc, char *argv[])
   g_signal_connect (actor, "button-press-event",
                     G_CALLBACK (cyan_press_cb), NULL);
 
-  clutter_actor_show_all (CLUTTER_ACTOR (stage));
+  clutter_actor_show (CLUTTER_ACTOR (stage));
 
   clutter_main();
 
diff --git a/src/tests/clutter/interactive/test-shader-effects.c 
b/src/tests/clutter/interactive/test-shader-effects.c
index 1fb7cefda1..abe2472d56 100644
--- a/src/tests/clutter/interactive/test-shader-effects.c
+++ b/src/tests/clutter/interactive/test-shader-effects.c
@@ -77,7 +77,7 @@ test_shader_effects_main (int argc, char *argv[])
   /* start the timeline and thus the animations */
   clutter_timeline_start (timeline);
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main();
 
diff --git a/src/tests/clutter/interactive/test-swipe-action.c 
b/src/tests/clutter/interactive/test-swipe-action.c
index 68ccb36b42..3c218bd17e 100644
--- a/src/tests/clutter/interactive/test-swipe-action.c
+++ b/src/tests/clutter/interactive/test-swipe-action.c
@@ -181,7 +181,7 @@ test_swipe_action_main (int argc, char *argv[])
                                                                     offset));
   }
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_main ();
 
diff --git a/src/tests/clutter/micro-bench/test-text-perf.c b/src/tests/clutter/micro-bench/test-text-perf.c
index 76084c4ff0..3361ebf84f 100644
--- a/src/tests/clutter/micro-bench/test-text-perf.c
+++ b/src/tests/clutter/micro-bench/test-text-perf.c
@@ -179,7 +179,7 @@ main (int argc, char *argv[])
        clutter_container_add_actor (CLUTTER_CONTAINER (stage), label);
       }
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_threads_add_idle (queue_redraw, stage);
 
diff --git a/src/tests/clutter/micro-bench/test-text.c b/src/tests/clutter/micro-bench/test-text.c
index 18bd841eb4..c3fa64132f 100644
--- a/src/tests/clutter/micro-bench/test-text.c
+++ b/src/tests/clutter/micro-bench/test-text.c
@@ -109,7 +109,7 @@ main (int argc, char *argv[])
           clutter_container_add_actor (CLUTTER_CONTAINER (group), label);
         }
   }
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   g_signal_connect (stage, "key-press-event",
                    G_CALLBACK (clutter_main_quit), NULL);
diff --git a/src/tests/clutter/performance/test-text-perf.c b/src/tests/clutter/performance/test-text-perf.c
index bf08a48109..89fc580c04 100644
--- a/src/tests/clutter/performance/test-text-perf.c
+++ b/src/tests/clutter/performance/test-text-perf.c
@@ -156,7 +156,7 @@ main (int argc, char *argv[])
        clutter_container_add_actor (CLUTTER_CONTAINER (stage), label);
       }
 
-  clutter_actor_show_all (stage);
+  clutter_actor_show (stage);
 
   clutter_perf_fps_start (CLUTTER_STAGE (stage));
   clutter_threads_add_idle (queue_redraw, stage);


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