Bug 276255

Summary: Paste Clipboard Contents disabled unless image already open
Product: [Applications] gwenview Reporter: DH <derekh4>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: adaptee, tereb.k
Priority: NOR    
Version: 2.6   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 18.04.2

Description DH 2011-06-22 16:25:51 UTC
Version:           2.6
OS:                Linux

Here is the user story.  I have an image on the clipboard and I want to paste it into Gwenview.  The menu item "Paste Clipboard Contents..." is disabled unless I open another image first.  And even if I do open another image, the menu item is not enabled unless I copy the image WHILE Gwenview is open.

Reproducible: Always

Steps to Reproduce:
- copy image to clipboard
- open Gwenview
- go to Edit - Paste Clipboard Contents... (it will be disabled)


Expected Results:  
This menu item should be enabled by default.  I can't see the use case for having an image open already.

OS: Linux (i686) release 2.6.38-8-generic
Compiler: cc
Comment 1 Jekyll Wu 2012-01-04 03:08:35 UTC
I can reproduce this using KDE SC 4.8 RC1.
Comment 2 trb 2017-10-25 13:15:05 UTC
Bug still exist in KDE Applications 17.08.2.
Comment 3 Peter Mühlenpfordt 2018-05-20 15:18:21 UTC
Git commit 358ff25a4ab9855a6727546f355db428dd74f8cf by Peter Mühlenpfordt.
Committed on 20/05/2018 at 15:16.
Pushed by muhlenpfordt into branch 'Applications/18.04'.

Update paste action on current directory and selection changes

Summary:
The paste action is disabled on Gwenview start. This is caused by
initializing the action state before setting the current directory
url in `ContextManager`. The state updates only on clipboard changes
and does not reflect the current permissions to paste into a folder.
This patch updates the paste action state on changing the directory
and the selection, which both affect the paste destination.
FIXED-IN: 18.04.2

Test Plan:
# Copy url(s) to clipboard (e.g. from `Dolphin`)
# Open Gwenview in Browse Mode
# Check if {nav Edit > Paste...} is enabled on startup
# Check if {nav Edit > Paste...} is disabled in non-writable folders

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: rkflx, huoni

Differential Revision: https://phabricator.kde.org/D12902

M  +1    -1    app/fileopscontextmanageritem.cpp

https://commits.kde.org/gwenview/358ff25a4ab9855a6727546f355db428dd74f8cf