Open Bug 1749130 Opened 2 years ago Updated 12 days ago

Restore use of IFileOpenPicker and IFileSavePicker

Categories

(Core :: Widget: Win32, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: saschanaz, Assigned: saschanaz)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached image image.png

It allows to connect to UWP apps including Camera and Photos, and get files right from them just as the file picker in Firefox for Android can.

Summary: Restore use of IFileOpenPicker → Restore use of IFileOpenPicker and IFileSavePicker

That opens a question: Does IFileSavePicker have any advantage too? (My patch uses it anyway, but)

  • It changes the default dialog and button title.
  • It changes the default overwrite behavior.
  • It may inform accessibility tools of more accurate information.

Thank you!

Just to log some chat from Slack: This should probably be rewritten in C++/WinRT instead of deprecated WRL, unless we have an important reason to support this in Windows 8 too. (I doubt it, it can just use the old API.) (Edit: Since cppwinrt is just a header-only library, I guess it shouldn't have compat issue with windows 8?)

https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-supported-api?tabs=csharp#classes-that-use-iinitializewithwindow
https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/move-to-winrt-from-wrl

Some caveats:

  • IFileOpenPicker does not support named filter groups. No grouped "Image Files", just a separate set of filter. IFileSavePicker does support it, weirdly.
  • IFileOpenPicker defaults to All Files without support for filter index. This is particularly bad for <input accept>.
  • IFileSavePicker does not support "All Files (.)", althought IFileOpenPicker does, also weirdly.
Severity: -- → S3
Priority: -- → P2
Attachment #9258188 - Attachment is obsolete: true

Time to revisit as a hobby work item...

Assignee: nobody → krosylight
Depends on: 1773509
See Also: → 1677170
See Also: → 1884054
See Also: → 1890431
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: