Commit graph

64 commits

Author SHA1 Message Date
Robin Gareus
d6c6c58155
NO-OP: fix alignment after recent code change 2025-05-14 20:28:56 +02:00
Paul Davis
9494ecf6e9 EditorComponent should have a reference, not pointer, to an Editor
the value is not allow to be null, and the coding style guide says in such cases to prefer
a reference.

No semantics change here, just the fact that all EditorComponents receive *this instead
of this when the Editor that owns them creates them
2025-05-14 11:50:30 -06:00
Robin Gareus
74c4ca3e52
Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
Paul Davis
6149771910 fix yet more cases where SMF are imported and named incorrectly 2024-10-15 22:35:04 -06:00
Paul Davis
af5c99dd05 move definition of selection operations in to ARDOUR namespace
This is a rare commit that I think should be done for GUI and libs at the same time
2024-08-02 11:50:21 -06:00
Robin Gareus
46a2b45443
Tweak translatable strings
* add spaces around "->"
* consistently use "time domain" (instead of "timebase")
* remove "Edit ->" from "Preferences" (on macOS Prefs
  are not in the edit menu
2023-12-17 20:58:11 +01:00
Robin Gareus
c162aa7aca
Consistently use context-menu button action
This fixes an issue where brining up a menu can directly activate an
action in the menu. Notably on macOS.

Nathan reports that this may also address #9515

Note: mac touchpads are not affected since right-click there is
effectively a "press and hold".
2023-10-31 20:16:23 +01:00
Robin Gareus
520b209c83
NO-OP: update comments 2023-05-31 15:53:12 +02:00
Robin Gareus
4bc8a3e9c7
Fix remove_selected_sources() for multi-channel sources
It is not sufficient to simply drop the first source
of a region. While destroying a whole-file region marks
all its sources as unused, only the source for 1st channel
was explicitly removed.

The session accumulated <Sources>, without corresponding
whole-file Regions. Those can prevent cleanup of unused
sources, particularly when using snapshots.
2023-05-29 21:15:50 +02:00
Paul Davis
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus
1b7b3543e8
Remove thin abstraction, directly call get_pixel_size 2022-09-20 03:33:08 +02:00
Mads Kiilerich
17fafc376b
gtkmm: use ALIGN_END instead of deprecated Gtk::AlignmentEnum::ALIGN_RIGHT 2022-04-08 21:11:06 +02:00
Mads Kiilerich
2aa72891f3
gtkmm: use ALIGN_START instead of deprecated Gtk::AlignmentEnum::ALIGN_LEFT 2022-04-08 21:11:06 +02:00
luz paz
364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Robin Gareus
b51621a1ae
Fix assert() when using DnD to import MIDI files
When importing a multi-track MIDI files with identical track-names,
Ardour would create the same file for each track. Effectively
overwriting an existing file.

The following MIDI file would create the same file twice
in `interchange/`, once for each MTrk.

```
MFile 1 2 240
MTrk
0 Meta SeqName "Foo Bar"
0 TimeSig 4/4 24 8
0 Tempo 666667
0 Meta TrkEnd
TrkEnd
MTrk
0 Meta TrkName "Foo Bar"
0 On ch=10 n=36 v=95
...
```
2022-01-19 19:22:51 +01:00
Robin Gareus
37877fbdc2
Unify Source and RegionList abstraction 2022-01-19 17:13:51 +01:00
Robin Gareus
0204ea1f24
Unify Region Drag/Drop
Identify Regions using PDB::ID. This allows dragging regions
from almost anywhere to anywhere, without special cases.
2022-01-19 17:13:51 +01:00
Robin Gareus
806f62ffe6
Allow import via DnD to Source list (not region list) 2022-01-11 00:56:32 +01:00
Robin Gareus
056189c76c
Clean up DnD, use MIME-types
This is in preparation for allowing to drag trigger-regions
or trigger-slots. Those will not use a static singleton
PublicEditor API.

Additionally this constrains Ardour-internal drags to Ardour
(via Gtk::TARGET_SAME_APP).
2022-01-10 21:29:29 +01:00
Robin Gareus
3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
Ben Loftis
84111a343e Deinterlace MIDI: gui part 2021-11-19 10:28:37 -06:00
Robin Gareus
0b2b361b32
Dis/reconnect to session signals for each session
This allows to load a session from a running instance.
Prior to this change this caused a crash (_session = null)

```
#1  ARDOUR::Session::session_directory() const (this=0x0) at ../libs/ardour/ardour/session.h:257
#2  EditorSources::populate_row(Gtk::TreeRow, boost::shared_ptr<ARDOUR::Region>) (this=0x555559836900, row=..., region=...) at ../gtk2_ardour/editor_sources.cc:433
#3  EditorSources::regions_changed
[ .. signal propagation ..]
#20 ARDOUR::Region::send_change
#21 PBD::Stateful::resume_property_changes
#22 ARDOUR::AudioRegion::_set_state
#23 ARDOUR::AudioRegion::set_state
#24 ARDOUR::RegionFactory::create
#25 ARDOUR::Session::XMLAudioRegionFactory
#27 ARDOUR::Session::load_regions
#28 ARDOUR::Session::set_state
#29 ARDOUR::Session::post_engine_init
#30 ARDOUR::Session::Session
#31 ARDOUR_UI::load_session_stage_two
#32 ARDOUR_UI::load_session
#33 ARDOUR_UI::open_recent_session
```
2021-09-19 04:56:13 +02:00
Paul Davis
07324bd1e2 change the way source list adds new regions to match the way the region list does it
This avoids duplicates, updates rows etc
2021-08-28 15:29:44 -06:00
Paul Davis
d5223c0c2c allow Editor source list to contain empty MIDI whole file regions 2021-08-28 15:28:41 -06:00
Paul Davis
6f861c63b5 nutempo #warning removal 2021-08-13 12:51:33 -06:00
Paul Davis
2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
Paul Davis
f4490f54c5 change Timecode::BBT_Time to use Temporal namespace, plus a couple of other minor changes to enable compilation
This still uses the tempo map object in libs/ardour, not the new one in libs/temporal, and isn't likely to be functional
(though it could be)
2021-08-13 12:51:28 -06:00
Ben Loftis
51d57a3fb6 Source and Region list: fix disappearing list items (break out of the loop instead of returning, so the list always gets thawed) 2021-05-28 18:51:35 -05:00
Robin Gareus
b0d4f77d92
Optimize RegionList redisplay for batch changes 2021-05-07 23:29:25 +02:00
Robin Gareus
283cade057
Update GUI Region[s]PropertyChanged signal handlers (2/3) 2021-05-07 23:29:25 +02:00
Robin Gareus
887f8a70bc
Show x-run count in source-list 2021-02-14 16:22:42 +01:00
Robin Gareus
22ab752924
NO-OP: whitespace 2020-07-26 17:17:33 +02:00
Ben Loftis
5cdaa5f935 Source list: some tweaks to match Region list 2020-07-26 09:53:48 -05:00
Ben Loftis
af4ab3708b Source List: allow Name field to be edited 2020-07-26 09:53:47 -05:00
Ben Loftis
cdee15b780 Source List: Add captured_for as a column. 2020-07-26 09:53:47 -05:00
Ben Loftis
d98d3f25d8 Source List: Add channel-count as a separate column 2020-07-26 09:53:47 -05:00
Ben Loftis
f5bdfb14fd Source List: watch for name-changes in Source entries. 2020-07-26 09:53:47 -05:00
Paul Davis
764dd20f93 Editor: allow name and path column in editor source list to be manually resizable 2020-07-19 23:10:43 -06:00
Edgar Aichinger
e20f74dcf1
Fix typos, consistent translatable strings 2020-04-15 18:02:35 +02:00
Robin Gareus
1aae553dae
Fix source list selection
Retain selection when showing context-menu.
2020-03-31 21:00:45 +02:00
Paul Davis
75260f9c9b fix (potentially serious) typo that confused comparison with assignment 2020-03-06 15:54:00 -07:00
Robin Gareus
a886f2bfcb
Cleanup SourceList: remove unused copy/pasted region-list code 2020-02-25 16:17:00 +01:00
Robin Gareus
f158d2064d
NO-OP: whitespace 2020-02-25 16:17:00 +01:00
Robin Gareus
589437c74a
SourceList: Drop references as requested 2020-02-25 16:17:00 +01:00
Robin Gareus
b228dce1c1
Use weak-ptr for source added/removed signals (2/2) 2019-12-25 18:00:57 +01:00
Paul Davis
cb116ca634 remove unused assignment 2019-10-10 16:52:00 -06:00
Robin Gareus
f940cbe794
Remove unused EditorSources selection filter 2019-08-13 00:53:04 +02:00
Robin Gareus
8a9b38e540
Remove remnants of hack from 9f3f3738e7
This fixes multiple selection. The original code using
"selection_countdown" is no longer in place. There's no "counter" to arm.

Shift/Tab name edit works regardless.
"s/m/r" solo/mute/rec shortcuts in the treeview have been discontinued
since a long time as well. Keyboard shortcuts are per window, regardless
of grab_focus()

PS. This change makes it easier for a user to start a drag/drop
operation of multiple regions. That currently assert()s, only
the first selected region is used.
2019-08-13 00:52:21 +02:00
Ben Loftis
82ebfa75f3 Source List: Explicitly check whether a file is in the {Audio|MIDI} folder where it should be.
Anywhere else (even somewhere else inside the session folder) should be flagged "weird"
2019-08-12 10:48:08 -05:00
Ben Loftis
ff440276c1 Source List: Source regions can be tagged, too. 2019-08-12 10:48:08 -05:00