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:
parent
a13a6fbb4e
commit
878aa6828b
1 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue