Changeset 2447
- Timestamp:
- Jul 20, 2007, 8:54:55 PM (15 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Torrent.h
r2442 r2447 65 65 NSBitmapImageRep * fBitmap; 66 66 int8_t * fPieces; 67 68 NSDictionary * fQuickPauseDict; 67 69 } 68 70 -
trunk/macosx/Torrent.m
r2442 r2447 53 53 flatList: (NSMutableArray *) flatList fileSize: (uint64_t) size index: (int) index; 54 54 - (NSImage *) advancedBar; 55 56 - (void) quickPause; 57 - (void) endQuickPause; 58 55 59 - (void) trashFile: (NSString *) path; 56 60 … … 182 186 [fFlatFileList release]; 183 187 188 [fQuickPauseDict release]; 189 184 190 [fBitmap release]; 185 191 … … 253 259 && (canMove = [self alertForMoveFolderAvailable])) 254 260 { 255 #warning pause without actually stopping 256 //pause without actually stopping 261 [self quickPause]; 257 262 258 263 if ([[NSFileManager defaultManager] movePath: [[self downloadFolder] stringByAppendingPathComponent: [self name]] … … 262 267 canMove = NO; 263 268 264 #warning unpause269 [self endQuickPause]; 265 270 } 266 271 … … 723 728 } 724 729 725 #warning pause without actually stopping 726 //pause without actually stopping 730 [self quickPause]; 727 731 728 732 if ([[NSFileManager defaultManager] movePath: [oldFolder stringByAppendingPathComponent: [self name]] … … 740 744 [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateInfoSettings" object: nil]; 741 745 742 #warning unpause746 [self endQuickPause]; 743 747 } 744 748 else 745 749 { 746 #warning unpause //restart before showing the alert750 [self endQuickPause]; 747 751 748 752 NSAlert * alert = [[NSAlert alloc] init]; … … 1820 1824 } 1821 1825 1826 - (void) quickPause 1827 { 1828 if (fQuickPauseDict) 1829 return; 1830 1831 fQuickPauseDict = [[NSDictionary alloc] initWithObjectsAndKeys: 1832 [NSNumber numberWithInt: [self uploadSpeedMode]], @"UploadSpeedMode", 1833 [NSNumber numberWithInt: [self uploadSpeedLimit]], @"UploadSpeedLimit", 1834 [NSNumber numberWithInt: [self downloadSpeedMode]], @"DownloadSpeedMode", 1835 [NSNumber numberWithInt: [self downloadSpeedLimit]], @"DownloadSpeedLimit", nil]; 1836 1837 [self setUploadSpeedMode: TR_SPEEDLIMIT_SINGLE]; 1838 [self setUploadSpeedLimit: 0]; 1839 [self setDownloadSpeedMode: TR_SPEEDLIMIT_SINGLE]; 1840 [self setDownloadSpeedLimit: 0]; 1841 } 1842 1843 - (void) endQuickPause 1844 { 1845 if (!fQuickPauseDict) 1846 return 1847 1848 [self setUploadSpeedMode: [[fQuickPauseDict objectForKey: @"UploadSpeedMode"] intValue]]; 1849 [self setUploadSpeedLimit: [[fQuickPauseDict objectForKey: @"UploadSpeedLimit"] intValue]]; 1850 [self setDownloadSpeedMode: [[fQuickPauseDict objectForKey: @"DownloadSpeedMode"] intValue]]; 1851 [self setDownloadSpeedLimit: [[fQuickPauseDict objectForKey: @"DownloadSpeedLimit"] intValue]]; 1852 1853 [fQuickPauseDict release]; 1854 fQuickPauseDict = nil; 1855 } 1856 1822 1857 - (void) trashFile: (NSString *) path 1823 1858 {
Note: See TracChangeset
for help on using the changeset viewer.