1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-12 15:11:09 +02:00

114 Commits

Author SHA1 Message Date
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
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
c8a8c6a3fa Remove radio button function overloads made unused in previous commit 2019-11-27 13:37:24 -05: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
1649e3669e Rename EnumSetting -> ChoiceSetting, EncodedEnumSetting -> EnumSetting 2019-04-07 16:42:11 -04:00
Paul Licameli
5e2b8cd825 Remove wx/{treebook,textbuf,srchctrl,socket}.h from *.h 2019-03-30 13:32:44 -04:00
Paul Licameli
de60edc62f Remove wx/{app,statbmp,spinctrl,scrolbar,dynlib,dcmemory}.h from *.h 2019-03-30 07:57:37 -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
bcc2e0d13b Remove wx/frame.h, wx/sizer.h, wx/access.h from headers 2019-03-28 11:21:15 -04:00
Paul Licameli
7766d9a192 AddCheckBox takes a bool for initial state, not string 2019-03-27 12:58:40 -04:00
Paul Licameli
485a9bbb58 Remove declared but undefined overload of TieCheckBox 2019-03-26 16:53:28 -04:00
Paul Licameli
1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli
80ca1dc5fc Remove unused overloads of ShuttleGuiBase::TieNumericTextBox...
... those taking wxString as default value, or reference to wxString as the
target variable.

There remain one that takes reference to int as target, and one taking
reference to double; and one taking a config path and a double default value,
passed by const reference.  Some of the calls to the last pass an int default
value which was, and still is, implicitly converted to double.
2019-03-20 13:50:58 -04:00
Paul Licameli
393719bbdf Remove unused overload of ShuttleGuiBase::TieTextBox...
... No need to tie a double-default-valued checkbox that is NOT numeric.
2019-03-20 11:32:30 -04:00
Paul Licameli
dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli
dcd82b8ef5 ShuttleGui::AddChoice takes int to specify selection, with a default...
... This makes things brief and where non-default avoids some repetition of
literal strings
2019-03-15 23:35:13 -04:00
Paul Licameli
a5e0b66d1f WrappedType is immutable (though it points to something mutable) 2019-03-10 12:38:35 -04:00
Paul Licameli
17cc8a495f Define and use TieNumberAsChoice for Quality sample rate setting 2018-03-25 14:48:52 -04:00
Paul Licameli
872b4f430c New overload of TieChoice taking EnumSetting...
... and change misleading argument names
2018-03-25 14:05:05 -04:00
Paul Licameli
f7f721b52d Automatic setting size hints in all choice controls in ShuttleGui...
... excpet in a few places that populate the choice control late and then
do it explicitly
2018-03-20 14:42:36 -04:00
James Crook
e978840044 Remove 'Set' from optional items.
This removes the text saying 'Set' beside an optional item.
It's a more far reaching change, as it allows the optional items to be
aware they are optional, paving the way for future nicer presentation.
2018-03-18 20:05:10 +00:00
andheh
89315bd5e6 made ShuttleGui destructor virtual
since it has virtual member functions and is used
polymorphically in commands/GetInfoCommand.cpp
2018-03-06 22:25:53 +00:00
James Crook
6f8d27208f Remove Apply-Macro from Tools menu.
Done by giving Macros... dialog an Expand / Shrink button
so that we can use it as just an apply-to-projects dialog, if we want.
The dialog is modal, and can be kept open whilst we work.  So for example
we could put useful presets into it as macros.
2018-03-03 22:20:25 +00:00
James Crook
ea4968e094 Add GetInfo Preferences. 2018-02-27 22:26:28 +00:00
James Crook
2180379a18 Optional parameters now working. 2018-02-24 14:20:24 -05:00
James Crook
1c988b4e3a Automation: AudacityCommand
This is a squash of 50 commits.

This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class.  AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.

- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
   - Tested with Zoom Toggle.

- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.

We abuse EffectsManager.  It handles both Effects and
AudacityCommands now.  In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.

- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.

This way we can search for related types at the same time.

- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason.  They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.

- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
  which are now better handled by other commands.

- JSONify "GetInfo: Commands" output, i.e. commas in the right places.

- General work on better Doxygen.
    - Lyrics -> LyricsPanel
    - Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
  previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-02-24 14:20:22 -05:00
Paul Licameli
8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -05:00
Paul Licameli
9612e3d971 indentation, final newlines, spelling, remove unused members 2017-11-05 21:01:38 -05:00
Paul Licameli
aa924b54a9 Rename Apply in spectrum settings & prefs dialogs, reposition it too 2017-06-25 11:39:30 -04:00
Paul Licameli
942c62b6f6 Remove some naked new amd delete in: various 2016-08-08 07:51:24 -04:00
tip2tail
aa5ffe99a7 Timer Recording Enhancements to allow Automatic Save and Export after
recording.  Also allows for additional options to be carried out after a
successful timer recording such as Exit, Retsrat and Shutdown.
2016-03-30 20:42:59 +01:00
Paul Licameli
0c9deb398c Fix mac build. No standard headers in Audacity.h. 2016-03-01 12:22:37 -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
1c07741d57 Sizers are owned by wxWindow objects when added, so use safenew, or...
... use unique_ptr in the interim between building them and adding.

This checks eliminates some naked news, which were not paired with deletes.
2016-02-18 18:58:38 -05:00
Paul Licameli
4d78e353c3 Revert "sizers"
This reverts commit 84c0a0b6663a1210be502a76ab9c48dd330b3919.
2016-02-18 14:50:52 -05:00
Paul Licameli
84c0a0b666 sizers 2016-02-18 02:54:50 -05:00
Paul Licameli
3f237daddc Use macro safenew for many allocations of wxWindow subclasses 2016-02-14 20:20:19 -05: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
ab21f75c77 ViewInfo is becoming a smart class, not a dumb struct
Now it has:
A constructor
XML attribute serializer functions (but no XML tag of its own)

Also removed unused lastZoom
2015-07-19 11:43:59 -04:00
Daniel Winzen
759ff8cd0d Performance improvements 2015-04-23 16:07:25 +02:00