It would be nice to support drag and drop, so you could open thunar, select an image and drag it to an open session of ristretto so the last one open the image.
With the current behaviour of ristretto, this would make ristretto close all remaining images and open the new one (and it's siblings). Is that what you'd expect?
Created attachment 4039 [PATCH] Added dnd support for image files. This patch adds basic drag and drop code so that a user can drag image files from Thunar, nautilus, Dolphin, or xfdesktop and it will add the image(s) to the current image list.
Nice patch Eric, But it does not answer my question. I've added Simon on CC for this bug. What behaviour is expected of ristretto when an image is dropped on it's interface? a) Open the image and add it to the list of opened images (patch) b) Close all images, and open the image that's dropped + all images in the same directory of the image. c) Do (a) and then nag the user with a pop-up dialog asking if he actually wants (b). I am inclined to think b or c are preferred, but I have doubts. What do you guys think?
Personally I'd think that the only consistent behaviour for the folder-mode is b). c) seems a bit like overkill to me (you wouldn't wanna answer that question everytime after drag and drop as a user imo). You can add a general switch to change the behaviour between folder-mode and "presentation/playlist" mode or maybe even a "playlist"-system where you can drag and drop in pics that you can later show as a slideshow (ristretto could keep a simple textfile with the image-addresses somewhere), but this is a different story/bugreport I guess ;)
A 'playlist' mode is something I have kept in mind for years, but I never came around to implementing. If we agree that this is a separate feature/bugreport then I indeed think the correct approach regarding this bug considering the current behaviour would be the behaviour b).
Created attachment 4078 [PATCH] Drag and drop for images. Adds support to open image files dropped into ristretto as well as all the images in that same directory. Optionally, the user can just drop a single folder and ristretto will load all the images in there.
(In reply to comment #6) > Created attachment 4078 > [PATCH] Drag and drop for images. > > Adds support to open image files dropped into ristretto as well as all the > images in that same directory. Optionally, the user can just drop > a single folder and ristretto will load all the images in there. Can you change it as followed? - User drops a single image - Image is loaded and all images in the same folder - User drops a folder - All images in the folder are loaded and the first image in the list is shown - User drops a selection of images - Only the selected images are loaded. This way the DnD support is identical to the behaviour of the 'normal' behaviour for opening files.
Created attachment 4083 [PATCH] Drag and drop for images. Adds support to open image files into ristretto as well as all the images in that same directory depending on what files were dropped, i.e. dropping one image will load all images in the directory while dropping a selection will reset the thumbnail bar and only load the selected images. Optionally, the user can just drop a single folder and ristretto will load all the images in there.
Created attachment 4086 [PATCH] Drag and drop for images. Code cleanup, I didn't like some of the code duplication in the last patch.
Patch applied.