Mercurial > pidgin
diff src/sound.c @ 64:b1d7336cba85
[gaim-migrate @ 74]
Changed how the sounds work for the applet - it's configurable now! :)
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Mon, 27 Mar 2000 03:52:12 +0000 |
| parents | 12894b62d206 |
| children | bfdc427b936d |
line wrap: on
line diff
--- a/src/sound.c Mon Mar 27 03:16:21 2000 +0000 +++ b/src/sound.c Mon Mar 27 03:52:12 2000 +0000 @@ -19,6 +19,7 @@ * */ +#ifndef USE_APPLET #include <stdio.h> #include <string.h> #include <sys/time.h> @@ -288,6 +289,41 @@ play(Receive, sizeof(Receive)); break; } +} - +#else /* USE_APPLET */ + +#include "gaim.h" +#include <libgnome/gnome-triggers.h> +void play_sound(int sound) +{ + + switch(sound) { + case BUDDY_ARRIVE: + if (sound_options & OPT_SOUND_LOGIN) + gnome_triggers_do("", "program", "gaim_applet", "login", NULL); + break; + case BUDDY_LEAVE: + if (sound_options & OPT_SOUND_LOGOUT) + gnome_triggers_do("", "program", "gaim_applet", "leave", NULL); + break; + case SEND: + if (sound_options & OPT_SOUND_SEND) + gnome_triggers_do("", "program", "gaim_applet", "send", NULL); + break; + case FIRST_RECEIVE: + if (sound_options & OPT_SOUND_FIRST_RCV) + gnome_triggers_do("", "program", "gaim_applet", "recv", NULL); + break; + case RECEIVE: + if (sound_options & OPT_SOUND_RECV) + gnome_triggers_do("", "program", "gaim_applet", "recv", NULL); + break; + case AWAY: + if (sound_options & OPT_SOUND_WHEN_AWAY) + gnome_triggers_do("", "program", "gaim_applet", "recv", NULL); + break; + } } + +#endif /* USE_APPLET */
