discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSUseFreedesktopThumbnails is not working correctly


From: Riccardo Mottola
Subject: Re: GSUseFreedesktopThumbnails is not working correctly
Date: Thu, 25 Aug 2011 17:22:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110820 Icedove/3.1.12

Hi,

Unfortunately, image is never nil. If no thumbnail file exists, an
NSImage object is returned which contains no representations (check
class NSBitmapImageRep, +imageRepsWithData:). Hence, no image is
displayed, not even the one for unknown file types.

Perhaps this has to do with multiple representations: imageRepWithData returns NIL imageRepsWithData returns an empty array.

initWithContentsOfFile says though:

(from Cocoa Docs)

Return Value

An initialized NSImage instance, or nil if the method cannot create an image representation from the contents of the specified file.

I think the culprit is _loadFromFile: it checks that the array is not nil, instead it should check that the array is not empty.

I patched that, I dont't seem to have caused havoc elsewhere, please try if it solves your problem.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]