From 481dc9f6b86bbfbc20c32c05fface2c78a9a225e Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 11 Jul 2007 01:40:49 +0000 Subject: [PATCH] If Transmission is opened by double-clicking a torrent file, open that torrent before setting up auto-import --- macosx/Controller.m | 6 +++--- macosx/InfoWindowController.m | 2 +- macosx/Torrent.m | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 59f3b3f3c..99bbea049 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -447,9 +447,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy [self autoSpeedLimitChange: nil]; fSpeedLimitTimer = [NSTimer scheduledTimerWithTimeInterval: AUTO_SPEED_LIMIT_SECONDS target: self selector: @selector(autoSpeedLimit) userInfo: nil repeats: YES]; - - //auto importing - [self checkAutoImportDirectory]; } - (void) applicationDidFinishLaunching: (NSNotification *) notification @@ -461,6 +458,9 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy andSelector: @selector(handleOpenContentsEvent:replyEvent:) forEventClass: kCoreEventClass andEventID: kAEOpenContents]; + //auto importing + [self checkAutoImportDirectory]; + //debug warning if ([fDefaults boolForKey: @"WarningDebug"] && [fDefaults integerForKey: @"MessageLevel"] == TR_MSG_DBG) { diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index b4a5c1f19..7a78ed820 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -929,7 +929,7 @@ } - (NSString *) outlineView: (NSOutlineView *) outlineView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect - tableColumn: (NSTableColumn *) tableColumn item: (id) item mouseLocation: (NSPoint) mouseLocation + tableColumn: (NSTableColumn *) tableColumn item: (id) item mouseLocation: (NSPoint) mouseLocation { NSString * ident = [tableColumn identifier]; if ([ident isEqualToString: @"Name"]) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 8b91a2ff4..84a2eb5e4 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1313,6 +1313,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 - (void) setFileCheckState: (int) state forIndexes: (NSIndexSet *) indexSet { + #warning multiples int index; for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index]) tr_torrentSetFileDL(fHandle, index, state != NSOffState); @@ -1324,6 +1325,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 - (void) setFilePriority: (int) priority forIndexes: (NSIndexSet *) indexSet { + #warning multiples int index; for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index]) tr_torrentSetFilePriority(fHandle, index, priority);