Commit Graph

74 Commits

Author SHA1 Message Date
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Gale Andrews
ed503c35e5 Address issue posted on Wiki Wording page 2016-10-27 06:23:05 +01:00
Paul Licameli
09a3854256 Use unique_ptr more properly in the fix for building mod-nyq-bench 2016-10-02 09:46:48 -04:00
Leland Lucius
2ab0c13101 Fix build of Nyquist Workbench 2016-10-01 14:05:53 -05:00
Paul Licameli
b6241c46d3 Remove a few more naked new in CommandManager.cpp 2016-08-13 10:37:52 -04:00
Paul Licameli
81228eac0e Improve the fix for the Ctrl+F6 cycle 2016-06-30 11:00:56 -04:00
Paul Licameli
e9cf0a8335 Bug1252: Ctrl-f6 cycle works on Mac even when combo has focus 2016-06-23 10:35:45 -04:00
Paul Licameli
03ec020085 Revert "Help for debugging of some event handling"
This reverts commit 9bfd66b06c.
2016-05-11 13:46:32 -04:00
Paul Licameli
9bfd66b06c Help for debugging of some event handling 2016-05-11 13:25:00 -04:00
Paul Licameli
0d9d8a057d Revert "Disable scrubbing when pause button is down."
This reverts commit 97fdce5f85.
2016-05-06 11:32:56 -04:00
Paul Licameli
97fdce5f85 Disable scrubbing when pause button is down. 2016-05-05 22:48:23 -04:00
Paul Licameli
014d5ab93c Type safety in the use of command flags, and make enum wide, allowing more bits 2016-05-05 20:02:13 -04:00
Paul Licameli
de75a00c10 Define movable_ptr and make_movable, use __AUDACITY_OLD_STD__ in fewer places 2016-03-25 20:27:25 -04:00
Leland Lucius
9dc9348127 Fixes bug #1344 (mac build)
In addition, the Xcode project can now build against the 10.6
or 10.7 SDKs.  All that is needed is to change the SDK version
and the other settings will change automatically.
2016-03-07 00:29:26 -06:00
Paul Licameli
60bcd7aea2 Fix warnings for unused variables and functions 2016-02-26 14:56:26 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
923a6ce4af Sweep unnecessary wxString copies: commands 2016-02-23 01:40:21 -05:00
Paul Licameli
cf3daebff6 Reviewed allocations of wxMenuBar items. 2016-02-20 20:23:54 -05:00
Paul Licameli
00db530c9b Don't eliminate indirection for CommandListEntry. Explain why. Use unique_ptr 2016-02-19 10:49:50 -05:00
Paul Licameli
d9c2ff6dc2 fix compilation 2016-02-19 01:39:44 -05:00
Paul Licameli
e0c88b1e53 Remove needless indirection for more little structures, in CommandManager...
... Also use std::shared_ptr for functors to simplify resource management
2016-02-18 20:19:27 -05:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli
56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli
12a2d066ba Bug1306: Kestroke shortcuts for sub-menu entries now work again...
... for instance, Align sub-menu of Tracks.
2016-01-27 16:10:46 -05:00
Paul Licameli
9c483e2e86 Add (redundant) #include "Experimental.h" in all .cpp files using the symbols 2015-08-31 17:56:10 -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
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
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
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
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