Commit bc2e3249 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Fix some playlist start showing/non-showing bug.

Still errors present, but too latE.
parent 958d8f0b
......@@ -156,3 +156,15 @@ void PlaylistWidget::dragEnterEvent(QDragEnterEvent *event)
event->acceptProposedAction();
}
void PlaylistWidget::closeEvent( QCloseEvent *event )
{
if( THEDP->isDying() )
{
close();
}
else
{
if( p_intf->p_sys->p_mi )
p_intf->p_sys->p_mi->togglePlaylist();
}
}
......@@ -56,8 +56,9 @@ private:
QWidget *parent;
protected:
intf_thread_t *p_intf;
void dropEvent( QDropEvent *);
void dragEnterEvent( QDragEnterEvent * );
virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void closeEvent( QCloseEvent * );
private slots:
void setArt( QString );
......
......@@ -57,6 +57,7 @@ DialogsProvider* DialogsProvider::instance = NULL;
DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
QObject( NULL ), p_intf( _p_intf )
{
b_isDying = false;
fixed_timer = new QTimer( this );
fixed_timer->start( 150 /* milliseconds */ );
......@@ -92,6 +93,7 @@ DialogsProvider::~DialogsProvider()
void DialogsProvider::quit()
{
b_isDying = true;
vlc_object_kill( p_intf->p_libvlc );
QApplication::closeAllWindows();
QApplication::quit();
......
......@@ -116,6 +116,7 @@ public:
EXT_FILTER_VIDEO | EXT_FILTER_AUDIO |
EXT_FILTER_PLAYLIST,
QString path = QString() );
bool isDying() { return b_isDying; }
protected:
QSignalMapper *menusMapper;
QSignalMapper *menusUpdateMapper;
......@@ -127,6 +128,7 @@ private:
intf_thread_t *p_intf;
static DialogsProvider *instance;
void addFromSimple( bool, bool );
bool b_isDying;
public slots:
void doInteraction( intf_dialog_args_t * );
......
......@@ -218,10 +218,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
QVLCTools::restoreWidgetPosition( settings, this, QSize(380, 60) );
/* Playlist */
if( settings->value( "playlist-visible", 0 ).toInt() ) togglePlaylist();
bool b_visible = settings->value( "playlist-visible", 0 ).toInt();
settings->endGroup();
/* Playlist */
if( b_visible ) togglePlaylist();
/* Final sizing and showing */
setMinimumWidth( __MAX( controls->sizeHint().width(),
menuBar()->sizeHint().width() ) );
......@@ -740,8 +742,10 @@ void MainInterface::togglePlaylist()
{
playlistWidget = new PlaylistWidget( p_intf, this );
i_pl_dock = (pl_dock_e)getSettings()
->value( "pl-dock-status", PL_UNDOCKED ).toInt();
i_pl_dock = PL_UNDOCKED;
/* i_pl_dock = (pl_dock_e)getSettings()
->value( "pl-dock-status", PL_UNDOCKED ).toInt(); */
if( i_pl_dock == PL_UNDOCKED )
{
playlistWidget->setWindowFlags( Qt::Window );
......
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