Wed, 02 Jun 2004 00:44:51 +0000
[gaim-migrate @ 9946]
wing added support for yahoo profiles in, well pretty much every language.
Looks pretty impressive to me.
Someone may want to double check his src/util.c changes. I think we have
some crazy patch writers who know those functions better than me.
This also introduces a couple of warning because wing didn't add his new
util.c function to util.h. Rather than adding it myself, I'm going to bug
him to add it and document it.
| 1 | 1 | /* |
| 2 | * gaim | |
| 3 | * | |
| 8046 | 4 | * Gaim is the legal property of its developers, whose names are too numerous |
| 5 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 6 | * source distribution. | |
| 1 | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | * | |
| 22 | */ | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
23 | #include "internal.h" |
| 3630 | 24 | |
| 4561 | 25 | #include "sound.h" |
|
5545
a8b1a1262402
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
26 | #include "prefs.h" |
| 1 | 27 | |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
28 | /* XXX CORE/UI: this goes away when away messages become sane */ |
|
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
29 | #include "gtkinternal.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
30 | #include "ui.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
31 | |
|
4019
450d7e314aea
[gaim-migrate @ 4219]
Herman Bloggs <herman@bluedigits.com>
parents:
4014
diff
changeset
|
32 | |
| 5684 | 33 | static GaimSoundUiOps *sound_ui_ops = NULL; |
| 3319 | 34 | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
35 | void gaim_sound_set_ui_ops(GaimSoundUiOps *ops) |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
36 | { |
| 5684 | 37 | if(sound_ui_ops && sound_ui_ops->shutdown) |
| 38 | sound_ui_ops->shutdown(); | |
| 39 | sound_ui_ops = ops; | |
| 40 | if(sound_ui_ops && sound_ui_ops->init) | |
| 41 | sound_ui_ops->init(); | |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
42 | } |
|
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
43 | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
44 | GaimSoundUiOps *gaim_sound_get_ui_ops(void) |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
45 | { |
| 5684 | 46 | return sound_ui_ops; |
| 4581 | 47 | } |
| 48 | ||
| 5684 | 49 | void gaim_sound_init() |
| 50 | { | |
| 51 | gaim_prefs_add_none("/core/sound"); | |
| 52 | gaim_prefs_add_bool("/core/sound/while_away", FALSE); | |
| 53 | } | |
| 4581 | 54 | |
| 5684 | 55 | void gaim_sound_shutdown() |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
56 | { |
| 5684 | 57 | if(sound_ui_ops && sound_ui_ops->shutdown) |
| 58 | sound_ui_ops->shutdown(); | |
| 59 | } | |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
60 | |
| 5684 | 61 | void gaim_sound_play_file(const char *filename) |
| 62 | { | |
| 63 | if(awaymessage && !gaim_prefs_get_bool("/core/sound/while_away")) | |
| 4561 | 64 | return; |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
65 | |
| 5684 | 66 | if(sound_ui_ops && sound_ui_ops->play_file) |
| 67 | sound_ui_ops->play_file(filename); | |
|
1006
fb2f2a403962
[gaim-migrate @ 1016]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
899
diff
changeset
|
68 | } |
|
fb2f2a403962
[gaim-migrate @ 1016]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
899
diff
changeset
|
69 | |
| 4561 | 70 | void gaim_sound_play_event(GaimSoundEventID event) |
| 1 | 71 | { |
| 5684 | 72 | if(awaymessage && !gaim_prefs_get_bool("/core/sound/while_away")) |
| 4561 | 73 | return; |
| 74 | ||
| 5684 | 75 | if(sound_ui_ops && sound_ui_ops->play_event) |
| 76 | sound_ui_ops->play_event(event); | |
| 4561 | 77 | } |