https://bugs.kde.org/show_bug.cgi?id=452225

--- Comment #5 from Harald Sitter <sit...@kde.org> ---
This is a bit awkward...

okularApplication_pdf.desktop is the actual desktop file associating with pdf,
org.kde.okular.desktop does not. 

What happens then is that the xdg-desktop-portal queries the options for pdf,
it gets back okularApplication_pdf.desktop and whatever else may handle pdf

e.g.
XDP: Recommended handlers for file, application/pdf: okularApplication_pdf,
org.chromium.Chromium, org.gimp.GIMP, inkscape

this then further trips up inside the portal because 

a) there isn't a single choice
b) the scheme to be opened isn't remote and so should_use_default_app() doesn't
apply
c) right out the gate the user wouldn't have picked okular often enough for it
to get auto-selected (i.e. the user would have had to pick okular a number of
times from the dialog before it becomes implicit default)

ultimately this results in the dialog popping up (which is kind of silly TBH)
and that dialog will then does not contain okular because
okularApplication_pdf.desktop is NoDisplay and org.kde.okular.desktop doesn't
associate with PDF. Long story short: the behavior is expected.

This ultimately shouldn't happen though, this bug is in effect a variant of
https://github.com/flatpak/xdg-desktop-portal/issues/472 - the portal really
shouldn't be starting an appchooser dialog for pdf at all, but start the
default app. The only practical reason for the app chooser to appears is when
no handlers are found or when the user set always-ask on his system.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to