Commit 546bbb82 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: first step to fix directory remembering.

(cherry picked from commit 5f621072)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 35f7e73c
...@@ -170,6 +170,7 @@ void FileOpenPanel::browseFile() ...@@ -170,6 +170,7 @@ void FileOpenPanel::browseFile()
new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg ); new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg );
item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled ); item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
ui.fileListWidg->addItem( item ); ui.fileListWidg->addItem( item );
savedirpathFromFile( file );
} }
updateMRL(); updateMRL();
} }
......
...@@ -301,6 +301,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg ) ...@@ -301,6 +301,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
i = 0; i = 0;
foreach( const QString &file, files ) foreach( const QString &file, files )
p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) ); p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) );
p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] );
} }
/* Callback */ /* Callback */
......
...@@ -501,8 +501,9 @@ static void *Thread( void *obj ) ...@@ -501,8 +501,9 @@ static void *Thread( void *obj )
/* Save the path */ /* 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 ) ); qtu( p_intf->p_sys->filepath ) );
msg_Dbg( p_intf, "%s", qtu( p_intf->p_sys->filepath ) );
/* Delete the application automatically */ /* Delete the application automatically */
#ifdef Q_WS_X11 #ifdef Q_WS_X11
......
...@@ -45,6 +45,7 @@ static inline QString removeTrailingSlash( QString s ) ...@@ -45,6 +45,7 @@ static inline QString removeTrailingSlash( QString s )
return s; return s;
} }
#define savedirpathFromFile( a ) p_intf->p_sys->filepath = QFileInfo( a ).path()
#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) ) #define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
static inline QString colon_escape( QString s ) static inline QString colon_escape( QString s )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment