Changeset 898


Ignore:
Timestamp:
Sep 23, 2006, 7:16:24 PM (17 years ago)
Author:
livings124
Message:

holding down option will now allow the pause/resume button within the table start queued torrents without waiting

Location:
branches/nat-traversal
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/nat-traversal/Transmission.xcodeproj/project.pbxproj

    r893 r898  
    1010                35B037A70AC59BC600A10FDF /* Check.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = 35B037A60AC59BC600A10FDF /* Check.png */; };
    1111                35B037B60AC59C4000A10FDF /* Check.png in Resources */ = {isa = PBXBuildFile; fileRef = 35B037A60AC59BC600A10FDF /* Check.png */; };
     12                35B037FB0AC5B53800A10FDF /* ResumeNoWaitOn.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = 35B037F90AC5B53800A10FDF /* ResumeNoWaitOn.png */; };
     13                35B037FC0AC5B53800A10FDF /* ResumeNoWaitOff.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = 35B037FA0AC5B53800A10FDF /* ResumeNoWaitOff.png */; };
     14                35B038130AC5B6EB00A10FDF /* ResumeNoWaitOn.png in Resources */ = {isa = PBXBuildFile; fileRef = 35B037F90AC5B53800A10FDF /* ResumeNoWaitOn.png */; };
     15                35B038140AC5B6EC00A10FDF /* ResumeNoWaitOff.png in Resources */ = {isa = PBXBuildFile; fileRef = 35B037FA0AC5B53800A10FDF /* ResumeNoWaitOff.png */; };
    1216                4D043A7F090AE979009FEDA8 /* TransmissionDocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4D043A7E090AE979009FEDA8 /* TransmissionDocument.icns */; };
    1317                4D118E1A08CB46B20033958F /* PrefsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D118E1908CB46B20033958F /* PrefsController.m */; };
     
    190194                                A25FCDE00A37695F002BCBBE /* ResumeSelected.png in CopyFiles */,
    191195                                35B037A70AC59BC600A10FDF /* Check.png in CopyFiles */,
     196                                35B037FB0AC5B53800A10FDF /* ResumeNoWaitOn.png in CopyFiles */,
     197                                35B037FC0AC5B53800A10FDF /* ResumeNoWaitOff.png in CopyFiles */,
    192198                        );
    193199                        runOnlyForDeploymentPostprocessing = 0;
     
    223229                32CA4F630368D1EE00C91783 /* Transmission_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Transmission_Prefix.pch; path = macosx/Transmission_Prefix.pch; sourceTree = "<group>"; };
    224230                35B037A60AC59BC600A10FDF /* Check.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Check.png; path = macosx/Images/Check.png; sourceTree = "<group>"; };
     231                35B037F90AC5B53800A10FDF /* ResumeNoWaitOn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeNoWaitOn.png; path = macosx/Images/ResumeNoWaitOn.png; sourceTree = "<group>"; };
     232                35B037FA0AC5B53800A10FDF /* ResumeNoWaitOff.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeNoWaitOff.png; path = macosx/Images/ResumeNoWaitOff.png; sourceTree = "<group>"; };
    225233                4D043A7E090AE979009FEDA8 /* TransmissionDocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = TransmissionDocument.icns; path = macosx/Images/TransmissionDocument.icns; sourceTree = "<group>"; };
    226234                4D118E1808CB46B20033958F /* PrefsController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PrefsController.h; path = macosx/PrefsController.h; sourceTree = "<group>"; };
     
    508516                                4DF7500708A103AD007B0D70 /* Open.png */,
    509517                                4DF7500908A103AD007B0D70 /* Remove.png */,
     518                                35B037F90AC5B53800A10FDF /* ResumeNoWaitOn.png */,
     519                                35B037FA0AC5B53800A10FDF /* ResumeNoWaitOff.png */,
    510520                                4D6DAAC4090CE00500F43C22 /* RevealOff.png */,
    511521                                4D6DAAC5090CE00500F43C22 /* RevealOn.png */,
     
    834844                                A260C9AC0AA3B8D700FDC1B7 /* Error.tiff in Resources */,
    835845                                35B037B60AC59C4000A10FDF /* Check.png in Resources */,
     846                                35B038130AC5B6EB00A10FDF /* ResumeNoWaitOn.png in Resources */,
     847                                35B038140AC5B6EC00A10FDF /* ResumeNoWaitOff.png in Resources */,
    836848                        );
    837849                        runOnlyForDeploymentPostprocessing = 0;
  • branches/nat-traversal/macosx/TorrentTableView.h

    r699 r898  
    4040   
    4141    IBOutlet NSMenu     * fContextRow, * fContextNoRow;
    42     NSImage             * fResumeOnIcon, * fResumeOffIcon, * fPauseOnIcon, * fPauseOffIcon,
     42    NSImage             * fResumeOnIcon, * fResumeOffIcon,
     43                        * fPauseOnIcon, * fPauseOffIcon,
     44                        * fResumeNoWaitOnIcon, * fResumeNoWaitOffIcon,
    4345                        * fRevealOnIcon, * fRevealOffIcon;
    4446   
  • branches/nat-traversal/macosx/TorrentTableView.m

    r878 r898  
    5656        fResumeOffIcon = [NSImage imageNamed: @"ResumeOff.png"];
    5757        fPauseOnIcon = [NSImage imageNamed: @"PauseOn.png"];
     58        fResumeNoWaitOnIcon = [NSImage imageNamed: @"ResumeOn.png"];
     59        fResumeNoWaitOffIcon = [NSImage imageNamed: @"ResumeOff.png"];
    5860        fPauseOffIcon = [NSImage imageNamed: @"PauseOff.png"];
    5961        fRevealOnIcon = [NSImage imageNamed: @"RevealOn.png"];
     
    9597    fClickPoint = [self convertPoint: [event locationInWindow] fromView: nil];
    9698
    97     if ([event modifierFlags] & NSAlternateKeyMask)
    98     {
    99         [fController toggleAdvancedBar: self];
    100         fClickPoint = NSZeroPoint;
    101     }
    102     else if (![self pointInPauseRect: fClickPoint] && ![self pointInRevealRect: fClickPoint])
    103     {
    104         if ([self pointInMinimalStatusRect: fClickPoint])
    105             [(TorrentCell *)[[self tableColumnWithIdentifier: @"Torrent"] dataCell] toggleMinimalStatus];
    106 
    107         [super mouseDown: event];
     99    if (![self pointInPauseRect: fClickPoint] && ![self pointInRevealRect: fClickPoint])
     100    {
     101        if ([event modifierFlags] & NSAlternateKeyMask)
     102        {
     103            [fController toggleAdvancedBar: self];
     104            fClickPoint = NSZeroPoint;
     105        }
     106        else
     107        {
     108            if ([self pointInMinimalStatusRect: fClickPoint])
     109                [(TorrentCell *)[[self tableColumnWithIdentifier: @"Torrent"] dataCell] toggleMinimalStatus];
     110
     111            [super mouseDown: event];
     112        }
    108113    }
    109114    else;
     
    122127        Torrent * torrent = [fTorrents objectAtIndex: row];
    123128
    124         if ([torrent isActive] || ([torrent isPaused] && [torrent waitingToStart]))
     129        if ([torrent isActive])
    125130            [fController stopTorrents: [NSArray arrayWithObject: torrent]];
    126                 else if ([torrent isPaused])
    127                         [fController resumeTorrents: [NSArray arrayWithObject: torrent]];
    128                 else;
     131        else if ([torrent isPaused])
     132        {
     133            if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
     134                [fController resumeTorrentsNoWait: [NSArray arrayWithObject: torrent]];
     135            else if ([torrent waitingToStart])
     136                [fController stopTorrents: [NSArray arrayWithObject: torrent]];
     137            else
     138                [fController resumeTorrents: [NSArray arrayWithObject: torrent]];
     139        }
     140        else;
    129141    }
    130142    else if (sameRow && [self pointInRevealRect: point] && [self pointInRevealRect: fClickPoint])
     
    183195        [super keyDown: event];
    184196    }
     197}
     198
     199- (void) flagsChanged: (NSEvent *) event
     200{
     201    [self display];
     202    [super flagsChanged: event];
    185203}
    186204
     
    224242        rect  = [self pauseRectForRow: i];
    225243
    226         if ([torrent isActive] || ([torrent isPaused] && [torrent waitingToStart]))
     244        if ([torrent isActive])
    227245            image = NSPointInRect(fClickPoint, rect) ? fPauseOnIcon : fPauseOffIcon;
    228246        else if ([torrent isPaused])
    229             image = NSPointInRect(fClickPoint, rect) ? fResumeOnIcon : fResumeOffIcon;
     247        {
     248            if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask && [fDefaults boolForKey: @"Queue"])
     249                image = NSPointInRect(fClickPoint, rect) ? fResumeNoWaitOnIcon : fResumeNoWaitOffIcon;
     250            else if ([torrent waitingToStart])
     251                image = NSPointInRect(fClickPoint, rect) ? fPauseOnIcon : fPauseOffIcon;
     252            else
     253                image = NSPointInRect(fClickPoint, rect) ? fResumeOnIcon : fResumeOffIcon;
     254        }
    230255        else
    231256            image = nil;
Note: See TracChangeset for help on using the changeset viewer.