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

114 Commits

Author SHA1 Message Date
Paul Licameli
ef38af71dd Move more time-shifting functions out of TrackPanel.cpp 2017-06-15 08:21:01 -04:00
Paul Licameli
e2d77b399d Move one more selection function out of TrackPanel 2017-06-11 16:14:26 -04:00
Paul Licameli
d834bcdbd1 Move some command handlers for selection and focus out of TrackPanel 2017-06-11 11:03:28 -04:00
James Crook
adc7312954 Auto-Select off by default.
I've implemented three states for what to do if no selection:
0 - Grey out (no longer used)
1 - Auto-select
2 - Give the warning message and try again.
2017-06-09 19:40:28 +01:00
Paul Licameli
a33ec61ddf Move code for toggling spectral selection (Q key) out of TrackPanel 2017-06-08 12:48:28 -04:00
Paul Licameli
d210b18aad Limit consolidation of undo items by other means 2017-05-24 00:23:25 -04:00
David Bailes
cd6c9834f6 Clip move commands - minor fix.
Forgot that the name of data members should begin with the letter m. Fixed this.
2017-05-23 12:56:11 +01:00
David Bailes
f46ac268f4 Update commands for moving clips using the keyboard
Second attempt at getting the commands to update history, so that they can be undone (previous attempt at b911607, which didn't call the undo manager for each keydown).

Both a single keypress (keydown, then keyup), and holding down a key (multiple keydowns followed by a keyup) result in a single entry in Audacity's history dialog. Note that this code relies on a change to the undo mananger in commit 63ae687.
2017-05-23 10:29:49 +01:00
Paul Licameli
f7578193b4 TrackPanel::OnClipMove is a static function 2017-05-18 07:46:54 -04:00
Paul Licameli
d36ac2cedb Revert "Fix for keyboard commands for time shifting clips"
This reverts commit b91160795dedce54745102027f8bb0908828772a.
2017-05-18 07:06:22 -04:00
David Bailes
b91160795d Fix for keyboard commands for time shifting clips
Commands didn't update history etc.

Fix: Commands now call TrackPanel::MakeParentPushState.
2017-05-15 13:12:11 +01:00
James Crook
0ac2d90d8a SelectAllIfNone now selects all time if none, and all tracks if none.
This means you can now select just a time, and get all tracks selected, or some tracks, and get all time selected.
One side effect of this is that if you select a label (only) and apply 'cut' you now just cut the label, rather than cutting all tracks.  If you select a label and apply echo, you now get an error message, rather than applying echo to all tracks.
2017-05-13 10:06:52 +01:00
James Crook
35fe313f30 Smarter SelectAllIfNone
Now if there is a time selection and no tracks selected, then just select all the tracks, preserving the time selection.
This helps in the case a user has made a time selection, e.g. with selection toolbar, and then clicked on track panel, losing the selection of tracks but preserving the time selection.

I also shortened some repeated cut-and-pasted code.
2017-05-11 22:36:55 +01:00
David Bailes
b2d8f36969 Fix for bugs in keyboard clip commands due to rounding errors
When When two clips are immediately next to each other, the GetEndTime() of the first clip and the GetStartTime() of the second clip may not be exactly equal due to rounding errors. The existing code assumed they were equal, and this lead to the wrong clip boundaries or clips being found.

There are a number of ways of fixing this which could be explored. The current solution involves changing only the code for the keyboard interaction with clips.

The fix:
1. The test used for two clips being immediately next to each other is that GetEndSample() on the first clip is equal to to GetStartSample() on the second clip.
2. When searching for the start/end times of clips, the cases where GetEndTime() and GetStartTime() are not equal are taken into account. This is done in the two functions AudacityProject::AdjustForFindingStartTimes and AudacityProject::AdjustForFindingEndTimes.
2017-05-10 09:24:25 +01:00
James Crook
9d501f69d6 Add preference for Record being to new track. 2017-05-01 12:04:27 +01:00
David Bailes
baf46c1f85 Update to Select Previous/Next clip commands
Previously, these two commands used the clips in the focused track. They now have similar to the Tracks->Pan->Left/Right/Center commands. That is if any audio tracks are selected, the clips in these tracks are used, otherwise the clips in all audio tracks are used.
2017-05-01 09:20:44 +01:00
David Bailes
ce1d067f84 Update to Clip Boundary commands
This update affects the four commands:
Cursor to Previous clip boundary
Cursor to Next clip boundary
Select previous clip boundary to cursor
Select cursor to next clip boundary

Previously these commands all used the clips in the focused track. This update changes this so that their behaviour is the same as the Tracks->Pan->Left/Right/Center commands. That is, if any audio tracks are selected, all the clips in these tracks are used, else the clips in all audio tracks are used.
2017-05-01 08:58:46 +01:00
James Crook
6d361687d6 Add Show/Hide Extra menus preference.
The new preference is in the view menu and on the Gui preferences page.
Also Ext Menus rearranged to more closely match default toolbar order.
Also F11 (a new menu command to show/hide maximised) now has a check mark.

This change needs testing on mac as mac is pickier about when menus are updated.
2017-04-21 17:32:53 +01:00
David Bailes
592453082b Removed zoom presets
Removed the zoom presets which I added in commit 1fa97a4. Nobody else wanted them.
2017-04-21 15:15:38 +01:00
James Crook
221b0271ca Bug 1628 - Tracks > Align items two submenus deep
Fixed by adding a new on/off option, "Move  Selection With Tracks".
2017-04-08 11:54:25 +01:00
David Bailes
caca4d20f3 Zoom presets: wording change
Thousandth second -> Millisecond
2017-04-07 08:57:48 +01:00
David Bailes
1fa97a4b37 Added zoom presets
Please Note:
In ViewInfo.h there is the comment left by Paul:
// There is NO GetZoom()!
// Use TimeToPosition and PositionToTime and OffsetTimeByPixels!

I needed to get the value of the current zoom so that I could use the functions AudacityProject::ZoomInByFactor and AudacityProject::ZoomOutByFactor to handle the change in zoom when a preset zoom is chosen. So I added GetZoom() for this use.
2017-04-06 12:49:38 +01:00
James Crook
52f0f750d9 Add Tracks->Pan->Left/Right/Center 2017-04-03 22:35:19 +01:00
David Bailes
a7a4a70e5f Two commands added, neither on a menu:
Clip Left
Clip Right

If the cursor lies within a clip, the clip and the cursor is moved 1 pixel left/right.
If the cursor position is at both a clip end and a clip start, the second of these clips is moved.

The movement currently ignores the snap to setting on the selection bar, and there is no snapping to the clip boundaries of other clips.
Following the behaviour or shifting with the mouse, the distance moved is rounded to an integral number of samples, and the minimum distance moved is one sample.
2017-04-03 13:53:48 +01:00
David Bailes
c382139c05 New commands for selecting clips using the keyboard
Added two commands:
Select > Previous clip. Select the previous clip for which clip start < selection start/cursor position.

Select > Next clip. If the position of selection start/cursor is at the start of a clip, and selection end is not at the end of the clip, select that clip. Otherwise, select the next clip for which clip start > selection start/cursor position.
2017-04-03 13:45:58 +01:00
David Bailes
a519e6fc7d New commands for clip boundaries using the keyboard
Added the commands:
Cursor to > Previous clip boundary
Cursor to > Next clip boundary
Select > Previous clip boundary to cursor
Select > Cursor to next clip boundary
2017-04-03 13:35:46 +01:00
Paul Licameli
1552ff188f When opening a file into a new project, delete the project on failure 2017-03-21 14:11:28 -04:00
James Crook
5c1f4d24b5 Menu rearrangement merged from DarkAudacity 2017-03-19 16:43:51 +00:00
Paul Licameli
9eaa40659e Utility for track editing leaves fewer direct calls to GetLinked() 2017-03-17 17:52:28 -04:00
Paul Licameli
6665370f61 Fix spelling in a function name 2017-03-17 17:52:21 -04:00
James Crook
c53e2dbb77 Bug 1597 - Enh: Greater clarity over status of versions needed
- For ALPHA builds we do a check version with the Welcome screen (if welcome screen is enabled).
- A 'Check Online' in the About box provides a new route to check version
- Check Version now passes CommitId and Build Date/Time to identify a version.

To actually close the bug we need the javascript on the server page to put up informative messages.
2017-02-25 23:00:39 +00:00
Steve Daulton
15aa84f10b Fix bug 1575
Includes fix by PRL:
https://github.com/Paul-Licameli/audacity/commit/cbca44e
2017-01-16 12:35:07 +00:00
David Bailes
87c0eb1563 Rename the two commands for the Saved cursor position
After discussion on Audacity-quality mailing list, the commands now refer to the stored cursor position, rather than the saved cursor position. (This position is not saved to disc).
2016-11-20 12:44:13 +00:00
David Bailes
cc24472d09 Add two new commands for selecting a time range using the keyboard
The new commands are "Save Cursor Position" and "(Select) Cursor to Saved Cursor Position"
2016-11-08 08:58:48 +00:00
David Bailes
5542f88089 Changed names of the commands to move to next/previous label
Selection to next label => Move to Next Label
Selection to previous label => Move to Previous Label
2016-11-01 14:09:03 +00:00
David Bailes
a79596fb4e Add a setting for whether labels can be created by typing
Added a setting for whether labels can be created by typing in a label track.
The setting can be changed in either the Tracks menu, or the Tracks category in Preferences.
By default the setting is set to on.
2016-10-26 13:11:07 +01:00
David Bailes
ff9763f984 Add two commands to move the cursor/selection to next/prev label
The two commands are "selection to next label" and "selection to previous label".
They have default shortcuts alt+right and alt+left.

A label track does not have to be the focus. If there is a single label track in the project, that it used. If there is more than one label track, then the first label track, if any, starting at the focused track is used.

If the commands are used during playback of the project, playback continues from the new cursor/selection.

The commands provide feedback to screen readers: the name of the label, and position in the form of "i of n".
2016-10-24 14:24:20 +01:00
Paul Licameli
302ac247e1 Implmement option+command+M on Mac to minimize all projects 2016-06-29 14:24:51 -04:00
Paul Licameli
617fdb387f Bugs 1119, 1198: Bring back the Mac Window menu, at least partly...
... This poor imitation of the standard Mac Window menu only includes
Minimize and Zoom.

But this may be adequate for the complaints in Bug1198, when the yellow title
bar button is hidden and unreachable.
2016-06-28 15:52:33 -04:00
Paul Licameli
53e30e5533 Label context menu can bring up the edit dialog 2016-06-26 13:34:52 -04:00
Paul Licameli
5a121bbbd8 Bug1252 more: Omit empty tool docks from ctrl+f6 rotation 2016-06-23 17:56:30 -04:00
Paul Licameli
df0e4945de Remove scrolling left of zero check mark from Tracks menu...
... Less need now to make it more discoverable, because we override an "off"
setting during transport with a pinned play head, thus removing some
inconsistency and confusion.
2016-06-08 18:33:02 -04:00
Paul Licameli
fd9d6a8fcf Set selection whenever scrub/seek stops by any means besides ESC key 2016-06-06 01:45:54 -04:00
Paul Licameli
f5c4c85653 New scrubbing toolbar; remove ruler pushbuttons. 2016-06-05 01:03:24 -04:00
Paul Licameli
e39da0c42b New preference for pinned play head, also in Transport menu 2016-06-01 13:25:01 -04:00
Paul Licameli
4394ad1b70 Add a check item to Tracks menu for the scrolling beyond zero preference 2016-05-10 12:47:34 -04:00
Paul Licameli
19ef2f6681 Implement drag-scrub, compatibly with the existing move-scrub...
... Start scrub by click or double click on the scrub head; release button or
not; then move.

If you release before moving, you get scrubbing as before, controlled by
motion.  Click or drag to switch in and out of seeking.  Stop with ESC,
spacebar, etc.  No change of selection.

But now if you drag, then scrubbing contines until you release the mouse or
otherwise stop with a key.

If by release of the mouse, then the selection changes as if by a click at
the last play position.  If you hold shift, then, as if by shift-click.

If drag begins with a double-click, then the play head remains centered and
the track moves.
2016-05-10 09:37:10 -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
4fba13bd2a Improved behavior of scrubbing menu items: Checkmarks, and toggling behavior. 2016-04-23 15:07:45 -04:00
Paul Licameli
26771b6db9 Add transport menu items for scrubbing and seeking...
... This includes new always-seeking modes unlike scrubbing which can switch
to seeking and back according to the left mouse button state.

The reason for this is that visually impaired users should not be required to
click with the mouse in the track panel window to signal seeking.  But mouse
movements can still control scrubbing, because we poll the global mouse
position in the timer, not relying on events from any window object.
2016-04-21 12:13:39 -04:00