Commit 106a3256 authored by imperio's avatar imperio Committed by Jean-Baptiste Kempf

Add shortcut to set focus on playlist search field

Signed-off-by: imperio's avatarGuillaume Gomez <guillaume1.gomez@gmail.com>
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent fcedf52d
......@@ -226,6 +226,11 @@ void PlaylistWidget::changeView( const QModelIndex& index )
locationBar->setIndex( index );
}
void PlaylistWidget::setSearchFieldFocus()
{
searchEdit->setFocus();
}
#include <QSignalMapper>
#include <QMenu>
#include <QPainter>
......
......@@ -56,6 +56,7 @@ public:
void forceHide();
void forceShow();
void setSearchFieldFocus();
QStackedWidget *artContainer;
StandardPLPanel *mainView;
......
......@@ -1489,6 +1489,12 @@ void MainInterface::handleKeyPress( QKeyEvent *e )
toggleMinimalView( !b_minimalView );
e->accept();
}
else if( ( e->modifiers() & Qt::ControlModifier ) && ( e->key() == Qt::Key_K ) &&
playlistWidget )
{
playlistWidget->setSearchFieldFocus();
e->accept();
}
int i_vlck = qtEventToVLCKey( e );
if( i_vlck > 0 )
......
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