comparison src/buddy.c @ 4561:9df99116840a

[gaim-migrate @ 4842] This is the new sound subsystem Lots of stuff got renamed, and everything sound-wise is documented. Gaim now uses libaudiofile and libao to play sounds. Lots of ugly hacks were removed, and now we support playing audio through anything that libao will support. If you need to (you shouldn't) you can force libao to use a specific output driver, by putting a line into ~/.libao like: default_driver=esd You shouldn't need to do this, libao is pretty good at figuring out what driver to use. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 09 Feb 2003 01:55:35 +0000
parents d03fcb3f4be2
children 493f050dc11a
comparison
equal deleted inserted replaced
4560:eb32b3acef97 4561:9df99116840a
43 #endif 43 #endif
44 44
45 #include <gdk/gdkkeysyms.h> 45 #include <gdk/gdkkeysyms.h>
46 #include <gtk/gtk.h> 46 #include <gtk/gtk.h>
47 #include "prpl.h" 47 #include "prpl.h"
48 #include "sound.h"
48 #include "gaim.h" 49 #include "gaim.h"
49 50
50 #ifdef _WIN32 51 #ifdef _WIN32
51 #include "win32dep.h" 52 #include "win32dep.h"
52 #endif 53 #endif
1457 CloseHandle( pi.hThread ); 1458 CloseHandle( pi.hThread );
1458 #endif /*_WIN32*/ 1459 #endif /*_WIN32*/
1459 } 1460 }
1460 if (b->options & OPT_POUNCE_SOUND) { 1461 if (b->options & OPT_POUNCE_SOUND) {
1461 if (strlen(b->sound)) 1462 if (strlen(b->sound))
1462 play_file(b->sound); 1463 gaim_sound_play_file(b->sound);
1463 else 1464 else
1464 play_sound(SND_POUNCE_DEFAULT); 1465 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT);
1465 } 1466 }
1466 1467
1467 if (!(b->options & OPT_POUNCE_SAVE)) 1468 if (!(b->options & OPT_POUNCE_SAVE))
1468 rem_bp(NULL, b); 1469 rem_bp(NULL, b);
1469 1470
2212 bs->connlist = g_slist_append(bs->connlist, gc); 2213 bs->connlist = g_slist_append(bs->connlist, gc);
2213 update_num_group(gs); 2214 update_num_group(gs);
2214 } 2215 }
2215 if (b->present == 1) { 2216 if (b->present == 1) {
2216 if (bs->sound != 2) 2217 if (bs->sound != 2)
2217 play_sound(SND_BUDDY_ARRIVE); 2218 gaim_sound_play_event(GAIM_SOUND_BUDDY_ARRIVE);
2218 if (blist_options & OPT_BLIST_POPUP) 2219 if (blist_options & OPT_BLIST_POPUP)
2219 gdk_window_show(blist->window); 2220 gdk_window_show(blist->window);
2220 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, 2221 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
2221 NULL, (char **)login_icon_xpm); 2222 NULL, (char **)login_icon_xpm);
2222 gtk_widget_hide(bs->pix); 2223 gtk_widget_hide(bs->pix);
2274 if (!bs->connlist) 2275 if (!bs->connlist)
2275 return; /* we won't do signoff updates for 2276 return; /* we won't do signoff updates for
2276 buddies that have already signed 2277 buddies that have already signed
2277 off */ 2278 off */
2278 if (bs->sound != 1) 2279 if (bs->sound != 1)
2279 play_sound(SND_BUDDY_LEAVE); 2280 gaim_sound_play_event(GAIM_SOUND_BUDDY_LEAVE);
2280 if (blist_options & OPT_BLIST_POPUP) 2281 if (blist_options & OPT_BLIST_POPUP)
2281 gdk_window_show(blist->window); 2282 gdk_window_show(blist->window);
2282 bs->connlist = g_slist_remove(bs->connlist, gc); 2283 bs->connlist = g_slist_remove(bs->connlist, gc);
2283 update_num_group(gs); 2284 update_num_group(gs);
2284 if (bs->log_timer > 0) 2285 if (bs->log_timer > 0)