X-Git-Url: https://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Fplaylist%2Fstandardpanel.cpp;h=4709378c2e054b80d66c37962e6d0b7c7535dfd9;hp=b3d29f00f41a04d9d770cd85c4d9fd6d10d75a52;hb=71219c5d86572d2d598ca844bc9a7353d19d3f8c;hpb=0320a30e4f079df4f5250c800b5eb732d5008fba diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp index b3d29f00f4..4709378c2e 100644 --- a/modules/gui/qt4/components/playlist/standardpanel.cpp +++ b/modules/gui/qt4/components/playlist/standardpanel.cpp @@ -133,6 +133,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, BUTTONACT( repeatButton, toggleRepeat() ); buttons->addWidget( repeatButton ); + /* Goto */ + gotoPlayingButton = new QPushButton( qtr( "X" ), this ); + BUTTONACT( gotoPlayingButton, gotoPlayingItem() ); + buttons->addWidget( gotoPlayingButton ); + /* A Spacer and the search possibilities */ QSpacerItem *spacer = new QSpacerItem( 10, 20 ); buttons->addItem( spacer ); @@ -193,6 +198,11 @@ void StandardPLPanel::toggleRandom() randomButton->setToolTip( prev ? qtr( I_PL_NORANDOM ) : qtr(I_PL_RANDOM ) ); } +void StandardPLPanel::gotoPlayingItem() +{ + view->scrollTo( view->currentIndex() ); +} + void StandardPLPanel::handleExpansion( const QModelIndex &index ) { if( model->isCurrent( index ) )