1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-23 16:08:07 +02:00

88 Commits

Author SHA1 Message Date
Paul Licameli
6248226163 Bug1892: VoiceOver on Mac should read category names in Preferences...
... Achieved by implementing a wxAccessible subclass for wxTreeCtrl, but on
Mac only.  Leave be on Windows, just making the new type name an alias.
2019-04-27 21:30:38 -04:00
James Crook
3b312f9d1b Add ComponentInterface to PrefsPanel
This is so that we can have plug-in prefs panels loaded from a dll, and introspect what we have.
2019-04-15 13:26:18 +01:00
Paul Licameli
a915a510bd include <wx/setup.h> in all files where wxUSE* macros are used...
... even if it's redundant; improving on what was done at b47e2f9
2019-03-23 14:56:02 -04:00
Paul Licameli
32a79c703b Redo 429fad6 without special logic in PrefsDialog.cpp 2019-03-23 02:45:39 -04:00
Paul Licameli
f45300f032 This is only comments, in files where USE_ macros are tested...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
b8c0125143 Replace comparisons against wxEmptyString with empty() 2019-03-14 16:20:18 -04:00
Paul Licameli
492a44894b Move MenuManager functions out of Project.cpp 2018-10-24 15:04:41 -04:00
James Crook
3353780bf9 Bug 1918 - Right to Left (RTL) language cannot be undone using preferences. 2018-08-08 17:21:45 +01:00
James Crook
47bbedb20e Avoid too-small prefs dialog
Prefs dialog can now be more compact, but the tree control gains scrollers which look poor.  So a height of at least 480px, if no height was set by the user, is used.  This way also the key config prefs have reasonable height.

Doesn't set the min size.  On small screens, users can scrunch the dialog up tightly if they really want to.
2018-04-11 23:10:17 +01:00
James Crook
edacab85fa Save prefs size, even on a Cancel 2018-04-11 19:44:36 +01:00
James Crook
d1c2ff82f0 Bug 1864 - Spectrogram settings dialog hides the checkbox for "Enable Spectral Selection"
Fixed by a more compact layout.
Also we now size the dialogs for unique pages to fit their contents.
2018-04-11 11:08:28 +01:00
David Bailes
f9ee3cdc45 Fix some of the accessibility names that disappeared with the move to WX 3.1.1
The main change in wxWidgets for the setting of accessibility names is:
7dab555f71 (diff-04f5191d86f95b1c4d5d9c979da65878)

Before this change, with wxUSE_ACCESSIBILITY set to 1, for wxWindow and all the classes derived from it, wxWidgets automatically created accessible objects to handle accessibility itself. Because the way wxWindowAccessible::GetName() was written, the accessibility names of lots of windows and controls had to be set using SetName().

After the change, by default, the accessibility of instances of these classes is handled by Windows. Where the accessibility of a control is handled by Windows, then the accessibility name is automatically set to so the appropriate value. However, an accessible can still be set using SetAccessible() then wxWidgets handles the accessibility for this object.

So for many controls we can just leave Windows to set the accessibility name. However, for controls which don't have any visible labels, or where we want to accessibility name to different from the visible text, then we have to set an accessible object for that control, and then call SetName(). The Class WindowAccessible can be used for this purpose. And for custom widgets, like the TrackPanel, and the NumericTextCtrl, SetAccessible() still has to be called, since they need bespoke accessible objects

So in the cases where we want the accessible name to be different from normal, we now need to explicitly set an accessible object. (Before, this wasn't needed, as accessible objects were automatically created.).

Some notes of the fixes included in this commit:
1. The fixes cover the main window, preferences, and built-in effects. Other fixes will follow.

2. In ShuttleGui, I've set accessible objects for wxTextCtrls and wxSliders. So all of these widgets still need the name set. This was done because there are a lot of instances where these controls need non standard accessibility names, and so it saves having to put lots of SetAccessibles throughout the code.

3. For wxPanel, Windows picks up the accessibility name from the label, and so SetLabel() can be used instead of SetName(). This is just as well, since for windows that contain other windows or controls, setting WindowAccessible as the accessibility object breaks the accessibility tree.

Note that at some stage a lot of calls to SetName() can be removed from the code as they are no longer needed, but it might be better to leave them there for the moment, just in case they are unexpectedly needed.
2018-04-06 17:24:40 +01:00
James Crook
0cf7964e38 Bug 1661 - Default audio track name not being translated
We need a blank name stored in the config, if the name is the local version of "Audio Tracks"
2018-03-23 14:17:05 +00:00
James Crook
ea4968e094 Add GetInfo Preferences. 2018-02-27 22:26:28 +00:00
James Crook
4724c6a131 Fix spectral preferences extra caching issue. 2018-02-24 14:20:29 -05:00
James Crook
99e18a8896 Implement ReloadPreferences for SetPreferences Command. 2018-02-24 14:20:25 -05:00
Paul Licameli
228388a63c Follow wxWidgets argument conventions for PrefsPanel factories 2018-02-21 19:21:04 -05:00
Steve Daulton
0a93172265 Cautions re. size of Preference pages
Clarify meaning / purpose of assert in PrefsDialog
and add scrollers to pages that may grow in future versions.
2018-01-15 22:23:59 +00:00
Steve Daulton
acbfa1387e Fix Assert on opening Prefs with high dpi 2018-01-14 15:34:24 +00:00
Paul Licameli
ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
Paul Licameli
37bc61f4ac Make scroll panel of Spect Settings absorb the window resizing 2017-08-29 08:40:54 -04:00
James Crook
ce9938787c Use alpha or released or local manual for "help on selection".
Previously this was hard coded to use the online alphamanual.
Some other help-on-errors paths were hardcoded to use the online manual, and did not use local help even if available, so these were changed too.

Also two naming changes in the code:
ShowHelpDialog() became ShowHelp() because it typically shows the help in your browser, only showing the help in a dialog under certain circumstances.
The helpURL parameter became helpPage since it is usually a page name that is then elaborated into a url.
The Link() function became InnerLink().

Some careful http -> https changes made too.
2017-08-25 13:59:16 +01:00
Paul Licameli
4a4fa8d97c Bug1183: make spectrogram settings scrollable for limited resolution 2017-07-24 21:12:19 -04:00
Paul Licameli
48202284b2 Change virtual function interface of PrefsPanel 2017-06-25 11:42:20 -04:00
Paul Licameli
aa924b54a9 Rename Apply in spectrum settings & prefs dialogs, reposition it too 2017-06-25 11:39:30 -04:00
James Crook
534cf87265 FIx so NVDA reads 'Categories' rather than 'trreCtrl'.
Fix by Robert Hänggi.
2017-05-28 16:07:02 +01:00
Steve Daulton
2fcf715972 Update Help link for Spectrogram Settings 2017-05-22 15:11:39 +01:00
Steve Daulton
b96f169e1f Fix link to Spectrogram Settings Help 2017-05-20 18:21:32 +01:00
Steve Daulton
fd3d41e82f Add help pages for shipped Nyquist effects 2017-05-20 14:49:07 +01:00
Steve Daulton
469120cebd Enable help button for effects 2017-05-20 14:49:07 +01:00
James Crook
429fad6f88 Send Spectrum Settings help to its own page in the manual
This commit provides a different help landing page (Settings) for preferences that are used outside the normal Ctrl+P preferences dialog - for example, 'spectrum settings' accessed from the track menu.   This should work for any settings that are used on their own in that way, though spectrum settings is currently the only example.
2017-05-20 13:57:16 +01:00
James Crook
4e187d0ce0 Bug 1648 - Crash clicking Help icon in Spectrograms Settings 2017-05-20 09:25:18 +01:00
Steve Daulton
e16f6f9221 Add small help button to Prefs pages 2017-05-14 19:02:36 +01:00
James Crook
9d501f69d6 Add preference for Record being to new track. 2017-05-01 12:04:27 +01:00
Steve Daulton
516570074b Add preference option for Stem Plot
Tracks 'behaviors' preferences split to sub-page to avoid over-long
page for Tracks preferences.
2017-04-27 15:16:05 +01:00
James Crook
7661d179ba Send size event after repopulating MeterToolbar buttons.
If we don't do this, it does not regain its former size, if it is floating.
2017-04-27 09:51:34 +01:00
Paul Licameli
fe5ab9a462 Remove the naked new in allocation of AudacityProject 2016-08-14 15:24:59 -04:00
Paul Licameli
84c0337aba Fix TAB key navigation on Mac for all dialogs (not only for panels) 2016-07-10 17:12:27 -04:00
Paul Licameli
e0f6ed9972 Rewrite wxPanelWrapper passing the base class as a template 2016-07-10 17:12:27 -04:00
Paul Licameli
9f6eedf6e4 Bug682: fix Tab key navigation in Preferences, particulary Keyboard 2016-06-25 19:38:38 -04:00
Paul Licameli
dfc84d030c Fix warnings for out-of-order initializers, with in-class member initializers 2016-02-26 14:56:30 -05:00
Paul Licameli
990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
0ce4fe0b83 Sweep unnecessary wxString copies: prefs 2016-02-22 21:30:42 -05:00
Paul Licameli
3f237daddc Use macro safenew for many allocations of wxWindow subclasses 2016-02-14 20:20:19 -05:00
Leland Lucius
9dd79c9f80 Remove flushing of preferences in ShuttlePrefs and only
flush when all settings have been written.
2015-12-21 20:07:24 -06:00
David Bailes
1b6b354fc6 Remove the setting of the maximum size from the Preferences dialog.
The maximum size setting could introduce a horizontal scroll bar in the
keyboard preferences, making it awkward to read them.

The maximum size has been removed, but the initial, and minimum size
remain unchanged.
2015-08-27 15:35:07 +01:00
Leland Lucius
6a9dae20f5 Appearance on OSX is now back to normal or better
Some additional wx3 cleanup as well.
2015-08-23 20:25:01 -05:00
Paul Licameli
49ff3ae78f Be sure OK button of preferences dialog is default 2015-08-21 06:25:00 -04:00