[vlc-devel] commit: Qt: be sure to use everywhere the saved path. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Jun 21 14:36:24 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun 21 03:57:49 2009 +0200| [953140e515e407698579f525ad5e0c17eb9e094b] | committer: Jean-Baptiste Kempf 

Qt: be sure to use everywhere the saved path.

And also fix the support for it on Windows.

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

 modules/gui/qt4/components/open_panels.cpp |    2 +-
 modules/gui/qt4/dialogs_provider.cpp       |    2 +-
 modules/gui/qt4/util/qt_dirs.hpp           |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 7cd4d2b..31ed8b2 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -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 =
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 1cae581..2f27d3c 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -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() )
     {
diff --git a/modules/gui/qt4/util/qt_dirs.hpp b/modules/gui/qt4/util/qt_dirs.hpp
index 5f46a6e..5abb7d0 100644
--- a/modules/gui/qt4/util/qt_dirs.hpp
+++ b/modules/gui/qt4/util/qt_dirs.hpp
@@ -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 )




More information about the vlc-devel mailing list