Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL
authorMatthias Clasen <mclasen@redhat.com>
Fri, 9 Jun 2023 10:39:02 +0000 (06:39 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 9 Jun 2023 12:17:34 +0000 (08:17 -0400)
We have to be careful to only use GDK_ALIGN_BASELINE_FILL when
permitted by GDK_VERSION_MAX_ALLOWED because gtkenums.h is a
public header.

Fixes: #5875
I don't think we can avoid conditional compilation here, because the old definition is going to cause deprecated declaration warnings unless you define an old GDK_VERSION_MIN_REQUIRED.

gtk/gtkenums.h

index cac6de68569b66ebfa507e6db2e313172e6612f0..9f9f5615b893e3d72557b574b738232b95f51ff2 100644 (file)
@@ -70,7 +70,7 @@ typedef enum
   GTK_ALIGN_END,
   GTK_ALIGN_CENTER,
   GTK_ALIGN_BASELINE_FILL GDK_AVAILABLE_ENUMERATOR_IN_4_12,
-  GTK_ALIGN_BASELINE GDK_DEPRECATED_ENUMERATOR_IN_4_12_FOR(GTK_ALIGN_BASELINE_FILL) = GTK_ALIGN_BASELINE_FILL,
+  GTK_ALIGN_BASELINE GDK_DEPRECATED_ENUMERATOR_IN_4_12_FOR(GTK_ALIGN_BASELINE_FILL) = GTK_ALIGN_CENTER + 1,
   GTK_ALIGN_BASELINE_CENTER GDK_AVAILABLE_ENUMERATOR_IN_4_12,
 } GtkAlign;