1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-24 08:28:04 +02:00

179 Commits

Author SHA1 Message Date
Paul Licameli
9c483e2e86 Add (redundant) #include "Experimental.h" in all .cpp files using the symbols 2015-08-31 17:56:10 -04:00
Paul Licameli
ca9928d533 Add missing critical inclusions of Experimental.h to other headers 2015-08-31 17:21:50 -04:00
David Bailes
e8a07c61e2 Fix for problem with the handling of default keystrokes.
In the class CommandListEntry, the default key was being set to an empty string, rather than the correct key.
This resulted in bugs such as: pressing default in keyboard preferences clearing all the shortcuts, entries
being created in audacity.cfg for all commands with keystrokes, and ending up with commands with the same shortcut.
2015-08-26 11:44:50 +01:00
Leland Lucius
d8be1ea3e0 Allow Unicode characters to be used in accelerators 2015-08-24 09:33:54 -05:00
Leland Lucius
7757297d82 Fix OSX special menu items (About, Preferences, Quit)
And convert a few more command manager arguments to const
2015-08-16 06:18:41 -05:00
Leland Lucius
b2b23f1250 Hopefully the last round of keyboard handling changes 2015-08-15 21:52:30 -05:00
Leland Lucius
8504603e8a Should fix keyboard problem on Linux...
...where accelerators were still being recognized when entering
a track name or rate.
2015-08-14 18:40:56 -05:00
Leland Lucius
1b2923e8f4 One more try to get this darn keyboard handling right 2015-08-14 16:37:37 -05:00
Leland Lucius
fdd725fc68 Fit double execution of meta commands 2015-08-13 23:24:58 -05:00
Leland Lucius
e119ffcd78 Do NOT generate keyup, use the system one
David has been trying to beat it into my thick skull that the
command manager should use the system created key up event rather
than generating it, but I just wasn't getting it.

Actually, the documentation for the OSX method I needed to use
to get at the key event before the menus did said that a key up
event couldn't be captured on 10.6 (the oldest we support).  But,
testing showed that it can be, so I was able to do what David was
suggesting.
2015-08-12 18:05:50 -05:00
Leland Lucius
15b4cf2bfa Fix excessive cursor movement 2015-08-11 12:17:25 -05:00
Leland Lucius
04d026e5bc Further fixes for keyboard handling
I'm pretty sure this gets all of the currently known issues, including
the SHIFT+M not working, the Play buttons responding to SHIFT and CTRL,
the ESC key canceling drags, and I'm pretty sure it even fixes
but #784.
2015-08-10 13:15:15 -05:00
Leland Lucius
59b4c9d64b Fix for bug #1126 2015-08-09 23:49:57 -05:00
Leland Lucius
f08c5245f6 Fix bug #1114 2015-08-09 18:49:23 -05:00
Leland Lucius
2a0f9da32d Fix keyboard handling in Lyrics and MixerBoard windows
Apparently, this hasn't worked for a while.  At least back to 2.0.6
anyway.
2015-08-09 18:23:32 -05:00
Leland Lucius
f36fe29f96 Fixes for bugs 1122 and 1113
Several other issues were also fixed (hopefully ;-)).

This is a major change to accelerator handling and keyboard
capturing.  Menu shortcuts, non-menu commands, label editing,
navigation, and basically anything else were you might use
the keyboard should be thoroughly tested.
2015-08-08 00:01:24 -05:00
Leland Lucius
4cd7757cf4 Batting 1000 tonight...make sure navigation works on Windows. 2015-08-04 22:41:52 -05:00
Leland Lucius
1e195ecea6 Fix many wx3.1.0 assertions now to prevent double testing 2015-07-30 02:05:23 -05:00
Leland Lucius
37168ebbf6 Merge remote-tracking branch 'upstream/master' into wx3 2015-07-28 15:06:25 -05:00
Leland Lucius
5bdfcff97d Menu shortcut hiding has been removed
It had been causing problems in Unity for a while now and they
were missing on OSX as well in wx3.  So, the old menu Open/Close
method of hiding has been removed and replaced with an event
filter/monitor which looks for wxEVT_CHAR_HOOK events to pass
key events to the handler that has the keyboard captured.
2015-07-28 14:35:09 -05:00
Paul Licameli
d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli
b89c2a130c Remove Track.h from other headers 2015-07-28 10:02:03 -04:00
Paul Licameli
162418ff07 Fix compilation warnings 2015-06-10 02:04:07 -04:00
David Bailes
a4cc294158 state field in status bar. Previous commit caused linux build to fail. Included a file to hopefully fix. 2015-06-02 15:50:08 +01:00
David Bailes
391bd1691c status bar state field. When you move to the menubar, the state field is no longer cleared. This was achieved by introducing a dummy field of width 0. When you first open a new audacity project, the state is stopped - previously the state only appeared after the first play/pause/etc command. 2015-06-02 15:18:46 +01:00
David Bailes
5c67bc38b3 Add a field to the status bar to show the state of Audacity, eg play/record/play pause. This is useful so that screen readers can easily read audacitys state. 2015-05-29 17:47:43 +01:00
Leland Lucius
0d89483df7 Add missing include 2015-05-16 18:00:24 -05:00
Leland Lucius
cbcc78b183 Fix for bug #887
A little overkill, but low risk since the majority of the source
changed isn't actually used.
2015-05-16 17:57:01 -05:00
Leland Lucius
8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00
david avery
b258146f59 more wx 3.1 changes 2015-04-11 17:56:34 -06:00
lllucius
16ca4f17eb Re-adding localized menu labels for effects
If you can believe it, this whole big mess is
just to get localized effect labels back into
the menus.

I sure wish I'd had a little bit more time to
finish up all of the effects.  It sure would 
be a lot cleaner (code wise).
2014-12-15 21:54:23 +00:00
lllucius@gmail.com
9ff563419c Add workaround for screenshot tools on OSX. 2014-12-15 05:05:48 +00:00
lllucius
2afba65cb6 Fix wx3 Windows build 2014-12-13 18:34:01 +00:00
lllucius
b78f096826 Final fix for bug #40 on Windows
I'm 100% certain I found the cause this time (r13739 was
still needed though).

There's a design flaw in wxMenuBar::RebuildAccelTable() that
will always leave the last accelerator active as they are
removed from the menus.

For the Edit menu, that will be "Move Cursor -> to Track End"
because of the way the submenus are traversed.  And because that
fella happens to have an unmodified character for an accelerator
it can't be used in a label track until another menu is opened
and closed.

The workaround is to nullify the accelerator table when a menu
closes.
2014-12-13 08:38:07 +00:00
lllucius
a3112e5aeb Deleted a little too much in r13739.
New label wasn't being saved.
2014-12-13 00:46:44 +00:00
lllucius
079b4b66aa Fix for bug #40.
Whenever a menu is NOT open, the accelerator keys are
stripped from the menu items so that the O/S doesn't even
know that accelerators are being used (we do it internally).

While this stripping was being down when the menus are set
up, it was NOT being down when the Undo and Redo menu items
were modified to include the "last action".

So, the fix is to strip the accelerator then as well.
2014-12-11 04:05:33 +00:00
lllucius
4b904f5eb2 Got a little delete happy in r13707
Removed a line in AddItem() and InsertItem() that didn't
seem to make sense (especially given the comment).  However,
it caused an issue where the key assignment would persist
for one last time after leaving Preferences.  It would then
act as desired.
2014-12-09 16:12:59 +00:00
lllucius@gmail.com
f18f4857e2 Fix for bug #736
This MUST be tested by everyone on as many platforms as you
have access to...reason:

This removes a very old piece of code (May 10, 2003) in the
command manager that worked around a problem in GTK where
accelerators could not be changed again after the initial
menu setup.

While there is another way to fix this bug, remove this old
code is actually a better way AS LONG AS it doesn't break
anything else.  So far, it's looking like it is no longer
needed.

But, I'll be trying as many combinations of changing shortcuts,
entering/exiting preferences, swapping shortcuts, etc, as
I can on Linux, Windows and OSX.

But, the more ppl trying to break keyboard shortcuts the
better.

In case it helps, here's the comments that Dominic had in the
code:

   // This is a very weird hack.  Under GTK, menu labels are totally
   // linked to accelerators the first time you create a menu item
   // with that label and can't be changed.  This causes all sorts of
   // problems.  As a workaround, we create each menu item with a
   // made-up name (just an ID number string) but with the accelerator
   // we want, then immediately change the label to the correct string.
   // -DMM
2014-12-07 01:06:37 +00:00
lllucius
4b756ce7d6 Give the keyboard user the ability to move among all modeless windows
With realtime preview, the keyboard user will need this to get
back and forth between the effect and the project window.  Actualy,
the "problem" existed before this since the keyboard user couldn't
switch between project and Plot Spectrum windows.

The normal flags-based keyboard handling would not work since it
depends on the state of the project and requires a project window
to have the current focus.

In this new case, a modeless dialog may actually have the focus and
using the "switch window" key combo may happen in nearly any mode, like
while playing.

So, I "created" the concept of "meta" commands...ones that do not have
the restrictions mentioned above.  The should be used sparingly and
you must be careful about what happens within their handlers.
2014-11-26 18:17:38 +00:00
james.k.crook@gmail.com
8a9987a0d9 From: martin@steghoefer.eu [PATCHES 02-15 of 15] Fix runtime problem with wxWidgets 3.0:
Correct string formatting for:
2/15  %d + enum => %d + int
3/15  %lld + int64_t => %lld + long long
4/15  %d + int64_t => %lld + long long
5/15  %d + double => %f + double
6/15  %d + int32_t => %d + int
7/15  %d + intptr_t => %p + void*
8/15  gint, guint
9/15  %d + long => %ld + long
10/15 %n + int => %d + int
11/15 %x + int => %x + unsigned int
12/15 %f + int => %d + int
13/15 %S + wxChar* => %s + wxChar*
14/15 %d + size_t => %d + int
15/15 %d + size_t => %lld + long long

"The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match."

Note (9/15): In TrackPanel.cpp, ExportMP2.cpp and CompareAudioCommand.cpp this patch supersedes related change done in r13466 because the new solution requires fewer casts and therefore simplifies the code.

Note: Many .po files are affected, and we need to be very careful about this.  Incorrect "%d" and similar in translation files may lead to crashes in those languages (only).  This is something we should actually have been more careful about in the past.  We need to write a script to check that the "%d" and similar format specifiers match between English and translation.
2014-11-08 16:42:34 +00:00
lllucius
1eeb4d979a The fabled realtime effects...
I've made it where you can enable and disable via experimentals:

EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK

You will notice that, as of now, the only effects currently set up for
realtime are VSTs.  Now that this is in, I will start converting the
rest.

As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects.  This isolates the effects from changes in Audacity and makes
it much easier to add new ones.

Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too.  There are quite a few VSTs for Linux if
you search for them.

The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me.  I'm not really sure it should
stay in as-is.  I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects.  It should probably
revert back to that idea.

You may notice that this DOES include the API work I did.  The realtime effects
were too tied to it and I didn't want to redo the whole thing.  As I mentioned
elsewhere, the API stuff may or may not be very future proof.

So, let the critter complaints commence.  I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly.  ;-))
2014-10-26 03:24:10 +00:00
lllucius@gmail.com
1b993ccd08 Patch provided by Rob (RPM) to resolve many of the wx3 format string assertions
He wanted to help so I asked if he wanted to track them down.  He agreed and
found more than I probably would have.  And he said there were more, but the
rest were questionable and since he works on Windows, wasn't able to actually
test.

I give a few of the ones he did find a go and they do indeed get rid of the
assertions.

(Basically, a 64-bit/32-bit issue, easily resolved with a typecast.)
2014-10-19 03:08:10 +00:00
james.k.crook@gmail.com
37608c2290 Paul Licameli's Spectral Editing Patch.
This relies on three new nyquist scripts to actually do the editing.  The peak-snapping code in FrequencyWindow has been extracted into a new class, SpectrumAnalyst, to provide peak-snapping in spectrogram too.
2014-10-18 14:19:38 +00:00
james.k.crook@gmail.com
14e0380444 Fixed some warnings. 2014-10-09 22:12:51 +00:00
lllucius
bdcefb4850 Preliminary changes for wxWidgets 3.0.1
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX.  You can get Windows to build, but there's
still some display issues.

These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
2014-10-06 08:10:50 +00:00
james.k.crook@gmail.com
f5e593cc4c Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
This change is believed to be a direct refactoring that does not change functionality.  It paves the way for more complex kinds of selection, such as selections involving frequency as well as time.  It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
2014-10-05 17:10:09 +00:00
windinthew
7a4a5fd9cc Fix typo in code comment. 2014-06-14 11:01:02 +00:00
lllucius
a12818a912 Fix memleak. Not observed, just saw it when browsing the code. 2014-06-10 06:03:51 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
james.k.crook@gmail.com
6fc830c0b6 Added Steve Parry's patch that adds the Open and SaveAs commands to scripting. 2014-01-13 22:12:20 +00:00