Questions about a unified API for file choosers (and platform/toolkit integration)
thiago at kde.org
Mon Mar 27 21:18:29 UTC 2017
On quinta-feira, 23 de março de 2017 14:30:20 PDT Roman Hargrave wrote:
> Currently, some applications use DESKTOP_SESSION as a way to determine which
> utilities and IPC facilities, etc, to interact with. Currently, the burden
> of selecting the "correct" toolkit features is upon the application, and I
> have encountered at least one application that seems to switch between the
> Qt or GTK file picker based on the environment it runs in, so there is
That's actually Qt's behaviour. It chooses, based on DESKTOP_SESSION and the
window manager you're running, which platform theme to load or fall back to.
It can be either the KDE platform theme (gets you the KDE file dialog), the
Gtk3 theme (links to libgtk-3.so and gets you whatever GTK wants for file
dialog), the "gnome" theme (no linking, just dlopens some things and tries to
guess) or the fallback which uses the built-in Qt file dialog.
I don't think we can change this. There can't be a file dialog API for Qt to
use that would circle back to Qt (chicken-and-the-egg problem). At best, we
could use a centralised "guess my environment" library so that all
applications come to the same conclusion.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
More information about the xdg