Wed, 01 Dec 2004 01:17:19 +0000
[gaim-migrate @ 11451]
Patch from Scott Shedden to have the blist hidden when Gaim starts.
This actually probably won't work for most people currently, because
on X11, the docklet is added asynchrously, so we usually won't realize the
docklet exists until we've already created the blist. I'm sure there
must be some way around this, though (Scott's solution was to manually hide
the buddy list when the docklet was finally embedded. I may fall back on
that).
committer: Sean Egan <seanegan@pidgin.im>
| 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 | |
| 5684 | 28 | static GaimSoundUiOps *sound_ui_ops = NULL; |
| 3319 | 29 | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
30 | void gaim_sound_set_ui_ops(GaimSoundUiOps *ops) |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
31 | { |
| 5684 | 32 | if(sound_ui_ops && sound_ui_ops->shutdown) |
| 33 | sound_ui_ops->shutdown(); | |
| 34 | sound_ui_ops = ops; | |
| 35 | if(sound_ui_ops && sound_ui_ops->init) | |
| 36 | sound_ui_ops->init(); | |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
37 | } |
|
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
38 | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
39 | GaimSoundUiOps *gaim_sound_get_ui_ops(void) |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
40 | { |
| 5684 | 41 | return sound_ui_ops; |
| 4581 | 42 | } |
| 43 | ||
| 5684 | 44 | void gaim_sound_init() |
| 45 | { | |
| 46 | gaim_prefs_add_none("/core/sound"); | |
| 47 | gaim_prefs_add_bool("/core/sound/while_away", FALSE); | |
| 48 | } | |
| 4581 | 49 | |
| 5684 | 50 | void gaim_sound_shutdown() |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
51 | { |
| 5684 | 52 | if(sound_ui_ops && sound_ui_ops->shutdown) |
| 53 | sound_ui_ops->shutdown(); | |
| 54 | } | |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
55 | |
| 5684 | 56 | void gaim_sound_play_file(const char *filename) |
| 57 | { | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9791
diff
changeset
|
58 | /* FIXME */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9791
diff
changeset
|
59 | #if 0 |
| 5684 | 60 | if(awaymessage && !gaim_prefs_get_bool("/core/sound/while_away")) |
| 4561 | 61 | return; |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9791
diff
changeset
|
62 | #endif |
|
4430
95df701e8cdf
[gaim-migrate @ 4705]
Robert McQueen <robot101@debian.org>
parents:
4429
diff
changeset
|
63 | |
| 5684 | 64 | if(sound_ui_ops && sound_ui_ops->play_file) |
| 65 | sound_ui_ops->play_file(filename); | |
|
1006
fb2f2a403962
[gaim-migrate @ 1016]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
899
diff
changeset
|
66 | } |
|
fb2f2a403962
[gaim-migrate @ 1016]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
899
diff
changeset
|
67 | |
| 4561 | 68 | void gaim_sound_play_event(GaimSoundEventID event) |
| 1 | 69 | { |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9791
diff
changeset
|
70 | /* FIXME */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9791
diff
changeset
|
71 | #if 0 |
| 5684 | 72 | if(awaymessage && !gaim_prefs_get_bool("/core/sound/while_away")) |
| 4561 | 73 | return; |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9791
diff
changeset
|
74 | #endif |
| 4561 | 75 | |
| 5684 | 76 | if(sound_ui_ops && sound_ui_ops->play_event) |
| 77 | sound_ui_ops->play_event(event); | |
| 4561 | 78 | } |