[digiKam-users] Copy file path and name to clipboard from thumbs view

Frédéric Da Vitoria davito9w at free.fr
Tue Mar 7 10:42:29 GMT 2023


I guess you did not understand what I wrote. I'll try to rephrase it. DK 
does not behave as you expecte because in Windows the software which 
copies to the clipboard must choose between file or text format. DK 
chooses file format, so that you can paste in Windows Explorer and other 
file managers, which is fine IMO. Unfortunately, the price to pay is 
that it does not work in most text editors. If you read my previous 
post, you'll see that DK's behaviour is the same as Windows Explorer's: 
when you copy from DK, you can paste in a file manager but not in a text 
editor, just as like when you copy from Windows Explorer (or the other 
file manager I checked).

Le 07/03/2023 à 11:12, Gilles Caulier a écrit :
> I can confirm that digiKam 7.9.0 under Windows the copy and paste from 
> icon-view to notepad do not work. I don't know why...
> Gilles Caulier
> Le mar. 7 mars 2023 à 11:10, Gilles Caulier <caulier.gilles at gmail.com> 
> a écrit :
>     The Gimp error is normal. Gimp attends to find image data in
>     clipboard, not test with url. Open an image in DK image editor,
>     Edit/Select all, and Edit/Copy the image contents. Go to gimp and
>     paste.gimp. Here it work like a charm under Linux.
>     Gilles Caulier
>     Le mar. 7 mars 2023 à 11:04, Frédéric Da Vitoria
>     <davito9w at free.fr> a écrit :
>         Hello,
>         I just tested using Notepad++ and The Gimp. Copy / Paste does
>         not do anything. I tried using Ctrl+C, Ctrl+Ins and the "Copy"
>         option in the thumbnail's contextual menu, same results.
>         Notepad++ reacts as if there was no text to paste :
>         and Gimp does the same :
>         The Gimp's message seems a little more informative, but
>         unfortunately the message is the same if the clipboard is
>         empty or if it contains no image data.
>         Drag & Drop works fine both with Notepad++ and with The Gimp.
>         Gilles, I was a little surprised that you expected Copy to
>         copy the name of the image instead of it's contents. From your
>         answer, I later realized that you expected Copy to work on both.
>         Using Nirsoft's InsideClipboard tool, I found that DK did
>         indeed put something in the clipboard, but that Notepad++ and
>         The Gimp could not understand it. So I checked copying from
>         different tools as a source (an image viewer, Windows Explorer
>         and so on). The image viewer I checked copies the image
>         contents, and works only with The Gimp. Windows Explorer and
>         another file manager don't work with Notepad++ or with The
>         Gimp, just like DigiKam. I could not find any tool which would
>         copy both the contents and the path in such a way that it
>         worked with Notepad++ and The Gimp. OTOH, copying from DK
>         towards Windows Explorer or another file manager works.
>         My conclusion is that the Windows clipboard is much less
>         tolerant than the Linux clipboard, the Windows clipboard
>         contains either a file (actually not the file itself, but data
>         allowing to identify it), text, image (or probably music and
>         so on) but not several types of data at once. So that copying
>         from DK can either work with a file manager, a text editor or
>         a graphics software but not with all at once. Currently, DK
>         places file data. I have no idea why software aren't as smart
>         with the clipboard as with Drag & Drop. Maybe some other text
>         editor is smart enough to parse the clipboard and fetch the
>         file path from what DK places there?
>         Note that DK does not always copy file data to the clipboard.
>         If you edit an image and select some part of it, DK copies
>         image data instead, which makes perfect sense IMO, so that you
>         can then paste to The Gimp.
>         InsideClipboard can save a digest of the clipboard contents. I
>         you find it useful, I can post digests taken in different
>         situations.
>         Regards
>         DigiKam 7.9.0
>         Build date: 03/12/2022 14:49 (target: RelWithDebInfo)
>         Revision: 99d199a7ebc10fae20afffc316ce34815f7d1c9d
>         Windows 11 64 bits
>         Le 07/03/2023 à 07:53, Gilles Caulier a écrit :
>>         Hi all,
>>         The copy and paste in digiKam is based on the QClipBoard class from Qt :
>>         https://doc.qt.io/qt-6/qclipboard.html
>>         In the album view, we take the item urls and we share the data to the
>>         clipboard as text list. It's a very simple mechanism.
>>         - paste into GEdit :https://i.imgur.com/1UF93ej.png
>>         - paste into VIM:https://i.imgur.com/SeGJLZ4.png
>>         - paste into Kate :https://i.imgur.com/eltQHZ4.png
>>         Note : the same mechanism is used with drag and drop...
>>         Best
>>         Gilles Caulier
>>         Le mar. 7 mars 2023 à 06:06, Shel Ritter<shelritterbmw at yahoo.com>  <mailto:shelritterbmw at yahoo.com>  a écrit :
>>>         Hey Robert ,
>>>         I was interested in seeing how people might respond to this question. I was surprised at Gilles's answer as I've never seen an option to copy an image file path in my older v7.3.0,  wondering if it was a feature added in a newer build. I'm running it in Windows 7 and that 'Copy' menu option does just copy the image as would be expected. When I want to get the actual path to a file, I right-click a thumbnail and select the 'Open In File Manager' menu option which brings up Windows Explorer at the folder that contains the file. I would think Linux would bring up whatever file manager you have installed.
>>>         Shel
>>>         On 3/6/2023 9:31 AM,plowmail2010 at gmail.com  wrote:
>>>         Windows 7 64-bit
>>>         digiKam 7.9.0
>>>            Build date: 12/3/2022 2:49 PM (target: RelWithDebInfo)
>>>            Revision: 99d199a7ebc10fae20afffc316ce34815f7d1c9d
>>>            Branch: HEAD
>>>         Thanks, Gilles, but selecting a thumbnail and copy/paste into a text editor or Paint produces nothing.
>>>         Pasting onto the Windows desktop or into Windows Explorer produces a copy of the image's file.
>>>         Same result with copy/paste outside digiKam: select a file name in Windows Explorer or Xplorer2, copy/paste into text editor or Paint produces nothing.  Pastes the file OK onto the desktop or into Windows Explorer.
>>>         Pasting into GIMP produced the message "There is no image data in the clipboard...".
>>>         Does the copy/paste work in linux?
>>>         Is this a peculiarity of the clipboard in Windows 7?
>>>         Robert DiGrazia
>         -- 
>         Frédéric Da Vitoria

Frédéric Da Vitoria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20230307/e1ee19f0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XMcl0RO10lFq0YFZ.png
Type: image/png
Size: 34940 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20230307/e1ee19f0/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QCJ6l9EJGq3uuQ4N.png
Type: image/png
Size: 22709 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20230307/e1ee19f0/attachment-0003.png>

More information about the Digikam-users mailing list