Mercurial > pidgin.yaz
comparison pidgin/gtksound.c @ 29695:b1284d63b969
propagate from branch 'im.pidgin.pidgin' (head 29f6b9d81574bfa9235dbd438a8934f06552e368)
to branch 'im.pidgin.cpw.attention_ui' (head 382194d06f05cbf5030ec6471a719e32bf6ef9d7)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 20 Sep 2009 19:57:21 +0000 |
parents | 9c7fe51c153b 338d6a211055 |
children | c783f9e66171 |
comparison
equal
deleted
inserted
replaced
28646:5f97830906bc | 29695:b1284d63b969 |
---|---|
70 {N_("Person leaves chat"), "left_chat", "logout.wav"}, | 70 {N_("Person leaves chat"), "left_chat", "logout.wav"}, |
71 {N_("You talk in chat"), "send_chat_msg", "send.wav"}, | 71 {N_("You talk in chat"), "send_chat_msg", "send.wav"}, |
72 {N_("Others talk in chat"), "chat_msg_recv", "receive.wav"}, | 72 {N_("Others talk in chat"), "chat_msg_recv", "receive.wav"}, |
73 /* this isn't a terminator, it's the buddy pounce default sound event ;-) */ | 73 /* this isn't a terminator, it's the buddy pounce default sound event ;-) */ |
74 {NULL, "pounce_default", "alert.wav"}, | 74 {NULL, "pounce_default", "alert.wav"}, |
75 {N_("Someone says your username in chat"), "nick_said", "alert.wav"} | 75 {N_("Someone says your username in chat"), "nick_said", "alert.wav"}, |
76 {N_("Attention received"), "got_attention", "alert.wav"}, | |
77 {N_("Attention sent"), "sent_attention", "alert.wav"} | |
76 }; | 78 }; |
77 | 79 |
78 static gboolean | 80 static gboolean |
79 unmute_login_sounds_cb(gpointer data) | 81 unmute_login_sounds_cb(gpointer data) |
80 { | 82 { |
215 /* This isn't quite right; if you have the PURPLE_SOUND_CHAT_NICK event disabled | 217 /* This isn't quite right; if you have the PURPLE_SOUND_CHAT_NICK event disabled |
216 * and the PURPLE_SOUND_CHAT_SAY event enabled, you won't get a sound at all */ | 218 * and the PURPLE_SOUND_CHAT_SAY event enabled, you won't get a sound at all */ |
217 play_conv_event(conv, PURPLE_SOUND_CHAT_NICK); | 219 play_conv_event(conv, PURPLE_SOUND_CHAT_NICK); |
218 else | 220 else |
219 play_conv_event(conv, event); | 221 play_conv_event(conv, event); |
222 } | |
223 | |
224 static void | |
225 sent_attention_cb(PurpleAccount *account, const char *who, | |
226 PurpleConversation *conv, guint type, PurpleSoundEventID event) | |
227 { | |
228 play_conv_event(conv, event); | |
229 } | |
230 | |
231 static void | |
232 got_attention_cb(PurpleAccount *account, const char *who, | |
233 PurpleConversation *conv, guint type, PurpleSoundEventID event) | |
234 { | |
235 play_conv_event(conv, event); | |
220 } | 236 } |
221 | 237 |
222 /* | 238 /* |
223 * We mute sounds for the 10 seconds after you log in so that | 239 * We mute sounds for the 10 seconds after you log in so that |
224 * you don't get flooded with sounds when the blist shows all | 240 * you don't get flooded with sounds when the blist shows all |
297 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/nick_said", FALSE); | 313 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/nick_said", FALSE); |
298 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/nick_said", ""); | 314 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/nick_said", ""); |
299 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/pounce_default", TRUE); | 315 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/pounce_default", TRUE); |
300 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/pounce_default", ""); | 316 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/pounce_default", ""); |
301 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/sound/theme", ""); | 317 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/sound/theme", ""); |
318 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/sent_attention", TRUE); | |
319 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/sent_attention", ""); | |
320 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/enabled/got_attention", TRUE); | |
321 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/file/got_attention", ""); | |
302 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/conv_focus", TRUE); | 322 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/conv_focus", TRUE); |
303 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE); | 323 purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE); |
304 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/command", ""); | 324 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/command", ""); |
305 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/sound/method", "automatic"); | 325 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/sound/method", "automatic"); |
306 purple_prefs_add_int(PIDGIN_PREFS_ROOT "/sound/volume", 50); | 326 purple_prefs_add_int(PIDGIN_PREFS_ROOT "/sound/volume", 50); |
343 gtk_sound_handle, PURPLE_CALLBACK(chat_msg_sent_cb), | 363 gtk_sound_handle, PURPLE_CALLBACK(chat_msg_sent_cb), |
344 GINT_TO_POINTER(PURPLE_SOUND_CHAT_YOU_SAY)); | 364 GINT_TO_POINTER(PURPLE_SOUND_CHAT_YOU_SAY)); |
345 purple_signal_connect(conv_handle, "received-chat-msg", | 365 purple_signal_connect(conv_handle, "received-chat-msg", |
346 gtk_sound_handle, PURPLE_CALLBACK(chat_msg_received_cb), | 366 gtk_sound_handle, PURPLE_CALLBACK(chat_msg_received_cb), |
347 GINT_TO_POINTER(PURPLE_SOUND_CHAT_SAY)); | 367 GINT_TO_POINTER(PURPLE_SOUND_CHAT_SAY)); |
368 purple_signal_connect(conv_handle, "sent-attention", gtk_sound_handle, | |
369 PURPLE_CALLBACK(sent_attention_cb), | |
370 GINT_TO_POINTER(PURPLE_SOUND_SEND_ATTENTION)); | |
371 purple_signal_connect(conv_handle, "got-attention", gtk_sound_handle, | |
372 PURPLE_CALLBACK(got_attention_cb), | |
373 GINT_TO_POINTER(PURPLE_SOUND_GOT_ATTENTION)); | |
348 } | 374 } |
349 | 375 |
350 static void | 376 static void |
351 pidgin_sound_uninit(void) | 377 pidgin_sound_uninit(void) |
352 { | 378 { |