Changeset 12664


Ignore:
Timestamp:
Aug 11, 2011, 1:54:14 AM (10 years ago)
Author:
livings124
Message:

fix starting transfers when adding

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r12647 r12664  
    26452645            NSIndexSet * insertIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(insertIndex, [movingTorrents count])];
    26462646            for (Torrent * torrent in movingTorrents)
    2647                 [torrent setQueueIndex: insertIndex++];
     2647                [torrent setQueuePosition: insertIndex++];
    26482648            [fTorrents insertObjects: movingTorrents atIndexes: insertIndexes];
    26492649        }
  • trunk/macosx/Torrent.h

    r12626 r12664  
    8282- (void) wakeUp;
    8383
    84 - (void) setQueueIndex: (NSUInteger) index;
     84- (NSInteger) queuePosition;
     85- (void) setQueuePosition: (NSUInteger) index;
    8586
    8687- (void) manualAnnounce;
     
    128129
    129130- (NSString *) name;
    130 - (NSInteger) queuePosition;
    131131- (BOOL) isFolder;
    132132- (uint64_t) size;
  • trunk/macosx/Torrent.m

    r12645 r12664  
    303303- (void) startTransferNoQueue
    304304{
    305     if (![self isActive] && [self alertForRemainingDiskSpace])
     305    if ([self alertForRemainingDiskSpace])
    306306    {
    307307        tr_torrentStartNow(fHandle);
     
    316316- (void) startTransfer
    317317{
    318     if (![self isActive] && ![self waitingToStart] && [self alertForRemainingDiskSpace])
     318    if ([self alertForRemainingDiskSpace])
    319319    {
    320320        tr_torrentStart(fHandle);
     
    328328- (void) stopTransfer
    329329{
    330     if ([self isActive] || [self waitingToStart])
    331     {
    332         tr_torrentStop(fHandle);
    333         [self update];
    334     }
     330    tr_torrentStop(fHandle);
     331    [self update];
    335332}
    336333
     
    350347}
    351348
    352 - (void) setQueueIndex: (NSUInteger) index
     349#warning remove
     350- (NSInteger) queuePosition
     351{
     352    return fStat->queuePosition;
     353}
     354
     355- (void) setQueuePosition: (NSUInteger) index
    353356{
    354357    tr_torrentSetQueuePosition(fHandle, index);
     
    616619{
    617620    return fInfo->name != NULL ? [NSString stringWithUTF8String: fInfo->name] : fHashString;
    618 }
    619 
    620 #warning remove
    621 - (NSInteger) queuePosition
    622 {
    623     return fStat->queuePosition;
    624621}
    625622
Note: See TracChangeset for help on using the changeset viewer.