Bug 219908 - Drag and Drop photo to folder: let user choose to copy or move
Summary: Drag and Drop photo to folder: let user choose to copy or move
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Drag&Drop (show other bugs)
Version: 1.0.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-24 01:52 UTC by Ar
Modified: 2017-08-01 12:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.1.0
Sentry Crash Report:


Attachments
dolphin context menu after drag from digikam (7.10 KB, image/jpeg)
2009-12-26 03:49 UTC, Mark Purcell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ar 2009-12-24 01:52:16 UTC
Version:           1.0.0 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

Currently (Digikam 1.0.0 final), dragging a photo from the album view photo grid or from the photo view' thumbbar to a Nautilus or Dolphin window moves the photo out of the album and into the folder.

This behavior is reasonable but we need a way to copy (instead of move) the photo by Ctrl-dragging or Alt-dragging it from Album View or Photo View to a File Manager window (nautilus or dolphin)

Likely Ctrl-drag for copy would be more intuitive

Thanks
Comment 1 caulier.gilles 2009-12-24 12:02:01 UTC
I'm Agree with this report. Providing a contextual menu with copy and paste is easy to do...

Gilles Caulier
Comment 2 Marcel Wiesweg 2009-12-24 15:14:52 UTC
If you are (and you say you do) talking about dragging _from_ digikam _to_ any other app, than that's not our problem at all - the receiving app is responsible for providing such a choice.

For me, dolphin indeed defaults to copying and cannot be convinced to move.
I'm not sure why. Maybe it's using the digikam URLs and treating them as remote files. In any case, text/uri-list is available as well.
Comment 3 Ar 2009-12-24 15:50:26 UTC
Hi Marcel, yes I refer about dragging pics out of Digikam and into a file manager window.

Digikam behaves differently from other apps from some reason. When I drag a photo in digikam, the mouse pointer changes color and I see a "1" inside a little box besides the mouse pointer; there is also a small picture that shows up besides the mouse pointer as well. 

Intuitively, if I Ctrl-drag I would expect a "+1" inside the little box.

All this does seem to be controlled by digikam. No other app in desktop behaves like this, even KDE Archiver tool.

Also the reverse operation is a "move" by default and doesn't seem to offer "copy" by Ctrl-drag
Comment 4 Marcel Wiesweg 2009-12-24 15:59:13 UTC
The pixmap is indeed generated by digikam (you will see a "2" if you drag two photos), but we still just pass URLs and cannot control what the receiving application is doing with this. I dont know what we could do differently.
Comment 5 Ar 2009-12-25 00:08:08 UTC
Just tested with Karmic's ark (package manager) and nautilus and dolphin. Somehow they are able to do both copy and move to both nautilus and dolphin.

Also, you can drag or ctrl-drag files from dolphin to nautilus and viceversa and it just works fine. Copy or move, depending on "Ctrl" state. They both likely follow the freedesktop specs so maybe that's  

By default ARK copies - I think it would be great if digikam would also "copy by default" instead of moving. By moving by default, you may inadvertently lose pictures, it happened to me a few times while Viewing an album and trying to copy pics to a "For Print" folder.


When you press shift then drag from ark, then it moves instead of copy. The icon changes (by default it draws a little "+", and when you shift-click it the arrow pointer changes to black and there is no "+". 


I think Ctrl-drag would be more intuitive for moving though, than shift-drag. "Ctrl" is what dolphin/nautilus use to select move or copy.

Thanks
Comment 6 Marcel Wiesweg 2009-12-25 12:49:54 UTC
I agree that the experience you get in the end is not optimal, but the technical background is not correctly described: When you drag from digikam to dolphin, then digikam just puts a list of URLs in a QDrag object, Qt uses the platform standards for drag'n'drop, and it's dolphin that copies or moves. Digikam does nothing.
Comment 7 Marcel Wiesweg 2009-12-25 12:50:45 UTC
I have to correct my comment above: Dolphin offers me the menu to copy or move, and Ctrl and Shift work as expected. So I cannot reproduce.

I have one tiny change, digikam otherwise starts a drag just like dolphin does.
Comment 8 Marcel Wiesweg 2009-12-25 12:52:16 UTC
SVN commit 1066014 by mwiesweg:

When starting a drag, give Qt::IgnoreAction as default proposed action.
This is how dolphin starts a drag as well.
When dragging only one image, use it's icon as drag pixmap.

CCBUG: 219908

 M  +1 -1      imagecategorizedview.cpp  
 M  +19 -1     imagedelegate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1066014
Comment 9 Ar 2009-12-26 02:49:34 UTC
Hi Marcel, Dolphin offers you the menu? what key combination/s are you using? I'm using karmic's default dolphin and I can't figure out how to copy instead of move.

Also, is it possible to consering doing "copy by default" instead "move by default" like currently done?

Thanks
Comment 10 Mark Purcell 2009-12-26 03:49:03 UTC
Created attachment 39345 [details]
dolphin context menu after drag from digikam
Comment 11 Mark Purcell 2009-12-26 03:50:48 UTC
Ar,

When I drag and drop from digikam (1.0.0) to dolphin (1.3 using KDE 4.3.4), on Debian, I receive a standard dialog with options of; move, copy, link or cancel.

So I don't think it is a digikam setting that is causing your issue.

Mark
Comment 12 Marcel Wiesweg 2009-12-27 20:46:33 UTC
> Also, is it possible to consering doing "copy by default" instead "move by
> default" like currently done?

Digikam does not default to "move" currently, it does not default to anything because digikam is not involved in any action when you drag from digikam to any other application. (digikam is responsible for what happens when you drag from anywhere to digikam).

Furthermore, we are now using the same code as dolphin to start a drag, and all this is basically using Qt API. I dont think we can do any more here.
Comment 13 caulier.gilles 2010-07-28 10:48:58 UTC
*** Bug 245835 has been marked as a duplicate of this bug. ***
Comment 14 Michiel Wittkampf 2010-07-28 12:20:14 UTC
Hi Marcel,

You explaind what the technical background is why 'move' is the default action when a picture is dragged to nautilus / dolphin. I agree with Gilles and Ar that 'copy-by-default' or a contextual menu with the choice copy/move is prefered in this case. Beceause it is a photo-management application.

You say you can't solve it. But I have the impression you agree that it would be nicer otherwise. Who in your opinion should we ask to improve this? gnome/kde? freedesktop folks?

Thanks,
Michiel
Comment 15 Marcel Wiesweg 2010-07-28 13:29:01 UTC
Well, from our side, with reading the Qt documentation, I can see no way to start the drag differently. I would be happy to improve this from our side, if there's a way which I did not see so far.

I would suggest to open a bug for dolphin. If Peter Penz in turn tells you that dolphin is all right and it's digikam's fault, we can discuss the problem!
Comment 16 Michiel Wittkampf 2010-07-29 10:53:12 UTC
A simular bug for dolphin was just created by someone else.
https://bugs.kde.org/show_bug.cgi?id=243657

I added a reference to this bug.
https://bugs.kde.org/show_bug.cgi?id=243657#c1
Comment 17 caulier.gilles 2013-01-13 14:52:53 UTC
*** Bug 313173 has been marked as a duplicate of this bug. ***