From 9ab320cd3d4b32ed5d30ff80310daca555a0989e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 10 Jun 2015 15:14:30 +0100 Subject: [PATCH] pango: Conditionally use deprecated API When compiling against a newer version of Pango we can avoid the deprecation warning. --- cogl-pango/cogl-pango-fontmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cogl-pango/cogl-pango-fontmap.c b/cogl-pango/cogl-pango-fontmap.c index 722223895..a9c7df065 100644 --- a/cogl-pango/cogl-pango-fontmap.c +++ b/cogl-pango/cogl-pango-fontmap.c @@ -98,9 +98,13 @@ cogl_pango_font_map_create_context (CoglPangoFontMap *fm) { _COGL_RETURN_VAL_IF_FAIL (COGL_PANGO_IS_FONT_MAP (fm), NULL); +#if PANGO_VERSION_CHECK (1, 22, 0) /* We can just directly use the pango context from the Cairo font map */ + return pango_font_map_create_context (PANGO_FONT_MAP (fm)); +#else return pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fm)); +#endif } static CoglPangoFontMapPriv *