Commit Graph

59 Commits

Author SHA1 Message Date
Paul Licameli 4d43967add Restore commit c1d129ec98 2020-01-31 23:51:12 -05:00
Paul Licameli 2c25a37994 Revert to a465ce0046 2020-01-31 22:34:25 -05:00
Paul Licameli d9d3f95570 Several nonmodal top level window tools register their menu items...
... removing link dependencies on them from src/menus, so they are now suitable
for moving out into modules.

They are:
Mixer Board
Karaoke (also called Lyrics)
History
Contrast
Plot Spectrum

Their header files are now no longer included anywhere but in their own
implementation files!
2020-01-31 21:12:36 -05:00
Paul Licameli d1637c22c0 TranslatableString for explicit prompts and units in ShuttleGui 2019-12-23 19:22:03 -05:00
Paul Licameli 455d3185a8 TranslatableString for list control column headers, menus 2019-12-23 19:02:21 -05:00
Paul Licameli 5168d62e3d TranslatableString for captions of text entry boxes 2019-12-23 18:53:00 -05:00
Paul Licameli b404eb7800 TranslatableString for static text box captions 2019-12-23 18:52:37 -05:00
Paul Licameli 1944ac2040 TranslatableString for labels of ShuttleGui buttons 2019-12-23 15:35:48 -05:00
Paul Licameli 4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
Paul Licameli 53ee9c9800 TranslatableString for titles, names, labels of wxDialogWrappers...
... Found one missed translation in CommandTargets.cpp
2019-12-16 10:58:05 -05:00
James Crook 5a3e9cd063 Fix dialog naming
For nicer Doxygen results, we need consistency in naming of classes.
Dialag classes are now called SomethingDialog.
2019-12-06 10:39:07 +00: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 ae353fe61f Specify list control columns and styles all in one call 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
Steve Daulton 61672af055 Remove obsolete FixMe comment 2019-07-19 13:20:10 +01:00
Steve Daulton 75fdadf674 Fix bug 680
"Project was recovered" replaces "Create new project" in Undo History.
2019-07-19 13:15:50 +01:00
Paul Licameli e17fc86c23 Distinguish another undo event type 2019-06-12 11:08:50 -04:00
Paul Licameli 06c9896498 Send Undo events through the project, not the UndoManager 2019-06-12 11:08:50 -04:00
Paul Licameli f03684db4f New class ProjectHistory split from ProjectManager for undo, etc...
... And yet fewer inclusions of Projectmanager.h, though it's still not yet
free of cycles
2019-06-09 12:10:48 -04:00
Paul Licameli 66a0a93e17 Fix crash opening History...
... This should have been done with commit 4abc71c

But the C style pointer casting (bad practice!) left the mistake compilable.

I reviewed all other casts to wxWindow* in the source and this was the only
bad one.
2019-06-08 10:17:30 -04:00
Paul Licameli fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00
Paul Licameli 4274d44ab7 New attached structure ProjectManager handles project lifetime...
... that is, a factory function, open, close, import, undo/redo/rollback.

Also the callbacks from AudioIO, which need to invoke undo history push when
recording stops.

It is meant as a high-level class using several of the other things attached
to the project, while AudacityProject will be a low level class acting mostly
as just the container of the attached structures.
2019-06-03 01:18:12 -04:00
Paul Licameli ea0ee7fc0b Fix inability to close the History window 2019-05-27 09:11:52 -04:00
Paul Licameli 338d7cd164 A class encapsulating the global clipboard 2019-05-17 06:47:53 -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 3e5bfa0c12 Make sure HistoryWindow does space usage update if hidden then shown again 2019-05-16 12:30:27 -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 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 5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli ad8fafa6a0 History window listens for events 2018-10-27 12:52:06 -04:00
Paul Licameli 2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli e6e8e3251c Rewrite more Connect() with Bind(), which were type incorrect...
... though harmlessly so.  They called to nonstatic member functions of classes
with improper this pointers; though the functions did not use this.

Bind events to nonmember funtions instead.  Sometimes just to empty lambdas to
consume the event and ignore it, blocking other handlers.
2018-02-21 19:28:12 -05:00
Paul Licameli bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli 714d53e00f Big1822: Discard button of History window should remain disabled...
... during recording, even though Undo history might lengthen, such as for
Ctrl+M (or Command+.) to drop a label, or moving of a Pan or Gain slider.
2018-01-14 19:03:47 -05:00
Paul Licameli 80a958f8a4 Rewrite empty prompts to ShuttleGUI functions as {} ...
... so we might more easily redefine the type of the function argument,
some other day (not this release)
2018-01-01 22:51:25 -05:00
Gale Andrews c4484a44ef Rename Size as 'Reclaimable Space" for now
Better than being misleading, until we revisit the History window.
2017-04-14 06:59:33 +01:00
Paul Licameli 5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
Gale Andrews d00df6acb2 Make dialog title same as menu item, as agreed 2016-11-11 17:46:09 +00:00
Paul Licameli 93c0b5a92d Add button to History dialog to clear the clipboard & space calc 2016-11-07 11:25:27 -05:00
Paul Licameli 14c23803ac Various uses of make_unique 2016-08-10 11:05:52 -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 73ced7b93f Remove UndoManager.h from other headers 2016-02-24 19:10:34 -05:00
Paul Licameli 3f237daddc Use macro safenew for many allocations of wxWindow subclasses 2016-02-14 20:20:19 -05:00
Steve Daulton 1878a0ddd0 Fix for bug 1148 2015-08-24 00:37:41 +01:00
Leland Lucius 1e195ecea6 Fix many wx3.1.0 assertions now to prevent double testing 2015-07-30 02:05:23 -05:00
Steve Daulton 0d86cd1fd5 Fix: Update History window after deleting levels.
ToDo: fix capitalization of textbox labels.
2015-06-16 01:42:42 +01:00
Leland Lucius 4b9d81f228 Fix for bug #992 and add total space used to History 2015-05-30 15:56:46 -05:00
David Bailes 66084b65ef Changes to a number of dialogs so that the nvda screen reader can read their titles. The accessibility name of the dialog is set to the title of the dialog. 2015-05-16 09:35:21 +01:00
Leland Lucius 2457579091 Bug 765 - Delays using Edit commands and Draw Tool in long projects
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by

(a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits.
(b) in size calculation, using sizes that are cached rather than going to disk to find the sizes.
(c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter.

Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
2015-04-07 12:20:50 +01:00