Revision: 4559
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4559&view=rev
Author:   hofman
Date:     2008-09-05 13:37:32 +0000 (Fri, 05 Sep 2008)

Log Message:
-----------
Change file icon for download with KVC method

Modified Paths:
--------------
    trunk/SKDownload.m

Modified: trunk/SKDownload.m
===================================================================
--- trunk/SKDownload.m  2008-09-05 12:48:36 UTC (rev 4558)
+++ trunk/SKDownload.m  2008-09-05 13:37:32 UTC (rev 4559)
@@ -164,6 +164,13 @@
     return fileIcon;
 }
 
+- (void)setFileIcon:(NSImage *)newFileIcon {
+    if (fileIcon != newFileIcon) {
+        [fileIcon release];
+        filePath = [newFileIcon retain];
+    }
+}
+
 - (long long)expectedContentLength {
     return expectedContentLength;
 }
@@ -317,8 +324,7 @@
     if (UTI) {
         CFStringRef type = UTTypeCopyPreferredTagWithClass(UTI, 
kUTTagClassFilenameExtension);
         if (type) {
-            [fileIcon release];
-            fileIcon = [[[NSWorkspace sharedWorkspace] 
iconForFileType:(NSString *)type] retain];
+            [self setFileIcon:[[NSWorkspace sharedWorkspace] 
iconForFileType:(NSString *)type]];
             CFRelease(type);
         }
         CFRelease(UTI);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to