Skip to content

Conversation

@ryonakano
Copy link
Member

@ryonakano ryonakano commented Nov 29, 2025

Fixes #266

I also refactored get_types_for_app () while I'm here.

Checklist

I installed Okular from Flathub and confirmed that:

  • the default PDF viewer is selected by default when opening the defaults plug first time
  • PDF files are opened with the PDF viewer selected in the defaults plug when activating them from Files

@ryonakano ryonakano requested a review from a team November 29, 2025 05:10
@ryonakano ryonakano added this to OS 9 Nov 29, 2025
@ryonakano ryonakano moved this to Needs Review in OS 9 Nov 29, 2025

var pdf_setting = new SettingsChild (
_("PDF Viewer"),
"application/pdf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should change this to "Document Viewer" and also change some of these other document file types? https://gitlab.gnome.org/GNOME/papers/-/blob/main/meson.build?ref_type=heads#L220

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not opposed to your suggestion, but other PDF viewers may not support most of those content types. Should we really want to do this? 🤔

The following warnings are shown when selecting Okular:

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.109: DefaultPlug.vala:154: Okular does not support content type application/vnd.comicbook-rar

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.115: DefaultPlug.vala:154: Okular does not support content type application/vnd.comicbook+zip

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.119: DefaultPlug.vala:154: Okular does not support content type application/x-cb7

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.143: DefaultPlug.vala:154: Okular does not support content type application/x-ext-cb7

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.146: DefaultPlug.vala:154: Okular does not support content type application/x-ext-cbr

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.148: DefaultPlug.vala:154: Okular does not support content type application/x-ext-cbt

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.153: DefaultPlug.vala:154: Okular does not support content type application/x-ext-cbz

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.158: DefaultPlug.vala:154: Okular does not support content type application/x-ext-djv

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.163: DefaultPlug.vala:154: Okular does not support content type application/x-ext-djvu

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.172: DefaultPlug.vala:154: Okular does not support content type image/vnd.djvu+multipage

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.175: DefaultPlug.vala:154: Okular does not support content type application/illustrator

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.191: DefaultPlug.vala:154: Okular does not support content type application/x-ext-pdf

(io.elementary.settings:33919): io.elementary.settings.applications-CRITICAL **: 14:56:52.200: DefaultPlug.vala:154: Okular does not support content type application/x-xzpdf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with this as-is and we can always re-evaluate adding more types later if necessary :)

@danirabbit danirabbit merged commit 3d57124 into main Dec 5, 2025
4 checks passed
@danirabbit danirabbit deleted the ryonakano/default-pdf branch December 5, 2025 18:03
@github-project-automation github-project-automation bot moved this from Needs Review to Done in OS 9 Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add default selector for pdf viewer

2 participants