Restore the ability to use Ark as an embedded KPart
Review Request #102803 - Created Oct. 8, 2011 and submitted
(Copied from original review request https://svn.reviewboard.kde.org/r/5405/) In KDE3 it was possible to use Ark as am embedded KPart, e.g. to browse the contents of a remote archive inside Konqueror. Now in KDE4 this is not possible, ark_part.desktop is installed but contains no MimeTypes list. This change restores the MIME type list (copied verbatim from the Ark application's desktop file).
Built and installed Ark with these changes, it is now possible to preview the contents of an archive within Konqueror.
|Is this list in sync with app/ark.desktop?||Raphael Kubo da Costa|
Review request changed
Ok, big edit. Each plugin now sets its list of accepted MIME types in the CMakeLists.txt file, either fixed or in accordance with the configuration options, and that is edited into the plugin's desktop file(s). The cumulative list from all of the plugins is passed up to the top level as SUPPORTED_ARK_MIMETYPES, and that list is edited into the app's and part's desktop files. All desktop files therefore get the same (consistent) list, and any change in the list of types supported by a plugin is automatically propagated. Apologies for the huge diff, but it seems that reviewboard doesn't support Git renames.
Revision 2 (+1137 -1052)
Ship it! At first, I was in favour of fixing this the way Okular handles its mimetypes: each generator (in our case, plugin), has a .desktop file for the plugin itself, one with Type=Application and another one for the part. In our case, this would mean ark.desktop and ark_part.desktop could stop existing altogether. However, we also have ark_dndextract.desktop and ark_servicemenu.desktop which need a list with all the mimetypes we support, which is a problem Okular does not have (I think replacing them with a .desktop file for each plugin would be redundant and overkill, as each plugin would have 5 .desktop files). As I couldn't think of a better solution, please commit this to master.