From d4953c77c3303cea4fcb1ae299bb4f809e5928f8 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 26 Jun 2020 15:23:46 -0300 Subject: [PATCH] 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 +- .../cally-atkeditabletext-example.c | 2 +- .../accessibility/cally-atkevents-example.c | 4 ++-- .../accessibility/cally-atktext-example.c | 2 +- .../accessibility/cally-clone-example.c | 4 +--- .../interactive/test-cogl-multitexture.c | 2 +- .../clutter/interactive/test-cogl-offscreen.c | 2 +- .../interactive/test-cogl-tex-convert.c | 2 +- .../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 +- .../clutter/interactive/test-swipe-action.c | 2 +- .../clutter/micro-bench/test-text-perf.c | 2 +- src/tests/clutter/micro-bench/test-text.c | 2 +- .../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 4fe21686a..24c5c08aa 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 616e80169..c6b375e1d 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 1567bf093..436ad2e4c 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 4dad878ee..72006f2a6 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 879109365..fedc6a60d 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 5a7a4eca2..391c4e703 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 8db876315..5345453d2 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 d2b9d7ae5..c43c0db74 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 433ee9270..2b31e006c 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 6740cb80f..e7bf42550 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 fce36f1a4..aa540c7bf 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 9cc2d6856..e80a8f1d1 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 5d33e40e3..b64062225 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 bade842d4..10c0432bd 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 5f4257d7c..73f848ac7 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 a522da459..5fbd47af1 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 9b2d0e8d5..191252ff0 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 f31c7d228..16fadfc35 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 eabec8778..cceb547e1 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 1fb7cefda..abe2472d5 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 68ccb36b4..3c218bd17 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 76084c4ff..3361ebf84 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 18bd841eb..c3fa64132 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 bf08a4810..89fc580c0 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);