From: Darren S. <ds...@us...> - 2004-11-30 22:19:29
|
Update of /cvsroot/xine/gnome-xine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19507/src Modified Files: script_engine.c Log Message: Restore some A/V settings on exit, and save the volume level (if requested). Index: script_engine.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/script_engine.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- script_engine.c 24 Nov 2004 22:51:19 -0000 1.32 +++ script_engine.c 30 Nov 2004 22:19:21 -0000 1.33 @@ -116,12 +116,23 @@ logprintf ("script_engine: saving config...\n"); - fname = g_strconcat(g_get_home_dir(), "/.gxine/config", NULL); + { + xine_cfg_entry_t entry; + if (xine_config_lookup_entry (xine, "audio.remember_volume", &entry) && + entry.num_value && + xine_config_lookup_entry (xine, "audio.mixer_volume", &entry)) + { + entry.num_value = xine_get_param (stream, XINE_PARAM_AUDIO_VOLUME); + xine_config_update_entry (xine, &entry); + } + } + fname = g_strconcat(g_get_home_dir(), "/.gxine/config", NULL); xine_config_save (xine, fname); - g_free (fname); + settings_clear (); + gtk_main_quit(); exit (0); |