Review Request 120015: KIO: Save the default application into the group [Default Applications]

Luc Menut lmenut at free.fr
Sun Sep 7 23:59:08 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120015/
-----------------------------------------------------------

(Updated Sept. 7, 2014, 11:59 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks and David Faure.


Repository: kio


Description
-------

Similar change for KIO as Review Request #120012
Save the default application for a given mimetype by writing into the group [Default Applications] in the file mimeapps.list, according to mime-apps-spec 1.0 .
http://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html#default

Currently, the default application saved by KDE (first application in [Added Assocations] ) is not respected by applications using glib/gio (which follow mime-apps-spec 1.0) if there is a default application at a lower level (eg $XDG_DATA_DIRS/applications/mimeapps.list), because the most-preferred .desktop from [Added Assocations] for a given mimetype is used to determine the default application only if there is no entry in [Default Applications] for this mimetype at all levels.
mime-apps-spec 1.0#default
"... In the absence of such an entry, the next mimeapps.list is checked. Once all levels have been checked, if no entry could be found, the implementations should pick the most-preferred .desktop files associated with the mimetype, taking into account added and removed associations as per the next section."

eg. if we have
- ~/.local/share/applications/mimeapps.list (with no group [Default Applications] )
[Added Assocations]
mimetype1=foo1.desktop;foo2.desktop;foo3.desktop

- /usr/share/applications/mimeapps.list (from distrib preferences)
[Default Applications]
mimetype1=foo3.desktop;foo4.desktop;foo1.desktop;foo2.desktop;

according to mime-apps-spec 1.0, the default application used for mimetype1 will be foo3.desktop instead of foo1.desktop expected by a KDE user.

The proposed patch fixes this.

regards,
Luc Menut - Mageia

PS: I don't have write access to kde git, so could you commit the change if the patch looks fine. Thanks.


Diffs
-----

  src/widgets/kopenwithdialog.cpp 4c56fc1 

Diff: https://git.reviewboard.kde.org/r/120015/diff/


Testing
-------

tested with kio 5.1.0 (Mageia Cauldron)


Thanks,

Luc Menut

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140907/381a39bc/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list