1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 00:50:05 +02:00

181 Commits

Author SHA1 Message Date
Paul Licameli
96291c5476 Remove second argument of AddWindow(), use Position() instead 2019-12-02 22:01:22 -05:00
Paul Licameli
b5ee7676fd Rename ShuttleGui::SetSizeHints, chain-call it like other methods...
... And rewrite some other existing calls to SetMinSize
2019-12-02 19:35:06 -05:00
Paul Licameli
64a96e6f01 Define and use ShuttleGui::ConnectRoot...
... And corrected improper connections in HistoryWindow and ContrastDialog,
improper because they got called with the wrong this pointer, to
the control instead of the dialog.  But that was harmless anyway because the
handlers did not use this.
2019-12-02 19:35:01 -05:00
Paul Licameli
d98e41aad1 Define and use ShuttleGui::Disable; remove EnableCtrl 2019-12-02 17:54:07 -05:00
Paul Licameli
c72dbf5b51 Define and use ShuttleGui::Focus 2019-12-02 17:26:40 -05:00
Paul Licameli
30d375d6fa Remove style argument from ShuttleGui::AddCombo & AddListBox...
... use the Style() chain-call instead, as needed
2019-12-02 17:26:38 -05:00
Paul Licameli
1bfbfb9640 ShuttleGui::Style analogous to other functions 2019-12-02 17:23:34 -05:00
Paul Licameli
9eeef4713d Define and use ShuttleGui::Name and NameSuffix...
... For radio buttons, the name will default to the same as the prompt if not
otherwise specified
2019-12-02 16:55:46 -05:00
Paul Licameli
3ea0209e5c Define and use ShuttleGui::ToolTip 2019-12-02 11:41:51 -05:00
Paul Licameli
1d32824e02 Define and use ShuttleGui::Validator 2019-12-02 11:21:40 -05:00
Paul Licameli
8ea137e041 Define struct DialogDefinition::Item, to be filled in 2019-12-01 22:21:49 -05:00
Paul Licameli
b351eabf47 ComponentInterfaceSymbol contains TranslatableString 2019-12-01 18:08:56 -05:00
Paul Licameli
3704336a58 Fix dangling pointer bug, caused assertion opening Preferences 2019-12-01 13:50:36 -05:00
Paul Licameli
f07d33f4b5 Fix bug in pushing and popping sizers in notebook pages...
... Wrong sizer was pushed instead of the page's own, and was popped as
current sizer, when the first sub-sizer in the page was done.

But nothing was affected by this error, because notebook pages are used only
in the About dialog, and none of the pages have more than one directly nested
sizer.  So popping null as current sizer didn't matter because the stack did
not deepen again.

PushSizer() only after assigning mpSizer, as with other calls to it.
2019-11-28 14:24:44 -05:00
Paul Licameli
ae353fe61f Specify list control columns and styles all in one call 2019-11-28 14:24:44 -05:00
Paul Licameli
17ee2478bc An overload of AddChoice specifying selected as string value 2019-11-28 14:24:44 -05:00
Paul Licameli
089b46ab64 Specify initial radio button state in ShuttleGui method arguments 2019-11-28 14:24:44 -05:00
Paul Licameli
bca0afd52e ShuttleGui lets you specify whether a button is default. Use that. 2019-11-28 14:24:43 -05:00
Paul Licameli
6bff718248 Comments about wxALL where there are position arguments in ShuttleGui 2019-11-28 14:24:43 -05:00
Paul Licameli
7ccd35d219 wxWidgets docs recommend: don't SetSizeHints on non-top-level windows 2019-11-28 14:24:43 -05:00
Paul Licameli
c67a47e3e6 ShuttleGuiBase::mpDlg is const 2019-11-28 14:24:43 -05:00
Paul Licameli
f20e4786e9 Replace ShuttleGui::SetNoMatchSelector with arg in TieNumberAsChoice 2019-11-28 14:24:43 -05:00
Paul Licameli
d4ffbe0d68 Group setting path & default value arguments of Tie...() functions 2019-11-28 13:26:23 -05:00
Paul Licameli
7675d51044 Separate function TieIntegerTextBox...
... For the cases in which there is an associated preference variable which
should be a whole number
2019-11-28 13:18:33 -05:00
Paul Licameli
7fbe97c5ca Privatize, rename ShuttleGuiBase member fns (those using WrappedType) 2019-11-28 12:54:57 -05:00
Paul Licameli
9b41741074 Remove an overload of TieChoice; use more ChoiceSetting instead...
... this also corrects some mis-specifications of the default choice, formerly
by string instead of array position
2019-11-27 13:38:16 -05:00
Paul Licameli
087ac5e6c9 Change one overload of TieChoice to expect un-translated strings...
... preparatory to removing that overload.

This overload is used in exactly these files:

DevicePrefs.cpp (displaying host names retrieved by portaudio, which are not
defined in Audacity source)

EffectsPrefs.cpp

ExportFLAC.cpp (twice)

ExportMultiple.cpp (displaying the descriptions defined in the several export
plugin classes)

GUIPrefs.cpp (four times: languages, manual location, theme, and meter DB
range; the language names themselves don't have localizations!)

MidiIOPrefs.cpp (displaying host names retrieved by portmidi)

TracksBehaviorsPrefs.cpp (for solo button choices)

There is also TieNumberAsChoice, used in QualityPrefs and elsewhere, which
calls through to that overload.
2019-11-27 13:38:16 -05:00
Paul Licameli
5638d6844f Eliminate an overload of TieChoice...
... with one exception (/FileFormats/FFmpegAACProfile),
the calls are replaced with TieNumberAsChoice.

Some unfortunately repetitious string tables are a small price in exchange for
reduced confusion in ShuttleGui.cpp

Untranslated strings are passed to TieNumberAsChoice, which is wrong, but that
will be made right in the next commit when we change the implementation of that
function
2019-11-27 13:38:16 -05:00
Paul Licameli
dc3e872ca6 Reimplement TieNumberAsChoice and fix some comments...
... Make the array of integer choices optional, and call through to the
non-deprecated overload of TieChoice, which uses strings.

In 2.3.3 this function is only used in the Quality preferences dialog.
2019-11-27 13:38:06 -05:00
Paul Licameli
0493aaccee TieChoice needs only const reference to ChoiceSetting 2019-11-27 13:37:26 -05:00
Paul Licameli
e008a44022 Pass ChoiceSetting to StartRadioButtonGroup...
... and we don't need to pass strings to TieRadioButton.

This removes some repetition of string literals in import/export, which is
good too.
2019-11-27 13:37:25 -05:00
Paul Licameli
c5e21ead18 Rename, privatize, combine ShuttleGui members related to radios 2019-11-27 13:37:25 -05:00
Paul Licameli
89f3369556 Some WrappedType members just for radio buttons are no longer needed 2019-11-27 13:37:25 -05:00
Paul Licameli
c8a8c6a3fa Remove radio button function overloads made unused in previous commit 2019-11-27 13:37:24 -05:00
Paul Licameli
1236c5bfed class EnumValueSymbols lets you specify a table...
... of EnumValueSymbol either row-wise or column-wise
2019-11-27 13:37:23 -05:00
David Bailes
43145e0a49 Bug 2169 - Modules page of preferences is not read by NVDA
This is caused by the same problem that caused bug 1980. This was fixed for check boxes by commit 42efe53.
Note that the bug in NVDA's audacity appmodule affects controls with the class button: button, check boxes, radio buttons and group boxes.

The fix is similar to the fix for bug 1980:
For group boxes which have an empty label, set the accessibility name to "\a", which is non-empty, but not read by screen readers.
2019-07-22 11:12:15 +01:00
Paul Licameli
4da02d667f ShuttleGui.cpp and ShuttlePrefs.cpp have fewer dependencies...
... Freeing 13 files from cyclic dependencies
2019-05-18 20:29:25 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
7ad6897598 Move class ShuttleGuiGetDefinition near its only point of use 2019-05-16 12:30:27 -04:00
Paul Licameli
ad26c35d3c Fix Tab key navigation on Mac in presence of static boxes 2019-05-01 07:50:34 +01:00
Paul Licameli
c8d95e1117 Bug2105: Enable TAB to sliders on Mac...
... I think this is a defect in wxWidgets, but one we can work around with a
simple wrapper class around wxSlider overriding one method.

To make the fix complete, change all occurrences of "safenew wxSlider"
but the one in ShuttleGui.cpp covers most cases
2019-04-30 21:50:22 +01:00
Paul Licameli
498507ddd3 Bug1848: Mac VoiceOver should read names of choice controls...
... This should cover most of the neglected cases, where a choice was added
by ShuttleGui.

There are some places where choices are added directly:  scan the soure for
"safenew wxChoice"

I think there are still uncovered cases then in Grid.cpp, LV2 Effects, and in
commented-out parts of Transcription toolbar.

Are these important?

(This reinstates commit d2c112600d38f0894fe783f8dfd8861b5e604fce, which had
been reverted at 21a1260f912a9cb0ac8bff4f6e0fd7f8132f01ca, but making the
changes conditionally compiled on Mac only.)
2019-04-26 11:55:08 -04:00
David Bailes
21a1260f91 Revert "Bug1848: Mac VoiceOver should read names of choice controls..."
This reverts commit d2c112600d38f0894fe783f8dfd8861b5e604fce.

On Windows, it is intentional that SetAccessible is not called for wxChoice in ShuttleGui.
See the commit message of f9ee3cd for background.

Changing this during code freeze and close to creating release candidates would have the danger of introducing bugs.

Fixing this bug needs further discussion. Hopefully the Mac accessibility code can be changed to bring it into line with the changes in the wxWidets accessibility code when we moved to 3.1.1
2019-04-26 09:05:22 +01:00
Paul Licameli
d2c112600d Bug1848: Mac VoiceOver should read names of choice controls...
... This should cover most of the neglected cases, where a choice was added
by ShuttleGui.

There are some places where choices are added directly:  scan the soure for
"safenew wxChoice"

I think there are still uncovered cases then in Grid.cpp, LV2 Effects, and in
commented-out parts of Transcription toolbar.

Are these important?
2019-04-25 13:11:53 -04:00
Paul Licameli
1649e3669e Rename EnumSetting -> ChoiceSetting, EncodedEnumSetting -> EnumSetting 2019-04-07 16:42:11 -04:00
Paul Licameli
70e88782fe Remove wx/{grid,font,ffile,colour,button,bmpbuttn}.h from headers 2019-03-28 12:27:10 -04:00
Paul Licameli
b8aea73c91 Remove wx/stattext.h from headers 2019-03-27 14:33:46 -04:00
Paul Licameli
7766d9a192 AddCheckBox takes a bool for initial state, not string 2019-03-27 12:58:40 -04:00
Paul Licameli
75e44df43d Make windows inside wxStaticBox its children, not its siblings...
... as is recommended by wxWidgets documentation for version 2.9.1 and later:

http://docs.wxwidgets.org/3.0/classwx_static_box.html
2019-03-26 13:05:22 -04: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