Changeset 40946d1a99505655473eb4568136377666aa9019
- Timestamp:
- 03/14/04 17:10:07
(4 years ago)
- Author:
- Olivier Teulière <ipkiss@videolan.org>
- git-committer:
- Olivier Teulière <ipkiss@videolan.org> 1079280607 +0000
- git-parent:
[9e0417527786ca9751c84490adf0beaccb16e246]
- git-author:
- Olivier Teulière <ipkiss@videolan.org> 1079280607 +0000
- Message:
- wxwindows/preferences_widgets.*: do not duplicate hot keys list in
the wxwindows plugin
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r8bc1b7e |
r40946d1 |
|
| 159 | 159 | * KeyConfigControl implementation |
|---|
| 160 | 160 | *****************************************************************************/ |
|---|
| 161 | | static wxString KeysList[] = |
|---|
| 162 | | { |
|---|
| 163 | | wxT("Unset"), |
|---|
| 164 | | wxT("Left"), |
|---|
| 165 | | wxT("Right"), |
|---|
| 166 | | wxT("Up"), |
|---|
| 167 | | wxT("Down"), |
|---|
| 168 | | wxT("Space"), |
|---|
| 169 | | wxT("Enter"), |
|---|
| 170 | | wxT("F1"), |
|---|
| 171 | | wxT("F2"), |
|---|
| 172 | | wxT("F3"), |
|---|
| 173 | | wxT("F4"), |
|---|
| 174 | | wxT("F5"), |
|---|
| 175 | | wxT("F6"), |
|---|
| 176 | | wxT("F7"), |
|---|
| 177 | | wxT("F8"), |
|---|
| 178 | | wxT("F9"), |
|---|
| 179 | | wxT("F10"), |
|---|
| 180 | | wxT("F11"), |
|---|
| 181 | | wxT("F12"), |
|---|
| 182 | | wxT("Home"), |
|---|
| 183 | | wxT("End"), |
|---|
| 184 | | wxT("Menu"), |
|---|
| 185 | | wxT("Esc"), |
|---|
| 186 | | wxT("Page Up"), |
|---|
| 187 | | wxT("Page Down"), |
|---|
| 188 | | wxT("Tab"), |
|---|
| 189 | | wxT("Backspace"), |
|---|
| 190 | | wxT("Mouse Wheel Up"), |
|---|
| 191 | | wxT("Mouse Wheel Down"), |
|---|
| 192 | | wxT("a"), |
|---|
| 193 | | wxT("b"), |
|---|
| 194 | | wxT("c"), |
|---|
| 195 | | wxT("d"), |
|---|
| 196 | | wxT("e"), |
|---|
| 197 | | wxT("f"), |
|---|
| 198 | | wxT("g"), |
|---|
| 199 | | wxT("h"), |
|---|
| 200 | | wxT("i"), |
|---|
| 201 | | wxT("j"), |
|---|
| 202 | | wxT("k"), |
|---|
| 203 | | wxT("l"), |
|---|
| 204 | | wxT("m"), |
|---|
| 205 | | wxT("n"), |
|---|
| 206 | | wxT("o"), |
|---|
| 207 | | wxT("p"), |
|---|
| 208 | | wxT("q"), |
|---|
| 209 | | wxT("r"), |
|---|
| 210 | | wxT("s"), |
|---|
| 211 | | wxT("t"), |
|---|
| 212 | | wxT("u"), |
|---|
| 213 | | wxT("v"), |
|---|
| 214 | | wxT("w"), |
|---|
| 215 | | wxT("x"), |
|---|
| 216 | | wxT("y"), |
|---|
| 217 | | wxT("z"), |
|---|
| 218 | | wxT("+"), |
|---|
| 219 | | wxT("="), |
|---|
| 220 | | wxT("-"), |
|---|
| 221 | | wxT(","), |
|---|
| 222 | | wxT("."), |
|---|
| 223 | | wxT("<"), |
|---|
| 224 | | wxT(">"), |
|---|
| 225 | | wxT("`"), |
|---|
| 226 | | wxT("/"), |
|---|
| 227 | | wxT(";"), |
|---|
| 228 | | wxT("'"), |
|---|
| 229 | | wxT("\\"), |
|---|
| 230 | | wxT("["), |
|---|
| 231 | | wxT("]"), |
|---|
| 232 | | wxT("*") |
|---|
| 233 | | }; |
|---|
| | 161 | wxString *KeyConfigControl::m_keysList = NULL; |
|---|
| 234 | 162 | |
|---|
| 235 | 163 | KeyConfigControl::KeyConfigControl( vlc_object_t *p_this, |
|---|
| … | … | |
| 237 | 165 | : ConfigControl( p_this, p_item, parent ) |
|---|
| 238 | 166 | { |
|---|
| | 167 | // Number of keys descriptions |
|---|
| | 168 | unsigned int i_keys = sizeof(vlc_keys)/sizeof(key_descriptor_t); |
|---|
| | 169 | |
|---|
| | 170 | // Init the keys decriptions array |
|---|
| | 171 | if( m_keysList == NULL ) |
|---|
| | 172 | { |
|---|
| | 173 | m_keysList = new wxString[i_keys]; |
|---|
| | 174 | for( unsigned int i = 0; i < i_keys; i++ ) |
|---|
| | 175 | { |
|---|
| | 176 | m_keysList[i] = wxT(vlc_keys[i].psz_key_string); |
|---|
| | 177 | } |
|---|
| | 178 | } |
|---|
| | 179 | |
|---|
| 239 | 180 | label = new wxStaticText(this, -1, wxU(p_item->psz_text)); |
|---|
| 240 | 181 | alt = new wxCheckBox( this, -1, wxU(_("Alt")) ); |
|---|
| … | … | |
| 245 | 186 | shift->SetValue( p_item->i_value & KEY_MODIFIER_SHIFT ); |
|---|
| 246 | 187 | combo = new wxComboBox( this, -1, wxT(""), wxDefaultPosition, |
|---|
| 247 | | wxDefaultSize, WXSIZEOF(KeysList), KeysList, |
|---|
| | 188 | wxDefaultSize, i_keys, m_keysList, |
|---|
| 248 | 189 | wxCB_READONLY ); |
|---|
| 249 | | for( unsigned int i = 0; i < WXSIZEOF(KeysList); i++ ) |
|---|
| | 190 | for( unsigned int i = 0; i < i_keys; i++ ) |
|---|
| 250 | 191 | { |
|---|
| 251 | 192 | combo->SetClientData( i, (void*)vlc_keys[i].i_key_code ); |
|---|
| … | … | |
| 269 | 210 | KeyConfigControl::~KeyConfigControl() |
|---|
| 270 | 211 | { |
|---|
| 271 | | ; |
|---|
| | 212 | if( m_keysList ) |
|---|
| | 213 | { |
|---|
| | 214 | delete[] m_keysList; |
|---|
| | 215 | m_keysList = NULL; |
|---|
| | 216 | } |
|---|
| 272 | 217 | } |
|---|
| 273 | 218 | |
|---|
| rf5c7fd8 |
r40946d1 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000-2003 VideoLAN |
|---|
| 5 | | * $Id: preferences_widgets.h,v 1.8 2004/01/29 17:04:01 gbazin Exp $ |
|---|
| | 5 | * $Id$ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> |
|---|
| … | … | |
| 69 | 69 | wxCheckBox *shift; |
|---|
| 70 | 70 | wxComboBox *combo; |
|---|
| | 71 | // Array of key descriptions, for the ComboBox |
|---|
| | 72 | static wxString *m_keysList; |
|---|
| 71 | 73 | }; |
|---|
| 72 | 74 | |
|---|
| … | … | |
| 80 | 82 | wxComboBox *combo; |
|---|
| 81 | 83 | }; |
|---|
| 82 | | |
|---|
| | 84 | |
|---|
| 83 | 85 | class StringConfigControl: public ConfigControl |
|---|
| 84 | 86 | { |
|---|