Play sound when seeding completes.

This commit is contained in:
Mitchell Livingston 2006-08-07 01:03:14 +00:00
parent accc03084c
commit 874b50ac84
7 changed files with 18 additions and 5 deletions

View File

@ -1344,6 +1344,13 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[self applyFilter: nil];
[fInfoController updateInfoStatsAndSettings];
if ([fDefaults boolForKey: @"PlaySeedingSound"])
{
NSSound * sound;
if ((sound = [NSSound soundNamed: @"Submarine"]))
[sound play];
}
[GrowlApplicationBridge notifyWithTitle: @"Seeding Complete" description: [[notification object] name]
notificationName: GROWL_SEEDING_COMPLETE iconData: nil priority: 0 isSticky: NO clickContext: nil];
}

View File

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key></key>
<string></string>
<key>AutoImport</key>
<false/>
<key>AutoImportDirectory</key>
@ -52,6 +50,8 @@
<string>~/Desktop</string>
<key>PlayDownloadSound</key>
<true/>
<key>PlaySeedingSound</key>
<false/>
<key>RatioCheck</key>
<false/>
<key>RatioLimit</key>

View File

@ -40,6 +40,7 @@
fImportFolderPopUp = NSPopUpButton;
fNetworkView = NSView;
fPlayDownloadSoundCheck = NSButton;
fPlaySeedingSoundCheck = NSButton;
fPortField = NSTextField;
fQuitCheck = NSButton;
fQuitDownloadingCheck = NSButton;

View File

@ -11,7 +11,7 @@
<key>28</key>
<string>139 281 538 290 0 0 1152 842 </string>
<key>41</key>
<string>161 333 584 355 0 0 1152 842 </string>
<string>115 371 538 378 0 0 1152 842 </string>
<key>66</key>
<string>353 613 538 104 0 0 1152 842 </string>
</dict>

View File

@ -37,7 +37,7 @@
IBOutlet NSButton * fQuitCheck, * fRemoveCheck,
* fQuitDownloadingCheck, * fRemoveDownloadingCheck,
* fBadgeDownloadRateCheck, * fBadgeUploadRateCheck,
* fPlayDownloadSoundCheck,
* fPlayDownloadSoundCheck, * fPlaySeedingSoundCheck,
* fCopyTorrentCheck, * fDeleteOriginalTorrentCheck,
* fAutoImportCheck, * fAutoSizeCheck;

View File

@ -193,6 +193,7 @@
//set play sound
[fPlayDownloadSoundCheck setState: [fDefaults boolForKey: @"PlayDownloadSound"]];
[fPlaySeedingSoundCheck setState: [fDefaults boolForKey: @"PlaySeedingSound"]];
//set start setting
NSString * startSetting = [fDefaults stringForKey: @"StartSetting"];
@ -515,7 +516,11 @@
- (void) setPlaySound: (id) sender
{
[fDefaults setBool: [sender state] forKey: @"PlayDownloadSound"];
if (sender == fPlayDownloadSoundCheck)
[fDefaults setBool: [sender state] forKey: @"PlayDownloadSound"];
else if (sender == fPlaySeedingSoundCheck)
[fDefaults setBool: [sender state] forKey: @"PlaySeedingSound"];
else;
}
- (void) setUpdate: (id) sender