Mercurial > pidgin
changeset 19403:fbdabdd3839a
merge of '0705e301236da4eef643bf63cac73af309c26799'
and '195aef2568dd6ceacd046d089326f3f87a0e761a'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 24 Aug 2007 15:58:38 +0000 |
parents | e95555316216 (diff) ff23b2470850 (current diff) |
children | 93dfc16efbda 41417f94afe9 |
files | |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntsound.c Fri Aug 24 06:39:51 2007 +0000 +++ b/finch/gntsound.c Fri Aug 24 15:58:38 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