[vlc-commits] Qt: DialogsProvider, use the open helper
Jean-Baptiste Kempf
git at videolan.org
Sun May 18 16:42:52 CEST 2014
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 18 16:37:51 2014 +0200| [4607174b308e3c1ef51a9a5fdc85bee8644543f7] | committer: Jean-Baptiste Kempf
Qt: DialogsProvider, use the open helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4607174b308e3c1ef51a9a5fdc85bee8644543f7
---
modules/gui/qt4/dialogs_provider.cpp | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index cb38f3e..8e83f06 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -440,16 +440,14 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help,
void DialogsProvider::addFromSimple( bool pl, bool go)
{
QStringList files = DialogsProvider::showSimpleOpen();
- int mode = go ? PLAYLIST_GO : PLAYLIST_PREPARSE;
+ bool first = go;
files.sort();
foreach( const QString &file, files )
{
QString url = toURI( toNativeSeparators( file ) );
- playlist_Add( THEPL, qtu( url ), NULL, PLAYLIST_APPEND | mode,
- PLAYLIST_END, pl, pl_Unlocked );
- RecentsMRL::getInstance( p_intf )->addRecent( url );
- mode = PLAYLIST_PREPARSE;
+ Open::openMRL( p_intf, url, first, pl);
+ first = false;
}
}
@@ -481,11 +479,8 @@ void DialogsProvider::openUrlDialog()
url = qfu(uri);
free( uri );
}
- playlist_Add( THEPL, qtu(url), NULL,
- !oud.shouldEnqueue() ? ( PLAYLIST_APPEND | PLAYLIST_GO )
- : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
- PLAYLIST_END, true, pl_Unlocked );
- RecentsMRL::getInstance( p_intf )->addRecent( url );
+
+ Open::openMRL( p_intf, qtu(url), !oud.shouldEnqueue() );
}
/* Directory */
More information about the vlc-commits
mailing list