Bug 204628

Summary: "Open with..." opens temporary file, should open saved file
Product: [Applications] ksnapshot Reporter: Michael G. Hansen <mike>
Component: generalAssignee: Richard Moore <rich>
Status: RESOLVED FIXED    
Severity: normal CC: andresbajotierra, montel, uwolfer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: A patch to fix this bug.

Description Michael G. Hansen 2009-08-21 10:04:58 UTC
Version:           0.8.1 (using KDE 4.3.0)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Take a screenshot with KSnapShot, use "Save As..." to save it to a file in your home directory, then do "Open With..." to open the file in gimp or showfoto. The opened file is in /tmp/kde-username. (The file chosen by "Save As..." can be found in the expected directory, but is not opened)
Modify the file in gimp and save it. KSnapShot complains:
"The supposedly temporary file file:///tmp/kde-mike/sometest1.png has been modified. Do you still want to delete it?" and this is the last chance to manually make a copy of the file to not loose the changes.

I think KSnapShot should open the file saved by "Save As..." instead, to avoid confusion and data loss. If the file has not been saved yet, the user should be warned to save it using KSnapShot first or to save it later in the application. In the last case, when the temporary file is changed, it should be made easy for the user to move it to his home directory.
Comment 1 Vishesh Handa 2010-02-12 16:16:11 UTC
Created attachment 40717 [details]
A patch to fix this bug.

This is the first patch I've ever written. I've just added a new private function and called it twice in the open slots.
Comment 2 Vishesh Handa 2010-02-12 16:17:36 UTC
Comment on attachment 40717 [details]
A patch to fix this bug.

:-)

This should get accepted, hopefully.
Comment 3 Aaron J. Seigo 2010-03-30 19:53:54 UTC
SVN commit 1109164 by aseigo:

if the image is already saved, open with the saved file rather than the tempfile
BUG:204628


 M  +33 -10    ksnapshot.cpp  
 M  +1 -0      ksnapshot.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1109164