]> git.sesse.net Git - vlc/commitdiff
Fix drop on the playlist in all case (DP and MI )
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 25 Aug 2008 07:25:59 +0000 (00:25 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 25 Aug 2008 07:25:59 +0000 (00:25 -0700)
Also set a correct title and icon, when you don't use the pl through THEDP.

modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.hpp
modules/gui/qt4/main_interface.hpp

index 3712d17d9573283de08ac2fb9a8c2eacec64ff95..2ae4a44a2787b3a0bb320e13ef36791fa503295c 100644 (file)
@@ -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();
+}
+
index d1cf059c2eb7aa83b98e5f5420605b3f6da1f32b..5945176f149a41ae05946dfd2431ae6fdff961cc 100644 (file)
@@ -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:
index 2efeebcffdb13538df9dcf10487c905d3fc17461..ca653679db5da83c6b9a6cb017ebd6044d090c85 100644 (file)
@@ -70,6 +70,7 @@ class MainInterface : public QVLCMW
 
     friend class VolumeClickHandler;
     friend class InteractionDialog;
+    friend class PlaylistWidget;
 
 public:
     MainInterface( intf_thread_t *);