From 899bd78c4fe81ee8e9de7677674396f2dea37510 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 18 Nov 2019 15:39:54 +0100 Subject: [PATCH] Check for HAVE_GTK3 instead of a specific version Our minimum GTK3 version is 3.10, the font filter functions appeared in 3.2. * gtkutil.c (xg_font_filter) [HAVE_GTK3]: Just check for HAVE_GTK3. (xg_get_font) [HAVE_GTK3]: Same here. --- src/gtkutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index c4d2ef9d80b..4bab4059c35 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2228,7 +2228,7 @@ xg_get_file_name (struct frame *f, static char *x_last_font_name; -#if GTK_CHECK_VERSION (3, 2, 0) +#if HAVE_GTK3 static gboolean xg_font_filter (const PangoFontFamily *family, const PangoFontFace *face, @@ -2262,7 +2262,7 @@ xg_get_font (struct frame *f, const char *default_name) w = gtk_font_chooser_dialog_new ("Pick a font", GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); -#if GTK_CHECK_VERSION (3, 2, 0) +#ifdef HAVE_GTK3 gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (w), xg_font_filter, NULL, NULL); #endif if (default_name) -- 2.39.5