From 5cebe28e2fa5ca6ee27e43579596f5aad43273f5 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Wed, 13 Apr 2016 08:43:53 +0100 Subject: clonetiler: Fix deprecated GtkAlignment #Hackfest2016 (bzr r14808) --- src/ui/dialog/clonetiler.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/ui/dialog/clonetiler.cpp') diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp index fa53041d3..9656878e0 100644 --- a/src/ui/dialog/clonetiler.cpp +++ b/src/ui/dialog/clonetiler.cpp @@ -2866,14 +2866,13 @@ void CloneTiler::clonetiler_reset(GtkWidget */*widget*/, GtkWidget *dlg) void CloneTiler::clonetiler_table_attach(GtkWidget *table, GtkWidget *widget, float align, int row, int col) { - GtkWidget *a = gtk_alignment_new (align, 0, 0, 0); - gtk_container_add(GTK_CONTAINER(a), widget); - #if GTK_CHECK_VERSION(3,0,0) - gtk_widget_set_halign(table, GTK_ALIGN_FILL); - gtk_widget_set_valign(table, GTK_ALIGN_CENTER); - gtk_grid_attach(GTK_GRID(table), a, col, row, 1, 1); + gtk_widget_set_halign(widget, GTK_ALIGN_FILL); + gtk_widget_set_valign(widget, GTK_ALIGN_START); + gtk_grid_attach(GTK_GRID(table), widget, col, row, 1, 1); #else + GtkWidget *a = gtk_alignment_new (align, 0, 0, 0); + gtk_container_add(GTK_CONTAINER(a), widget); gtk_table_attach ( GTK_TABLE (table), a, col, col + 1, row, row + 1, GTK_FILL, (GtkAttachOptions)0, 0, 0 ); #endif } -- cgit v1.2.3