Merge branch 'filefilter-suffixes' into 'main'

filefilter: Fix <suffixes> in buildable

See merge request GNOME/gtk!4581
This commit is contained in:
Matthias Clasen 2022-03-17 16:57:09 +00:00
commit 8f9ee48aaa
2 changed files with 8 additions and 2 deletions

View File

@ -283,7 +283,8 @@ parser_start_element (GtkBuildableParseContext *context,
}
if (strcmp (element_name, "mime-types") == 0 ||
strcmp (element_name, "patterns") == 0)
strcmp (element_name, "patterns") == 0 ||
strcmp (element_name, "suffixes") == 0)
{
if (!_gtk_builder_check_parent (data->builder, context, "object", error))
return;
@ -422,7 +423,8 @@ gtk_file_filter_buildable_custom_tag_end (GtkBuildable *buildable,
gpointer user_data)
{
if (strcmp (tagname, "mime-types") == 0 ||
strcmp (tagname, "patterns") == 0)
strcmp (tagname, "patterns") == 0 ||
strcmp (tagname, "suffixes") == 0)
{
SubParserData *data = (SubParserData*)user_data;

View File

@ -9,5 +9,9 @@
<pattern>*.txt</pattern>
<pattern>*.png</pattern>
</patterns>
<suffixes>
<suffix>txt</suffix>
<suffix>png</suffix>
</suffixes>
</object>
</interface>