Re: [Audacity-devel] Patch for P3: Preferences Window: OK Button does not respond to Enter when a t
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Gale A. <ga...@au...> - 2009-10-07 09:10:10
|
| From Vidyashankar Vellal <vid...@gm...> | Tue, 6 Oct 2009 19:10:08 +0530 | Subject: [Audacity-devel] Patch for P3: Preferences Window: OK Button does not respond to Enter when a tab is selected in the left > On Tue, Oct 6, 2009 at 3:48 PM, David Bailes <drb...@go...> wrote: > > > Unfortunately, it's not OK for the users of screen readers, because if > > they can't navigate the list using the keyboard, then they can't read > > it. > > > > David. > > Oops! Forgot about screen readers. Sorry. My bad. > > Anyway, I have made some more changes. New patch is attached. > > I am wondering why I didn't think of this before. > Instead of disabling all mouse events, I have disabled only the double-click. > Also, when keys other than <enter> or <tab> are pressed (arrow or > letter keys for example), then the user can select the list items. > So effectively, the user can select the list items through the > keyboard or mouse as usual. > > When <enter> key is pressed with either the list control or a list > item having focus, the dialog is dismissed. > > Since the double-click is disabled, we don't have to worry about > dialog getting dismissed when list item is double-clicked. > > Hope this is OK. > > Thanks > > Vidyashankar Hi Vidyashankar I haven't managed to compile ExportMultiple.cpp after the patch, getting the error below. Patch.exe aborts with a runtime error here when it tries to patch ExportMultiple.h, but the result is the same even if I apply the patch to both files manually. Could you take a look, and if you can't see a problem, can you attach the actual cpp and h files as they are working now for you? Thanks Gale Compiling... ExportMultiple.cpp c:\program files\audcvs\audacity\src\export\ExportMultiple.h(174) : error C2061: syntax error : identifier 'wxListEvent' c:\program files\audcvs\audacity\src\export\ExportMultiple.h(175) : error C2061: syntax error : identifier 'wxListEvent' ..\..\..\src\export\ExportMultiple.cpp(93) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall SuccessDialog::* )(void)' to 'wxListEventFunction' Cast from base to derived requires dynamic_cast or static_cast ..\..\..\src\export\ExportMultiple.cpp(93) : error C2466: cannot allocate an array of constant size 0 ..\..\..\src\export\ExportMultiple.cpp(93) : error C2440: 'initializing' : cannot convert from 'int' to 'const wxEventTableEntry' No constructor could take the source type, or constructor overload resolution was ambiguous ..\..\..\src\export\ExportMultiple.cpp(94) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall SuccessDialog::* )(void)' to 'wxListEventFunction' Cast from base to derived requires dynamic_cast or static_cast ..\..\..\src\export\ExportMultiple.cpp(957) : error C2511: 'void SuccessDialog::OnKeyDown(wxListEvent &)' : overloaded member function not found in 'SuccessDialog' c:\program files\audcvs\audacity\src\export\ExportMultiple.h(169) : see declaration of 'SuccessDialog' ..\..\..\src\export\ExportMultiple.cpp(965) : error C2511: 'void SuccessDialog::OnItemActivated(wxListEvent &)' : overloaded member function not found in 'SuccessDialog' c:\program files\audcvs\audacity\src\export\ExportMultiple.h(169) : see declaration of 'SuccessDialog' > > So I thought of preventing the user from selecting any list item. > > (Anyway, the user cannot do anything functional even if he selects a > > list item). I have attached a patch which gives the following > > behaviour: > > *Initially, the list control has focus. > > *Pressing <enter> dismisses the dialog. > > *Pressing <tab> shifts focus to OK button. > > *Pressing any other key does nothing. (Usually, pressing arrow keys or > > letters selects list items). > > *All mouse events are also disabled (in a sense). So the user cannot > > select any list items using the mouse. > > > > Essentially, the list control is non-functional and appears like a > > static text surrounded by a black border. The user can just read the > > list of exported files and press <enter>. Is this behaviour OK? |