discuss-gnustep
[Top][All Lists]
Advanced

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

GSUseFreedesktopThumbnails is not working correctly


From: Andreas Schik
Subject: GSUseFreedesktopThumbnails is not working correctly
Date: Wed, 24 Aug 2011 11:17:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11

Hi all,
I just detected that GSUseFreedesktopThumbnails is not working
correctly. If this option is turned on, GWorkspace won't display images
for files that do not have a thumbnail (in $HOME/.thumbnails). For files
having thumbnails, the icon is displayed correctly.

The cause lies in NSWorkspace's method - (NSImage*) iconForFile:

Here, you find the following code:

      if ([[NSUserDefaults standardUserDefaults] boolForKey:
              @"GSUseFreedesktopThumbnails"])
        {
          /* This image will be 128x128 pixels as oposed to the 48x48
             of other GNUstep icons or the 32x32 of the specification */
          image = [self _saveImageFor: [self thumbnailForFile: fullPath]];
          if (image != nil)
            {
              return image;
            }
        }

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.

Regards,
Andreas

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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