1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 19:03:04 +00:00

When both torrent and non-torrent files are dropped, only open the torrents.

Don't badge with completed downloads when the window is key.
 Update the table right after start so you don't stay with an empty list
 for one second.
This commit is contained in:
Eric Petit 2006-02-11 06:46:40 +00:00
parent a13a6fbb4e
commit 878aa6828b

View file

@ -144,8 +144,9 @@ static void sleepCallBack( void * controller, io_service_t y,
fSeeding = 0;
fCompleted = 0;
fStat = nil;
[self updateUI: nil];
fTimer = [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self
selector: @selector( updateUI: ) userInfo: NULL repeats: YES];
selector: @selector( updateUI: ) userInfo: nil repeats: YES];
[[NSRunLoop currentRunLoop] addTimer: fTimer
forMode: NSModalPanelRunLoopMode];
[[NSRunLoop currentRunLoop] addTimer: fTimer
@ -154,7 +155,7 @@ static void sleepCallBack( void * controller, io_service_t y,
[self checkForUpdateTimer: nil];
fUpdateTimer = [NSTimer scheduledTimerWithTimeInterval: 60.0
target: self selector: @selector( checkForUpdateTimer: )
userInfo: NULL repeats: YES];
userInfo: nil repeats: YES];
}
- (void) windowDidBecomeKey: (NSNotification *) n
@ -583,7 +584,8 @@ static void sleepCallBack( void * controller, io_service_t y,
if( !tr_getFinished( fHandle, i ) )
continue;
fCompleted++;
if( ![fWindow isKeyWindow] )
fCompleted++;
[self notifyGrowl: [NSString stringWithUTF8String:
fStat[i].info.name]];
tr_setFinished( fHandle, i, 0 );
@ -650,8 +652,9 @@ static void sleepCallBack( void * controller, io_service_t y,
(id <NSDraggingInfo>) info row: (int) row dropOperation:
(NSTableViewDropOperation) operation
{
[self application: NSApp openFiles: [[info draggingPasteboard]
propertyListForType: NSFilenamesPboardType]];
[self application: NSApp openFiles: [[[info draggingPasteboard]
propertyListForType: NSFilenamesPboardType]
pathsMatchingExtensions: [NSArray arrayWithObject: @"torrent"]]];
return YES;
}