Allow dragging files/folders to View mode
Summary:
Specifically accepts drop events within the viewport of View mode.
If a folder that contains images is dropped, it will open that folder
and remain in View mode with the first image selected. If the
folder doesn't contain images, it switches to Browse mode.
Dragging multiple items is supported but only the first item is opened.
BUG: 169408
FIXED-IN: 18.08.0
Test Plan:
Test with different image formats, as well as unsupported format (Gwenview
should display a nice error).
Test with folder (with and without images within).
Browse mode and the Thumbnail Bar drag drop should work as before.
Drop operations should not be accepted anywhere else in the GUI where they aren't
already supported. In other words, this should only add drop functionality to the
View viewport.
Ensure drops are only accepted for URL mimetypes (e.g. ignore text).
Reviewers: Gwenview, rkflx, ngraham
Reviewed By: Gwenview, rkflx
Tags: Gwenview
Differential Revision: https://phabricator.kde.org/D11879