1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-20 14:20:06 +02:00

808 Commits

Author SHA1 Message Date
Paul Licameli
474f80912a Some functions can be static, don't need to be members of MenuBuilder 2018-10-20 09:21:22 -04:00
James Crook
e8762a478f Add 'Quick Fix' menu item to Help.
This helps with 3 of the stuck-in-a-mode problems, adding fix buttons for the issues.
2018-10-19 18:31:44 +01:00
Paul Licameli
52672ed5e2 More careful sorting of effects...
... when grouping by two criteria (publisher and name or type and name).

Use a stable sort for the second sort so that the minor sort (done first) is
sure not to be destoyed.

Maybe this never mattered (depending on the implementation of std::sort and
its threshold for doing small sorts by insertion).
2018-10-19 11:12:20 -04:00
David Bailes
c067ad5b37 Apply macro sub menu: ensure first letter selection
Problem: Palette has the access key P, so any macro with name beginning with P cannot be selected by pressing P, since access keys have precedence over first letters.

Fix: remove access key, which is not needed since Palette is the first item, and so is selected when the sub menu is opened.
2018-10-19 15:50:13 +01:00
David Bailes
ac596554c4 Fix a couple of duplicate access keys 2018-10-19 09:27:17 +01:00
Paul Licameli
9ad88e091c Use weak pointers to simplify MenuCreator 2018-10-18 15:43:21 -04:00
Paul Licameli
16ab48079b Don't include CommandManager.h in other headers 2018-10-18 09:25:14 -04:00
Paul Licameli
fc1bc7994e Remove CommandManager::SetDefaultFlags and related 2018-10-17 23:14:55 -04:00
Paul Licameli
63f20f3405 CommandManager::AddItemList requires flags 2018-10-17 23:13:56 -04:00
Paul Licameli
742e578d49 Flags in AddItem (and AddCommand) may not be NoFlagsSpecified 2018-10-17 23:13:56 -04:00
Paul Licameli
db997f8ecd Flags argument of AddItem (and AddCommand) is obligatory 2018-10-17 23:13:56 -04:00
Paul Licameli
f6478acb1c Just spaces 2018-10-17 14:14:21 -04:00
Paul Licameli
596eefe675 CommandManager::Options also specified the long name 2018-10-17 13:49:43 -04:00
Paul Licameli
cfe7ddcf55 struct CommandManager::Options lets us fold AddCheck into AddItem 2018-10-17 13:32:39 -04:00
Paul Licameli
de4132d66c Reorder accel argument and unify two overloads of AddItem 2018-10-17 13:32:36 -04:00
Paul Licameli
c376ffb165 Simplify calls to SetDefaultFlags: default mask to equal flags 2018-10-17 13:21:00 -04:00
Paul Licameli
42aef9f3e8 Mask != flags is unusual: simplify most AddItem/AddCheck...
... and the no longer used AddCommand.

There are only four exceptions, all using NoAutoSelect in the flags and not in
the mask.
2018-10-17 13:20:58 -04:00
Paul Licameli
80437582d8 Change comments that confused audacity.pot hints 2018-10-17 12:53:25 -04:00
Paul Licameli
399e2d099d Fix spelling in an enum constant name 2018-10-17 12:53:25 -04:00
Paul Licameli
fef9e2abac Remove some unused things 2018-10-17 12:53:25 -04:00
Paul Licameli
a7df004a88 Don't include Project.h or ODTask.h needlessly in other header files 2018-10-16 17:36:38 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
a3fc5894fb Fix obsolete comments in Menus.cpp...
... In particular, some handlers have been in Scrubbing.cpp and MenusMac.cpp
for a few versions now, so we must soften "all" to "most"
2018-10-16 16:34:09 -04:00
James Crook
708cbe173e Consitently use On<something> iff it is a direct menu handler.
Some former 'On' functions have been renamed 'Do' since they didn't directly handle the menu item.  Some functions that used 'Context' now use 'Project'.
2018-10-16 15:15:35 +01:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
James Crook
26086a4142 Split MenuCommandHandler into three classes.
Menus.cpp is over 10,000 lines.  The main point of the split is to make possible a new .cpp file for MenuCreator, which is responsible for the creation of the menu bar, and which contains the near 2,000 line function MenuCreator::CreateMenusAndCommands()

The menu handlers are also (better) separated from the menu management.
2018-10-13 21:38:34 +01:00
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
James Crook
5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli
90e2da7f14 Fix uses of TrackList::GroupChannels in Mix and effect preview 2018-10-04 11:34:14 -04:00
Steve Daulton
8880e1b929 Fix missing initialization from a17af37 2018-10-03 21:08:27 +01:00
Steve Daulton
a17af37c1e Fix bug 1992 2018-10-02 22:40:10 +01:00
Paul Licameli
beebe648fb Remove more uses of Track::SetLinked() and Track::SetChannel() 2018-10-01 13:42:36 -04:00
Paul Licameli
2ee87082cb Track::GetLink and GetLinked are private, but SetLinked isn't yet 2018-10-01 13:42:34 -04:00
Paul Licameli
4aa990e835 Remove GetLink(ed) in various other places 2018-10-01 13:42:33 -04:00
Paul Licameli
d2a18f01e3 Remove use of GetLink(ed) in AudacityProject::OnPaste 2018-10-01 13:42:32 -04:00
Paul Licameli
f276373f3c Remove GetLink(ed) in clip-moving functions 2018-10-01 13:42:29 -04:00
Paul Licameli
d01013e0d0 Rewrite many iterations over tracks and channels in Menus.cpp 2018-10-01 11:19:35 -04:00
Paul Licameli
1e32309d24 Rewrite MenuCommandHandler::HandleAlign 2018-10-01 11:19:18 -04:00
Paul Licameli
1be3187b99 Use TrackIterRange::Visit 2018-10-01 10:59:24 -04:00
Paul Licameli
17089d03bf Rewrite MenuCommandHandler::OnPaste with TypeSwitch and new iterators 2018-10-01 10:59:09 -04:00
Paul Licameli
51842fc78b Use TypeSwitch and track_cast 2018-10-01 10:58:47 -04:00
Paul Licameli
e17c4acd5d Rewrite sorting of tracks 2018-10-01 10:54:37 -04:00
Paul Licameli
05ddfaf82b Remove TrackList::Select 2018-10-01 10:47:51 -04:00
Paul Licameli
5c6fd64a0e TrackList::GetPrev and ::GetNext are private 2018-10-01 10:44:58 -04:00
Paul Licameli
a0e15cfbbd Remove TrackListIterator::RemoveCurrent 2018-10-01 10:42:02 -04:00
Paul Licameli
89748cbe3c Remove "skiplinked" argument of old track iterators 2018-10-01 10:35:46 -04:00
Paul Licameli
debf96028e Provide missing piece of menu refactor, commit 9481587 2018-09-29 13:54:42 -04:00
Paul Licameli
4710d69f4c Bug1988: Don't lose data in unusual inter-project copy-paste case 2018-09-29 12:10:27 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
0f5c8d4d84 Wording: "Duplex" -> "Overdub" (missing piece). 2018-09-08 14:41:43 +01:00