Changeset dfa3c5d025680525c0999df341d2ef881bffcd0f
- Timestamp:
- 04/21/03 03:47:42
(5 years ago)
- Author:
- Cyril Deguet <asmax@videolan.org>
- git-committer:
- Cyril Deguet <asmax@videolan.org> 1050889662 +0000
- git-parent:
[474a83cf3d35e1d7464fffa6042553bd66aae20b]
- git-author:
- Cyril Deguet <asmax@videolan.org> 1050889662 +0000
- Message:
* shortcut handling under linux
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r50000c8 |
rdfa3c5d |
|
| 70 | 70 | # CONFIG_DV is not set |
|---|
| 71 | 71 | # CONFIG_FLAC is not set |
|---|
| 72 | | # CONFIG_LIBMPEG2 is not set |
|---|
| | 72 | CONFIG_LIBMPEG2=y |
|---|
| 73 | 73 | CONFIG_VORBIS=y |
|---|
| 74 | 74 | # CONFIG_TREMOR is not set |
|---|
| r474a83c |
rdfa3c5d |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2003 VideoLAN |
|---|
| 5 | | * $Id: gtk2_run.cpp,v 1.15 2003/04/21 00:54:26 ipkiss Exp $ |
|---|
| | 5 | * $Id: gtk2_run.cpp,v 1.16 2003/04/21 01:47:42 asmax Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Cyril Deguet <asmax@videolan.org> |
|---|
| … | … | |
| 122 | 122 | } |
|---|
| 123 | 123 | |
|---|
| | 124 | // Process keyboard shortcuts |
|---|
| | 125 | if( msg == GDK_KEY_PRESS ) |
|---|
| | 126 | { |
|---|
| | 127 | int KeyModifier = 0; |
|---|
| | 128 | // If key is ALT |
|---|
| | 129 | if( ((GdkEventKey *)event)->state & GDK_MOD1_MASK ) |
|---|
| | 130 | { |
|---|
| | 131 | KeyModifier = 1; |
|---|
| | 132 | } |
|---|
| | 133 | // If key is CTRL |
|---|
| | 134 | else if( ((GdkEventKey *)event)->state & GDK_CONTROL_MASK ) |
|---|
| | 135 | { |
|---|
| | 136 | KeyModifier = 2; |
|---|
| | 137 | } |
|---|
| | 138 | int key = ((GdkEventKey *)event)->keyval; |
|---|
| | 139 | // Translate into lower case |
|---|
| | 140 | if( key >= 'a' && key <= 'z' ) |
|---|
| | 141 | { |
|---|
| | 142 | key -= ('a' - 'A'); |
|---|
| | 143 | } |
|---|
| | 144 | if( KeyModifier > 0 ) |
|---|
| | 145 | p_intf->p_sys->p_theme->EvtBank->TestShortcut( key , KeyModifier ); |
|---|
| | 146 | } |
|---|
| | 147 | |
|---|
| 124 | 148 | // Send event |
|---|
| 125 | | if( IsVLCEvent( msg ) ) |
|---|
| | 149 | else if( IsVLCEvent( msg ) ) |
|---|
| 126 | 150 | { |
|---|
| 127 | 151 | if( !proc->EventProc( evt ) ) |
|---|