]> git.sesse.net Git - vlc/commitdiff
Qt: be sure to use everywhere the saved path.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 21 Jun 2009 01:57:49 +0000 (03:57 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 21 Jun 2009 12:34:49 +0000 (14:34 +0200)
And also fix the support for it on Windows.

modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/util/qt_dirs.hpp

index 7cd4d2bd963e1ea9369329c21981dbb814f226d1..31ed8b22298f75740f53e6f6c18badbf34775cb4 100644 (file)
@@ -164,7 +164,7 @@ FileOpenPanel::~FileOpenPanel()
 
 void FileOpenPanel::browseFile()
 {
-    QStringList files = QFileDialog::getOpenFileNames( this );
+    QStringList files = QFileDialog::getOpenFileNames( this, qtr( "Select one or multiple files" ), p_intf->p_sys->filepath) ;
     foreach( const QString &file, files )
     {
         QListWidgetItem *item =
index 1cae581555789b945138290c6c5a4dfbb3b18246..2f27d3c2336cf1d4e34e9131a74f39d1191920b1 100644 (file)
@@ -466,7 +466,7 @@ void DialogsProvider::openUrlDialog()
  **/
 static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
 {
-    QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory") );
+    QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory"), p_intf->p_sys->filepath );
 
     if (!dir.isEmpty() )
     {
index 5f46a6e42f25617018bdb56dd3bb70ea52e8ec45..5abb7d02e9e3f89a721f2e1b6201cc21868795a5 100644 (file)
@@ -45,7 +45,7 @@ static inline QString removeTrailingSlash( QString s )
     return s;
 }
 
-#define savedirpathFromFile( a ) p_intf->p_sys->filepath = QFileInfo( a ).path()
+#define savedirpathFromFile( a ) p_intf->p_sys->filepath = toNativeSeparators( QFileInfo( a ).path() )
 #define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
 
 static inline QString colon_escape( QString s )