Port service menus to KFileItemAction
ClosedPublic

Authored by elvisangelaccio on Jun 3 2016, 2:22 PM.

Details

Summary

The Compress and Extract service menus shown in Dolphin's context menu are now
provided by two new KFileItemAction plugins. This allows us to do a lot of
useful checks before actually showing the actions in the context menu.

This also allows us to stop hardcoding the supported mimetypes for the Extract
menu. This is actually needed in order to support the Extract menu when more
than one archive is selected. In this case Dolphin sends to the plugin the
generic 'application/octet-stream' mimetype, so we have to manually check
anyway the mimetype of any given URL.

Test Plan
  • Apply https://git.reviewboard.kde.org/r/128088/ to dolphin master
  • Make sure that the Compress and Extract menu are disabled in read-only folders
  • Make sure that Compress is not shown when right-clicking an archive
  • Uninstall zip/7z and make sure that 'Compress -> as ZIP' is not shown

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.
elvisangelaccio retitled this revision from to Port service menus to KFileItemAction.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio updated this object.
Restricted Application added a project: Ark. · View Herald TranscriptJun 3 2016, 2:22 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
rthomsen accepted this revision.Jun 5 2016, 9:30 AM
rthomsen edited edge metadata.

Thanks for working on this. I followed your testing steps and it works as expected (after deleting the two old .desktop files). I also tried various compress and extract actions from the service menus and everything seems to work.

Now we can consider re-adding the "Compress->Here (as RAR)" entry :)

This revision is now accepted and ready to land.Jun 5 2016, 9:30 AM
This revision was automatically updated to reflect the committed changes.