[vlc-devel] commit: Fix configure hotkeys behaviour on keyboard seection. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Jul 26 18:34:38 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jul 26 09:33:12 2008 -0700| [08016364e84b8915cb595ad1455ad0d559e52869]

Fix configure hotkeys behaviour on keyboard seection.
Close #1773

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

 modules/gui/qt4/components/preferences_widgets.cpp |    8 +++++---
 modules/gui/qt4/components/preferences_widgets.hpp |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index a72e7ea..7ff6aea 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -1193,16 +1193,18 @@ void KeySelectorControl::finish()
 
     table->resizeColumnToContents( 0 );
 
-    CONNECT( table, itemClicked( QTreeWidgetItem *, int ),
-             this, select1Key( QTreeWidgetItem * ) );
     CONNECT( table, itemDoubleClicked( QTreeWidgetItem *, int ),
              this, selectKey( QTreeWidgetItem * ) );
+    CONNECT( table, itemSelectionChanged (),
+             this, select1Key() );       
+
     CONNECT( shortcutValue, pressed(), this, selectKey() );
 }
 
 /* Show the key selected from the table in the keySelector */
-void KeySelectorControl::select1Key( QTreeWidgetItem *keyItem )
+void KeySelectorControl::select1Key()
 {
+    QTreeWidgetItem *keyItem = table->currentItem();
     shortcutValue->setText( keyItem->text( 1 ) );
     shortcutValue->setValue( keyItem->data( 1, Qt::UserRole ).toInt() );
 }
diff --git a/modules/gui/qt4/components/preferences_widgets.hpp b/modules/gui/qt4/components/preferences_widgets.hpp
index 4e42cd2..715f26a 100644
--- a/modules/gui/qt4/components/preferences_widgets.hpp
+++ b/modules/gui/qt4/components/preferences_widgets.hpp
@@ -457,7 +457,7 @@ private:
 private slots:
     void setTheKey();
     void selectKey( QTreeWidgetItem * = NULL );
-    void select1Key( QTreeWidgetItem *);
+    void select1Key();
 };
 
 class KeyInputDialog : public QDialog




More information about the vlc-devel mailing list