1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-20 14:20:06 +02:00

109 Commits

Author SHA1 Message Date
Paul Licameli
82663892dc Accessors to get the project window...
... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
2019-05-28 23:18:13 -04:00
Paul Licameli
0923bc19a9 static MenuManager::Get()...
... not member functions of AudacityProject
2019-05-23 16:34:47 -04:00
Paul Licameli
14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -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
9bf29f5582 CommandManager keys by CommandId, not plain wxString 2019-05-16 12:30:29 -04:00
Paul Licameli
f6adeed47b Remove some unnecessary #include directives 2019-05-15 14:14:18 -04:00
David Bailes
f83a773ec2 Accessibility: improve the assessbility of MacrosWindow for Narrator
Problem:
In the Macros window, the list of steps has a dummy empty column, which is a workaround for getting the Num column to be right aligned. Narrator reads the table/list as having 4 columns which is confusing. In addition, when arrowing down such a list, Narrator initially just reads the contents of the first column, which is unfortunately an empty string.

Fix:
After all the columns have been inserted, the dummy column can be deleted. This workaround was suggested in some Microsoft documentation.

Note:
I've made what I think is a correct change for some Mac specific code, but haven't tested this.
2019-04-01 11:37:00 +01:00
Paul Licameli
2e05d2d884 Remove wx/{radiobut,ownerdrw,menuitem,menu,listbox}.h from *.h 2019-03-30 12:15:53 -04:00
Paul Licameli
cfde442bcd Remove a few small member functions from AudacityProject 2019-03-27 13:32:54 -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
Paul Licameli
5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli
50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli
da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -04:00
Paul Licameli
c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli
fb8b5029e5 Select and Clip Menus 2018-10-24 12:16:33 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
2758491a4a Bug 1966 - Manage Macros: Import and Export buttons are always inactive. 2018-09-03 22:58:57 +01:00
James Crook
0ea4ff1395 Add internationalization hints. 2018-08-28 16:35:06 +01:00
David Bailes
4bf28412db Manage Macros dialog: a couple of focus issues
1. For both the macros list and the steps list, when focus first moves to the list, an item is selected but not the focus.
2. After editing a step, focus is not returned to that step in the list.

Fix for 1: in the calls of SetItemState(), include the wxLIST_STATE_FOCUSED flag.

Fix for 2: The fix for 1 fixed 2. Not sure why.
2018-08-10 16:43:27 +01:00
James Crook
9d396e3315 Bug 1925 - Applying <macroname> to current project window: visual noise, and accessibility.
For accessibility, not showing the activity window is better.
2018-08-10 12:23:30 +01:00
James Crook
9357c90b43 Bug 1859 - Macros on files - Save Project causes overwrites. thus loses data
AudacityProject::Save() is now batch mode sensitive, and if in batch mode (and not overwriting) will save without prompting.
The loop for applying macros to multiple files now also clears down the project, using the new function ResetProjectToEmpty().
2018-08-05 21:34:24 +01:00
David Bailes
d554ea53d2 Fix Travis build
Which I broke with my last commit.
2018-07-30 11:58:16 +01:00
David Bailes
f123624806 Macro dialog: minor accessibility fixes
1. Set accessibility names for the buttons for applying a macro to the project or files. Note that although these names are not read by NVDA 2018.2, they will be read by NVDA 2018.3

2. Remove access keys from wxStaticText controls, as they do not work on this type of control.
2018-07-30 11:34:00 +01:00
James Crook
40085b384f Fix crash on second invocation of Macros after apply to projects.
This was caused by reuse (misuse) of mList variable for a new list.
It was still needed for future use of the dialog.
2018-03-23 09:30:25 +00:00
James Crook
63879f2fc4 Don't hide macros GUI when applying. 2018-03-19 17:38:18 +00:00
Steve Daulton
e661c7da49 Fix assert on deletion of last macro item 2018-03-19 14:42:06 +00:00
James Crook
110d4ac478 Change "Apply Macros" -> "Macros Palette" 2018-03-17 19:17:55 +00:00
James Crook
20d577de27 Preserve location in lists after edits. 2018-03-17 19:17:54 +00:00
James Crook
51011fb38f Keep Edit Macros dialog open after applying. 2018-03-17 19:17:53 +00:00
James Crook
2d62013fac Add Macros Palette to Apply Macro -> submenu, 2018-03-16 18:38:06 +00:00
Paul Licameli
d258385e3a Use TranslatedInternalString in MacroCommandsCatalog 2018-03-15 19:53:38 -04:00
James Crook
5cc1dbc872 Bring Macros dialog to front after various actions 2018-03-14 16:57:33 +00:00
James Crook
b1862d2b11 Rearrange Macros buttons
- Allows Macro dialogs to be smaller.
- Order is more logical.
- Layout is neater (better aligned).
- Height stays stable on Expand/Shrink.
2018-03-14 16:37:15 +00:00
Paul Licameli
77f720b0c8 Show friendly names of commands in message boxes...
... With spaces in the English; maybe later they will localize
2018-03-07 23:55:19 -05:00
Paul Licameli
4cb2ec6fa0 Fix missing i18n of some new prompts 2018-03-07 17:11:36 -05:00
Paul Licameli
ffadd64a56 Define MacroCommandsCatalog to associate friendly and internal names...
... friendly names are still English only.  Not yet localized, but ought to be.
2018-03-06 18:47:56 -05:00
andheh
896e7a4dd5 fixed a "signed vs. unsigned" warning in BatchProcessDialog.cpp 2018-03-06 21:30:39 +00:00
James Crook
4617b0b1a8 Change wording: Now "Manage Plug-ins" and "Manage Macros" for those two dialogs. 2018-03-05 20:10:01 +00:00
James Crook
4c5e1f30fd Keep focus on Expand/Shrink button when resizing Macro Dialog. 2018-03-05 15:13:42 +00:00
James Crook
6b44a53de9 Move Macro Dialog buttons around.
Based on feedback from quality list.
2018-03-05 15:00:11 +00:00
James Crook
834c9df32a Save Changes when Expanding/Shrinking Macro Dialog.
Previously the selected macro was forgotten, as were any pending
changes.
2018-03-04 19:16:30 +00:00
James Crook
70b1f69bbe Use names not numbers in MacroIdOfName()
Previously the ID for a macro was, e.g. Macro003.  However this would
not work if macros were added or deleted, since chains containing the old
macro references would now refer to a different macro.  So changed to using
names.
2018-03-04 19:11:26 +00:00
James Crook
4dfac323c0 Make Macro Dialog optically stable.
Expand and Shrink now happen 'in place'.
Title changes to and from 'Apply Macro' <-> 'Edit Macros'
2018-03-04 18:41:16 +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
c0dcba66dd Rename Chains to Macros.
Lots of renaming.
Did not rename the containing files (yet) since that will require makefile updates.
2018-03-03 19:17:18 +00:00
James Crook
8ab69ae5c3 Update tools menu on Mac too.
This entailed making the Edit Chains and Apply Chain dialogs modeless.
That is good for other reasons too.
2018-03-03 19:16:50 +00:00