While investigating why the open directory dialogs in Zed weren't the same as other GTK programs and Chromium, I noticed that the dbus message ashpd sent had an empty choices array (even though Zed didn't set any choices itself). Making the choices optional so ashpd wouldn't send them fixed the problem.
This is probably a KDE quirk; but the file chooser portal documentation states:
As a special case, passing an empty array for the list of choices indicates a boolean choice that is typically displayed as a check button, using “true” and “false” as the choices.
So it's probably a good idea to make them optional.
To clarify, this is what dialogs looked like before:
This is actually an annoying limitation of the SerializeDict macro that doesn't provide a way to skip a field if it is empty... For the time being, this looks good enough for me. Thanks!
While investigating why the open directory dialogs in Zed weren't the same as other GTK programs and Chromium, I noticed that the dbus message ashpd sent had an empty choices array (even though Zed didn't set any choices itself). Making the choices optional so ashpd wouldn't send them fixed the problem.
This is probably a KDE quirk; but the file chooser portal documentation states:
So it's probably a good idea to make them optional.
To clarify, this is what dialogs looked like before:
And this is how they look now: