Commit 4607174b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: DialogsProvider, use the open helper

parent c57be0a7
...@@ -440,16 +440,14 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help, ...@@ -440,16 +440,14 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help,
void DialogsProvider::addFromSimple( bool pl, bool go) void DialogsProvider::addFromSimple( bool pl, bool go)
{ {
QStringList files = DialogsProvider::showSimpleOpen(); QStringList files = DialogsProvider::showSimpleOpen();
int mode = go ? PLAYLIST_GO : PLAYLIST_PREPARSE;
bool first = go;
files.sort(); files.sort();
foreach( const QString &file, files ) foreach( const QString &file, files )
{ {
QString url = toURI( toNativeSeparators( file ) ); QString url = toURI( toNativeSeparators( file ) );
playlist_Add( THEPL, qtu( url ), NULL, PLAYLIST_APPEND | mode, Open::openMRL( p_intf, url, first, pl);
PLAYLIST_END, pl, pl_Unlocked ); first = false;
RecentsMRL::getInstance( p_intf )->addRecent( url );
mode = PLAYLIST_PREPARSE;
} }
} }
...@@ -481,11 +479,8 @@ void DialogsProvider::openUrlDialog() ...@@ -481,11 +479,8 @@ void DialogsProvider::openUrlDialog()
url = qfu(uri); url = qfu(uri);
free( uri ); free( uri );
} }
playlist_Add( THEPL, qtu(url), NULL,
!oud.shouldEnqueue() ? ( PLAYLIST_APPEND | PLAYLIST_GO ) Open::openMRL( p_intf, qtu(url), !oud.shouldEnqueue() );
: ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
PLAYLIST_END, true, pl_Unlocked );
RecentsMRL::getInstance( p_intf )->addRecent( url );
} }
/* Directory */ /* Directory */
......
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