! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Drag and Drop support for ristretto
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Ristretto
Component:
Application

Comments

Description David B. Cortarello 2007-11-24 17:44:31 CET
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.
Comment 1 Stephan Arts editbugs 2011-11-04 11:46:40 CET
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?
Comment 2 Eric Koegel editbugs 2011-12-23 07:59:25 CET
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.
Comment 3 Stephan Arts editbugs 2012-01-02 16:06:49 CET
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?
Comment 4 Simon Steinbeiss editbugs 2012-01-02 17:25:13 CET
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 ;)
Comment 5 Stephan Arts editbugs 2012-01-02 21:37:33 CET
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).
Comment 6 Eric Koegel editbugs 2012-01-03 19:31:53 CET
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.
Comment 7 Stephan Arts editbugs 2012-01-06 17:17:43 CET
(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.
Comment 8 Eric Koegel editbugs 2012-01-06 19:52:59 CET
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.
Comment 9 Eric Koegel editbugs 2012-01-07 03:18:23 CET
Created attachment 4086 
[PATCH] Drag and drop for images.

Code cleanup, I didn't like some of the code duplication in the last patch.
Comment 10 Stephan Arts editbugs 2012-01-07 09:47:07 CET
Patch applied.

Bug #3688

Reported by:
David B. Cortarello
Reported on: 2007-11-24
Last modified on: 2012-01-07

People

Assignee:
Stephan Arts
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information