Commit c9742171 authored by Jakob Leben's avatar Jakob Leben

Qt: more settings fixes (undocked playlist size)

parent 40969236
...@@ -295,19 +295,15 @@ MainInterface::~MainInterface() ...@@ -295,19 +295,15 @@ MainInterface::~MainInterface()
/* Save states */ /* Save states */
settings->beginGroup( "MainWindow" ); settings->beginGroup( "MainWindow" );
settings->setValue( "pl-dock-status", b_plDocked ); settings->setValue( "pl-dock-status", b_plDocked );
/* Save playlist state */ /* Save playlist state */
if( playlistWidget ) if( playlistWidget )
{ {
if( isPlDocked() ) settings->setValue( "playlist-visible",
{ isPlDocked() ?
QVLCTools::saveWidgetPosition( p_intf, "Playlist", playlistWidget ); playlistVisible :
settings->setValue( "playlist-visible", playlistVisible ); playlistWidget->isVisible() /* FIXME */ );
}
else
{
settings->setValue( "playlist-visible", playlistWidget->isVisible() ); // FIXME
}
} }
settings->setValue( "adv-controls", settings->setValue( "adv-controls",
...@@ -320,9 +316,15 @@ MainInterface::~MainInterface() ...@@ -320,9 +316,15 @@ MainInterface::~MainInterface()
/* Save this size */ /* Save this size */
QVLCTools::saveWidgetPosition(settings, this); QVLCTools::saveWidgetPosition(settings, this);
settings->endGroup(); settings->endGroup();
/* Save undocked playlist size */
if( playlistWidget && !isPlDocked() )
QVLCTools::saveWidgetPosition( p_intf, "Playlist", playlistWidget );
delete playlistWidget; delete playlistWidget;
delete statusBar(); delete statusBar();
/* Unregister callbacks */ /* Unregister callbacks */
...@@ -717,6 +719,7 @@ void MainInterface::dockPlaylist( bool p_docked ) ...@@ -717,6 +719,7 @@ void MainInterface::dockPlaylist( bool p_docked )
} }
else else
{ {
QVLCTools::saveWidgetPosition( p_intf, "Playlist", playlistWidget );
playlistWidget->setWindowFlags( Qt::Widget ); // Probably a Qt bug here playlistWidget->setWindowFlags( Qt::Widget ); // Probably a Qt bug here
// It would be logical that QStackWidget::addWidget reset the flags... // It would be logical that QStackWidget::addWidget reset the flags...
stackCentralW->addWidget( playlistWidget ); stackCentralW->addWidget( playlistWidget );
......
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