mirror of
https://github.com/transmission/transmission
synced 2025-03-06 11:38:21 +00:00
Play sound when seeding completes.
This commit is contained in:
parent
accc03084c
commit
874b50ac84
7 changed files with 18 additions and 5 deletions
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
1
macosx/English.lproj/PrefsWindow.nib/classes.nib
generated
1
macosx/English.lproj/PrefsWindow.nib/classes.nib
generated
|
@ -40,6 +40,7 @@
|
|||
fImportFolderPopUp = NSPopUpButton;
|
||||
fNetworkView = NSView;
|
||||
fPlayDownloadSoundCheck = NSButton;
|
||||
fPlaySeedingSoundCheck = NSButton;
|
||||
fPortField = NSTextField;
|
||||
fQuitCheck = NSButton;
|
||||
fQuitDownloadingCheck = NSButton;
|
||||
|
|
2
macosx/English.lproj/PrefsWindow.nib/info.nib
generated
2
macosx/English.lproj/PrefsWindow.nib/info.nib
generated
|
@ -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>
|
||||
|
|
BIN
macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -37,7 +37,7 @@
|
|||
IBOutlet NSButton * fQuitCheck, * fRemoveCheck,
|
||||
* fQuitDownloadingCheck, * fRemoveDownloadingCheck,
|
||||
* fBadgeDownloadRateCheck, * fBadgeUploadRateCheck,
|
||||
* fPlayDownloadSoundCheck,
|
||||
* fPlayDownloadSoundCheck, * fPlaySeedingSoundCheck,
|
||||
* fCopyTorrentCheck, * fDeleteOriginalTorrentCheck,
|
||||
* fAutoImportCheck, * fAutoSizeCheck;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue