[vlc-commits] Qt: don't save the filepath between session if recent is deactivated

Jean-Baptiste Kempf git at videolan.org
Tue Apr 26 02:10:51 CEST 2011


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 26 01:54:03 2011 +0200| [ac0fa0d997276500b7967eec43914f04b99f70d0] | committer: Jean-Baptiste Kempf

Qt: don't save the filepath between session if recent is deactivated

Close #4324
(cherry picked from commit 02f89b753002952e161934ba7d0c5958c25a1a3c)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/qt4.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 32497de..f501541 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -508,8 +508,11 @@ static void *Thread( void *obj )
     /* Delete the recentsMRL object before the configuration */
     RecentsMRL::killInstance();
 
-    /* Save the path */
-    getSettings()->setValue( "filedialog-path", p_intf->p_sys->filepath );
+    /* Save the path or delete if recent play are disabled */
+    if( var_InheritBool( p_intf, "qt-recentplay" ) )
+        getSettings()->setValue( "filedialog-path", p_intf->p_sys->filepath );
+    else
+        getSettings()->remove( "filedialog-path" );
 
     /* Delete the configuration. Application has to be deleted after that. */
     delete p_intf->p_sys->mainSettings;



More information about the vlc-commits mailing list