Using a custom sound in Gmail Notifier

Oct 13, '05 06:03:00AM

Contributed by: Anonymous

So, with Gmail Notifier, you can select what sound you want the notifier to play when you have new mail. But it is not easy to add a custom sound to the list. Just dropping an .aiff file into ~/Library/Sounds, for instance, won't work. Although the sound will appear as an option in the System Preferences Sounds pane, it will not appear as an option in Gmail Notifier.

As it turns out, getting the Notifier to recognize a custom sound is something of a pain...

NOTE: To do this, you must have the Property List Editor application available, as well as the Interface Builder application (the latter installs with the Developer Tools that come on the OS X install CDs).

First, prepare the sound you want to use by converting it to .aiff format; you can do this with QuickTime Pro's File -> Export command, or with a specialized utility like MP3-to-Aiff. Control-click on the Gmail Notifier icon in your Applications folder and select Show Package Contents from the menu. Open Contents -> Resources -> English.projl.

In English.projl, there should be a file called Preferences.nib; double-clicking on this file should bring up the Interface Builder application. Once this app is running, you should see a window entitled Preferences.nib (English). Click on the Sounds tab. This should present a list of sounds available for use as notification sounds in Notifier.

Drag the .aiff file of the sound you want to use from the Finder into this window. When the Insert Sound dialogue box appears, click Create Local Sound. Save the interface and exit interface builder. At this point, I deleted the auto-save of the Preferences.nib file, but that was probably a bad idea. I don't think it matters.

Yet this is not enough; even at this point, the sound will not appear as an option in Notifier's Preferences pane. So, now we have to force Notifier to recognize the new sound resource.

Open the folder ~/Library/Preferences and double-click on com.Google.GmailNotifier.plist, which should bring up the Property List Editor application. Click on the triangle next to Root; you will see an entry called NewMailSound or something like that. Double-click on the field containing the name of the sound currently selected. Now manually enter in the name of the sound you put in the .nib file (without the .aif or .aiff extension). Save your changes and quit Property List Editor.

Next time you start Notifier, it should use this sound, and from now on, the sound should appear as an option in the Preferences pane of the Notifier, even if you switch to another sound.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20051011071155289