Commit Graph

11360 Commits

Author SHA1 Message Date
Leland Lucius 080b746b66 Revert to using a wrapper when starting Audacity
But, this time use a "C" wrapper as posited by Paul in:

   https://bugzilla.audacityteam.org/show_bug.cgi?id=543#c6

Doing so should bypass the execve()/decontruction issue and
still allow entitlements to work.

This also sets the build system to Legacy so that a "clean"
action will not produce:

   error: Could not delete '...' because it was not created by
          the build system.

And, I'm not sure why the deployment target was 10.9, but it
should have been 10.7.
2020-02-02 02:46:53 -06:00
Paul Licameli eb86a1eab7 Fix assertion in OnFullScreen command 2020-02-01 13:00:02 -05:00
Paul Licameli 7f4d61257a Command manager stores checkmark predicates...
... and we use them to simplify (the misnamed) MenuManager::ModifyToolbarMenus.

It looked wrong that statically constructed menu descriptions should ever hold
constant boolean checkmark values, rather than functions to re-eveluate the
checkmark state as needed.
2020-02-01 12:53:55 -05:00
Paul Licameli c3bbdbc50f fix build 2020-02-01 11:44:38 -05:00
Paul Licameli b7a9e55fa9 New toolbar id at the end of the enumeration, to be safe...
... in case toolbar ids persisted anywhere
2020-02-01 11:30:26 -05:00
Paul Licameli 93c5bfd86d Remove inappropriate uses of macro _ from commit 9bce51a 2020-02-01 09:45:15 -05:00
Paul Licameli c96fd0d2be Register preference pages, importers, exporters without sequence nos. 2020-02-01 09:21:39 -05:00
Paul Licameli 5165353dbe Reimplement export plugin registation without sequence numbers 2020-02-01 08:56:05 -05:00
Paul Licameli b1b8b034c8 Reimplement import plugin registation without sequence numbers 2020-02-01 08:39:52 -05:00
Paul Licameli a333b7d35a Redefine PrefsPanel::Registration with new Registry system...
... preserving the existing ordering of pages with a combination of
preferences and ordering hints
2020-02-01 07:13:03 -05:00
Paul Licameli 2ee8a6440a Initialize ordering preference for Preference dialog pages 2020-02-01 07:13:03 -05:00
Paul Licameli 1664463444 Define registry item class and visitor for Preference pages 2020-02-01 07:13:03 -05:00
Paul Licameli a729dfec3b Reusable preference-populating code for other registries than Menus 2020-02-01 07:11:38 -05:00
Paul Licameli 98e6a0e339 More fixes for visitation of registry 2020-02-01 04:22:27 -05:00
Paul Licameli 4d43967add Restore commit c1d129ec98 2020-01-31 23:51:12 -05:00
Paul Licameli 229e2673c7 Fix errors in d233cbd 2020-01-31 23:47:42 -05:00
Paul Licameli 2c25a37994 Revert to a465ce0046 2020-01-31 22:34:25 -05:00
Paul Licameli c1d129ec98 Use menu item registration system to sever many link dependencies...
... Many of these dependencies were hidden ones, not reflected in the diagrams
generated by scripts/graph.pl, because they relied on extern declarations and so
not indicated in header files.
2020-01-31 21:23:38 -05:00
Paul Licameli 1061c98b9f ViewMenus not link dependent on ToolbarMenus 2020-01-31 21:22:47 -05:00
Paul Licameli ffe101f9a2 TransportMenus not link dependent on SelectMenus or Scrubbing 2020-01-31 21:22:47 -05:00
Paul Licameli 09356f7fe7 EditMenus not link dependent on LabelMenus 2020-01-31 21:22:47 -05:00
Paul Licameli 02c5557054 Remove link dependencies on ClipMenus.cpp, register its menu items 2020-01-31 21:22:47 -05:00
Paul Licameli 6225043ff3 ExtraMenus.cpp not link dependent on external sub-menu definitions...
... They use the registry
2020-01-31 21:22:44 -05:00
Paul Licameli a465ce0046 Naming of many menu sections, so they can be attachment sites 2020-01-31 21:12:36 -05:00
Paul Licameli de08d9ff86 Menus.cpp no longer link dependent on top level menu definitions...
... They all use the registry.

(This link dependency was not shown in diagrams generated by scripts/graph.pl,
because it was not reflected in Menus.h but was done using extern declarations
within Menus.cpp.  That was a cheat, but it let all the other dependencies
be exposed in the graph and mitigated first.)
2020-01-31 21:12:36 -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 d233cbd881 Improvements and comments in visitation and merging of registry items 2020-01-31 21:11:58 -05:00
Leland Lucius 6da68f2035 Remove obsolete config*.h files
These are ancient and "configunix.h" was being pulled in
via Types.h.  Nothing major, but they were generated for
a 32-bit system and "may" cause problems when used on
64-bit systems.

(That's unlikely though since they haven't all this time.)
2020-01-31 09:29:15 -06:00
David Bailes 46a6d21585 Bug 2299 - Keyboard preferences: names of commands contain &
Caused by this commit: 0021a98091 : Remove another unnecessary stripping of accelerators from labels

Unfortunately, the stripping was necessary.

Fix:
Reinstate stripping.

Derives from tag: Audacity-2.3.3 + 94 commits
2020-01-31 15:11:18 +00:00
Binary Wisdom 9bce51a60e Bug 624: Keyboard Prefs: importing XML file can cause duplicated bindings
The fix follows the agreed behavior (see emails from around October 25) . For the sake of convenience see the agreed behavior below:

_"- first, check the xml-file. If it contains illegal shortcut duplicates, refuse importing. Shortcut duplicates are LEGAL if default settings also have those operations with the matching shortcuts. A refusal to import shortcuts must happen with the message that warns the user of a failure and explains the reason.

if the xml-file looks ok, import the shortcuts. As discussed before, because different versions of Audacity might have different sets of operations with shortcuts, it is still possible to end up with illegal shortcut duplicates for a perfectly correct xml-file. This situation must be monitored. In case of any conflicts, the shortcut from the xml-file is used, and the pre-existing shortcut is wiped clean.
When telling the user the commands which have had their shortcut removed, I think it would be useful to tell the user the name of the command, the shortcut, and and name of the command which still has that shortcut."_

I didn't find a clean way to intercept the imported content before it makes its way to the shortcut preferences, so I had to jump through some hoops right in KeyConfigPrefs::OnImport().
In general, I tried to keep changes minimal.
2020-01-31 11:32:23 +00:00
Paul Licameli f949a05952 Registration of plugin menu items; redo null & Nyquist modules...
... without ugly fragile hacks making assumptions about number and sequence of
other menu items.  Instead, specify where new items go with textual paths.
2020-01-30 15:16:28 -05:00
Paul Licameli 56cd24a062 Rewrite insertion of menu items by null and Nyquist modules...
... using the new registration system, and without the fragile hacks making
assumptions about the positions of menus within the menu bar.
2020-01-30 15:09:30 -05:00
Paul Licameli baada94567 Define AttachedItem registration struct for menu items 2020-01-30 15:04:08 -05:00
Paul Licameli c5495b3300 Ordering hints for insertion of newly discovered registry items...
... Now, a first-time registered item can specify that it go at the start or end
of the nodes under its parent, or before or after some named node.

Still it might happen that multiple first-time registrations might use the same
ordering hint, and so we must still sort by component name to resolve that
collision arbitrarily.
2020-01-30 14:46:35 -05:00
Paul Licameli 564a3ac708 Define the registry merging procedure...
... before we populate the registry.

This could apply to menu items, or more generally to other registries.

A registry is a tree of items identified by path names. Various code,
that need not coordinate, can specify items to attach to the tree, and the
merging procedure collects them into a single tree that can be visited.

Pathnames imply only an unordered tree.  Some visitation ordering must be
imposed on the nodes, and can be remembered in preferences for stability between
runs, independently of accidents of the unspecified sequence of initialization
of file-scope static objects in the various plug-ins.  It can be arbitrary --
not constrained to some fixed intrinsic criterion like alphabetical order.

Merging consults the preferences, and also updates them if previously unknown
items are found and inserted.  For now, such unknowns just go to the end of
the sequence of siblings, sorted by their path component names.
2020-01-30 14:18:26 -05:00
Paul Licameli 9d7f151cf6 No more Seperator items in menu descriptions...
... Instead, new grouping items describe the menu sub-sections, and names might
be attached to them, though not yet.
2020-01-30 12:15:05 -05:00
Paul Licameli 6b551d10c5 Fix indentations 2020-01-30 12:14:22 -05:00
Paul Licameli a84da3dee1 Remove Separator items from menu descriptions; use Section(...) 2020-01-30 12:12:48 -05:00
Paul Licameli c7fac7ae09 Use class MenuSection in visitors 2020-01-30 11:50:48 -05:00
Paul Licameli d84c994088 Redefine return type of MenuTable::Items 2020-01-30 09:06:20 -05:00
Paul Licameli 9639ba84f4 Reimplement commit 512c27d, fixing menus & shortcut keys on Windows 2020-01-29 13:39:19 -05:00
Paul Licameli ff2d20f335 Fix identifier string for new experimental command 2020-01-29 12:23:43 -05:00
Paul Licameli ef41b8f2ee Fix static initialization order problem for more ReservedCommandFlags 2020-01-29 11:24:25 -05:00
Leland Lucius 25afa10bc4 Adding "autogen" to reduce false failures 2020-01-28 19:27:37 -06:00
Paul Licameli 873d067e74 CommonCommandFlags does not depend on LabelTrack 2020-01-28 17:49:28 -05:00
Paul Licameli 9093364b8c Fix other problems since commit f6e5696...
... Problem with static initialization order of ReservedCommandFlags, caused
wrong enablement of menu items (at least on Mac), such as Plot Spectrum or
Contrast enabled when there was no selection
2020-01-28 17:49:07 -05:00
Paul Licameli 3c9cd7925a Fix crash on Linux startup since commit f6e5696 2020-01-28 17:39:40 -05:00
Paul Licameli c44f2cf755 Improve registry visitation procedure so it doesn't require a project...
... though the specific visitations for Menu items (the only ones that exist
now) still do require a project, to construct the visitor.
2020-01-26 17:31:06 -05:00
Paul Licameli 103a6050a0 Registry::Visit doesn't require an AudacityProject 2020-01-26 16:22:49 -05:00
Paul Licameli c7bfa7a2a6 Parametrize ComputedItem::Factory by the type of argument it expects 2020-01-26 16:22:02 -05:00