testgtk: Convert radio/check button examples from GtkTable to GtkGrid

This commit is contained in:
Benjamin Otte 2011-09-28 03:25:47 +02:00
parent 88a7942198
commit 26974640f8

View File

@ -779,11 +779,11 @@ create_toggle_buttons (GtkWidget *widget)
static GtkWidget * static GtkWidget *
create_widget_grid (GType widget_type) create_widget_grid (GType widget_type)
{ {
GtkWidget *table; GtkWidget *grid;
GtkWidget *group_widget = NULL; GtkWidget *group_widget = NULL;
gint i, j; gint i, j;
table = gtk_table_new (FALSE, 3, 3); grid = gtk_grid_new ();
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
{ {
@ -822,14 +822,11 @@ create_widget_grid (GType widget_type)
} }
if (widget) if (widget)
gtk_table_attach (GTK_TABLE (table), widget, gtk_grid_attach (GTK_GRID (grid), widget, i, j, 1, 1);
i, i + 1, j, j + 1,
0, 0,
0, 0);
} }
} }
return table; return grid;
} }
/* /*