mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
filefilter: Fix <suffixes> in buildable
A bug in GtkFileFilter's GtkBuildable implementation caused the <suffixes> tag not to be recognized.
This commit is contained in:
parent
3e4bfa2bae
commit
1f00cdc7a6
@ -283,7 +283,8 @@ parser_start_element (GtkBuildableParseContext *context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (element_name, "mime-types") == 0 ||
|
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))
|
if (!_gtk_builder_check_parent (data->builder, context, "object", error))
|
||||||
return;
|
return;
|
||||||
@ -422,7 +423,8 @@ gtk_file_filter_buildable_custom_tag_end (GtkBuildable *buildable,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
if (strcmp (tagname, "mime-types") == 0 ||
|
if (strcmp (tagname, "mime-types") == 0 ||
|
||||||
strcmp (tagname, "patterns") == 0)
|
strcmp (tagname, "patterns") == 0 ||
|
||||||
|
strcmp (tagname, "suffixes") == 0)
|
||||||
{
|
{
|
||||||
SubParserData *data = (SubParserData*)user_data;
|
SubParserData *data = (SubParserData*)user_data;
|
||||||
|
|
||||||
|
@ -9,5 +9,9 @@
|
|||||||
<pattern>*.txt</pattern>
|
<pattern>*.txt</pattern>
|
||||||
<pattern>*.png</pattern>
|
<pattern>*.png</pattern>
|
||||||
</patterns>
|
</patterns>
|
||||||
|
<suffixes>
|
||||||
|
<suffix>txt</suffix>
|
||||||
|
<suffix>png</suffix>
|
||||||
|
</suffixes>
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
Loading…
Reference in New Issue
Block a user