Fixed warnings

This commit is contained in:
Damiano Galassi committed 2015-08-19 14:47:09 +02:00
1 parent f53f64e262
commit d12e815539
5 files changed
+14 -10

No files matched your search

+5 -4
View File
@@ -659,10 +659,11 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
for (index = [itemIndexes lastIndex]; index != NSNotFound; index = [itemIndexes indexLessThanIndex:index]) {
NSArray *representations = [[[metadata.artworks objectAtIndex:index] image] representations];
NSData *bitmapData = [NSBitmapImageRep representationOfImageRepsInArray:representations
usingType:NSTIFFFileType properties:nil];
[pasteboard setData:bitmapData forType:NSTIFFPboardType];
if (representations) {
NSData *bitmapData = [NSBitmapImageRep representationOfImageRepsInArray:representations
usingType:NSTIFFFileType properties:@{}];
[pasteboard setData:bitmapData forType:NSTIFFPboardType];
}
}
return [itemIndexes count];
+1 -1
View File
@@ -178,7 +178,7 @@ static void *SBOptionsViewContex = &SBOptionsViewContex;
panel.canCreateDirectories = YES;
[panel setPrompt:@"Select"];
[panel beginSheetModalForWindow:nil completionHandler:^(NSInteger result) {
[panel beginWithCompletionHandler:^(NSInteger result) {
if (result == NSFileHandlingPanelOKButton) {
NSMenuItem *folderItem = [self prepareDestPopupItem:[panel URL]];
+1 -1
View File
@@ -31,7 +31,7 @@ extern NSString *SBQueueCancelledNotification;
SBQueueItem *_currentItem;
NSUInteger _currentIndex;
NSMutableArray *_items;
NSMutableArray<SBQueueItem *> *_items;
NSURL *_URL;
IOPMAssertionID _assertionID;
+6 -3
View File
@@ -214,8 +214,11 @@ static void *SBQueueContex = &SBQueueContex;
MP42File *mp4 = item.mp4File;
dispatch_sync(dispatch_get_main_queue(), ^{
SBDocument *doc = [[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:NULL];
[doc setMp4File:mp4];
SBDocument *doc = [[SBDocument alloc] initWithMP4:mp4 error:NULL];
[[NSDocumentController sharedDocumentController] addDocument:doc];
[doc makeWindowControllers];
[doc showWindows];
[doc release];
[self.itemPopover close];
@@ -599,7 +602,7 @@ static void *SBQueueContex = &SBQueueContex;
- (IBAction)showInFinder:(id)sender {
SBQueueItem *item = [self.queue itemAtIndex:[_tableView clickedRow]];
[[NSWorkspace sharedWorkspace] selectFile:[item.destURL path] inFileViewerRootedAtPath:nil];
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:@[item.destURL]];
}
- (IBAction)removeSelectedItems:(id)sender {
+1 -1
View File
@@ -54,7 +54,7 @@
- (instancetype)initWithURL:(NSURL *)URL {
self = [self init];
if (self) {
_fileURL = [URL retain];
_fileURL = [[URL filePathURL] retain];
NSFileManager *fileManager = [NSFileManager defaultManager];
unsigned long long originalFileSize = [[[fileManager attributesOfItemAtPath:[_fileURL path] error:nil] valueForKey:NSFileSize] unsignedLongLongValue];