[vlc-devel] commit: Always save position on exit. (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Sep 19 00:39:15 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Thu Sep 18 15:41:20 2008 -0700| [09e49c41969088684db6ebbe284c9cddaae5ea4a] | committer: Jean-Baptiste Kempf 

Always save position on exit.
(cherry picked from commit 9e5938db3f98863bdb2001d444c178c17468d67c)

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

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

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 77823a7..e013d65 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -249,6 +249,8 @@ MainInterface::~MainInterface()
 {
     msg_Dbg( p_intf, "Destroying the main interface" );
 
+    if( videoIsActive ) videoWidget->hide();
+
     /* Saving volume */
     if( config_GetInt( p_intf, "qt-autosave-volume" ) )
     {
@@ -271,18 +273,10 @@ MainInterface::~MainInterface()
     settings->setValue( "adv-controls",
                         getControlsVisibilityStatus() & CONTROLS_ADVANCED );
 
-    if( !videoIsActive )
-    {
-        QVLCTools::saveWidgetPosition(settings, this);
-    }
-    else
-    {
-        msg_Dbg( p_intf, "Not saving because video is in use." );
-    }
-
     if( bgWidget )
         settings->setValue( "backgroundSize", bgWidget->size() );
 
+    QVLCTools::saveWidgetPosition(settings, this);
     settings->endGroup();
 
     var_DelCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );




More information about the vlc-devel mailing list