[vlc-devel] commit: Quick hack to solve the save volume on exit. (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Sep 5 08:15:01 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Thu Sep  4 23:16:19 2008 -0700| [638daae0f33359746a08c489845e0250507ae367] | committer: Jean-Baptiste Kempf 

Quick hack to solve the save volume on exit.

This is of course NOT a good solution, and it has nothing to do in the interface...
So, either we let it like this, or we implement in the good place (not in intf)
or we remove this option

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=638daae0f33359746a08c489845e0250507ae367
---

 modules/gui/qt4/main_interface.cpp |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index b876336..cee1db9 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -249,6 +249,15 @@ MainInterface::~MainInterface()
 {
     msg_Dbg( p_intf, "Destroying the main interface" );
 
+    /* Saving volume */
+    if( config_GetInt( p_intf, "qt-autosave-volume" ) )
+    {
+        audio_volume_t i_volume;
+        aout_VolumeGet( p_intf, &i_volume );
+        config_PutInt( p_intf, "volume", i_volume );
+        config_SaveConfigFile( p_intf, NULL );
+    }
+
     if( playlistWidget )
     {
         if( !isDocked() )




More information about the vlc-devel mailing list