/* Make this QFileDialog a child of tempWidget from the ui. */
dialogBox = new FileOpenBox( ui.tempWidget, NULL,
- qfu( p_intf->p_sys->psz_filepath ), "" );
+ p_intf->p_sys->filepath, "" );
dialogBox->setFileMode( QFileDialog::ExistingFiles );
dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
{
// TODO Handle selection of more than one subtitles file
QStringList files = THEDP->showSimpleOpen( qtr("Open subtitles file"),
- EXT_FILTER_SUBTITLE, p_intf->p_sys->psz_filepath );
+ EXT_FILTER_SUBTITLE, p_intf->p_sys->filepath );
if( files.isEmpty() ) return;
ui.subInput->setText( files.join(" ") );
/* Function called by Open Dialog when clicke on Play/Enqueue */
void FileOpenPanel::accept()
{
- //FIXME
- // p_intf->p_sys->psz_filepath = qtu( dialogBox->directory().absolutePath() );
+ p_intf->p_sys->filepath = dialogBox->directory().absolutePath();
ui.fileListWidg->clear();
}
if( p_arg->b_save )
{
QString file = QFileDialog::getSaveFileName( NULL, p_arg->psz_title,
- qfu( p_intf->p_sys->psz_filepath ), extensions );
+ p_intf->p_sys->filepath, extensions );
if( !file.isEmpty() )
{
p_arg->i_results = 1;
else /* non-save mode */
{
QStringList files = QFileDialog::getOpenFileNames( NULL,
- p_arg->psz_title, qfu( p_intf->p_sys->psz_filepath ),
+ p_arg->psz_title, p_intf->p_sys->filepath,
extensions );
p_arg->i_results = files.count();
p_arg->psz_results = (char **)malloc( p_arg->i_results * sizeof( char * ) );
return QFileDialog::getOpenFileNames( NULL,
help.isEmpty() ? qtr(I_OP_SEL_FILES ) : help,
- path.isEmpty() ? qfu( p_intf->p_sys->psz_filepath ) : path,
+ path.isEmpty() ? p_intf->p_sys->filepath : path,
fileTypes );
}
{
QFileDialog *qfd = new QFileDialog( NULL,
qtr( "Save playlist as..." ),
- qfu( p_intf->p_sys->psz_filepath ),
+ p_intf->p_sys->filepath,
qtr( "XSPF playlist (*.xspf);; " ) +
qtr( "M3U playlist (*.m3u);; " ) +
qtr( "HTML playlist (*.html)" ) );
app.setQuitOnLastWindowClosed( false );
/* Retrieve last known path used in file browsing */
- char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
- p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? config_GetHomeDir()
- : psz_path;
+ {
+ char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
+ p_intf->p_sys->filepath =
+ EMPTY_STR(psz_path) ? config_GetHomeDir() : qfu(psz_path);
+ free( psz_path );
+ }
/* Launch */
app.exec();
/* Save the path */
- config_PutPsz( p_intf, "qt-filedialog-path", p_intf->p_sys->psz_filepath );
- free( psz_path );
+ config_PutPsz( p_intf, "qt-filedialog-path",
+ qtu(p_intf->p_sys->filepath) );
/* Delete the application automatically */
free( display );
#include <vlc_playlist.h> /* playlist_t */
#include <QEvent>
+#include <QString>
#if ( QT_VERSION < 0x040300 )
# error Update your Qt version
playlist_t *p_playlist; /* Core Playlist discussion */
- const char *psz_filepath; /* Last path used in dialogs */
+ QString filepath; /* Last path used in dialogs */
QMenu * p_popup_menu; /* The right click menu */
};