Mercurial > pidgin
changeset 19402:e95555316216
Use the changed volume when 'Test'ing.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 24 Aug 2007 15:04:19 +0000 |
parents | 649ac48fce1d |
children | fbdabdd3839a |
files | finch/gntsound.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntsound.c Fri Aug 24 03:08:54 2007 +0000 +++ b/finch/gntsound.c Fri Aug 24 15:04:19 2007 +0000 @@ -670,28 +670,34 @@ { PurpleSoundEventID id = GPOINTER_TO_INT(gnt_tree_get_selection_data(GNT_TREE(pref_dialog->events))); FinchSoundEvent * event = &sounds[id]; - char *enabled, *file, *tmpfile; + char *enabled, *file, *tmpfile, *volpref; gboolean temp_value; + int volume; enabled = g_strdup_printf(FINCH_PREFS_ROOT "/sound/profiles/%s/enabled/%s", finch_sound_get_active_profile(), event->pref); file = g_strdup_printf(FINCH_PREFS_ROOT "/sound/profiles/%s/file/%s", finch_sound_get_active_profile(), event->pref); + volpref = g_strdup(make_pref("/volume")); temp_value = purple_prefs_get_bool(enabled); tmpfile = g_strdup(purple_prefs_get_string(file)); + volume = purple_prefs_get_int(volpref); purple_prefs_set_string(file, event->file); if (!temp_value) purple_prefs_set_bool(enabled, TRUE); + purple_prefs_set_int(volpref, gnt_slider_get_value(GNT_SLIDER(pref_dialog->volume))); purple_sound_play_event(id, NULL); if (!temp_value) purple_prefs_set_bool(enabled, FALSE); purple_prefs_set_string(file, tmpfile); + purple_prefs_set_int(volpref, volume); g_free(enabled); g_free(file); g_free(tmpfile); + g_free(volpref); } static void