comparison src/sound.c @ 11552:11d30825c1bb

[gaim-migrate @ 13812] Source Forge patch 1273590 from Casey Harkins to move all sound playing events into gtksound.[ch] as well as a few other clean ups to make sure that all sounds are being played by the ui. committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Sat, 17 Sep 2005 03:00:12 +0000
parents 2a132b73a6e6
children 8d0ac3c37831
comparison
equal deleted inserted replaced
11551:78aad676fdb2 11552:11d30825c1bb
52 52
53 if(sound_ui_ops && sound_ui_ops->play_event) 53 if(sound_ui_ops && sound_ui_ops->play_event)
54 sound_ui_ops->play_event(event); 54 sound_ui_ops->play_event(event);
55 } 55 }
56 56
57 static void
58 sound_triggered_cb(GaimBuddy *buddy, GaimSoundEventID event)
59 {
60 gaim_sound_play_event(event);
61 }
62
63 void 57 void
64 gaim_sound_set_ui_ops(GaimSoundUiOps *ops) 58 gaim_sound_set_ui_ops(GaimSoundUiOps *ops)
65 { 59 {
66 if(sound_ui_ops && sound_ui_ops->uninit) 60 if(sound_ui_ops && sound_ui_ops->uninit)
67 sound_ui_ops->uninit(); 61 sound_ui_ops->uninit();
92 void *blist_handle = gaim_blist_get_handle(); 86 void *blist_handle = gaim_blist_get_handle();
93 87
94 gaim_prefs_add_none("/core/sound"); 88 gaim_prefs_add_none("/core/sound");
95 gaim_prefs_add_bool("/core/sound/while_away", FALSE); 89 gaim_prefs_add_bool("/core/sound/while_away", FALSE);
96 90
97 gaim_signal_connect(blist_handle, "buddy-signed-on",
98 handle, GAIM_CALLBACK(sound_triggered_cb),
99 GINT_TO_POINTER(GAIM_SOUND_BUDDY_ARRIVE));
100 gaim_signal_connect(blist_handle, "buddy-signed-off",
101 handle, GAIM_CALLBACK(sound_triggered_cb),
102 GINT_TO_POINTER(GAIM_SOUND_BUDDY_LEAVE));
103 } 91 }
104 92
105 void 93 void
106 gaim_sound_uninit() 94 gaim_sound_uninit()
107 { 95 {