diff src/sound.c @ 4082:4b04ecb3eb97

[gaim-migrate @ 4297] (22:54:38) Robot101: * Make sure prefs are saved before plugins are removed, and not afterwards. (22:54:59) Robot101: * Move do_quit() into aim.c and make sure everything appropriate uses it. (22:55:12) Robot101: * Remove duplicated cancel_login for closing the main window, use do_quit instead. (22:55:49) Robot101: * Remove uncalled code pertaining to closing the about window from when it was called via gaim -v. (22:56:06) LSchiere: what's this in sounds? (22:56:29) Robot101: * Add correct ifdefs to prefs so only compiled-in sound methods are shown. (22:56:34) LSchiere: if you broke my sounds... (22:57:07) Robot101: * Remove unused sound order data, and clarify comments and debug output. (22:57:56) Robot101: * Remove duplicated check which is performed at the start of play_file anyway. (22:58:03) Robot101: that's the lot committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 16 Dec 2002 03:58:54 +0000
parents e53d9f9969d0
children bf770f11132b
line wrap: on
line diff
--- a/src/sound.c	Mon Dec 16 00:19:44 2002 +0000
+++ b/src/sound.c	Mon Dec 16 03:58:54 2002 +0000
@@ -60,11 +60,10 @@
 
 gboolean mute_sounds = 0;
 
-/* description, option bit, default sound file                    *
- * if you want it to get displayed in the prefs dialog, it needs  *
- * to be added to the sound_order array in prefs.c, if not, and   *
- * it has no option bit, set it to 0. the order here has to match *
- * the defines in gaim.h.                               -Robot101 */
+/* description, option bit, default sound file             *
+ * set the option bit to 0 to have it not display in prefs *
+ * the order here has to match the defines in gaim.h.      *
+ *                                               -Robot101 */
 struct sound_struct sounds[NUM_SOUNDS] = {
 	{N_("Buddy logs in"), OPT_SOUND_LOGIN, "arrive.wav"},
 	{N_("Buddy logs out"), OPT_SOUND_LOGOUT, "leave.wav"},
@@ -79,12 +78,6 @@
 	{NULL, 0, "redalert.wav"},
 	{N_("Someone says your name in chat"), OPT_SOUND_CHAT_NICK, "redalert.wav"}
 };
-int sound_order[] = {
-	SND_BUDDY_ARRIVE, SND_BUDDY_LEAVE,
-	SND_FIRST_RECEIVE, SND_RECEIVE, SND_SEND,
-	SND_CHAT_JOIN, SND_CHAT_LEAVE,
-	SND_CHAT_YOU_SAY, SND_CHAT_SAY, SND_CHAT_NICK, 0
-};
 
 #ifndef _WIN32
 static int check_dev(char *dev)
@@ -464,14 +457,11 @@
 	if (mute_sounds)
 		return;
 	
-	if (awaymessage && !(sound_options & OPT_SOUND_WHEN_AWAY))
-		return;
-
 	if ((sound == SND_BUDDY_ARRIVE) && !logins_not_muted)
 		return;
 
 	if (sound >= NUM_SOUNDS) {
-		debug_printf("sorry old fruit... can't say I know that sound: ", sound, "\n");
+		debug_printf("got request for unknown sound: %d\n", sound);
 		return;
 	}