]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
Qt4 - unification of the common used path for QFileDialogs...
[vlc] / modules / gui / qt4 / qt4.cpp
index 2ad0d0e8c4e6793c4b6d8a34f3e9fe3c6663dae9..d647ba15be9444508276188aca5163a9b470f5ba 100644 (file)
@@ -331,6 +331,12 @@ static void Init( intf_thread_t *p_intf )
     /* Last settings */
     app->setQuitOnLastWindowClosed( false );
 
+    /*        retrieve last known path used in file browsing */
+    char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
+    p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path
+                           : p_intf->p_libvlc->psz_homedir;
+    delete psz_path;
+
     /* Launch */
     app->exec();
 
@@ -347,6 +353,8 @@ static void Init( intf_thread_t *p_intf )
     /* Destroy the MainInputManager */
     MainInputManager::killInstance();
 
+    delete p_intf->p_sys->psz_filepath;
+
     delete app;
 }