Skip to content
  • Huon Imberger's avatar
    Allow dragging files/folders to View mode · 131d2585
    Huon Imberger authored
    Summary:
    Specifically accepts drop events within the viewport of {nav View} mode.
    If a folder that contains images is dropped, it will open that folder
    and remain in {nav View} mode with the first image selected. If the
    folder doesn't contain images, it switches to {nav Browse} mode.
    Dragging multiple items is supported but only the first item is opened.
    
    BUG: 169408
    FIXED-IN: 18.08.0
    
    {F5781556}
    
    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).
    {nav Browse} mode and the {nav 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
    {nav 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
    131d2585