Bug 443682 - Add "copy file path" option to right-click menu
Summary: Add "copy file path" option to right-click menu
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Clipboard (show other bugs)
Version: 7.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-14 01:41 UTC by prawlins83
Modified: 2023-03-17 20:28 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prawlins83 2021-10-14 01:41:04 UTC
DigiKam is a great tool to organize and manage photos.  However, there is not a convenient way to copy the full file path of a photo to use in another app.  It would be helpful to have "copy file path" option on the right-click menu.

STEPS TO REPRODUCE
1. Go to album view
2. Right-click mouse


OBSERVED RESULT
There is no option to "copy file path"

EXPECTED (desired) RESULT
Have an option to "copy file path"

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 caulier.gilles 2021-10-14 03:36:49 UTC
From icon View, copy item to the clipboard after selection. Open a text editor, and paste the contents : file paths are there. This must work with all application supporting standard clipboard.

Gilles Caulier
Comment 2 prawlins83 2021-10-15 22:31:35 UTC
I tried the steps suggested by Gilles Caulier:

"From icon View, copy item to the clipboard after selection. Open a text editor, and paste the contents : file paths are there. This must work with all application supporting standard clipboard."

It still does not work for me.  I opened up a Notebook editor to paste the path.  Whether I copied to the clipboard using Ctrl-C or "Copy", nothing got pasted to Notebook.  

One interesting find is if I drag and dropped the image to Notebook, the binary contents of the file appeared.

Question for Gilles Caulier:  What OS are you running and which version of DigiKam?
Comment 3 caulier.gilles 2021-10-16 03:03:43 UTC
Linux Mageia 8, Plasma desktop, Kate editor, and last digiKam dev version :

https://i.imgur.com/MQ78Hs4t.png

Gilles Caulier
Comment 4 caulier.gilles 2021-10-16 03:05:23 UTC
Right screenshot size : https://i.imgur.com/MQ78Hs4.png
Comment 5 Maik Qualmann 2021-10-17 12:25:39 UTC
The clipboard entry under Windows is not a string and can therefore not be inserted as text. digiKam also has various options for interacting with external programs under Windows, for example the "Open with ..." dialog or open in the file manager. In what context do you need the path as text exactly?

Maik
Comment 6 caulier.gilles 2022-01-21 04:09:47 UTC
Maik,

I just tested under Windows :

1 Copy and paste to Kate editor : paths are there.
2 copy and paste to Notepad++ : no paste option. A drag and drop work fine as paths are pasted.
3 copy and paste to M$ notepad : no paste option. A drag and drop transfer file as byte array...
4 copy and paste to M$ wordpad : as M$ notepad.

Conclusion : A target Qt application can detect clipboard as text. I suspect that something is missing in clipboard metadata to recognize contents as text properly under Windows.

Gilles
Comment 7 Maik Qualmann 2022-02-09 07:20:49 UTC
*** Bug 449821 has been marked as a duplicate of this bug. ***
Comment 8 Maik Qualmann 2023-03-08 06:57:24 UTC
Git commit 3646129dfff77178b22e1ac21068340bd0789211 by Maik Qualmann.
Committed on 08/03/2023 at 06:55.
Pushed by mqualmann into branch 'qt5-maintenance'.

add file paths in text/plain format for clipboard actions
Related: bug 467013, bug 467024
FIXED-IN: 7.10.0

M  +3    -1    NEWS
M  +23   -0    core/app/dragdrop/ddragobjects.cpp

https://invent.kde.org/graphics/digikam/commit/3646129dfff77178b22e1ac21068340bd0789211
Comment 9 Peter 2023-03-13 10:18:05 UTC
I tested this patch. Observation...
Example: /media/benedek/Kepek/20190830Kalandpark -- this path can only be copied in that case, if the properties panel is wide enough and the path is fully visible. If the panel is not wide enough, the path will be truncated, and so it goes to the clipboard.

Clipboard content, if the panel is not wide enough:
-- Select All
-- Copy
-- Paste in any Text Editor
…enedek/Kepek/20190830Kalandpark
Comment 10 Maik Qualmann 2023-03-13 11:36:18 UTC
You can now also copy the file path via copy / paste. It also depends a bit on what information the target program takes from the clipboard. A text editor, CMD input fields will paste the path. A word processor that can also use images may take the URL and insert the image.

Maik
Comment 11 caulier.gilles 2023-03-13 11:45:46 UTC
Maik,

I plan to add a copy and paste section in online documentation and explain all cases in different OS

Gilles
Comment 12 caulier.gilles 2023-03-17 20:28:43 UTC
Git commit cc554edd7da9a51464e32516f7f3a5ab04d81d75 by Gilles Caulier.
Committed on 17/03/2023 at 20:27.
Pushed by cgilles into branch 'master'.

add a small section about copy/paste with other appications

M  +21   -8    main_window/albums_view.rst

https://invent.kde.org/documentation/digikam-doc/commit/cc554edd7da9a51464e32516f7f3a5ab04d81d75