From 50d73d95dacb1f9003151f226552e38cdcbb657b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 22 Nov 2015 21:47:21 +0000 Subject: [PATCH] Implement align_label_left for GTK 3.[14,16). gtk_misc_set_alignment was deprecated in GTK 3.14. But my replacement code using gtk_label_set_xalign doesn't work there, because that function wasn't introduced until GTK 3.16, so there are two minor versions in the middle where a third strategy is needed. --- unix/gtkmisc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/gtkmisc.c b/unix/gtkmisc.c index cbcc1af5..d3619e2d 100644 --- a/unix/gtkmisc.c +++ b/unix/gtkmisc.c @@ -62,6 +62,8 @@ void align_label_left(GtkLabel *label) { #if GTK_CHECK_VERSION(3,16,0) gtk_label_set_xalign(label, 0.0); +#elif GTK_CHECK_VERSION(3,14,0) + gtk_widget_set_halign(GTK_WIDGET(label), GTK_ALIGN_START); #else gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0); #endif