From 8eb9844a45cc66df48265cd7ac58b8ee68cc0628 Mon Sep 17 00:00:00 2001 From: James Westman Date: Thu, 17 Mar 2022 10:49:39 -0500 Subject: [PATCH] filefilter: Fix in buildable A bug in GtkFileFilter's GtkBuildable implementation caused the tag not to be recognized. --- gtk/gtkfilefilter.c | 6 ++++-- testsuite/gtk/ui/filefilter1.ui | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c index ae45ad72a4..c9a4d3040a 100644 --- a/gtk/gtkfilefilter.c +++ b/gtk/gtkfilefilter.c @@ -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; diff --git a/testsuite/gtk/ui/filefilter1.ui b/testsuite/gtk/ui/filefilter1.ui index f8df737720..85acb18b9a 100644 --- a/testsuite/gtk/ui/filefilter1.ui +++ b/testsuite/gtk/ui/filefilter1.ui @@ -9,5 +9,9 @@ *.txt *.png + + txt + png +