Bug 168666 - When a jpeg file is updated (e.g. rotated in gwenview) it's thumbnail will not update in dolphin
Summary: When a jpeg file is updated (e.g. rotated in gwenview) it's thumbnail will no...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Simon St James
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-07 21:59 UTC by Diederik van der Boor
Modified: 2009-05-18 08:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for one half of this issue. (6.63 KB, patch)
2008-08-17 18:56 UTC, Simon St James
Details
Updated patch for KFilePreviewGenerator (6.75 KB, patch)
2009-01-07 20:43 UTC, Simon St James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2008-08-07 21:59:06 UTC
Version:           1.1 (using 4.1.00 (KDE 4.1.0) "release 16.3", KDE:KDE4:Factory:Desktop / openSUSE_10.3)
Compiler:          gcc
OS:                Linux (i686) release 2.6.22.18-0.2-default

Example:
 * have a folder of photo's
 * open one in gwenview
 * rotate it and save it.
 * move over the original file.

Now you'll have an updated preview in the sidebar (rotated), while the original file is still unmodified.

Would it be possible to update the file preview when the file changed? (or schedule an update, so dolphin will re-generate all files when it gets the focus again).
Comment 1 Peter Penz 2008-08-07 22:46:12 UTC
It depends on the notification system. Currently this is not possible, but AFAIK there is some work ongoing to improve this in kdelibs. I've set this issue to NEW, as from a users point of view I fully agree to your request.
Comment 2 Simon St James 2008-08-10 16:17:29 UTC
This will hopefully be half-fixed automatically when 

https://bugs.kde.org/show_bug.cgi?id=154676

I've submitted a preliminary patch to Flavio, but he is very busy at the moment so I'm not sure when (or if ;)) it will land in kdelibs.  

I've just tried a test case with my local, patched copy and the fact the picture was changed was picked up by Dolphin and the thumbnail was "refreshed".  However, the refreshing didn't quite work and the old, stale thumbnail reappeared when the refresh was complete.  I haven't yet investigated as to whether this is a problem with the kdelibs thumbnailing or Dolphin's IconManager.  Either way, we'll have to be a bit careful to avoid continuous re-previewing when e.g. downloading a large file in a directory we've got open.
Comment 3 Simon St James 2008-08-17 18:56:30 UTC
Created attachment 26899 [details]
Patch for one half of this issue.

The attached patch won't work until there's a fix for
https://bugs.kde.org/show_bug.cgi?id=154676 in SVN, but I've tried it locally
with my kdirwatch patch and it seems OK.  I'll attach it here so I don't lose
track of it :)

It's a little more complex than expected as I've pre-emptively fixed a bug that
I noticed back when KDE3+Konqueror had this feature: downloading a video file
into an open directory uses 100% CPU as the file is constantly changing and
being re-previewed.  This patch adds the file to the preview queue as soon as
it detects the change, but won't preview it again until it has remained
unchanged for a certain length of time.
Comment 4 Simon St James 2009-01-07 20:43:32 UTC
Created attachment 30016 [details]
Updated patch for KFilePreviewGenerator

Peter - could you please review to make sure this is eligible for kdelibs inclusion (especially with the Q_PRIVATE_SLOT stuff)? Thanks!
Comment 5 Peter Penz 2009-05-18 08:53:42 UTC
SVN commit 969368 by ppenz:

Fixed issue that during a copy operation of huge files the preview will get regenerated constantly. Thanks to Simon St. James for the original patch.

BUG: 168666
CCMAIL: kdedevel@etotheipiplusone.com

 M  +68 -1     kfilepreviewgenerator.cpp  
 M  +1 -0      kfilepreviewgenerator.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=969368
Comment 6 Peter Penz 2009-05-18 08:56:29 UTC
@Simon: I've just committed a patch that is based on your patch. I've tested my patch against side effects in "normal" situations, but I could not verify the behavior when copying huge files (my video-plugin does not create any video preview...). I'm confident that the approach of the patch works, but I'd be glad that if you could do a check too. If there is an issue left, it should be only a minor detail... Thanks!
Comment 7 Simon St James 2009-05-18 08:57:51 UTC
Sure - will check this evening :)