Mercurial > pidgin
changeset 21048:fe1b44022884
Ignore mute setting when testing sounds from the preferences window.
author | Casey Harkins <charkins@pidgin.im> |
---|---|
date | Mon, 29 Oct 2007 04:08:42 +0000 |
parents | ecaa34fd0473 |
children | 8b81eeaf9bcb |
files | pidgin/gtkprefs.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkprefs.c Mon Oct 29 03:10:31 2007 +0000 +++ b/pidgin/gtkprefs.c Mon Oct 29 04:08:42 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); }