GtkFileFilter constructed in UI files have an empty filter appended
Found by accident while working on Boatswain. This was the file filter I was using:
<object class="GtkFileFilter" id="file_filter">
<property name="name" translatable="yes">Audio Files</property>
<mime-types>
<mime-type>audio/*</mime-type>
</mime-types>
</object>
and this is what gtkfilechoosernativeportal.c sends through D-Bus:
dict entry(
string "filters"
variant array [
struct {
string "Audio Files"
array [
struct {
uint32 1
string "audio/*"
}
struct {
uint32 1
string ""
}
]
}
]
)
Notice the empty element at the array. Constructing the file filter programatically does not have this problem.
I think this might be a bug with the GtkBuildable implementation of GtkFileFilter.