Teach gtk-builder-tool to rewrite <requires>.

This commit is contained in:
Arnaud Bonatti 2020-11-07 11:24:19 +01:00
parent db6d7dccd8
commit e6d46ec5ad

View File

@ -1635,6 +1635,14 @@ rewrite_scale (Element *element,
}
}
static void
rewrite_requires (Element *element,
MyParserData *data)
{
if (has_attribute (element, "lib", "gtk+"))
set_attribute_value (element, "lib", "gtk");
}
static void
rewrite_overlay (Element *element,
MyParserData *data)
@ -1978,6 +1986,9 @@ rewrite_element (Element *element,
property_has_been_removed (element, data))
return TRUE;
if (g_str_equal (element->element_name, "requires"))
rewrite_requires (element, data);
return FALSE;
}