Bug 281690 - Ability to drag&drop images from digikam to chrome/google+
Summary: Ability to drag&drop images from digikam to chrome/google+
Status: RESOLVED UPSTREAM
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Drag&Drop (show other bugs)
Version: 2.9.0
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-09 14:50 UTC by Petr Zmek
Modified: 2022-01-11 15:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Zmek 2011-09-09 14:50:41 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

Hello,

I miss an ability to drag & drop photos from digikam window to chrome window to upload to server (i.e. google+). I don't know the chrome version this is possible from, but in ver.11 it is. It also is possible drag & drop from gwenview window, but it is too complicated to make some filtered photo group in digikam, tag it with some temp tag, then open gwenview and show pics with the tag and then d&d to the chrome.

Is this feature possible?

Reproducible: Always

Steps to Reproduce:
drag and drop pics from digikam to chrome window


Expected Results:  
possibility of drag & drop pics from digikam to chrome window
Comment 1 caulier.gilles 2011-09-09 16:45:17 UTC
Fully reproducible here.

I need to use gwenview instead. Drag and drop work fine.

Note: With Dolphin, it doesn't work. digiKam and Dolphin use same component for icon-view, which include D&D implementation if i'm not too wrong.

It can be something to improve in KDELibs. Marcel, i'm not sure. Your viewpoint ?

Gilles Caulier
Comment 2 Marcel Wiesweg 2011-09-10 14:05:54 UTC
We have our own d&d implemtation in ddragobjects.cpp. We have some internal mimetypes, but also add the interoperable mime data (file URLs) through the kdelibs method KUrl::List::populateMimeData. This is why you can drag from digikam to e.g. dolphin.

I was searching for "QMimeData" in gwenview's source and did not find anything special except for using the populdateMimeData method as well.
Comment 3 Marcel Wiesweg 2011-09-11 14:13:17 UTC
There is an easy way to debug dropped mime data. Add the two lines to dragdrop/imagedragdrop.cpp, 598:

Qt::DropAction ImageDragDropHandler::accepts(const QDropEvent* e, const QModelIndex& /*dropIndex*/)
{
    kDebug() << "Dropped mimetypes:" << e->mimeData()->formats();
    return false;
    if (albumModel() && !albumModel()->currentAlbum())

Then drop from dolphin, chrome, gwenview, and digikam to the digikam icon view. There should be a line output with the offered mimetypes each time. Then we can see if gwenview adds some magic to the drag.
Comment 4 Dave M 2011-10-31 03:34:07 UTC
Certainly not wanting to make this a "me too" comment fest, just noticed not much chatter on this issue.  I'm not in a position to alter and compile the above, but can confirm that I cannot drag and drop files from Dolphin to Chrome (i.e. GMail attachments).  Works ok with Firefox or with Chrome and any other file browser (Krusader, or a Gnome file browser).
Comment 5 caulier.gilles 2011-10-31 11:58:20 UTC
I'm GMail + Chromium user, and D&D work fine here with digiKam to attach photo to mail.

Gilles Caulier
Comment 6 caulier.gilles 2012-09-12 10:35:44 UTC
*** Bug 306635 has been marked as a duplicate of this bug. ***
Comment 7 Robert Schöftner 2012-09-12 14:48:53 UTC
I made a test with the "dropsite" Qt-example application. Dnd from gwenview results in these mime-types:

text/uri-list
text/x-moz-url
text/plain
UTF8_STRING
STRING
TEXT
COMPOUND_TEXT
application/x-qiconlist

whereas Dnd from digikam results in

digikam/item-ids
digikam/digikamalbums
digikam/album-ids
digikam/image-ids-long
text/uri-list
text/x-moz-url
text/plain
UTF8_STRING
STRING
TEXT
COMPOUND_TEXT

The additional mime-types (digikam/*) should not trigger different behaviour IMHO.

A quick test in firefox shows that DND is working from gwenview and from digikam. Seems to be a bug on the chrome-side of things... Perhaps it gets confused by the  digikam-specific mime-types.
Comment 8 caulier.gilles 2012-09-12 15:14:45 UTC
Yes, it's sound like a bug in Chrome. We respect DND standard provided by Qt. Chreme must be able to ignore digikam* type mime used for intenal DND purpose and use standarized one that we provide.

Please report this problem to Chrome bugzilla. Thanks in advance.

Gilles Caulier