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

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.
parent 1244de84
...@@ -123,6 +123,10 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, ...@@ -123,6 +123,10 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i,
// with other uses of the same component... // with other uses of the same component...
// getSettings()->beginGroup( "playlist" ); // getSettings()->beginGroup( "playlist" );
restoreState( getSettings()->value("splitterSizes").toByteArray()); restoreState( getSettings()->value("splitterSizes").toByteArray());
setAcceptDrops( true );
setWindowTitle( qtr( "Playlist" ) );
setWindowIcon( QApplication::windowIcon() );
} }
void PlaylistWidget::setArt( QString url ) void PlaylistWidget::setArt( QString url )
...@@ -141,3 +145,14 @@ PlaylistWidget::~PlaylistWidget() ...@@ -141,3 +145,14 @@ PlaylistWidget::~PlaylistWidget()
getSettings()->endGroup(); 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: ...@@ -56,6 +56,9 @@ private:
QWidget *parent; QWidget *parent;
protected: protected:
intf_thread_t *p_intf; intf_thread_t *p_intf;
void dropEvent( QDropEvent *);
void dragEnterEvent( QDragEnterEvent * );
private slots: private slots:
void setArt( QString ); void setArt( QString );
signals: signals:
......
...@@ -70,6 +70,7 @@ class MainInterface : public QVLCMW ...@@ -70,6 +70,7 @@ class MainInterface : public QVLCMW
friend class VolumeClickHandler; friend class VolumeClickHandler;
friend class InteractionDialog; friend class InteractionDialog;
friend class PlaylistWidget;
public: public:
MainInterface( intf_thread_t *); 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