Drop PANGO_VERSION_CHECK checks

We require Pango 1.49 now.
This commit is contained in:
Matthias Clasen 2021-08-22 15:26:23 -04:00
parent bea4aa31ea
commit ba95ef63da
6 changed files with 0 additions and 18 deletions

View File

@ -255,14 +255,12 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
INT_ATTR (insert_hyphens);
break;
#if PANGO_VERSION_CHECK(1,49,0)
case PANGO_ATTR_LINE_HEIGHT:
FLOAT_ATTR (line_height);
break;
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
break;
#endif
case PANGO_ATTR_SHAPE:
case PANGO_ATTR_ABSOLUTE_SIZE:
@ -272,10 +270,8 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
case PANGO_ATTR_BACKGROUND_ALPHA:
break;
#if PANGO_VERSION_CHECK(1,49,0)
case PANGO_ATTR_TEXT_TRANSFORM:
break;
#endif
case PANGO_ATTR_INVALID:
default:

View File

@ -486,7 +486,6 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
attrs = add_pango_attr (attrs, pango_attr_letter_spacing_new (letter_spacing * PANGO_SCALE));
}
#if PANGO_VERSION_CHECK(1, 49, 0)
/* line-height */
{
double height = gtk_css_line_height_value_get (style->font->line_height);
@ -498,7 +497,6 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
attrs = add_pango_attr (attrs, pango_attr_line_height_new (height));
}
}
#endif
/* OpenType features */

View File

@ -249,7 +249,6 @@ attribute_from_text (GtkBuilder *builder,
color->blue * 65535);
}
break;
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_LINE_HEIGHT:
if (gtk_builder_value_from_string_type (builder, G_TYPE_DOUBLE, value, &val, error))
attribute = pango_attr_line_height_new (g_value_get_double (&val));
@ -262,7 +261,6 @@ attribute_from_text (GtkBuilder *builder,
if (gtk_builder_value_from_string_type (builder, PANGO_TYPE_TEXT_TRANSFORM, value, &val, error))
attribute = pango_attr_text_transform_new (g_value_get_enum (&val));
break;
#endif
case PANGO_ATTR_INVALID:
default:
break;

View File

@ -4689,14 +4689,12 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
INT_ATTR (letter_spacing);
break;
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_LINE_HEIGHT:
FLOAT_ATTR (line_height);
break;
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
break;
#endif
case PANGO_ATTR_FONT_FEATURES:
STRING_ATTR (font_features);
@ -4714,10 +4712,8 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
INT_ATTR (insert_hyphens);
break;
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_TEXT_TRANSFORM:
break;
#endif
case PANGO_ATTR_SHAPE:
case PANGO_ATTR_ABSOLUTE_SIZE:

View File

@ -1638,7 +1638,6 @@ add_text_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
#if PANGO_VERSION_CHECK(1, 49, 0)
if (style->line_height != 0.0)
{
if (style->line_height_is_absolute)
@ -1650,7 +1649,6 @@ add_text_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
#endif
if (style->font_features)
{

View File

@ -41,10 +41,8 @@ print_attribute (PangoAttribute *attr, GString *string)
case PANGO_ATTR_ALLOW_BREAKS:
case PANGO_ATTR_INSERT_HYPHENS:
case PANGO_ATTR_SHOW:
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
case PANGO_ATTR_TEXT_TRANSFORM:
#endif
g_string_append_printf (string, "%d", ((PangoAttrInt *)attr)->value);
break;
case PANGO_ATTR_FONT_DESC:
@ -69,9 +67,7 @@ print_attribute (PangoAttribute *attr, GString *string)
g_string_append_printf (string, "shape");
break;
case PANGO_ATTR_SCALE:
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_LINE_HEIGHT:
#endif
{
char val[20];