view->setDragEnabled( true );
view->setAcceptDrops( true );
view->setDropIndicatorShown( true );
- view->setAutoScroll( true );
getSettings()->beginGroup("Playlist");
model,activateItem( const QModelIndex& ) );
CONNECT( view, rightClicked( QModelIndex , QPoint ),
this, doPopup( QModelIndex, QPoint ) );
- CONNECT( model, dataChanged( const QModelIndex&, const QModelIndex& ),
- this, handleExpansion( const QModelIndex& ) );
CONNECT( view->header(), customContextMenuRequested( const QPoint & ),
this, popupSelectColumn( QPoint ) );
+ CONNECT( model, currentChanged( const QModelIndex& ),
+ this, handleExpansion( const QModelIndex& ) );
currentRootId = -1;
CONNECT( parent, rootChanged( int ), this, setCurrentRootId( int ) );
view->scrollTo( view->currentIndex() );
}
-void StandardPLPanel::handleExpansion( const QModelIndex &index )
+void StandardPLPanel::handleExpansion( const QModelIndex& index )
{
- if( model->isCurrent( index ) )
- view->scrollTo( index, QAbstractItemView::EnsureVisible );
+ view->scrollTo( index, QAbstractItemView::EnsureVisible );
}
void StandardPLPanel::setCurrentRootId( int _new )
if( currentRootId == THEPL->p_local_category->i_id ||
currentRootId == THEPL->p_local_onelevel->i_id )
{
- popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT(PLAppendDialog( OPEN_FILE_TAB )) );
- popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT(PLAppendDialog( OPEN_DISC_TAB )) );
- popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT(PLAppendDialog( OPEN_NETWORK_TAB )) );
- popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT(PLAppendDialog( OPEN_FILE_TAB )) );
+ popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT( simplePLAppendDialog()) );
popup.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) );
+ popup.addAction( qtr(I_OP_ADVOP), THEDP, SLOT( PLAppendDialog()) );
}
else if( ( THEPL->p_ml_category &&
currentRootId == THEPL->p_ml_category->i_id ) ||
( THEPL->p_ml_onelevel &&
currentRootId == THEPL->p_ml_onelevel->i_id ) )
{
- popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT( MLAppendDialog() ) );
+ popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT( simpleMLAppendDialog()) );
popup.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) );
+ popup.addAction( qtr(I_OP_ADVOP), THEDP, SLOT( MLAppendDialog() ) );
}
popup.exec( QCursor::pos() - addButton->mapFromGlobal( QCursor::pos() )