[vlc-commits] Qt: add a shortcut to give the focus to the search entry in advanced prefs

Ludovic Fauvet git at videolan.org
Tue Jul 9 22:12:31 CEST 2013


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Tue Jul  9 00:33:39 2013 +0200| [e7807a9e6266eca9fdee49488941b16adbe06fef] | committer: Ludovic Fauvet

Qt: add a shortcut to give the focus to the search entry in advanced prefs

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7807a9e6266eca9fdee49488941b16adbe06fef
---

 modules/gui/qt4/dialogs/preferences.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp
index bfa421a..1a18445 100644
--- a/modules/gui/qt4/dialogs/preferences.cpp
+++ b/modules/gui/qt4/dialogs/preferences.cpp
@@ -43,6 +43,7 @@
 #include <QDialogButtonBox>
 #include <QStackedWidget>
 #include <QSplitter>
+#include <QShortcut>
 
 PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
             : QVLCDialog( parent, _p_intf )
@@ -165,6 +166,9 @@ void PrefsDialog::setAdvanced()
         CONNECT( current_filter, stateChanged(int),
                  this, onlyLoadedToggled() );
         advanced_tree_panel->layout()->addWidget( current_filter );
+
+        QShortcut *search = new QShortcut( QKeySequence( QKeySequence::Find ), tree_filter );
+        CONNECT( search, activated(), tree_filter, setFocus() );
     }
 
     /* If don't have already and advanced TREE, then create it */



More information about the vlc-commits mailing list