From 851595b11c70043a5776684d3a8e4068abed4d7f Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 5 Aug 2009 02:13:45 +0000 Subject: [PATCH] get the mac build to compile again --- macosx/Controller.m | 10 +++++----- macosx/DragOverlayWindow.m | 2 +- macosx/Torrent.m | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index faea0e868..7d5a272bb 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -797,7 +797,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy tr_ctor * ctor = tr_ctorNew(fLib); tr_ctorSetMetainfoFromFile(ctor, [torrentPath UTF8String]); int result = tr_torrentParse(ctor, &info); - if (result != TR_OK) + if (result != TR_PARSE_OK) { if (result == TR_PARSE_DUPLICATE) [self duplicateOpenAlert: [NSString stringWithUTF8String: info.name]]; @@ -2437,7 +2437,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy switch (tr_torrentParse(ctor, NULL)) { - case TR_OK: + case TR_PARSE_OK: [self openFiles: [NSArray arrayWithObject: fullFile] addType: ADD_AUTO forcePath: nil]; [GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added", "Growl notification title") @@ -2445,7 +2445,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy clickContext: nil]; break; - case TR_EINVALID: + case TR_PARSE_ERR: [fAutoImportedNames removeObject: file]; } @@ -2677,7 +2677,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy torrent = YES; tr_ctor * ctor = tr_ctorNew(fLib); tr_ctorSetMetainfoFromFile(ctor, [file UTF8String]); - if (tr_torrentParse(ctor, NULL) == TR_OK) + if (tr_torrentParse(ctor, NULL) == TR_PARSE_OK) { if (!fOverlayWindow) fOverlayWindow = [[DragOverlayWindow alloc] initWithLib: fLib forWindow: fWindow]; @@ -2739,7 +2739,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy torrent = YES; tr_ctor * ctor = tr_ctorNew(fLib); tr_ctorSetMetainfoFromFile(ctor, [file UTF8String]); - if (tr_torrentParse(ctor, NULL) == TR_OK) + if (tr_torrentParse(ctor, NULL) == TR_PARSE_OK) [filesToOpen addObject: file]; tr_ctorFree(ctor); } diff --git a/macosx/DragOverlayWindow.m b/macosx/DragOverlayWindow.m index d241ffbc3..f031e7b44 100644 --- a/macosx/DragOverlayWindow.m +++ b/macosx/DragOverlayWindow.m @@ -89,7 +89,7 @@ tr_ctor * ctor = tr_ctorNew(fLib); tr_ctorSetMetainfoFromFile(ctor, [file UTF8String]); tr_info info; - if (tr_torrentParse(ctor, &info) == TR_OK) + if (tr_torrentParse(ctor, &info) == TR_PARSE_OK) { count++; size += info.totalSize; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 73b4701d0..beae8e35e 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1609,20 +1609,20 @@ int trashDataFile(const char * filename) tr_ctorSetPaused(ctor, TR_FORCE, YES); tr_ctorSetPeerLimit(ctor, TR_FALLBACK, [fDefaults integerForKey: @"PeersTorrent"]); - int result = TR_EINVALID; + int result = TR_PARSE_ERR; if (path) result = tr_ctorSetMetainfoFromFile(ctor, [path UTF8String]); //backup - shouldn't be needed after upgrade to 1.70 - if (result != TR_OK && hashString) + if (result != TR_PARSE_OK && hashString) result = tr_ctorSetMetainfoFromHash(ctor, [hashString UTF8String]); - if (result == TR_OK) + if (result == TR_PARSE_OK) { tr_info info; result = tr_torrentParse(ctor, &info); - if (result == TR_OK) + if (result == TR_PARSE_OK) { NSString * currentDownloadFolder = [self shouldUseIncompleteFolderForName: [NSString stringWithUTF8String: info.name]] ? fIncompleteFolder : fDownloadFolder; @@ -1630,7 +1630,7 @@ int trashDataFile(const char * filename) fHandle = tr_torrentNew(ctor, NULL); } - if (result != TR_EINVALID) + if (result != TR_PARSE_ERR) tr_metainfoFree(&info); }