1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-21 06:40:08 +02:00

124 Commits

Author SHA1 Message Date
James Crook
f01fed2ba2 Remove unwanted items from 'Select Command' in chains.
- Remove menu-version of effects.  They are already there because of EffectsManager.
-- This gets rid of all the entries with long paths in them.
- Mark more menu items as prompting, using '...', and so not suitable for chains.
2018-03-01 19:55:33 +00:00
Paul Licameli
66c421f28d Fix Windows build 2018-02-26 08:48:00 -05:00
Paul Licameli
e5052a1973 Use a type distinction for key strings in normalized form...
... Such are not for display to the user.  They are appended to menu item
names to identify accelerators, and wxWidgets transforms them appropriately
for the operating system.
2018-02-25 14:56:17 -05:00
Steve Daulton
19014f22b7 Prompt for track selection when required 2018-02-25 15:22:45 +00:00
James Crook
fa49d94530 Script work
Add Envelope script
Add Clips and Boundaries Scripts.
Add docimages_oddments.py for the weirder cases.
Add make html script.
Add more spectral images
Add Dark versions of spectrograms (paul's comment)
Clean up oddments script.

- This commit also adds an option NOT to bring Audacity to the top when screenshotting.
-- That's because QuickPlay will disappear if you do -because you lose mouse capture.
- Also allow negative window IDs in the drag command.

- Registration names of align commands sorted.  They had &, : and / in them.
- Fixed bug in SetTrackInfo where bFocused was being ignored
- Fixed bug where command manager ignored multi-commands.
- Commit docimages_oddments.py again, to fix line endings.
2018-02-24 14:20:29 -05:00
James Crook
859fe69a15 Case insensitive command names. 2018-02-24 14:20:28 -05:00
James Crook
5c2f35d96f Fix Automation listing
- Now correctly shows optional fields
- Now includes the zero-parameter commands.
- Fetches the Short-Names for menu commands.
2018-02-24 14:20:25 -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
ee4f35f288 Rename Lyrics as LyricsPanel, and some DOxygen 2018-02-21 17:32:08 -05:00
Paul Licameli
c9c5421e49 Properly hide non-Full keyboard defaults containing Command+ on Mac 2018-02-08 17:19:18 -05:00
Paul Licameli
6967925e48 Redo CommandManager::DescribeCommandsAndShortcuts with pairs...
... Later we may make other types for the members of that pair.
2018-01-08 14:14:22 -05:00
Paul Licameli
ab6de1181d No more functor objects; all command handler functions take same args 2018-01-05 09:27:29 -05:00
Paul Licameli
77c392d29c AudacityProject::OnEffect wraps new function DoEffect 2018-01-05 09:27:28 -05:00
Paul Licameli
6dead232f2 Pair CommandHandlerFinder with functor everywhere, but not used yet 2018-01-05 09:27:25 -05:00
Paul Licameli
1e3ab82a01 Effect commands store PluginID in CommandEntry parameter, not functor 2018-01-05 09:27:21 -05:00
Paul Licameli
05984e8bfb CommandEntry stores a string parameter, passed in CommandContext 2018-01-05 09:27:19 -05:00
Paul Licameli
0a711d8b26 define CommandContext 2018-01-05 09:27:17 -05:00
Paul Licameli
aa5c3f12a3 easy change key bindings 2018-01-05 09:27:11 -05:00
Paul Licameli
7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05: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
David Bailes
cbfde23e42 Fix for 1753: keyboard interaction with meter buttons broken
There are two problems with using Enter to press the meter drop down buttons:
1. It only works the first time.
2. If auto-select auto is on, then audio is auto-selected.

This was caused by commit a0ea5d6. The problem with this commit is that meters and sliders are also derived from wxPanel, and therefore affected by the fix.

To fix this, make the above fix specific to the Lyrics panel.
2017-10-14 21:49:20 -04:00
Paul Licameli
731a2ac40c Fix format of tooltip text for toolbar buttons in RTL languages...
... No translatable strings were added, two were removed
2017-09-11 22:08:06 -04:00
Steve Daulton
b9aaec6919 Fix bug 1730 2017-09-04 12:12:09 +01:00
James Crook
059139bb6d Bug 1727 - Spacebar may not start / stop playback
Fix proposed by David Bailes.
2017-08-28 22:53:55 +01: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
James Crook
47372cfe7d Add comments about URL-Help (Bug 299)
Bug 299 is an review and enhance request for all error messages to show the iconic help link.
These comments may help a little with identifying where they are and aren't needed.
2017-08-16 17:58:27 +01:00
Paul Licameli
812fd2adea move function 2017-07-16 23:01:12 -04:00
James Crook
58bd03419a Move Shift+J and Shift+K shortcuts into the standard set. 2017-07-03 17:30:12 +01:00
James Crook
46154d0dca Upgraders to 2.2.0 retain the full set of default shortcuts.
If they delete audacity.cfg they get the new smaller set of defaults.  Also if they explicitly ask for the standard set.
2017-06-30 21:38:20 +01:00
James Crook
a9cbebcb0f Reduce number of shortcuts provided by default.
The full list of shortcuts, the maxList, is still available, and can be set in KeyboardPreferences.
2017-06-28 23:00:02 +01:00
James Crook
500907ff87 Remove text explaining the 'Help Button'.
It is a button, not an icon, so it does not need explaining what it is.  Also this solves the issue of when the help button is deliberately removed after use.
2017-06-10 18:12:32 +01:00
James Crook
7341bff9e0 Disallow AutoSelect on dangerous commands.
Commands flagged with NoAutoSelect will not auto select, even if the user has asked for it.  This is used for Cut and 3 different kinds of delete.  We later might extend it to fades and repair.
2017-06-09 22:36:05 +01:00
James Crook
adc7312954 Auto-Select off by default.
I've implemented three states for what to do if no selection:
0 - Grey out (no longer used)
1 - Auto-select
2 - Give the warning message and try again.
2017-06-09 19:40:28 +01:00
James Crook
acd55e95db Capture screenshots of effects.
Only available if you define EXPERIMENTAL_DOCS_AUTOMATION.
This code is still a bit ropey and not suited for prime time, but fine for our own (careful) use in preparing the manual.

It captures most of the effects, generator and analyze built ins and nyquist dialogs.  Use it by creating a track, making a selection and then clicking the 'All Effects' button in the screenshot tools.  The dialogs will be captured to your user directory.
2017-06-03 15:59:51 +01:00
James Crook
7e691ddf38 Fix crash bug (regression) in Automation
Somewhere along the line, GetEffectIdentifier got changed to GetEffectByIdentifier, leading to abuse of an iterator when attempting to invoke an effect by name.
2017-06-03 15:59:50 +01:00
James Crook
c48310c519 Fix 'Disallowed' message when using up-arrow.
This happened when transcription toolbar had focus, with and without tracks.
2017-05-31 23:19:43 +01:00
James Crook
eaec68a014 Bug 1642 - (Windows) Adding a shortcut or toggling Extra Menus causes ENTER on dropdown to open new project 2017-05-15 23:25:54 +01:00
James Crook
a0ea5d64db Bug 1469 - Shift key does not modify Play/Record buttons when Karaoke view has focus 2017-05-14 22:14:13 +01:00
James Crook
94c43773fc Bug 1641 - Don't use the 'space trick' on Linux/Mac menus.
The 'added space trick' to disable menu accelerators and still show them hides the accelerators completely on Linux/Mac.  Linux/Mac rejects the invalid accelerators.  Fortunately we don't need to disable the menu accelerators on Linux/Mac.  These menu accelerators causing a problem (in bug 1637) only happens on Windows.  So the 'space trick' is now used only on Windows.
2017-05-09 08:44:39 +01:00
James Crook
6a33e8303a Bug 1641 - Follow up. NUMPAD_ENTER, Backspace, Delete
3 Keys that were already illegal now added back with a space before them.
This should fix these keys in 1641 too.
2017-05-07 11:17:18 +01:00
James Crook
6e65596b47 Bug 1641 - Panel navigation accelerators don't appear in the menus
This attempted fix applies the 'space' trick to make accelerators invalid, so "Left" is added as " Left" into the menus, and appears normal but does not act as an accelerator.  This is now only done for the problematic accelerators rather than for all accelerators.  It's believed that doing it for all accelerators caused the problem.

In debug builds users will see messages like the one below in the console:

"Unrecognized accel key ' right', accel string ignored."

This fix additionally adds 0..9 to the specially handled accelerators.  This should address:
Bug 1260 - Cant type "1" in the Project Rate text box

The fix has been developed and tested on Window only.  Theoretically the space might cause problems on Mac and if it does the 'space' trick could be applied just on Windows and Linux, since Mac did not seem to have the problem reported in 1260.
2017-05-07 10:59:50 +01:00
James Crook
ef62bd70df Bug 1637 - Keyboard interaction with many controls in toolbars broken
This progresses this bug.  Specifically on Windows, Left and Right arrows and Enter (non keypad version) should now no longer be a problem.  The fix is to not show these shortcuts in menus, because otherwise the menus will catch the events.  Unfortunately attempts to show these specific shortcuts in the menus bring back the bug.

Steps to reproduce for 1637 will need to be updated.
2017-05-04 17:14:44 +01:00
James Crook
57b200884e Bug 1639 - Left and Right arrow keys don't work in docked toolbars, if bound to some action.
This fix works by detecting whether the focus window is the TrackPanel, in which case all keys are handled normally.  If it isn't the TrackPanel, then the problematic keys do not get sent to our own CommandHandler and proceed on to wxWidgets.

A problem that then follows is that the menu accelerators (which normally don't get a look in) may then convert the event to a menu event and stop it going any further.So it does not get to the focus window.

The fix/workaround for that is to NOT provide accelerators for up, down, left and right arrow in the menus.  I'd much rather be able to turn off those accelerators completely, yet still show them to users as hints.
2017-05-01 19:04:49 +01:00
James Crook
083d123875 Don't update checkmarks of occult menu items. 2017-04-21 17:39:35 +01:00
James Crook
031f8413f4 Organise the occult commands in the Preferences Key View. 2017-04-21 15:50:25 +01:00
Paul Licameli
abbe9276f0 Exception safety in: CommandManager 2017-03-21 14:11:21 -04:00
James Crook
8f71aa67df Allow same command more than once in the menus.
Pause appears in both Record and Play, and we want the P shortcut to work.
2017-03-19 19:32:35 +00:00
Paul Licameli
b81cdee7e3 Comment where xml writing functions may throw 2017-03-18 11:45:05 -04:00
Paul Licameli
6525bb18cf Translate exceptions to error codes in callback functions...
... That is what the library protocols allow, and libraries may be written
in C and might corrupt their state if C++ exceptions pass through them.
2017-03-17 17:53:01 -04:00
Paul Licameli
5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00