Revision: 12985
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12985&view=rev
Author:   hofman
Date:     2008-03-06 09:26:06 -0800 (Thu, 06 Mar 2008)

Log Message:
-----------
Fix queuing icons when using old style icon queue.

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m        2008-03-06 
16:14:51 UTC (rev 12984)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m        2008-03-06 
17:26:06 UTC (rev 12985)
@@ -926,49 +926,56 @@
 
 - (void)_enqueueReleaseOperationForIcons:(NSArray *)icons;
 {    
-#ifdef USE_ICON_QUEUE
-    [[FVIconQueue sharedQueue] enqueueReleaseResourcesForIcons:icons];
-#else
     NSUInteger i, iMax = [icons count];
     NSMutableArray *operations = [[NSMutableArray alloc] 
initWithCapacity:iMax];
     FVIcon *icon;
     for (i = 0; i < iMax; i++) {
         icon = [icons objectAtIndex:i];
         if ([icon canReleaseResources]) {
+#ifdef USE_ICON_QUEUE
+            [operations addObject:icon];
+#else
             FVReleaseOperation *op = [[FVReleaseOperation alloc] 
initWithIcon:icon view:nil];
             [op setQueuePriority:FVOperationQueuePriorityLow];
             [operations addObject:op];
             [op release];
+#endif
         }
     }
     if ([operations count])
+#ifdef USE_ICON_QUEUE
+        [[FVIconQueue sharedQueue] enqueueReleaseResourcesForIcons:operations];
+#else
         [_operationQueue addOperations:operations];
+#endif
     [operations release];
-#endif
 }
 
 - (void)_enqueueRenderOperationForIcons:(NSArray *)icons 
withPriority:(FVOperationQueuePriority)priority;
 {    
-#ifdef USE_ICON_QUEUE
-    if ([icons count])
-        [[FVIconQueue sharedQueue] enqueueRenderIcons:icons forObject:self];
-#else
     NSUInteger i, iMax = [icons count];
     NSMutableArray *operations = [[NSMutableArray alloc] 
initWithCapacity:iMax];
     FVIcon *icon;
     for (i = 0; i < iMax; i++) {
         icon = [icons objectAtIndex:i];
         if ([icon needsRenderForSize:_iconSize]) {
+#ifdef USE_ICON_QUEUE
+            [operations addObject:icon];
+#else
             FVRenderOperation *op = [[FVRenderOperation alloc] 
initWithIcon:icon view:self];
             [op setQueuePriority:priority];
             [operations addObject:op];
             [op release];
+#endif
         }
     }
     if ([operations count])
+#ifdef USE_ICON_QUEUE
+        [[FVIconQueue sharedQueue] enqueueRenderIcons:operations 
forObject:self];
+#else
         [_operationQueue addOperations:operations];
+#endif
     [operations release];
-#endif
 }
 
 #ifdef USE_ICON_QUEUE


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to