Open Doublonmousse opened 3 weeks ago
Edit : with filter.add_pattern
only, this seems to work.
This also works with filter.add_pattern
and filter.add_suffix
. (although the extension is shown twice in that case)
The extension is added automatically on windows with the native file picker and the file filter is shown as well.
I might try to use only patterns or patterns+suffix everywhere and removing all mimetypes, test on Windows (this should work), then on the other twos (linux + mac) to see
Thanks for investigating this so thoroughly and reporting the issue upstream!
Hopefully it will be fixed in Gtk at some point so that it just works as expected on windows as well
Describe the bug
After #1075, filters still don't work as expected.
On windows, applying the filters make gtk not even use the windows native file picker https://gitlab.gnome.org/GNOME/gtk/-/issues/6717.
On linux, the filter appears but you can still save a file without the file extension. The filename portion is the only part selected so it's harder to achieve but is still possible.![image](https://github.com/flxzt/rnote/assets/115779707/7efe6b56-7371-4659-8aad-5b94c20076b9)
Expected behavior
Have the filter work in a way that makes it impossible to have a
filename
saved without any extensions and using the native file picker on all platforms.Libreoffice works around this by adding themselves the![Screenshot 2024-06-08 105938](https://github.com/flxzt/rnote/assets/115779707/1815156b-6a3a-43fc-a375-0d3aa7747966)
.odt
if the extension is not there in the file pickerOne issue on the gtk repo talks about this issue as well https://gitlab.gnome.org/GNOME/gtk/-/issues/5367
To have something that uses the native file picker everywhere, no mime type nor custom filters can be used. Now the question is whether using add_pattern over add_mime_type will work
Desktop (please complete the following information):