src/sound.c

changeset 133
418de720c20d
parent 108
a44b2ce7d0dc
child 178
88fbad3afffa
--- a/src/sound.c	Tue Apr 18 09:05:55 2000 +0000
+++ b/src/sound.c	Wed Apr 19 02:04:30 2000 +0000
@@ -220,7 +220,7 @@
 
 #endif
 
-static void play(unsigned char *data, int size)
+void play(unsigned char *data, int size)
 {
         int pid;
 
@@ -260,7 +260,7 @@
         }
 }
 
-
+extern int logins_not_muted;
 #ifndef USE_APPLET
 
 void play_sound(int sound)
@@ -268,7 +268,7 @@
 
 	switch(sound) {
 	case BUDDY_ARRIVE:
-		if (sound_options & OPT_SOUND_LOGIN)
+		if ((sound_options & OPT_SOUND_LOGIN) && logins_not_muted)
 			play(BuddyArrive, sizeof(BuddyArrive));
 		break;
 	case BUDDY_LEAVE:
@@ -302,7 +302,7 @@
 
 	switch(sound) {
 	case BUDDY_ARRIVE:
-		if (sound_options & OPT_SOUND_LOGIN)
+		if ((sound_options & OPT_SOUND_LOGIN) && logins_not_muted)
 			gnome_triggers_do("", "program", "gaim_applet", "login", NULL);
 		break;
 	case BUDDY_LEAVE:

mercurial