Questions about a unified API for file choosers (and platform/toolkit integration)
thomas at kluyver.me.uk
Sun Mar 26 13:10:25 UTC 2017
On Thu, Mar 23, 2017, at 10:30 PM, Roman Hargrave wrote:
> Now, if there were a toolkit-agnostic set of interfaces for applications
> to call in to in order to prompt the user with the native file picker
> instead of that which the toolkits use would have the advantage of insuring
> that any settings applied by their desktop environment follow through to the
> application experience, thus allowing users to, for instance, not be subjected
> to, for instance GTK file picker if they would prefer to use the Qt picker.
Flatpak has a system of 'portals', so that a sandboxed application can
ask the user to select a file which the application wouldn't otherwise
have access to. From the description, it sounds like the UI you see will
depend on your desktop environment, not on the application's toolkit,
which seems like what you want.
I don't know whether this interface is available to applications not
running in Flatpak, though.
More information about the xdg