Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
11641:925c1960af34 | 11642:58bc500cf226 |
---|---|
22 * along with this program; if not, write to the Free Software | 22 * along with this program; if not, write to the Free Software |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 */ | 24 */ |
25 #ifndef _GAIM_SOUND_H_ | 25 #ifndef _GAIM_SOUND_H_ |
26 #define _GAIM_SOUND_H_ | 26 #define _GAIM_SOUND_H_ |
27 | |
28 #include "account.h" | |
27 | 29 |
28 /**************************************************************************/ | 30 /**************************************************************************/ |
29 /** Data Structures */ | 31 /** Data Structures */ |
30 /**************************************************************************/ | 32 /**************************************************************************/ |
31 | 33 |
71 | 73 |
72 /** | 74 /** |
73 * Plays the specified sound file. | 75 * Plays the specified sound file. |
74 * | 76 * |
75 * @param filename The file to play. | 77 * @param filename The file to play. |
78 * @param account The account that this sound is associated with, or | |
79 * NULL if the sound is not associated with any specific | |
80 * account. This is needed for the "sounds while away?" | |
81 * preference to work correctly. | |
76 */ | 82 */ |
77 void gaim_sound_play_file(const char *filename); | 83 void gaim_sound_play_file(const char *filename, const GaimAccount *account); |
78 | 84 |
79 /** | 85 /** |
80 * Plays the sound associated with the specified event. | 86 * Plays the sound associated with the specified event. |
81 * | 87 * |
82 * @param event The event. | 88 * @param event The event. |
89 * @param account The account that this sound is associated with, or | |
90 * NULL if the sound is not associated with any specific | |
91 * account. This is needed for the "sounds while away?" | |
92 * preference to work correctly. | |
83 */ | 93 */ |
84 void gaim_sound_play_event(GaimSoundEventID event); | 94 void gaim_sound_play_event(GaimSoundEventID event, const GaimAccount *account); |
85 | 95 |
86 /** | 96 /** |
87 * Sets the UI sound operations | 97 * Sets the UI sound operations |
88 * | 98 * |
89 * @param ops The UI sound operations structure. | 99 * @param ops The UI sound operations structure. |