Commit 5f621072 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: first step to fix directory remembering.

parent 4c4aae84
...@@ -171,6 +171,7 @@ void FileOpenPanel::browseFile() ...@@ -171,6 +171,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 );
} }
updateButtons(); updateButtons();
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 */
......
...@@ -490,8 +490,9 @@ static void *Thread( void *obj ) ...@@ -490,8 +490,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