Commit 364ec544 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf Committed by Christophe Mutricy

Fix drop on the playlist in all case (DP and MI )

Also set a correct title and icon, when you don't use the pl through THEDP.
(cherry picked from commit 5917494b)
Signed-off-by: default avatarChristophe Mutricy <xtophe@videolan.org>
parent c57d9dbc
......@@ -123,6 +123,10 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i,
// with other uses of the same component...
// getSettings()->beginGroup( "playlist" );
restoreState( getSettings()->value("splitterSizes").toByteArray());
setAcceptDrops( true );
setWindowTitle( qtr( "Playlist" ) );
setWindowIcon( QApplication::windowIcon() );
}
void PlaylistWidget::setArt( QString url )
......@@ -141,3 +145,14 @@ PlaylistWidget::~PlaylistWidget()
getSettings()->endGroup();
}
#include "main_interface.hpp"
void PlaylistWidget::dropEvent(QDropEvent *event)
{
if( p_intf->p_sys->p_mi )
p_intf->p_sys->p_mi->dropEvent( event );
}
void PlaylistWidget::dragEnterEvent(QDragEnterEvent *event)
{
event->acceptProposedAction();
}
......@@ -56,6 +56,9 @@ private:
QWidget *parent;
protected:
intf_thread_t *p_intf;
void dropEvent( QDropEvent *);
void dragEnterEvent( QDragEnterEvent * );
private slots:
void setArt( QString );
signals:
......
......@@ -70,6 +70,7 @@ class MainInterface : public QVLCMW
friend class VolumeClickHandler;
friend class InteractionDialog;
friend class PlaylistWidget;
public:
MainInterface( intf_thread_t *);
......
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