Mercurial > pidgin
diff src/sound.h @ 11642:58bc500cf226
[gaim-migrate @ 13919]
sf patch #1324285, from Casey Harkins
fix "sounds while away" in HEAD
This patch adds a GaimAccount as a parameter to the
sound playing functions, allowing the caller to specify
the account the sound is related to. If the account is
not NULL and the while_away preference is not set, then
the account is checked to see if it is away, if so, the
sound is not played.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 12 Oct 2005 02:27:32 +0000 |
parents | 2a132b73a6e6 |
children | 5bc3d67ceb24 |
line wrap: on
line diff
--- a/src/sound.h Tue Oct 11 16:20:29 2005 +0000 +++ b/src/sound.h Wed Oct 12 02:27:32 2005 +0000 @@ -25,6 +25,8 @@ #ifndef _GAIM_SOUND_H_ #define _GAIM_SOUND_H_ +#include "account.h" + /**************************************************************************/ /** Data Structures */ /**************************************************************************/ @@ -73,15 +75,23 @@ * Plays the specified sound file. * * @param filename The file to play. + * @param account The account that this sound is associated with, or + * NULL if the sound is not associated with any specific + * account. This is needed for the "sounds while away?" + * preference to work correctly. */ -void gaim_sound_play_file(const char *filename); +void gaim_sound_play_file(const char *filename, const GaimAccount *account); /** * Plays the sound associated with the specified event. * * @param event The event. + * @param account The account that this sound is associated with, or + * NULL if the sound is not associated with any specific + * account. This is needed for the "sounds while away?" + * preference to work correctly. */ -void gaim_sound_play_event(GaimSoundEventID event); +void gaim_sound_play_event(GaimSoundEventID event, const GaimAccount *account); /** * Sets the UI sound operations