<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/120012/">https://git.reviewboard.kde.org/r/120012/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks and David Faure.</div>
<div>By Luc Menut.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-cli-tools
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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 .<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
http://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html#default</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
mime-apps-spec 1.0#default<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
"... 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."</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">eg. if we have<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
- ~/.local/share/applications/mimeapps.list (with no group [Default Applications] )<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
[Added Assocations]<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
mimetype1=foo1.desktop;foo2.desktop;foo3.desktop</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">/usr/share/applications/mimeapps.list (from distrib preferences)<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
[Default Applications]<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
mimetype1=foo3.desktop;foo4.desktop;foo1.desktop;foo2.desktop;</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The proposed patch fixes this.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">regards,<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Luc Menut - Mageia</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">PS: I don't have write access to kde git, so could you commit the change if the patch looks fine. Thanks.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">tested with kde-cli-tools 5.0.1 (Mageia Cauldron)</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>keditfiletype/mimetypedata.h <span style="color: grey">(5b00c07)</span></li>
<li>keditfiletype/mimetypedata.cpp <span style="color: grey">(65af59c)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/120012/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>