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

57 Commits

Author SHA1 Message Date
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
james.k.crook@gmail.com
2cab0679a5 Always apply commands to the active project. (introduced for the eutychus plugin, see discussion on audacity-devel) 2013-12-16 21:24:21 +00:00
lllucius
03f5088b6a Bug 406 - Label creation/other non-dialogue editing and keyboard selection hang on long projects
This is part 1...

Provides some relief to the selection "hang"

This patch adds the ability for the keyboard based commands (like cursor left,
extend selection right, etc.) to know when the key has been released.

When the patch is applied the current state is saved only when the key is
released and not every time it repeats.

Here's an example of the difference it makes.

This video show the selection "hang", but also watch the CPU usage.  All I'm
doing is pressing SHIFT+RIGHT ARROW.

http://youtu.be/tdMntDwGSkM

This one is the same thing bug with the patch applied.  Notice that the
selection "hang" no longer occurs and look at the CPU usage!

http://youtu.be/EpXNsQ4Cky0
2013-10-23 18:01:14 +00:00
lllucius
8cb1681e47 Fixes crash on Linux that surfaced as a result of r12493. But, this prompted
research into why that code had been ifdef'd in the first place and allowed
the root cause to be identified.

Now the menus are cleaned up properly, which also fixes bug #458 without
having the workaround in r12639.

Basically, the problem was that attempts were being made to manipulate
menuitems on a menu that no longer existed (after the menus were rebuilt).
2013-10-07 08:36:07 +00:00
lllucius
856c51e6a6 Okay, let's try this again. Now there's only a type of external index...none of
this "use aline index here and a node index here" stupidity.
2013-10-02 08:17:16 +00:00
lllucius
b0e65b57c2 Adding EXPERIMENTAL_KEY_VIEW that provides a new keyboard binding view. 2013-10-01 06:00:13 +00:00
james.k.crook@gmail.com
e8ee6393b8 Fix upper bound on plug-ins count. 2013-09-27 20:30:07 +00:00
lllucius
ec8e203676 One possible idea for improving shortcuts list. This is NOT final.
Just want to get opinions.
2013-09-26 08:18:37 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
james.k.crook@gmail.com
db56cbd363 Simplified Audacity (using ! prefix) now works for effects and analyse items too. 2013-09-22 11:48:29 +00:00
james.k.crook@gmail.com
29ee0f544a Removed recently commented out code. Added a comment. 2013-08-25 22:21:32 +00:00
james.k.crook@gmail.com
dba81b3f1c Cleanup: Fixed lots of trivial MSVC warnings. 2013-08-25 21:51:26 +00:00
james.k.crook@gmail.com
969122a985 Possible fix for Linux ASSERT (debug builds) with lots of duplicate key bindings. Also fixed some unused parameter warnings. 2013-08-25 12:54:24 +00:00
james.k.crook@gmail.com
ccec954f06 Bugfix for Bug 530 - Export and Import of XML file now handle the lists too. 2013-08-20 21:53:18 +00:00
v.audacity
b8128af0c5 Gale suggested showing current key shortcuts for toolbar controls tooltips. This implements it for ControlToolBar (aka Transport toolbar).
One tricky aspect was that until GetActiveProject() is ready to return non-NULL,  ControlToolBar::RegenerateToolsTooltips() cannot get the project's CommandManager, so cannot get the shortcuts. Changed ControlToolBar::RegenerateToolsTooltips() to be public and now call it late in wAudacityProject(). When called before the project is completely instantiated, in the rewritten ControlToolBar::RegenerateToolsTooltips(), it just sets the tooltips to the names without the keys, pretty much as now -- but I don't think users will ever see that because of the subsequent call. 

Anyway, did it in a more programmatic way than the previous code, which reduces string literals duplication.

Btw, I changed the start value for the ID_PLAY_BUTTON because the former value of 0 causes FindWindow() to return the toolbar rather than the button -- wxWidgets bug. 

Also got rid of some cruft and applied a few WXUNUSED.
2013-07-23 22:07:56 +00:00
v.audacity
ebb4f530bb Apparently, wxConfigBase::Write() does not update values for next access on all platforms unless Flush() method is called. Added many calls to wxConfigBase::Flush() to make sure the Rad() calls get the right values. 2012-08-02 06:03:19 +00:00
james.k.crook@gmail.com
bd670df287 Actually check in the change to fix Bug 517 (intended in r11795). Added comment for code fixing Bug 523. 2012-06-19 13:16:22 +00:00
james.k.crook@gmail.com
4656913708 Fix Bug 523: Names in prefs rather than numbers, so should be immune to renumbering bug. Fix Bug 517: Properly enable feature for Linux and Mac (changes were intended to be windows only, but some slipped through). 2012-06-18 13:19:57 +00:00
v.audacity
08b68fd96a Use American spelling conventions in GUI, per policy and convention. 2012-04-25 22:44:00 +00:00
james.k.crook@gmail.com
5125ee20d3 Removed extra prefix CommandManager:: which is OK in MSVC but not gcc. 2012-03-30 14:55:16 +00:00
james.k.crook@gmail.com
d1afc6e8c5 Hotkeys for effects. (uses numbers for effect names) 2012-03-29 20:31:49 +00:00
v.audacity
7bdac9233b Undo incorrect change made in r10469, to CommandManager::InsertItem(). This may fix a problem in commands, as it restores stripping all accelerator characters and mnemonics from the given text. 2012-02-08 00:40:34 +00:00
james.k.crook@gmail.com
1425847c2f Fixed external linkage (DLL_API) for CommandManager so that menus become visible externally. 2011-04-24 17:03:13 +00:00