diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-03-21 00:44:04 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-03-21 01:18:54 -0400 |
commit | 9259efb5d7a579b3e1221f42490e4f9a3404baad (patch) | |
tree | 11379e39569b8e9aa0d7e2669f5370414f5919d0 /gtk/gtktextbuffer.c | |
parent | 72f06abd13e6ca23bee0259107e7c000068cabfc (diff) | |
download | gtk+-9259efb5d7a579b3e1221f42490e4f9a3404baad.tar.gz |
Make overline support conditional
The ci image does not have Pango 1.45, so for the
time being, make the overline support conditional
on Pango being new enough.
Diffstat (limited to 'gtk/gtktextbuffer.c')
-rw-r--r-- | gtk/gtktextbuffer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index 610d79da10..7dd04c5e24 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -4758,10 +4758,6 @@ get_tag_for_attributes (PangoAttrIterator *iter) if (attr) g_object_set (tag, "underline", ((PangoAttrInt*)attr)->value, NULL); - attr = pango_attr_iterator_get (iter, PANGO_ATTR_OVERLINE); - if (attr) - g_object_set (tag, "overline", ((PangoAttrInt*)attr)->value, NULL); - attr = pango_attr_iterator_get (iter, PANGO_ATTR_UNDERLINE_COLOR); if (attr) { @@ -4776,6 +4772,11 @@ get_tag_for_attributes (PangoAttrIterator *iter) g_object_set (tag, "underline-rgba", &rgba, NULL); } +#if PANGO_VERSION_CHECK(1,45,0) + attr = pango_attr_iterator_get (iter, PANGO_ATTR_OVERLINE); + if (attr) + g_object_set (tag, "overline", ((PangoAttrInt*)attr)->value, NULL); + attr = pango_attr_iterator_get (iter, PANGO_ATTR_OVERLINE_COLOR); if (attr) { @@ -4789,6 +4790,7 @@ get_tag_for_attributes (PangoAttrIterator *iter) rgba.alpha = 1.; g_object_set (tag, "overline-rgba", &rgba, NULL); } +#endif attr = pango_attr_iterator_get (iter, PANGO_ATTR_STRIKETHROUGH); if (attr) |