[mutter/wip/nielsdg/clutter-remove-deprecated: 4/6] clutter: Remove deprecated ClutterTableLayout



commit b590c90e900037b70be7b77358fc6a0232d6bb47
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sat Nov 17 14:50:32 2018 +0100

    clutter: Remove deprecated ClutterTableLayout

 clutter/clutter/Makefile.am                       |    2 -
 clutter/clutter/clutter-deprecated.h              |    1 -
 clutter/clutter/deprecated/clutter-table-layout.c | 2609 ---------------------
 clutter/clutter/deprecated/clutter-table-layout.h |  172 --
 clutter/clutter/meson.build                       |    2 -
 clutter/tests/interactive/Makefile.am             |    1 -
 clutter/tests/interactive/meson.build             |    1 -
 clutter/tests/interactive/test-table-layout.c     |  284 ---
 clutter/tests/interactive/test-text-field.c       |   45 +-
 9 files changed, 10 insertions(+), 3107 deletions(-)
---
diff --git a/clutter/clutter/Makefile.am b/clutter/clutter/Makefile.am
index 27f8ec134..25b06acaf 100644
--- a/clutter/clutter/Makefile.am
+++ b/clutter/clutter/Makefile.am
@@ -277,7 +277,6 @@ deprecated_h = \
        deprecated/clutter-stage-manager.h              \
        deprecated/clutter-stage.h                      \
        deprecated/clutter-state.h                      \
-       deprecated/clutter-table-layout.h               \
        deprecated/clutter-texture.h                    \
        deprecated/clutter-timeline.h           \
        deprecated/clutter-util.h                       \
@@ -302,7 +301,6 @@ deprecated_c = \
        deprecated/clutter-layout-manager-deprecated.c \
        deprecated/clutter-rectangle.c          \
        deprecated/clutter-state.c                      \
-       deprecated/clutter-table-layout.c               \
        deprecated/clutter-texture.c                    \
        $(NULL)
 
diff --git a/clutter/clutter/clutter-deprecated.h b/clutter/clutter/clutter-deprecated.h
index a3d129092..23e5a1ae7 100644
--- a/clutter/clutter/clutter-deprecated.h
+++ b/clutter/clutter/clutter-deprecated.h
@@ -27,7 +27,6 @@
 #include "deprecated/clutter-stage-manager.h"
 #include "deprecated/clutter-stage.h"
 #include "deprecated/clutter-state.h"
-#include "deprecated/clutter-table-layout.h"
 #include "deprecated/clutter-texture.h"
 #include "deprecated/clutter-timeline.h"
 #include "deprecated/clutter-util.h"
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index 2174201f1..e94efb353 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -237,7 +237,6 @@ clutter_deprecated_headers = [
   'deprecated/clutter-stage-manager.h',
   'deprecated/clutter-stage.h',
   'deprecated/clutter-state.h',
-  'deprecated/clutter-table-layout.h',
   'deprecated/clutter-texture.h',
   'deprecated/clutter-timeline.h',
   'deprecated/clutter-util.h',
@@ -261,7 +260,6 @@ clutter_deprecated_sources = [
   'deprecated/clutter-layout-manager-deprecated.c',
   'deprecated/clutter-rectangle.c',
   'deprecated/clutter-state.c',
-  'deprecated/clutter-table-layout.c',
   'deprecated/clutter-texture.c',
 ]
 
diff --git a/clutter/tests/interactive/Makefile.am b/clutter/tests/interactive/Makefile.am
index a341159e6..466e1ed52 100644
--- a/clutter/tests/interactive/Makefile.am
+++ b/clutter/tests/interactive/Makefile.am
@@ -36,7 +36,6 @@ UNIT_TESTS = \
        test-scrolling.c \
        test-swipe-action.c \
        test-cogl-point-sprites.c \
-       test-table-layout.c \
        test-path-constraint.c \
        test-state-script.c \
        test-devices.c \
diff --git a/clutter/tests/interactive/meson.build b/clutter/tests/interactive/meson.build
index cc3a576e8..668e21f61 100644
--- a/clutter/tests/interactive/meson.build
+++ b/clutter/tests/interactive/meson.build
@@ -54,7 +54,6 @@ clutter_tests_interactive_test_sources = [
   'test-scrolling.c',
   'test-swipe-action.c',
   'test-cogl-point-sprites.c',
-  'test-table-layout.c',
   'test-path-constraint.c',
   'test-state-script.c',
   'test-devices.c',
diff --git a/clutter/tests/interactive/test-text-field.c b/clutter/tests/interactive/test-text-field.c
index 18cdfcb71..ed94bb13f 100644
--- a/clutter/tests/interactive/test-text-field.c
+++ b/clutter/tests/interactive/test-text-field.c
@@ -228,6 +228,7 @@ create_entry (const ClutterColor *color,
   clutter_text_set_max_length (CLUTTER_TEXT (retval), max_length);
   clutter_text_set_selected_text_color (CLUTTER_TEXT (retval), &selected_text);
   clutter_actor_set_background_color (retval, CLUTTER_COLOR_LightGray);
+  clutter_actor_set_x_expand (retval, TRUE);
   if (attrs)
     clutter_text_set_attributes (CLUTTER_TEXT (retval), attrs);
 
@@ -247,7 +248,7 @@ test_text_field_main (gint    argc,
 {
   ClutterActor *stage;
   ClutterActor *box, *label, *entry;
-  ClutterLayoutManager *table;
+  ClutterGridLayout *grid;
   PangoAttrList *entry_attrs;
 
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
@@ -258,12 +259,12 @@ test_text_field_main (gint    argc,
   clutter_actor_set_background_color (stage, CLUTTER_COLOR_Black);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
-  table = clutter_table_layout_new ();
-  clutter_table_layout_set_column_spacing (CLUTTER_TABLE_LAYOUT (table), 6);
-  clutter_table_layout_set_row_spacing (CLUTTER_TABLE_LAYOUT (table), 6);
+  grid = CLUTTER_GRID_LAYOUT (clutter_grid_layout_new ());
+  clutter_grid_layout_set_column_spacing (grid, 6);
+  clutter_grid_layout_set_row_spacing (grid, 6);
 
   box = clutter_actor_new ();
-  clutter_actor_set_layout_manager (box, table);
+  clutter_actor_set_layout_manager (box, grid);
   clutter_actor_add_constraint (box, clutter_bind_constraint_new (stage, CLUTTER_BIND_WIDTH, -24.0));
   clutter_actor_add_constraint (box, clutter_bind_constraint_new (stage, CLUTTER_BIND_HEIGHT, -24.0));
   clutter_actor_set_position (box, 12, 12);
@@ -271,46 +272,20 @@ test_text_field_main (gint    argc,
 
   label = create_label (CLUTTER_COLOR_White, "<b>Input field:</b>");
   g_object_set (label, "min-width", 150.0, NULL);
-  clutter_actor_add_child (box, label);
-  clutter_layout_manager_child_set (table, CLUTTER_CONTAINER (box), label,
-                                    "row", 0,
-                                    "column", 0,
-                                    "x-expand", FALSE,
-                                    "y-expand", FALSE,
-                                    NULL);
+  clutter_grid_layout_attach (grid, label, 0, 0, 1, 1);
 
   entry_attrs = pango_attr_list_new ();
   pango_attr_list_insert (entry_attrs, pango_attr_underline_new (PANGO_UNDERLINE_ERROR));
   pango_attr_list_insert (entry_attrs, pango_attr_underline_color_new (65535, 0, 0));
   entry = create_entry (CLUTTER_COLOR_Black, "somme misspeeled textt", entry_attrs, 0, 0);
-  clutter_actor_add_child (box, entry);
-  clutter_layout_manager_child_set (table, CLUTTER_CONTAINER (box), entry,
-                                    "row", 0,
-                                    "column", 1,
-                                    "x-expand", TRUE,
-                                    "x-fill", TRUE,
-                                    "y-expand", FALSE,
-                                    NULL);
+  clutter_grid_layout_attach (grid, entry, 1, 0, 1, 1);
   clutter_actor_grab_key_focus (entry);
 
   label = create_label (CLUTTER_COLOR_White, "<b>A very long password field:</b>");
-  clutter_actor_add_child (box, label);
-  clutter_layout_manager_child_set (table, CLUTTER_CONTAINER (box), label,
-                                    "row", 1,
-                                    "column", 0,
-                                    "x-expand", FALSE,
-                                    "y-expand", FALSE,
-                                    NULL);
+  clutter_grid_layout_attach (grid, label, 0, 1, 1, 1);
 
   entry = create_entry (CLUTTER_COLOR_Black, "password", NULL, '*', 8);
-  clutter_actor_add_child (box, entry);
-  clutter_layout_manager_child_set (table, CLUTTER_CONTAINER (box), entry,
-                                    "row", 1,
-                                    "column", 1,
-                                    "x-expand", TRUE,
-                                    "x-fill", TRUE,
-                                    "y-expand", FALSE,
-                                    NULL);
+  clutter_grid_layout_attach (grid, entry, 1, 1, 1, 1);
 
   clutter_actor_show (stage);
 


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