13
0

Merge branch 'ardour'

This commit is contained in:
Robin Gareus 2024-05-20 23:33:17 +02:00
commit dd149054b6
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
5 changed files with 68 additions and 18 deletions

View File

@ -700,16 +700,16 @@ Editor::register_actions ()
RadioAction::Group range_choice_group;
all_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-all-markers"), _("All Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), all_marker_types)));
cd_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-cd-markers"), _("CD Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), CDMarks)));
scene_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-cue-markers"), _("Cue Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), SceneMarks)));
cue_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-scene-markers"), _("Scene Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), CueMarks)));
location_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-location-markers"), _("Location Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), LocationMarks)));
cd_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-cd-markers"), _("Only CD Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), CDMarks)));
scene_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-cue-markers"), _("Only Cue Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), CueMarks)));
cue_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-scene-markers"), _("Only Scene Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), SceneMarks)));
location_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-location-markers"), _("Only Location Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), LocationMarks)));
all_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-all-ranges"), _("All Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), all_range_types)));
session_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-session-range"), _("Session Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), SessionRange)));
punch_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-punch-range"), _("Punch Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), PunchRange)));
loop_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-loop-range"), _("Loop Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), LoopRange)));
other_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-other-ranges"), _("Other Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), OtherRange)));
session_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-session-range"), _("Only Session Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), SessionRange)));
punch_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-punch-range"), _("Only Punch Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), PunchRange)));
loop_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-loop-range"), _("Only Loop Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), LoopRange)));
other_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-other-ranges"), _("Only Other Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), OtherRange)));
ActionManager::register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor"));

View File

@ -287,15 +287,26 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
Gtk::Menu* a_menu = new Gtk::Menu;
MenuList& add_items = a_menu->items();
add_items.push_back (MenuElem (_("Location Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags (0), 0)));
add_items.push_back (MenuElem (_("Range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_range), where)));
add_items.push_back (MenuElem (_("Loop Range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_loop), where)));
add_items.push_back (MenuElem (_("Punch Range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_punch), where)));
add_items.push_back (MenuElem (_("CD Track Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags(Location::IsMark |Location::IsCDMarker), 0)));
add_items.push_back (MenuElem (_("Arrangement Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags(Location::IsMark | Location::IsSection), 0)));
#ifndef LIVETRAX
add_items.push_back (MenuElem (_("CD Track Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags(Location::IsMark |Location::IsCDMarker), 0)));
add_items.push_back (MenuElem ("Cue Marker..."));
Gtk::MenuItem& cue_submenu = add_items.back();
Gtk::Menu* cue_menu = new Gtk::Menu;
MenuList& cue_items = cue_menu->items();
cue_items.push_back (MenuElem (_("Stop All Cues"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, CueRecord::stop_all)));
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
add_items.push_back (MenuElem (string_compose (_("Cue %1"), cue_marker_name (n)), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, n)));
cue_items.push_back (MenuElem (string_compose (_("Cue %1"), cue_marker_name (n)), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, n)));
}
cue_submenu.set_submenu (*cue_menu);
#endif
add_items.push_back (SeparatorElem());
add_items.push_back (MenuElem (_("Range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_range), where)));
add_items.push_back (MenuElem (_("Loop Range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_loop), where)));
#ifndef LIVETRAX
add_items.push_back (MenuElem (_("Punch Range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_punch), where)));
#endif
add_menu.set_submenu (*a_menu);
@ -311,13 +322,13 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
clear_items.push_back (MenuElem (_("All Xruns"), sigc::mem_fun(*this, &Editor::clear_xrun_markers)));
clear_items.push_back (MenuElem (_("All (MIDI) Scenes"), sigc::mem_fun (*this, &Editor::clear_scenes)));
clear_menu.set_submenu (*c_menu);
#ifndef LIVETRAX
ruler_items.push_back (MenuElem (_("Stop All Cues"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, CueRecord::stop_all)));
#endif
}
break;
}
ruler_items.push_back (SeparatorElem());
/* Gtkmm does not expose the ::set_related_action() API for
* Gtk::Activatable, so we have to drop to C to create menu items
* directly from actions.
@ -439,6 +450,7 @@ Editor::restore_ruler_visibility ()
ruler_section_action->set_active (td == Temporal::BeatTime);
}
#ifdef LIVETRAX
if (ARDOUR::Profile->get_livetrax()){
ruler_minsec_action->set_active (false);
ruler_timecode_action->set_active (false);
@ -452,6 +464,7 @@ Editor::restore_ruler_visibility ()
ruler_marker_action->set_active (true);
ruler_section_action->set_active (true);
}
#endif
no_ruler_shown_update = false;
update_ruler_visibility ();
@ -505,6 +518,24 @@ Editor::update_ruler_visibility ()
minsec_label.hide();
}
#ifndef LIVETRAX
if (ruler_timecode_action->get_active()) {
old_unit_pos = timecode_ruler->position().y;
if (tbpos != old_unit_pos) {
timecode_ruler->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
timecode_ruler->show();
timecode_label.show();
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
have_timebar = true;
} else {
timecode_ruler->hide();
timecode_label.hide();
}
#endif
if (ruler_samples_action->get_active()) {
old_unit_pos = samples_ruler->position().y;
if (tbpos != old_unit_pos) {
@ -603,7 +634,7 @@ Editor::update_ruler_visibility ()
mark_label.hide();
}
if (ruler_section_action->get_active()) {
if (!Profile->get_livetrax() && ruler_section_action->get_active()) {
old_unit_pos = section_marker_group->position().y;
if (tbpos != old_unit_pos) {
section_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -640,6 +671,7 @@ Editor::update_ruler_visibility ()
update_video_timeline(true);
}
#ifdef LIVETRAX
if (ruler_timecode_action->get_active()) {
old_unit_pos = timecode_ruler->position().y;
if (tbpos != old_unit_pos) {
@ -655,6 +687,7 @@ Editor::update_ruler_visibility ()
timecode_ruler->hide();
timecode_label.hide();
}
#endif
if (have_timebar && UIConfiguration::instance().get_show_selection_marker ()) {
_selection_marker_group->show ();
@ -665,8 +698,10 @@ Editor::update_ruler_visibility ()
int ruler_separator_y = std::max(1, (int)(timebar_height * visible_timebars));
ruler_separator->set_y_position (ruler_separator_y);
time_bars_vbox.set_size_request (-1, ruler_separator_y);
#ifdef LIVETRAX
time_bars_hbox.set_size_request (-1, ruler_separator_y);
time_bars_hbox.set_border_width (4);
#endif
/* move hv_scroll_group (trackviews) to the end of the timebars */
@ -680,8 +715,9 @@ Editor::update_ruler_visibility ()
for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
i->second->setup_lines ();
}
#ifdef LIVETRAX
ARDOUR_UI::instance()->update_section_visibility(ruler_section_action->get_active());
#endif
}
void

View File

@ -61,6 +61,8 @@ public:
DirectOuts = 0x40
};
static bool role_from_xml (const XMLNode&, Role&);
static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert || r == DirectOuts; }
bool does_routing() const { return true; }

View File

@ -419,6 +419,12 @@ Delivery::state () const
return node;
}
bool
Delivery::role_from_xml (const XMLNode& node, Role& role)
{
return node.get_property ("role", role);
}
int
Delivery::set_state (const XMLNode& node, int version)
{

View File

@ -3347,6 +3347,12 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const*
processor->set_owner (this);
} else if (prop->value() == "send") {
#ifndef LIVETRAX
Delivery::Role role;
if (Delivery::role_from_xml (node, role) && role == Delivery::DirectOuts) {
return true;
}
#endif
XMLProperty const * role_prop = node.property (X_("role"));
if (role_prop && role_prop->value() == "DirectOuts") {