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

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


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks and David Faure.


Repository: kde-cli-tools


Description
-------

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
-----

  keditfiletype/mimetypedata.h 5b00c07 
  keditfiletype/mimetypedata.cpp 65af59c 

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


Testing
-------

tested with kde-cli-tools 5.0.1 (Mageia Cauldron)


Thanks,

Luc Menut

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to