Linux: Cut from browser actually Copies

*** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: helmut, XnTriq, xnview, Dreamer

metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

> yes the original issue is fixed.

It isn't as of 1.5.5

> If you have always the issue, please describe how to reproduce in a new post...

You want me to start a separate thread for the exact same issue? The description is literally exactly identical as above, except for the newer current version numbers of XnView MP & KDE...:

Using XnView MP Linux 1.5.5, on KDE Neon 5.26. In the browser, if i Ctrl+X (or manually right-click->Cut) an image, then paste it to Dolphin (KDE's file explorer), the file is duplicated rather than moved. In other words: 'Cut' actually 'Copies' rather than 'cuts.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

its not the original bug, it was "drag&drop copy instead of move"
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

What? Just look at the thread - the first post is from me, on 4/3/2021, with the exact content I just pasted above. "drag&drop copy instead of move" is not the original topic; someone else added that as a 2nd message on 4/6/2021, 3 days later.

The subject is even "Cut from browser actually Copies", not "drag&drop copy instead of move."

Not understanding why you're telling me the original topic is that of the 2nd post. I wrote the first post myself, with an issue, that still remains. So if I start another thread...it would be identical.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

my apologizes, you're right. The fix was for drag&drop. Currently i don't how to tell to dolphin to cut the file and not to copy it...
On Gnome, the files explorer uses "x-special/gnome-copied-files" in clipboard
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

So to clarify, the issue is:

1) Within XnView MP (browser), I select a file and "Cut"
2) Within Dolphin, "Paste"
3) The file successfully appears at the destination
4) However, the file does not disappear at the source

While I'm obviously not familiar with the intricacies of how this is implemented (tried to look but I guess it's not open-source), since the "cut" operation is being performed within XnView MP, it does seem like it would be possible to workaround. For instance - just one thought - when a file is "cut" in XnView MP, hook the clipboard & when a "paste" occurs, have XnView MP delete the source file. Just one possible workaround - I'm sure there are many options, where this could be made to function...?
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

i found that KDE uses "application/x-kde-cutselection"
See issue for current status and some details.
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

Nice!! Will give it a try as soon as released :)
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.6.0. Please check and confirm the bug fix here.
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

Unfortunately, the issue still seems to persist - cut and paste still performs copy paste, in v1.6.0.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

metal450 wrote: Thu Oct 12, 2023 1:58 pm Unfortunately, the issue still seems to persist - cut and paste still performs copy paste, in v1.6.0.
could you tell me what do you have in clipboard when you cut a file in dolphin, and in XnViewMP?
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

Aha, maybe that's it!

When I cut in Dolphin, it's format

Code: Select all

text/plain
and content is the file path, i.e.

Code: Select all

file:///media/metal450/SSD-Data/20200301_162652.jpg
But when I cut in XnView MP, it's missing the file:// at the front:

Code: Select all

/media/metal450/SSD-Data/20200301_162652.jpg
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

and od you have application/x-kde-cutselection?
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

When I view the clipboard contents? Nope, in both cases, I only see the text/plain - here's a screenshot (when cutting from Dolphin):

https://jiij.cc/snaps/2023-10-12_07.50.52.png

When cutting from XnView, it's the same, just without the leading "file://"

I'm using CopyQ to view the clipboard, not sure if that's the best way...
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: Cut from browser actually Copies

Post by xnview »

it's better to use xclip, the content of application/x-kde-cutselection is not good, i'll fix it
Pierre.
metal450
Posts: 150
Joined: Sun Apr 28, 2019 6:01 am

Re: Linux: Cut from browser actually Copies

Post by metal450 »

Post Reply