1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-13 15:17:42 +02:00

519 Commits

Author SHA1 Message Date
Paul Licameli
4ef8da8f16 Revert "Preliminaries to support better interaction of undo and recording"
This reverts commit 6e75ae58ac56d9c94af5a4ce97951f627808473a, reversing
changes made to 714d53e00f803643131bb775858ac930b39dd5b8.
2018-01-14 21:36:33 -05:00
Paul Licameli
ce5a67a9e9 Iterate over the pending tracks for drawing 2018-01-14 19:04:03 -05:00
Paul Licameli
4ccb695c61 Disable Undo and Redo while there are pending changes in TrackList...
... But perhaps we are developing the means to relax even this ban safely.

For instance, why not undo a mistaken AddLabelPlaying command (Ctrl+M) without
stopping the recording?
2018-01-14 19:03:59 -05:00
Paul Licameli
bd2c7e6abc Define TrackId to identify tracks across undo states 2018-01-14 19:03:54 -05:00
Paul Licameli
0265b8792d More stl idiom for TrackList and its iterators 2018-01-14 16:58:19 -05:00
Paul Licameli
8e0cffb7f2 Simplify GuardedCall and default its return type to void 2018-01-13 01:32:41 -05:00
Paul Licameli
c975de8c5e More use of shared_ptr to Track, for safety...
... This even makes it possible to remove the prohibition of undo and redo
during transport, not that we want to though.  Playback and recording will
continue, using track objects that might not be in the current project.
2018-01-10 20:05:11 -05:00
James Crook
0cc9c6bc3b Zoom Toggle
Added preferences for Zoom-Toggle and put into menus.
New helper functions for determining zoom scaling.

Optional EXPERIMENTAL_ZOOM_TOGGLE_BUTTON added, and Light theme updated.
Not enabled for 2.2.2.
2018-01-07 17:14:33 +00: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
1f7b62f056 AudacityProject::RebuildAllMenuBars is static 2018-01-05 09:19:07 -05:00
Paul Licameli
def1d52505 Substitute, don't concatenate, when composing localized strings...
... Avoid English syntax bias.
2018-01-04 04:30:46 -05:00
Paul Licameli
17b6ca387e Install plug-in by file icon context menu or drop on program icon...
... no longer by drop onto open program window
2018-01-03 03:26:50 -05:00
Paul Licameli
0ec42f3dd2 Fix some English grammar biases...
... Avoid small out-of-context words and phrases in translation catalog that
are then substituted into larger translated phrases with blanks.

(What if my language has declensions?  How do I know the right form to use
for the phrases?)

Instead, give the translators larger in-context phrases to work with, even if
that requires replications of phrases with small variations.
2018-01-02 22:15:33 -05:00
Paul Licameli
e0970ad1e8 Remove unnecesary Format, Printf, casts to wxString 2018-01-01 21:53:51 -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
384300016d Define FileDialogWrapper, with localized default prompt and name 2018-01-01 17:50:04 -05:00
Paul Licameli
e8b875ff81 Define AudacityMessageDialog wrapper around wxMessageDialog...
... Prohibiting use of the default caption which is unlocalized.  (But we
didn't use it in fact anywhere.)
2018-01-01 17:50:03 -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
Paul Licameli
2c2db0fe09 Implement drag-and-drop of Nyquist, LADSPA, VST plug-ins...
... I'm not sure how to make it work for AudioUnits, LV2, or Vamp, for which
the API for identifying a plug-in doesn't map straightforwardly to a file name.
2017-12-31 18:09:41 -05:00
James Crook
52e9763337 Fix multiple bugs in IsGoodInt and IsGoodInt64
Alerted to this buggy code by Darrell Walisser's comment:
"Whoops, the range on the 64-bit signed integer check is incorrect."

After these fixes,  I saw that IsGoodInt was being used to test a dotted
version number, so I commented out that (bogus) test which was previously
always succeeding.

The IsGood{num} functions did no range checking if the numbers were shorter
than the max value.  Then, if the number was similar in length, the first digit could
be an invalid character and the code also previously accepted all 9's followed by 1.

My new code would benefit from code review and unit tests.
2017-12-29 20:15:29 +00:00
James Crook
db45280695 Add names to some windows.
This is mainly for automation, so that when exploring the windows we have a name for
each.
2017-12-22 14:03:32 +00:00
James Crook
4da9e41e03 Bug 1799 - Un-muting with a single track unnecessarily activates the Solo button 2017-12-17 16:49:35 +00:00
Paul Licameli
4d978bcefb Use wxPrintf not printf 2017-12-16 11:54:32 -05:00
James Crook
f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
Paul Licameli
d8c3a59bd6 Zoom to fit (as in 2.1.3) after File > Open (Recent), audio/MIDI file 2017-11-04 21:00:55 -04:00
Paul Licameli
58f07d2021 Flush .aup before writing .au; no redundant out-of-space messages 2017-10-25 15:06:35 -04:00
Paul Licameli
985457e992 Rearrange steps in saving project so .aup is cleaned up on failure 2017-10-25 15:06:23 -04:00
Paul Licameli
c874519522 When saving compressed fails, clean up partial results 2017-10-25 15:06:23 -04:00
Paul Licameli
c613a0bd40 revert last three 2017-10-24 04:32:46 -04:00
Paul Licameli
c02bf91689 Rearrange steps in saving project so .aup is cleaned up on failure 2017-10-24 04:24:41 -04:00
Paul Licameli
874d8da025 When saving compressed fails, clean up partial results 2017-10-24 04:24:41 -04:00
Paul Licameli
b49e467412 Bug1756: reinstate status for disk capacity during recording 2017-10-16 21:22:19 -04:00
Paul Licameli
1960762308 Fix a null dereference found by Pvs-studio...
... I think the other examples flagged by it are provably redundant
null-checks after uses of pointers, not really bugs
2017-10-12 11:31:08 -04:00
Paul Licameli
42f8945812 Fix statically allocated message string in _() (didn't translate!) 2017-09-10 19:21:35 -04:00
Paul Licameli
88c55c9687 remove a comment 2017-08-22 08:40:28 -04:00
James Crook
ab9bb2ae29 Bug 1532 - Toolbars fail to arrange correctly when maximizing or restoring main window size
Layout() needs to be done before and after toolbar packing.  See reasons in comments in revised code.
2017-08-17 20:44:49 +01:00
Paul Licameli
95560ad510 Bug1676, more: don't bother caching the first visible track...
... because the sequence of update of the cache and the use of it were wrong
on Linux, resulting in wrong display when dragging tracks.  Finding the
first visible track is too cheap to justify this memoizing of it.

Commit 8eb64f5f71d19a4c634cb8312fd1fa93ac75f17f was not sufficient to fix
the bug, but I think remains necessary.

It feels good to throw away this needless complication.
2017-08-07 18:51:06 -04:00
James Crook
eee58d9449 Bug 1292 - Enh: Zoom Normal (Ctrl+2) may move selection off screen
Selection is now centred after any zoom, if it will fit on screen.
2017-08-05 17:46:52 +01:00
Paul Licameli
a5594537bb "/DefaultOpenPath" is now in only one place 2017-08-03 08:05:22 -04:00
Paul Licameli
e3efc98a55 Remove the last defaulting to cwd 2017-08-03 08:05:22 -04:00
Paul Licameli
5d48e96942 Where FileSelector was used, default to Documents not cwd; save prefs 2017-08-03 08:02:33 -04:00
Paul Licameli
a9d4c2c05b Defaulting of file paths to Documents is defined in just one place 2017-08-03 08:02:19 -04:00
Paul Licameli
3e39771c53 MIDI imports, like other imports, are put into recent files list 2017-08-02 11:19:27 -04:00
Paul Licameli
fa42d4f661 Some null checks, might be needed when project is closing 2017-07-25 18:00:38 -04:00
Paul Licameli
2f178db700 Revert "Bug 1432 another case..." It's not safe for Windows...
... It made it possible to get into a state where some of the toolbars
stopped responding.

This reverts commit 67b858ed3ff1c6c84fdb1b505e6ccb882471d6f6.
2017-07-23 17:32:01 -04:00
Paul Licameli
67b858ed3f Bug 1432 another case...
...Mac, drag toolbar with the focus on or off dock, won't lose focus.

You still lose focus when dragging another bar to undocked.
2017-07-23 15:48:50 -04:00
Paul Licameli
503f3548a1 Bug1432 partial, keep correct focus in more cases, not all...
Works by using the newer and better logic of ToolManager for remembering which
window to focus.

It seems, at least on Windows, that when the toolbar with the focused control
is docked after the end of a docking (of itself or another bar), then focus
remains.

If the bar with the focus is undocked and another bar docks or undocks, focus
is still lost.
2017-07-23 14:57:19 -04:00
Paul Licameli
f0de38dec1 Scanned for bad naked new; found none; changed comments, used safenew 2017-07-23 09:35:01 -04:00
Paul Licameli
e61e60ad25 Update TrackPanel cursor for unmoving mouse, changing display...
... This fix might not be exhaust the possibilities.  Some examples covered:

When an undo state is pushed.  For instance:  Hover over bottom of sole track
for resize cursor, then Shift+C to delete it.  (Cursor change used to happen
at Shift key up, now sooner.  Maybe your shortcut does not include Shift.)

When an undo state is modified without a push.  For instance:  hover over right
edge of selection.  Hit Shift+Ctrl+A to remove the selection.  (Again, change
cursor before keys up, and even if no modifiers in the shortcut.)

When scrollbars change for any reason, such as pinned play or Shift+scrollwheel.
(Clip boundaries may pass your mouse.  Cursor change and also snap lines come
and go.)
2017-07-21 10:09:44 -04:00
Paul Licameli
69d6f36ef6 Bug1696: Drag-and-drop should import Midi file as a Note track 2017-07-20 13:34:21 -04:00