Use Ark part only when mime type exactly matches a supported type
ClosedPublic

Authored by broulik on Sep 12 2018, 8:26 AM.

Details

Summary

Many file types (e.g. Open Document and Office Open XML) are technically just archives but browsing their internals is typically not what the user wants.
Only when the mime type matches one of Ark's supported archive types directly, open them in the internal previewer.
If it turns out to be a genuine archive after all it should just open in a new Ark window then.

CHANGELOG: Fixed Ark previeweing certain files (e.g. Open Document) as archives instead of opening them in the appropriate application

BUG: 398531
FIXED-IN: 18.12.0

Test Plan

Put an .ods file into an archive, clicked it in Ark, opened in LibreOffice instead of showing the file's contents in a ark previewer

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Sep 12 2018, 8:26 AM
Restricted Application added a project: Ark. · View Herald TranscriptSep 12 2018, 8:26 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
broulik requested review of this revision.Sep 12 2018, 8:26 AM
elvisangelaccio requested changes to this revision.Sep 16 2018, 3:57 PM

Looks good otherwise

part/arkviewer.cpp
221–223

Please move this comment below, it's a bit confusing here (because it doesn't explain what the find_id call does).

This revision now requires changes to proceed.Sep 16 2018, 3:57 PM
broulik updated this revision to Diff 41834.Sep 17 2018, 1:38 PM
  • Move comment
elvisangelaccio accepted this revision.Sep 22 2018, 8:09 AM
This revision is now accepted and ready to land.Sep 22 2018, 8:09 AM
This revision was automatically updated to reflect the committed changes.