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()
new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg );
item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
ui.fileListWidg->addItem( item );
savedirpathFromFile( file );
}
updateMRL();
}
......
......@@ -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 */
......
......@@ -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
......
......@@ -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 )
......
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