diff options
author | raveit65 <[email protected]> | 2017-04-21 19:16:36 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-04-21 20:08:52 +0200 |
commit | 048993c9d4cff5c5ac65641c18f16e0c9723118f (patch) | |
tree | 0b8de771e62923b1c1c63cba762eb43b1e691833 /cut-n-paste | |
parent | e29c96a1af7660e78164bf5c0fe5fae4eaefe59d (diff) | |
download | eom-048993c9d4cff5c5ac65641c18f16e0c9723118f.tar.bz2 eom-048993c9d4cff5c5ac65641c18f16e0c9723118f.tar.xz |
toolbar-editor: avoid deprecated GtkAlignment
Diffstat (limited to 'cut-n-paste')
-rw-r--r-- | cut-n-paste/toolbar-editor/egg-toolbar-editor.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c index be6b342..99d7587 100644 --- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c +++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c @@ -537,29 +537,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) @@ -567,7 +562,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++; } |