Commit graph

688 commits

Author SHA1 Message Date
Robin Gareus
8710a2d943
Dialog default to cancel (#7915)
There are various ways to cancel a dialog. Only checking for
RESPONSE_CANCEL is not sufficient. e.g. Esc causes a delete-event.

 * Gtk::RESPONSE_CLOSE
 * Gtk::RESPONSE_REJECT
 * Gtk::RESPONSE_DELETE_EVENT
 * Gtk::RESPONSE_CANCEL
 * Gtk::RESPONSE_NO

Among others this fixes "Clicking session > open,
then hitting ESC opens the currently selected folder and session"
2020-02-27 23:27:42 +01:00
Ben Loftis
cf4d7387d2
Use a sensible min length for default session-duration
If the user tries to set the Start or End marker on an empty session,
apply some sensible defaults for the resulting session range.
2020-01-26 19:36:23 +01:00
Paul Davis
215d5d556f handle possible failure of a region rename 2020-01-23 14:25:38 -07:00
Ben Loftis
c8faadee4b Fit Selection (Vertical): if we cant fit all selected tracks, report that to the user. But still fit what we can. 2020-01-23 14:11:18 -06:00
Paul Davis
47767738b9 rename DoTheRightThing to RollIfAppropriate 2020-01-18 08:49:18 -07:00
Paul Davis
3c00048b0c Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it
can be cnentralized and is less ambiguous
2020-01-18 08:49:18 -07:00
Robin Gareus
2b55d6dce3
First batch of MessageDialog replacements 2019-12-14 23:44:01 +01:00
Robin Gareus
ccefc64418
Reset paste-count, paste-offset on undo/redo
This fixes an workflow edge-case when undoing a paste in order
to paste at a different location on the same track or automation lane.
After undo, any accumulated paste-offset needs to be reset
2019-11-26 23:49:06 +01:00
Robin Gareus
fb4cbb9f9e
Correctly handle Zoom > Edit-point > Mouse
Previously this failed if the event was initiated outside
of the canvas (e.g. Zoom buttons).

This also fixes a special case of Zooming to an edit-point at zero.
2019-09-17 17:18:29 +02:00
Robin Gareus
e7637d7786
Fix mute toggle actions when mute is automated
Track menu, as well as mixer-shortcut to set/unset mute
of selected tracks needs to send a start_touch() event, otherwise
the change is not effective.
2019-09-03 22:01:35 +02:00
Nikolaus Gullotta
f44a436f70
Move StripSilenceDialog XML to dedicated function
This moves the Session::add_extra_xml() call out of editor_ops.cc and
moves it to its own class method StripSilenceDialog::finished()
2019-08-30 14:44:50 -05:00
Nikolaus Gullotta
d5988b232c Add settings retention to StripSilenceDialog
StripSilenceDialog will now retain its threshold, minimum length, and
fade length values from run to run.

This is done via Session::add_extra_xml() and recalled during the
construction of StripSilenceDialog via Session::extra_xml()
2019-08-30 12:40:28 -05:00
Robin Gareus
4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Ben Loftis
da3d8e5418 (Source List) Implement insert-region action... now uses the Source List. 2019-08-01 12:11:31 -05:00
Ben Loftis
50786b3e5c (Source List) Recover Regions feature: WIP 2019-08-01 12:11:31 -05:00
Ben Loftis
c12a017728 (Source List) Region Tags (gtk2 part) 2019-08-01 12:11:31 -05:00
Robin Gareus
b1587940e4
Fix crash when deleting selected region-view in ripple mode #7764
Changing the playlist (remove_region) invalidates selection and
unsets `clicked_regionview`. The region to operate on needs
to be stored for later use.
2019-05-27 14:10:59 +02:00
Robin Gareus
31815b5f26
NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used
for indenting as well as some related code alignment issues.
2019-04-13 17:57:46 +02:00
Robin Gareus
c09c7bab52
Update GUI, use Session::playlists() getter (2/2) 2019-03-19 05:14:40 +01:00
Ben Loftis
66f73f40db Fix thinko: if the entered_regionview is already part of the selection, do not treat it as a special case when splitting. 2019-03-07 09:50:00 -06:00
Ben Loftis
3e442ae52b Session-range behavior (gtk2 part)
* Both the session-start and session-end point should follow the is-free option
  * Rename the end-is-free option to session-range-is-free, to reflect that change
  * This fixes the problem: recording before the start marker would move the Start,
    even if the user had already fixed the End marker.
2019-02-12 11:35:57 -06:00
Ben Loftis
22deebb42f Selection-after-split behavior (gtk2 part)
*  When splitting in MouseObject, entered_region should get priority over selected regions.
    This fixes the unexpected case where you try to split an unselected a region, but
       a)  nothing happens  OR
       b)  some other region (maybe off-screen) is split

*  Range mode now has its own option for splits, which can be:
     Clear:  the selection is cleared.
     Preserve:  the selection is left as-is. (default)
     Force:  all the regions that resulted from the split are selected (forcing a tool change).

*  Un-hid the additional config options to select only the regions BEFORE or AFTER a split.

*  Note:  splits made with Cut Tool should be unaffected by these changes.
2019-02-12 11:35:39 -06:00
Alex Pilon
e7091cb2cd
Observe preference to prompt for names when adding range markers 2018-12-28 17:25:30 +01:00
Robin Gareus
245d48dbd0
NO-OP: Clarify function name 2018-11-28 15:16:25 +01:00
Robin Gareus
f150f6c074
Use central method to check for engine where required
These are generally places where tracks/busses are created or port
connections change.
2018-11-28 00:01:50 +01:00
Robin Gareus
57d7b5de65
GUI limitation: Require engine to add/remove tracks/busses 2018-11-27 13:18:39 +01:00
Paul Davis
58e9bb0a14 move away from "sync source" concepts 2018-10-05 14:15:02 -04:00
Ben Loftis
35243c9b3e Fix weird behavior in playhead_x_to_grid: use return value from snap_to_grid. 2018-10-02 20:12:21 -05:00
Ben Loftis
2b95b5b8b3 More correct fix for 8bfbef4: the check was already there; just needed to set the dirty flag. 2018-10-02 09:41:04 -05:00
Ben Loftis
8bfbef4888 Fix deadlock when no region boundaries are selected in the Snap prefs. 2018-10-02 09:28:05 -05:00
Paul Davis
932eefad9f use new CoreSelection methods in editor and mixer 2018-08-24 14:04:18 -04:00
Ben Loftis
0883f02de9 new_grid: The Return of the snap_to_X functions.
We no longer assume that Snap always uses the visible ruler lines.
 If you want to snap to the grid, and ignore the users zoom scale, use SnapPref::SnapToGrid_Unscaled
 This fixes 2 (known) oversights: "snap region(s) to grid" and "regions whose start are left of the canvas edge".
2018-07-27 00:28:47 +02:00
Ben Loftis
7fbbfc0729 Allow snapping to the start of the video timeline. (should work, but needs testing on a machine with harvid). 2018-06-08 16:12:35 -05:00
Ben Loftis
41cf86cb9f Playhead to Grid: handle case where PH is rolling, and we are prevented from skipping backwards sensibly. 2018-05-17 15:01:09 -05:00
Ben Loftis
c074c7ce52 playhead_X_to_grid: Handle the case of GridTypeNone 2018-05-08 09:03:20 -05:00
Ben Loftis
a5d90c3d9d Arrow keys (playhead_x_to_grid()) should move the view along with it. This is more consistent with jog-wheel operation, which has proven to work nicely. 2018-05-08 08:45:22 -05:00
Paul Davis
5132a6c2eb fix undo/redo for duplicate-regions in ripple mode
Also fix duplicate of multiple regions in the same track, and change "gap" variable
name to "span" for greater clarity
2018-03-28 14:24:21 -04:00
Paul Davis
9840f84830 duplicate (regions) should honor ripple edit mode 2018-03-27 10:19:12 -04:00
Ben Loftis
d88cdcc1bf Reinstate the ability to split regions while dragging playhead. I think this was unintentionally lost. 2018-02-27 13:08:40 -06:00
Ben Loftis
fcabb27561 Remove some redundant calls to snap_to(). get_preferred_edit_position() already did it. 2018-02-27 08:55:17 -06:00
Ben Loftis
5d423e38d5 Should be able to Split in range mode, with a selected track. 2018-02-26 20:38:50 -06:00
Ben Loftis
292f998298 Fix bug: sequential pasting to the same time, but different tracks, would trigger paste offset. 2018-02-26 19:40:24 -06:00
Ben Loftis
f64a39a07f Fixes for region_boundary_cache:
If no region-snaps are defined, bail out before generating cache.
 Avoid potential overflow at max_samplepos+1
 Snap should continue to work beyond the End marker.
2018-02-24 10:30:52 -06:00
Robin Gareus
ceac42cc03 NO-OP: whitespace
- remove trailing whitespace
- remove space after opening brackets and before closing brackets
- add space around operators
- do not use '//' for multi-line comments, do not use "//" on line-start
  to comment-out code breaking indenting (-Wmisleading-indent)
- do add a single space after comment-start /*{SPACE}... or //{SPACE}...
- reserve duplicate whitespace "  " for alignment, remove other duplicate
  whitespace
- use established "TODO" and "XXX" (highlighted keywords)
- remove equal-sign series "====" (those indicate merge conflicts)
2018-02-24 13:55:20 +01:00
Ben Loftis
881c8eeca8 Tell the user why Insert/Remove Time failed, rather than fail silently. 2018-02-23 14:37:32 -06:00
Ben Loftis
0299229e41 SoloSelection: gui part. 2018-02-11 09:39:45 -06:00
Ben Loftis
dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid.  Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers.  Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers.  If you are zoomed out, grid becomes coarser.
2018-02-09 09:59:39 -06:00
Robin Gareus
ba2b136af2 NO-OP: whitespace 2017-12-12 00:13:12 +01:00
Ben Loftis
aab02cac3d zoom-to-selection should clear the selection, afterwards. 2017-12-11 10:51:33 -06:00
Robin Gareus
c591368133 Remove unreachable code.
if (working_on_selection) {
  ...
} else {
  if (working_on_selection) { .. never reached .. }
}

Found by PVS: https://www.viva64.com/en/b/0540/
2017-11-23 10:51:20 +01:00