summaryrefslogtreecommitdiffstats
path: root/src/tk/grid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tk/grid.c')
-rw-r--r--src/tk/grid.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/tk/grid.c b/src/tk/grid.c
index 4f09928..5994929 100644
--- a/src/tk/grid.c
+++ b/src/tk/grid.c
@@ -142,12 +142,7 @@ mftk_grid_new(int rows, int cols, int row_spacing, int col_spacing, ...)
int r;
int c;
- if ((w = mftk_widget_new(sizeof(*g))) == NULL) return NULL;
- g = (struct mftk_grid *) w;
- w->layout = &_mftk_grid_layout;
- w->event = &_mftk_grid_event;
- w->render = &_mftk_grid_render;
- w->destroy = &_mftk_grid_destroy;
+ mftk_widget_init(w, g, grid);
g->children = calloc(rows * cols, sizeof(*g->children));
if (g->children == NULL) {