Commit 10bf15ba authored by Filip Roséen's avatar Filip Roséen Committed by François Cartegnie

gui/qt: only add Media\ Library to view if enabled

Given that the media-library is conditionally enabled, the
implementation should not add an entity for such if it is not there.

This commit fixes that issue.
Signed-off-by: François Cartegnie's avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent 8a38e84f
......@@ -235,10 +235,13 @@ void PLSelector::createItems()
setCurrentItem( playlistItem->treeItem() );
/* ML */
PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, N_("Media Library"), true ),
THEPL->p_media_library );
ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
ml->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/library" ) );
if( THEPL->p_media_library )
{
PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, N_("Media Library"), true ),
THEPL->p_media_library );
ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
ml->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/library" ) );
}
/* SD nodes */
QTreeWidgetItem *mycomp = addItem( CATEGORY_TYPE, N_("My Computer"), false, true )->treeItem();
......
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