[vlc-devel] [PATCH 3/3] Qt: Fix save volume on exit Fixes #2968
Francois Cartegnie
fcvlcdev at free.fr
Sat Jul 10 19:49:42 CEST 2010
---
modules/gui/qt4/qt4.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index a1990d9..1888ab5 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -505,6 +505,15 @@ static void *Thread( void *obj )
/* Save the path */
getSettings()->setValue( "filedialog-path", p_intf->p_sys->filepath );
+ /* Save volume on exit */
+ audio_volume_t i_volume;
+ if ( var_InheritBool( p_intf, "qt-autosave-volume" ) )
+ aout_VolumeGet( p_intf, &i_volume );
+ else
+ i_volume = config_GetInt( p_intf, "qt-startvolume" );
+ config_PutInt( p_intf, "volume", i_volume );
+ config_SaveConfigFile( p_intf, NULL );
+
/* Delete the configuration. Application has to be deleted after that. */
delete p_intf->p_sys->mainSettings;
--
1.6.4.4
More information about the vlc-devel
mailing list