mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
when unchecking all files in the add dialog window, don't do finished events
This commit is contained in:
parent
4843187f6c
commit
612e7221a9
2 changed files with 48 additions and 48 deletions
|
@ -194,6 +194,7 @@ typedef enum
|
|||
|
||||
- (void) torrentFinishedDownloading: (NSNotification *) notification;
|
||||
- (void) torrentRestartedDownloading: (NSNotification *) notification;
|
||||
- (void) torrentStoppedForRatio: (NSNotification *) notification;
|
||||
|
||||
- (void) updateTorrentHistory;
|
||||
|
||||
|
@ -227,8 +228,6 @@ typedef enum
|
|||
- (void) setRatioGlobalEnabled: (id) sender;
|
||||
- (void) setQuickRatioGlobal: (id) sender;
|
||||
|
||||
- (void) torrentStoppedForRatio: (NSNotification *) notification;
|
||||
|
||||
- (void) changeAutoImport;
|
||||
- (void) checkAutoImportDirectory;
|
||||
|
||||
|
|
|
@ -1593,10 +1593,13 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
return desired;
|
||||
}
|
||||
|
||||
#warning migrate to Torrent.m
|
||||
- (void) torrentFinishedDownloading: (NSNotification *) notification
|
||||
{
|
||||
Torrent * torrent = [notification object];
|
||||
|
||||
if ([torrent isActive])
|
||||
{
|
||||
if (!fSoundPlaying && [fDefaults boolForKey: @"PlayDownloadSound"])
|
||||
{
|
||||
NSSound * sound;
|
||||
|
@ -1617,8 +1620,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
if (![fWindow isMainWindow])
|
||||
[fBadger incrementCompleted];
|
||||
|
||||
if ([torrent isActive])
|
||||
{
|
||||
if ([fDefaults boolForKey: @"QueueSeed"] && [self numToStartFromQueue: NO] <= 0)
|
||||
{
|
||||
[torrent stopTransfer];
|
||||
|
@ -1644,6 +1645,32 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
[self updateTorrentsInQueue];
|
||||
}
|
||||
|
||||
- (void) torrentStoppedForRatio: (NSNotification *) notification
|
||||
{
|
||||
Torrent * torrent = [notification object];
|
||||
|
||||
[self updateTorrentsInQueue];
|
||||
[fInfoController updateInfoStats];
|
||||
[fInfoController updateOptions];
|
||||
|
||||
if (!fSoundPlaying && [fDefaults boolForKey: @"PlaySeedingSound"])
|
||||
{
|
||||
NSSound * sound;
|
||||
if ((sound = [NSSound soundNamed: [fDefaults stringForKey: @"SeedingSound"]]))
|
||||
{
|
||||
[sound setDelegate: self];
|
||||
fSoundPlaying = YES;
|
||||
[sound play];
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary * clickContext = [NSDictionary dictionaryWithObjectsAndKeys: GROWL_SEEDING_COMPLETE, @"Type",
|
||||
[torrent dataLocation], @"Location", nil];
|
||||
[GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Seeding Complete", "Growl notification title")
|
||||
description: [torrent name] notificationName: GROWL_SEEDING_COMPLETE
|
||||
iconData: nil priority: 0 isSticky: NO clickContext: clickContext];
|
||||
}
|
||||
|
||||
- (void) updateTorrentHistory
|
||||
{
|
||||
NSMutableArray * history = [NSMutableArray arrayWithCapacity: [fTorrents count]];
|
||||
|
@ -2341,32 +2368,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
[fPrefsController updateRatioStopField];
|
||||
}
|
||||
|
||||
- (void) torrentStoppedForRatio: (NSNotification *) notification
|
||||
{
|
||||
Torrent * torrent = [notification object];
|
||||
|
||||
[self updateTorrentsInQueue];
|
||||
[fInfoController updateInfoStats];
|
||||
[fInfoController updateOptions];
|
||||
|
||||
if (!fSoundPlaying && [fDefaults boolForKey: @"PlaySeedingSound"])
|
||||
{
|
||||
NSSound * sound;
|
||||
if ((sound = [NSSound soundNamed: [fDefaults stringForKey: @"SeedingSound"]]))
|
||||
{
|
||||
[sound setDelegate: self];
|
||||
fSoundPlaying = YES;
|
||||
[sound play];
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary * clickContext = [NSDictionary dictionaryWithObjectsAndKeys: GROWL_SEEDING_COMPLETE, @"Type",
|
||||
[torrent dataLocation], @"Location", nil];
|
||||
[GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Seeding Complete", "Growl notification title")
|
||||
description: [torrent name] notificationName: GROWL_SEEDING_COMPLETE
|
||||
iconData: nil priority: 0 isSticky: NO clickContext: clickContext];
|
||||
}
|
||||
|
||||
- (void) sound: (NSSound *) sound didFinishPlaying: (BOOL) finishedPlaying
|
||||
{
|
||||
fSoundPlaying = NO;
|
||||
|
|
Loading…
Reference in a new issue