D17764: Allow creating empty file in filesystem browser
Alexey Bogdanenko
noreply at phabricator.kde.org
Sun Dec 23 16:26:34 GMT 2018
abogdanenko created this revision.
Herald added a project: Kate.
Herald added a subscriber: kwrite-devel.
abogdanenko requested review of this revision.
REVISION SUMMARY
This commit allows user to create new empty files from filesystem
browser plugin. Filenames without extension are supported.
Menu items which produce such files were missing from Create New menu.
This is due to the way MIME type filter was configured. The filter
included files of type text/plain. However, empty files without
extension, for example, an empty file named "empty", do not belong to
class text/plain.
Both kmimetypefinder5 and xdg-mime utilities classify such a file as
application/x-zerosize. According to the current Shared MIME-Info
database, application/x-zerosize MIME type is not a subclass of type
text/plain, see
https://gitlab.freedesktop.org/xdg/shared-mime-info/blob/58bee0a8b52f4ced82c3ac227e688e24dc4259bf/freedesktop.org.xml.in#L3966.
This commit extends the filter accordingly.
REPOSITORY
R40 Kate
BRANCH
allow-empty-file
REVISION DETAIL
https://phabricator.kde.org/D17764
AFFECTED FILES
addons/filebrowser/katefilebrowser.cpp
To: abogdanenko
Cc: kwrite-devel, hase, michaelh, ngraham, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20181223/df82bec4/attachment.html>
More information about the KWrite-Devel
mailing list