changeset 3401:1be15204741f

[gaim-migrate @ 3420] Sound prefs bugfix. No, there aren't any sound prefs for gtk1.2. Get over it. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 18 Aug 2002 00:02:01 +0000
parents 388dd9fbfe4e
children 2490433b7417
files src/prefs.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/prefs.c	Fri Aug 16 21:55:09 2002 +0000
+++ b/src/prefs.c	Sun Aug 18 00:02:01 2002 +0000
@@ -196,7 +196,6 @@
 		if (sound_file[r])
 			g_free(sound_file[r]);
 		sound_file[r] = sound_file_new[r];
-		sound_file_new[r] = NULL;
 	}
 	if (away_options != away_options_new)		
 		set_away_options();
@@ -1119,11 +1118,16 @@
 static void test_sound(GtkWidget *button, gpointer i_am_NULL)
 {
 	guint32 tmp_sound = sound_options;
+	char *save_me=NULL;
 	if (!(sound_options & OPT_SOUND_WHEN_AWAY))
 		sound_options ^= OPT_SOUND_WHEN_AWAY;
 	if (!(sound_options & sounds[sound_row_sel].opt))
 		sound_options ^= sounds[sound_row_sel].opt;
+	save_me = sound_file[sound_row_sel];
+	sound_file[sound_row_sel] = sound_file_new[sound_row_sel];
 	play_sound(sound_row_sel);
+	
+	sound_file[sound_row_sel] = save_me;
 	sound_options = tmp_sound;
 }