[vlc-devel] commit: Qt: first step to fix directory remembering. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Jun 19 17:12:05 CEST 2009
vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun 19 00:59:02 2009 +0200| [546bbb82f42665946904cea876e845a3e9b77275] | committer: Jean-Baptiste Kempf
Qt: first step to fix directory remembering.
(cherry picked from commit 5f621072ec348a36e1c5444e92803c262150f08b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=546bbb82f42665946904cea876e845a3e9b77275
---
modules/gui/qt4/components/open_panels.cpp | 1 +
modules/gui/qt4/dialogs_provider.cpp | 1 +
modules/gui/qt4/qt4.cpp | 3 ++-
modules/gui/qt4/util/qt_dirs.hpp | 1 +
4 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index c3d42f0..6714a5e 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -170,6 +170,7 @@ void FileOpenPanel::browseFile()
new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg );
item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
ui.fileListWidg->addItem( item );
+ savedirpathFromFile( file );
}
updateMRL();
}
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index bda9130..887284c 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -301,6 +301,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
i = 0;
foreach( const QString &file, files )
p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) );
+ p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] );
}
/* Callback */
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 9ece336..8cdef8b 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -501,8 +501,9 @@ static void *Thread( void *obj )
/* Save the path */
- config_PutPsz( p_intf, "qt-filedialog-path",
+ config_PutPsz( p_intf->p_libvlc, "qt-filedialog-path",
qtu( p_intf->p_sys->filepath ) );
+ msg_Dbg( p_intf, "%s", qtu( p_intf->p_sys->filepath ) );
/* Delete the application automatically */
#ifdef Q_WS_X11
diff --git a/modules/gui/qt4/util/qt_dirs.hpp b/modules/gui/qt4/util/qt_dirs.hpp
index 113eb0d..5f46a6e 100644
--- a/modules/gui/qt4/util/qt_dirs.hpp
+++ b/modules/gui/qt4/util/qt_dirs.hpp
@@ -45,6 +45,7 @@ static inline QString removeTrailingSlash( QString s )
return s;
}
+#define savedirpathFromFile( a ) p_intf->p_sys->filepath = QFileInfo( a ).path()
#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
static inline QString colon_escape( QString s )
More information about the vlc-devel
mailing list