diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index 448e6cf8d..a4a43891a 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -313,7 +313,7 @@ 4DFBC2DD09C0970D00D5C571 /* Torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Torrent.h; path = macosx/Torrent.h; sourceTree = ""; }; 4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; }; A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = ""; }; A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = ""; }; A200B9630A227FD0007BBB1E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/InfoWindow.nib; sourceTree = ""; }; diff --git a/macosx/Controller.m b/macosx/Controller.m index b8117e1c9..9daf81235 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -543,6 +543,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy } //remove all torrent files in the temporary directory + #warning move? if (fTempTorrentFiles) { NSEnumerator * torrentEnumerator = [fTempTorrentFiles objectEnumerator]; @@ -2688,10 +2689,8 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy NSEnumerator * enumerator = [[fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]] objectEnumerator]; Torrent * torrent; while ((torrent = [enumerator nextObject])) - { if ([torrent isActive] || [torrent waitingToStart]) return YES; - } return NO; } @@ -2701,10 +2700,8 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy NSEnumerator * enumerator = [[fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]] objectEnumerator]; Torrent * torrent; while ((torrent = [enumerator nextObject])) - { if ([torrent isPaused] && ![torrent waitingToStart]) return YES; - } return NO; } diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index a8a4b0c52..646af2c09 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -61,7 +61,6 @@ - (NSRect) rectForTitleBasedOnMinimalStatusRect: (NSRect) statusRect withString: (NSAttributedString *) string inBounds: (NSRect) bounds; - (NSRect) rectForProgressWithString: (NSAttributedString *) string inBounds: (NSRect) bounds; -- (NSRect) rectForBarInBounds: (NSRect) bounds; - (NSRect) rectForStatusWithString: (NSAttributedString *) string inBounds: (NSRect) bounds; @@ -166,10 +165,24 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 inBounds: bounds]; } -#warning remove other - (NSRect) barRectForBounds: (NSRect) bounds { - return [self rectForBarInBounds: bounds]; + BOOL minimal = [fDefaults boolForKey: @"SmallView"]; + + NSRect result = bounds; + result.size.height = BAR_HEIGHT; + result.origin.x = PADDING_HORIZONAL + (minimal ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG) + + PADDING_BETWEEN_IMAGE_AND_TITLE - PADDING_LESS_BETWEEN_TITLE_AND_BAR; + + result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE; + if (minimal) + result.origin.y += PADDING_BETWEEN_TITLE_AND_BAR_MIN; + else + result.origin.y += PADDING_BETWEEN_TITLE_AND_PROGRESS + HEIGHT_STATUS + PADDING_BETWEEN_PROGRESS_AND_BAR; + + result.size.width = NSMaxX(bounds) - result.origin.x - PADDING_HORIZONAL - BUTTONS_TOTAL_WIDTH; + + return result; } - (NSRect) statusRectForBounds: (NSRect) bounds @@ -248,9 +261,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [progressString drawInRect: progressRect]; } - #warning bar is already sized..... //bar - NSRect barRect = [self rectForBarInBounds: cellFrame]; + NSRect barRect = [self barRectForBounds: cellFrame]; NSImage * bar = [fDefaults boolForKey: @"UseAdvancedBar"] ? [self advancedBar: barRect.size.width] : [self simpleBar: barRect.size.width]; [bar drawInRect: barRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; @@ -566,26 +578,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 return result; } -- (NSRect) rectForBarInBounds: (NSRect) bounds -{ - BOOL minimal = [fDefaults boolForKey: @"SmallView"]; - - NSRect result = bounds; - result.size.height = BAR_HEIGHT; - result.origin.x = PADDING_HORIZONAL + (minimal ? IMAGE_SIZE_MIN : IMAGE_SIZE_REG) - + PADDING_BETWEEN_IMAGE_AND_TITLE - PADDING_LESS_BETWEEN_TITLE_AND_BAR; - #warning rename some - result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE; - if (minimal) - result.origin.y += PADDING_BETWEEN_TITLE_AND_BAR_MIN; - else - result.origin.y += PADDING_BETWEEN_TITLE_AND_PROGRESS + HEIGHT_STATUS + PADDING_BETWEEN_PROGRESS_AND_BAR; - - result.size.width = NSMaxX(bounds) - result.origin.x - PADDING_HORIZONAL - BUTTONS_TOTAL_WIDTH; - - return result; -} - - (NSRect) rectForStatusWithString: (NSAttributedString *) string inBounds: (NSRect) bounds { if ([fDefaults boolForKey: @"SmallView"])