Warn if a property alias is used

Emit a deprecation warning if a property is not used
by its official name.
This commit is contained in:
Matthias Clasen 2015-11-20 20:21:33 -05:00
parent 7c95f50ee2
commit f3e4e8660d

View File

@ -2485,7 +2485,16 @@ parse_declaration (GtkCssScanner *scanner,
return;
}
if (strcmp (name, "engine") == 0)
if (property != NULL && strcmp (name, property->name) != 0)
{
gtk_css_provider_error (scanner->provider,
scanner,
GTK_CSS_PROVIDER_ERROR,
GTK_CSS_PROVIDER_ERROR_DEPRECATED,
"The '%s' property has been renamed to '%s'",
name, property->name);
}
else if (strcmp (name, "engine") == 0)
{
gtk_css_provider_error (scanner->provider,
scanner,