Mercurial > pidgin
diff plugins/signals-test.c @ 12850:49b2347863b2
[gaim-migrate @ 15200]
SF Patch #1403151 from charkins
"This patch prevents two cases for "sonic avalanche" in
the sound code. The first is to only play sounds in
response to the chat-buddy-joined signal when the
new_arrival flag is set."
"The second case has to do with jabber pre-filling chat
history when a chat is joined. The GAIM_MESSAGE_DELAYED
flag is used on these messages, so sound are not played
when this flag is set on received messages."
"I also fixed sound_playing_event_cb() in
signals-test.c which was assuming account!=NULL, which
in turn was throwing an assertion error when
gaim_account_get_username() was called."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 12 Jan 2006 06:59:39 +0000 |
parents | 366326fa9cb4 |
children | f09c6e8df82c |
line wrap: on
line diff
--- a/plugins/signals-test.c Thu Jan 12 06:44:23 2006 +0000 +++ b/plugins/signals-test.c Thu Jan 12 06:59:39 2006 +0000 @@ -346,10 +346,10 @@ static void chat_buddy_joined_cb(GaimConversation *conv, const char *user, - GaimConvChatBuddyFlags flags, void *data) + GaimConvChatBuddyFlags flags, gboolean new_arrival, void *data) { - gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d)\n", - gaim_conversation_get_name(conv), user, flags); + gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d, %d)\n", + gaim_conversation_get_name(conv), user, flags, new_arrival); } static void @@ -501,8 +501,11 @@ **************************************************************************/ static int sound_playing_event_cb(GaimSoundEventID event, const GaimAccount *account) { - gaim_debug_misc("signals test", "sound playing event: %d for account: %s\n", - event, gaim_account_get_username(account)); + if (account != NULL) + gaim_debug_misc("signals test", "sound playing event: %d for account: %s\n", + event, gaim_account_get_username(account)); + else + gaim_debug_misc("signals test", "sound playing event: %d\n", event); return 0; }