Changeset 9299 for trunk/macosx/Controller.m
- Timestamp:
- Oct 11, 2009, 11:27:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r9298 r9299 3124 3124 } 3125 3125 3126 #warning refresh QL is either window is closed 3126 3127 - (void) beginPreviewPanelControl: (id) panel 3127 3128 { … … 3137 3138 } 3138 3139 3140 - (NSArray *) quickLookableTorrents 3141 { 3142 NSArray * selectedTorrents = [fTableView selectedTorrents]; 3143 NSMutableArray * qlArray = [NSMutableArray arrayWithCapacity: [selectedTorrents count]]; 3144 3145 for (Torrent * torrent in selectedTorrents) 3146 if (([torrent isFolder] || [torrent isComplete]) && [[NSFileManager defaultManager] fileExistsAtPath: [torrent dataLocation]]) 3147 [qlArray addObject: torrent]; 3148 3149 return qlArray; 3150 } 3151 3139 3152 - (NSInteger) numberOfPreviewItemsInPreviewPanel: (id) panel 3140 3153 { 3141 3154 if ([fInfoController canQuickLook]) 3142 3155 return [[fInfoController quickLookURLs] count]; 3156 else if ([fWindow isVisible]) 3157 return [[self quickLookableTorrents] count]; 3143 3158 else 3144 return [[self quickLookableTorrents] count];3159 return 0; 3145 3160 } 3146 3161 … … 3180 3195 return frame; 3181 3196 } 3182 }3183 3184 - (NSArray *) quickLookableTorrents3185 {3186 NSArray * selectedTorrents = [fTableView selectedTorrents];3187 NSMutableArray * qlArray = [NSMutableArray arrayWithCapacity: [selectedTorrents count]];3188 3189 for (Torrent * torrent in selectedTorrents)3190 if (([torrent isFolder] || [torrent isComplete]) && [[NSFileManager defaultManager] fileExistsAtPath: [torrent dataLocation]])3191 [qlArray addObject: torrent];3192 3193 return qlArray;3194 3197 } 3195 3198
Note: See TracChangeset
for help on using the changeset viewer.