From e77ea1a26c9c7e880b8c4d64a7e0a8f9bd8c4818 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sat, 11 Mar 2017 13:05:46 +0100 Subject: toolbar-editor: don't use deprecated GtkAlignment --- cut-n-paste/toolbar-editor/egg-toolbar-editor.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'cut-n-paste') diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c index 45912b19..580e1c70 100644 --- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c +++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c @@ -538,29 +538,24 @@ append_grid (GtkGrid *grid, GList *items, gint y, gint width) if (items != NULL) { gint x = 0; - GtkWidget *alignment; GtkWidget *item; if (y > 0) { item = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); - alignment = gtk_alignment_new (0.5, 0.5, 1.0, 0.0); - g_object_set (G_OBJECT (alignment), "expand", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (alignment), item); - gtk_widget_show (alignment); + gtk_widget_set_hexpand (item, TRUE); + gtk_widget_set_vexpand (item, FALSE); gtk_widget_show (item); - gtk_grid_attach (grid, alignment, 0, y, width, 1); + gtk_grid_attach (grid, item, 0, y, width, 1); y++; } for (; items != NULL; items = items->next) { item = items->data; - alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); - g_object_set (G_OBJECT (alignment), "expand", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (alignment), item); - gtk_widget_show (alignment); + gtk_widget_set_hexpand (item, FALSE); + gtk_widget_set_vexpand (item, FALSE); gtk_widget_show (item); if (x >= width) @@ -568,7 +563,7 @@ append_grid (GtkGrid *grid, GList *items, gint y, gint width) x = 0; y++; } - gtk_grid_attach (grid, alignment, x, y, 1, 1); + gtk_grid_attach (grid, item, x, y, 1, 1); x++; } -- cgit v1.2.1