# HG changeset patch # User Nathan Walp # Date 1058492213 0 # Node ID eb0fedc1ac093d53548ae86404f3874ac0235b3e # Parent fcc28f5dd0c86dac2156b4727650f25a1063e631 [gaim-migrate @ 6685] music to my ears committer: Tailor Script diff -r fcc28f5dd0c8 -r eb0fedc1ac09 ChangeLog --- a/ChangeLog Fri Jul 18 01:34:45 2003 +0000 +++ b/ChangeLog Fri Jul 18 01:36:53 2003 +0000 @@ -11,6 +11,7 @@ * MSN messages with newlines are now sent correctly to MSN clients. * Italian translation updated (Claudio Satriano) * British English "translation" added (Sam Halliday) + * Fix some sound initialization stuff version 0.65 (07/16/2003): * French translation updated (Eric (Zongo) Boumaour) diff -r fcc28f5dd0c8 -r eb0fedc1ac09 src/gtksound.c --- a/src/gtksound.c Fri Jul 18 01:34:45 2003 +0000 +++ b/src/gtksound.c Fri Jul 18 01:36:53 2003 +0000 @@ -54,6 +54,7 @@ static gboolean mute_login_sounds = FALSE; static gboolean mute_sounds = FALSE; +static gboolean sound_initialized = FALSE; static char *sound_cmd = NULL; static struct gaim_sound_event sounds[GAIM_NUM_SOUNDS] = { @@ -115,7 +116,6 @@ gaim_prefs_connect_callback("/gaim/gtk/sound/method", _pref_sound_method_changed, NULL); - gaim_prefs_trigger_callback("/gaim/gtk/sound/method"); } @@ -124,6 +124,7 @@ #ifdef USE_AO ao_shutdown(); #endif + sound_initialized = FALSE; } static void gaim_gtk_sound_play_file(const char *filename) @@ -136,6 +137,9 @@ #endif #endif + if (!sound_initialized) + gaim_prefs_trigger_callback("/gaim/gtk/sound/method"); + if (mute_sounds) return; @@ -308,6 +312,8 @@ static void _pref_sound_method_changed(const char *name, GaimPrefType type, gpointer val, gpointer data) { + sound_initialized = TRUE; + if(type != GAIM_PREF_STRING || strcmp(name, "/gaim/gtk/sound/method")) return; #ifdef USE_AO