Show always text when viewer is in text-mode
ClosedPublic

Authored by martinkostolny on Aug 23 2016, 7:22 PM.

Details

Summary

Some time ago I've submitted a patch (https://git.reviewboard.kde.org/r/127291/) which forced opening text viewer instead of hex viewer when mimetype was unknown (application/octet-stream). This is of course valid only when TextMode is chosen in Konfigurator->General->Viewer/Editor. Situation got better but I still hit some corner cases when hex viewer is opened instead of text viewer.

Examples of corner case mimetypes I've found:

  • application/x-extension-html
  • application/x-trash

And there is probably more mimetypes not inheriting text/plain and therefore would lead to "binary" categorization.

I'd like to propose that when TextMode is enabled, every single file is opened in lister or text viewer regardless of it's mimetype. Hex viewer is never showed. Do you think it is a good idea?

Test Plan

Switch to TextMode and try:

  • opening any text file using F3 key
  • opening any *.bak or binary (e.g. png) file using F3 key

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
martinkostolny retitled this revision from to Show always text when viewer is in text-mode.
martinkostolny updated this object.
martinkostolny edited the test plan for this revision. (Show Details)
martinkostolny added a reviewer: Krusader.
martinkostolny set the repository for this revision to R167 Krusader.
martinkostolny added a project: Krusader.
gengisdave accepted this revision.Aug 28 2016, 12:30 PM
gengisdave added a reviewer: gengisdave.
This revision is now accepted and ready to land.Aug 28 2016, 12:30 PM
This revision was automatically updated to reflect the committed changes.