[vlc-devel] commit: Bug fixed in the "recently played" functionnality (Ludovic Fauvet )
git version control
git at videolan.org
Mon Oct 20 22:08:27 CEST 2008
vlc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Mon Oct 20 21:54:27 2008 +0200| [9a38b276e6ddecdd032d5a1f2128530d2e3478ca] | committer: Jean-Baptiste Kempf
Bug fixed in the "recently played" functionnality
* A connect was called multiple times causing a wrong behaviour in the playlist.
* playlist_AddInput was replaced by playlist_Add to simplify code.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a38b276e6ddecdd032d5a1f2128530d2e3478ca
---
modules/gui/qt4/dialogs_provider.cpp | 7 ++-----
modules/gui/qt4/menus.cpp | 5 -----
modules/gui/qt4/recents.cpp | 5 +++++
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 879980a..8143b28 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -610,11 +610,8 @@ void DialogsProvider::SDMenuAction( QString data )
**/
void DialogsProvider::playMRL( const QString &mrl )
{
- input_item_t *p_input = input_item_New( p_intf,
- qtu( mrl ), NULL );
- playlist_AddInput( THEPL, p_input, PLAYLIST_GO,
- PLAYLIST_END, true, pl_Unlocked );
- vlc_gc_decref( p_input );
+ playlist_Add( THEPL, qtu( mrl ) , NULL,
+ PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, false );
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
}
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 1d2d01a..28f1802 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1328,11 +1328,6 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf )
rmrl->signalMapper->setMapping( action, l.at( i ) );
}
- CONNECT( rmrl->signalMapper,
- mapped(const QString & ),
- DialogsProvider::getInstance( p_intf ),
- playMRL( const QString & ) );
-
recentsMenu->addSeparator();
recentsMenu->addAction( "Clear", rmrl, SLOT( clear() ) );
}
diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index 9109989..b1bbf85 100644
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -23,6 +23,7 @@
#include "recents.hpp"
+#include "dialogs_provider.hpp"
#include <QList>
#include <QString>
@@ -37,6 +38,10 @@ RecentsMRL::RecentsMRL( intf_thread_t *_p_intf ) : p_intf( _p_intf )
{
stack = new QList<QString>;
signalMapper = new QSignalMapper(this);
+ CONNECT( signalMapper,
+ mapped(const QString & ),
+ DialogsProvider::getInstance( p_intf ),
+ playMRL( const QString & ) );
isActive = config_GetInt( p_intf, "qt-recentplay" );
filter = new QRegExp(
More information about the vlc-devel
mailing list