X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Futil%2Fcustomwidgets.cpp;h=4de1129e9e491709bcc768d21ecaf16fba342d50;hb=e77d9061a5f92aff02ca206cda9cf03507bd2b4e;hp=2ef11193a38dcfbe1818570b7fdefd6bb75358c7;hpb=9774edc08215b7d6daadd7e07d39fd7cfc77a8b5;p=vlc diff --git a/modules/gui/qt4/util/customwidgets.cpp b/modules/gui/qt4/util/customwidgets.cpp index 2ef11193a3..4de1129e9e 100644 --- a/modules/gui/qt4/util/customwidgets.cpp +++ b/modules/gui/qt4/util/customwidgets.cpp @@ -3,7 +3,7 @@ **************************************************************************** * Copyright (C) 2006 the VideoLAN team * Copyright (C) 2004 Daniel Molkentin - * $Id: qvlcframe.hpp 16283 2006-08-17 18:16:09Z zorglub $ + * $Id$ * * Authors: Clément Stenac * The "ClickLineEdit" control is based on code by Daniel Molkentin @@ -23,6 +23,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "customwidgets.hpp" #include @@ -145,6 +148,7 @@ int qtEventToVLCKey( QKeyEvent *e ) HANDLE( Key_Delete, KEY_DELETE ); HANDLE( Key_VolumeDown, KEY_VOLUME_DOWN); HANDLE( Key_VolumeUp, KEY_VOLUME_UP ); + HANDLE( Key_VolumeMute, KEY_VOLUME_MUTE ); HANDLE( Key_MediaPlay, KEY_MEDIA_PLAY_PAUSE ); HANDLE( Key_MediaStop, KEY_MEDIA_STOP ); HANDLE( Key_MediaPrevious, KEY_MEDIA_PREV_TRACK ); @@ -177,6 +181,8 @@ int qtWheelEventToVLCKey( QWheelEvent *e ) QString VLCKeyToString( int val ) { + const char *base = KeyToString (val & ~KEY_MODIFIER); + QString r = ""; if( val & KEY_MODIFIER_CTRL ) r+= "Ctrl+"; @@ -185,13 +191,6 @@ QString VLCKeyToString( int val ) if( val & KEY_MODIFIER_SHIFT ) r+= "Shift+"; - unsigned int i_keys = sizeof(vlc_keys)/sizeof(key_descriptor_t); - for( unsigned int i = 0; i< i_keys; i++ ) - { - if( vlc_keys[i].i_key_code == (val& ~KEY_MODIFIER) ) - { - r+= vlc_keys[i].psz_key_string; - } - } - return r; -} \ No newline at end of file + return r + (base ? base : "Unset"); +} +