Bug 268163 - Do not offer to compression service menu on an already compressed archive
Summary: Do not offer to compression service menu on an already compressed archive
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 21:44 UTC by whatmeurgent
Modified: 2016-06-05 17:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.08.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description whatmeurgent 2011-03-10 21:44:07 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

Why Compress a compressed archive?

Dolphin context menu for compressed files includes an action to ... compress the file


Reproducible: Always

Steps to Reproduce:
01] open dolphin
02] right click on a tar.gz file


Actual Results:  
there is context menu option to compress what is an already compressed archive (tar.gz)

Expected Results:  
No such option present; alternatively I suppose there could be a more general option "convert compression type" if that was the purpose of this menu option and it was just named vaguely.
Comment 1 Peter Penz 2011-03-10 22:21:02 UTC
This is in the scope of Ark: If a MIME-type is not sufficient for deciding whether a service-menu can be used, then Ark should ideally provide a KFileItemActionPlugin instead (see http://ppenz.blogspot.com/2010/11/improved-service-menus.html)
Comment 2 Raphael Kubo da Costa 2011-03-11 01:12:21 UTC
Confirming, thanks for the report.
Comment 3 Gagan Batra 2014-01-30 08:23:04 UTC
hi,
i would like to contribute to this bug.
Comment 4 Elvis Angelaccio 2016-06-05 17:53:35 UTC
Git commit c369264d6c9ba2763b338f025c359c1b4c86f66e by Elvis Angelaccio.
Committed on 05/06/2016 at 17:50.
Pushed by elvisangelaccio into branch 'master'.

Port service menus to KFileItemAction

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.

We can also stop hardcoding the supported mimetypes for the Extract
menu. This is actually required in order to support the Extract menu when more
than one archive is selected. In this case Dolphin sends to the kfileitemaction
plugins the
generic 'application/octet-stream' mimetype, so we have to manually check
anyway the mimetype of any given URL (to be sure that Ark supports it).

This also paves the way to dynamically generate the service menus (e.g. based
on some kind of user preset).
Related: bug 189177, bug 348582
FIXED-IN: 16.08.0

Differential Revision: D1761

M  +22   -6    app/CMakeLists.txt
D  +0    -179  app/ark_addtoservicemenu.desktop
D  +0    -167  app/ark_servicemenu.desktop.cmake
A  +99   -0    app/compressfileitemaction.cpp     [License: GPL (v2+)]
A  +54   -0    app/compressfileitemaction.h     [License: GPL (v2+)]
A  +15   -0    app/compressfileitemaction.json
A  +103  -0    app/extractfileitemaction.cpp     [License: GPL (v2+)]
A  +54   -0    app/extractfileitemaction.h     [License: GPL (v2+)]
A  +13   -0    app/extractfileitemaction.json

http://commits.kde.org/ark/c369264d6c9ba2763b338f025c359c1b4c86f66e