[gtk/fix-double-underscore-mnemonic] Avoid pango deprecations
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-double-underscore-mnemonic] Avoid pango deprecations
- Date: Mon, 2 Aug 2021 02:44:48 +0000 (UTC)
commit 2dac1e8f7ad349b85d80457602a3501716f25083
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Aug 1 22:43:43 2021 -0400
Avoid pango deprecations
This function has been deprecated on the main
branch of pango. Since we don't want to bump our
pango dependency to 1.49 yet, ignore the deprecation.
gtk/gtkfontchooserwidget.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index be3b4cd027..cf836da233 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -386,15 +386,18 @@ user_filter_cb (gpointer item,
ret = FALSE;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
langs = pango_fc_font_get_languages (PANGO_FC_FONT (font));
- for (i = 0; langs[i]; i++)
- {
- if (langs[i] == self->filter_language)
- {
- ret = TRUE;
- break;
- }
- }
+G_GNUC_END_IGNORE_DEPRECATIONS
+ if (langs)
+ for (i = 0; langs[i]; i++)
+ {
+ if (langs[i] == self->filter_language)
+ {
+ ret = TRUE;
+ break;
+ }
+ }
}
g_object_unref (font);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]