changeset 21049:8b81eeaf9bcb

merge of '5e40b4c4c0c2949025f174c4aef2da0c54d79c31' and '886ce0e2c644e00427871777bb58888fbb8035cd'
author Ka-Hing Cheung <khc@hxbc.us>
date Mon, 29 Oct 2007 06:45:53 +0000
parents 9f0e2db39bc5 (current diff) fe1b44022884 (diff)
children e376393e4f35
files
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkprefs.c	Mon Oct 29 04:41:19 2007 +0000
+++ b/pidgin/gtkprefs.c	Mon Oct 29 06:45:53 2007 +0000
@@ -1607,18 +1607,22 @@
 test_sound(GtkWidget *button, gpointer i_am_NULL)
 {
 	char *pref;
-	gboolean temp_value;
+	gboolean temp_enabled;
+	gboolean temp_mute;
 
 	pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s",
 			pidgin_sound_get_event_option(sound_row_sel));
 
-	temp_value = purple_prefs_get_bool(pref);
+	temp_enabled = purple_prefs_get_bool(pref);
+	temp_mute = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/mute");
 
-	if (!temp_value) purple_prefs_set_bool(pref, TRUE);
+	if (!temp_enabled) purple_prefs_set_bool(pref, TRUE);
+	if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE);
 
 	purple_sound_play_event(sound_row_sel, NULL);
 
-	if (!temp_value) purple_prefs_set_bool(pref, FALSE);
+	if (!temp_enabled) purple_prefs_set_bool(pref, FALSE);
+	if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", TRUE);
 
 	g_free(pref);
 }