Bug 102148 - turning off one category of thumbnail preview turns off all others as well
Summary: turning off one category of thumbnail preview turns off all others as well
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-22 10:12 UTC by Jonathan Marten
Modified: 2008-06-29 09:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Marten 2005-03-22 10:12:16 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
OS:                Irix

Start Konqueror with all previews enabled, in a directory which contains a mix of file types; previews are displayed for all applicable file types.  Using the "View -> Preview" menu, turn off previewing of one type of file - this works for anything except "Sound Files" and it doesn't matter whether the display includes an applicable file or not.  All previews - not just the selected category - will disappear, although the ticked options in the menu remain correct.

Turn off another preview category - again it doesn't matter if a file of that type is present or not - and then turn it on again.  All previews will reappear as intended.  The previews will also reappear on a reload.

I think this is what happens.  KonqKfmIconView::slotPreview() first calls
m_pIconView->setPreviewSettings(m_pProps->previewSettings()); KonqIconViewWidget::setPreviewSettings() does

    int size = m_size;
    m_size = -1; // little trick to force grid change in setIcons
    setIcons( size ); // force re-determining all icons

KonqIconViewWidget::setIcons() detects that the size has changed:

    // size has changed?
    bool sizeChanged = (m_size != size);

and then for each icon item does:

    if ( !ivi->isThumbnail() ||
         sizeChanged ||
         previewSizeChanged ||
         stopAll ||
         mimeTypeMatch( ivi->item()->mimetype(), stopImagePreviewFor ) )
    {
	ivi->setIcon( size, ivi->state(), true, false );
    }

KFileIVI::setIcon() sets m_bThumbnail = false; the thumbnail is now off.

Back at KonqKfmIconView::slotPreview(), only if a preview is being turned off, it will do:

       bool previewRunning = m_pIconView->isPreviewRunning();
       if ( previewRunning ) m_pIconView->stopImagePreview();
       QStringList mimeTypes = serv->property("MimeTypes").toStringList();
       m_pIconView->setIcons( m_pIconView->iconSize(), mimeTypes );
       if ( previewRunning ) m_pIconView->startImagePreview( m_pProps->previewSettings(),
                                                             false );

Here previewRunning is false, so nothing is stopped or started.  The setIcons() does the same as before: the size does not change so sizeChanged is false, but the icon item's m_bThumbnail is already false so the condition above is again true.  The thumbnail is never reenabled.

Suspect that KonqIconViewWidget::setIcons() should not do setIcon() if only sizeChanged or previewSizeChanged applies - it only needs to do invalidateThumb().  Needs further investigation.
Comment 1 Jonathan Marten 2005-08-14 22:00:09 UTC
Problem still appears to be present in KDE 3.4.2
Comment 2 Jonathan Marten 2005-12-02 14:51:22 UTC
Problem still appears to be present in KDE 3.5.0
Comment 3 Jonathan Marten 2006-02-10 16:32:10 UTC
Problem still appears to be present in KDE 3.5.1
Comment 4 Philip Rodrigues 2006-09-01 21:08:26 UTC
Confirmed on SVN r575787
Comment 5 A. Spehr 2008-06-29 03:10:18 UTC
Looks like previews are happy in 4.00.83, so closing.
Comment 6 Jonathan Marten 2008-06-29 09:30:45 UTC
This bug is regarding the "selective preview by category" option which was present in KDE3.5.  That facility, though, doesn't seem to be available in the Dolphin part in KDE4 - there is only a single option to turn previews on or off.

Unless previews by category have been added to KDE4 very recently, it's not possible to say whether this bug is fixed.  If there are plans to add the facility to the Dolphin part then the bug should be held open until it can be verified, or if there are no plans to add such a feature then it should be marked WONTFIX.