update NEWS and add a little efficiency for the last commit

This commit is contained in:
Mitchell Livingston 2008-01-11 05:04:40 +00:00
parent 1f862a70e6
commit 4a6c14bc01
2 changed files with 27 additions and 17 deletions

1
NEWS
View File

@ -3,6 +3,7 @@ NEWS file for Transmission <http://transmission.m0k.org/>
1.10 (2008/xx/yy) 1.10 (2008/xx/yy)
- OS X: - OS X:
+ Window when adding torrents to select files and other settings + Window when adding torrents to select files and other settings
+ Leopard: Fix to allow double-clicking the icon to reveal in Finder, double-clicking the progress string to toggle between selected and total progress, and double-clicking anywhere else to toggle the inspector
1.01 (2008/xx/yy) 1.01 (2008/xx/yy)
- All Platforms: - All Platforms:

View File

@ -100,7 +100,6 @@
- (void) mouseDown: (NSEvent *) event - (void) mouseDown: (NSEvent *) event
{ {
NSLog(@"down");
fClickPoint = [self convertPoint: [event locationInWindow] fromView: nil]; fClickPoint = [self convertPoint: [event locationInWindow] fromView: nil];
if ([self pointInActionRect: fClickPoint]) if ([self pointInActionRect: fClickPoint])
@ -148,34 +147,44 @@
- (void) mouseUp: (NSEvent *) event - (void) mouseUp: (NSEvent *) event
{ {
NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil]; int oldRow;
int row = [self rowAtPoint: point], oldRow = [self rowAtPoint: fClickPoint]; if (fClickIn)
if (row == oldRow && [self pointInPauseRect: point] && [self pointInPauseRect: fClickPoint])
{ {
Torrent * torrent = [fTorrents objectAtIndex: row]; NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil];
int row = [self rowAtPoint: point];
oldRow = [self rowAtPoint: fClickPoint];
if ([torrent isActive]) if (row == oldRow && [self pointInPauseRect: point] && [self pointInPauseRect: fClickPoint])
[fController stopTorrents: [NSArray arrayWithObject: torrent]];
else
{ {
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) Torrent * torrent = [fTorrents objectAtIndex: row];
[fController resumeTorrentsNoWait: [NSArray arrayWithObject: torrent]];
else if ([torrent waitingToStart]) if ([torrent isActive])
[fController stopTorrents: [NSArray arrayWithObject: torrent]]; [fController stopTorrents: [NSArray arrayWithObject: torrent]];
else else
[fController resumeTorrents: [NSArray arrayWithObject: torrent]]; {
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
[fController resumeTorrentsNoWait: [NSArray arrayWithObject: torrent]];
else if ([torrent waitingToStart])
[fController stopTorrents: [NSArray arrayWithObject: torrent]];
else
[fController resumeTorrents: [NSArray arrayWithObject: torrent]];
}
} }
else if (row == oldRow && [self pointInRevealRect: point] && [self pointInRevealRect: fClickPoint])
[[fTorrents objectAtIndex: row] revealData];
else;
} }
else if (row == oldRow && [self pointInRevealRect: point] && [self pointInRevealRect: fClickPoint])
[[fTorrents objectAtIndex: row] revealData];
else;
[super mouseUp: event]; [super mouseUp: event];
fClickPoint = NSZeroPoint; fClickPoint = NSZeroPoint;
#warning need fClickIn?
BOOL wasClickIn = fClickIn;
fClickIn = NO; fClickIn = NO;
[self setNeedsDisplayInRect: [self rectOfRow: oldRow]];
if (wasClickIn)
[self setNeedsDisplayInRect: [self rectOfRow: oldRow]];
} }
- (void) mouseDragged: (NSEvent *) event - (void) mouseDragged: (NSEvent *) event