Compare commits
18 Commits
354e60d657
...
201580f7ba
Author | SHA1 | Date |
---|---|---|
Paul Davis | 201580f7ba | |
Paul Davis | fc86629daf | |
Paul Davis | 21a39c5f1f | |
Paul Davis | b2570bcaa3 | |
Paul Davis | 0b8cfdee40 | |
Paul Davis | 87f40ddc7f | |
Paul Davis | a0756429cf | |
Paul Davis | 7bcdd5b2e4 | |
Paul Davis | e3b21ed77a | |
Paul Davis | a7dbf57afa | |
Paul Davis | ad53c31e50 | |
Paul Davis | 5d1233e60a | |
Paul Davis | 43e0f08b93 | |
Paul Davis | 8f7f204ae4 | |
Paul Davis | 9052eb013e | |
Paul Davis | 125b0f9432 | |
Paul Davis | 16ed245977 | |
Paul Davis | 46fa056da6 |
|
@ -553,6 +553,7 @@
|
|||
<menuitem action="toggle-arrangement-ruler"/>
|
||||
<menuitem action="toggle-marker-ruler"/>
|
||||
<menuitem action="toggle-cue-marker-ruler"/>
|
||||
<menuitem action="toggle-scene-marker-ruler"/>
|
||||
<separator/>
|
||||
<menuitem action="toggle-video-ruler"/>
|
||||
</menu>
|
||||
|
@ -805,6 +806,7 @@
|
|||
<menuitem action="toggle-cd-marker-ruler"/>
|
||||
<menuitem action="toggle-marker-ruler"/>
|
||||
<menuitem action="toggle-cue-marker-ruler"/>
|
||||
<menuitem action="toggle-scene-marker-ruler"/>
|
||||
<separator/>
|
||||
<menuitem action="toggle-video-ruler"/>
|
||||
</popup>
|
||||
|
|
|
@ -1105,8 +1105,6 @@ AudioRegionView::set_colors ()
|
|||
{
|
||||
RegionView::set_colors();
|
||||
|
||||
assert (_fx_line);
|
||||
|
||||
set_fx_line_colors ();
|
||||
set_waveform_colors ();
|
||||
|
||||
|
@ -1263,7 +1261,9 @@ AudioRegionView::get_region_fx_line (PBD::ID& id, uint32_t& param_id)
|
|||
void
|
||||
AudioRegionView::update_envelope_visibility ()
|
||||
{
|
||||
assert (_fx_line);
|
||||
if (!_fx_line) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseContent ) {
|
||||
_fx_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::ControlPoints|AutomationLine::Line));
|
||||
|
@ -1670,7 +1670,9 @@ AudioRegionView::color_handler ()
|
|||
void
|
||||
AudioRegionView::set_fx_line_colors ()
|
||||
{
|
||||
assert (_fx_line);
|
||||
if (!_fx_line) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_rdx_param != UINT32_MAX && _rfx_id != 0) {
|
||||
_fx_line->set_line_color ("region automation line");
|
||||
|
|
|
@ -343,6 +343,7 @@ Editor::Editor ()
|
|||
, cd_mark_label (_("CD Markers"))
|
||||
, section_mark_label (_("Arrangement"))
|
||||
, cue_mark_label (_("Cue Markers"))
|
||||
, scene_mark_label (_("Scenes"))
|
||||
, videotl_label (_("Video Timeline"))
|
||||
, videotl_group (0)
|
||||
, _region_boundary_cache_dirty (true)
|
||||
|
@ -576,6 +577,13 @@ Editor::Editor ()
|
|||
cue_mark_label.hide();
|
||||
cue_mark_label.set_no_show_all();
|
||||
|
||||
scene_mark_label.set_name ("EditorRulerLabel");
|
||||
scene_mark_label.set_size_request (-1, (int)timebar_height);
|
||||
scene_mark_label.set_alignment (1.0, 0.5);
|
||||
scene_mark_label.set_padding (5,0);
|
||||
scene_mark_label.hide();
|
||||
scene_mark_label.set_no_show_all();
|
||||
|
||||
videotl_bar_height = 4;
|
||||
videotl_label.set_name ("EditorRulerLabel");
|
||||
videotl_label.set_size_request (-1, (int)timebar_height * videotl_bar_height);
|
||||
|
|
|
@ -939,6 +939,7 @@ private:
|
|||
ArdourCanvas::Container* cd_marker_group;
|
||||
ArdourCanvas::Container* section_marker_group;
|
||||
ArdourCanvas::Container* cue_marker_group;
|
||||
ArdourCanvas::Container* scene_marker_group;
|
||||
|
||||
/* parent for groups which themselves contain time markers */
|
||||
ArdourCanvas::Container* _time_markers_group;
|
||||
|
@ -992,6 +993,7 @@ private:
|
|||
Glib::RefPtr<Gtk::ToggleAction> ruler_section_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_marker_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_cue_marker_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_scene_marker_action;
|
||||
bool no_ruler_shown_update;
|
||||
|
||||
Gtk::Widget* ruler_grabbed_widget;
|
||||
|
@ -1083,6 +1085,7 @@ private:
|
|||
ArdourCanvas::Rectangle* cd_marker_bar;
|
||||
ArdourCanvas::Rectangle* section_marker_bar;
|
||||
ArdourCanvas::Rectangle* cue_marker_bar;
|
||||
ArdourCanvas::Rectangle* scene_marker_bar;
|
||||
ArdourCanvas::Line* ruler_separator;
|
||||
|
||||
void toggle_cue_behavior ();
|
||||
|
@ -1099,6 +1102,7 @@ private:
|
|||
Gtk::Label cd_mark_label;
|
||||
Gtk::Label section_mark_label;
|
||||
Gtk::Label cue_mark_label;
|
||||
Gtk::Label scene_mark_label;
|
||||
|
||||
/* videtimline related actions */
|
||||
Gtk::Label videotl_label;
|
||||
|
@ -1593,6 +1597,7 @@ private:
|
|||
void clear_xrun_markers ();
|
||||
void clear_ranges ();
|
||||
void clear_cues ();
|
||||
void clear_scenes ();
|
||||
void clear_locations ();
|
||||
void unhide_markers ();
|
||||
void unhide_ranges ();
|
||||
|
|
|
@ -697,6 +697,7 @@ Editor::register_actions ()
|
|||
ruler_cd_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_section_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-arrangement-ruler"), _("Arrangement"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Location Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_scene_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-scene-marker-ruler"), _("Scene Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_cue_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cue-marker-ruler"), _("Cue Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
|
||||
ActionManager::register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor"));
|
||||
|
@ -727,6 +728,7 @@ Editor::register_actions ()
|
|||
ruler_cd_marker_action->set_active (true);
|
||||
ruler_marker_action->set_active (true);
|
||||
ruler_cue_marker_action->set_active (true);
|
||||
ruler_scene_marker_action->set_active (false);
|
||||
|
||||
ruler_video_action->set_active (false);
|
||||
xjadeo_proc_action->set_active (false);
|
||||
|
|
|
@ -173,6 +173,8 @@ Editor::initialize_canvas ()
|
|||
CANVAS_DEBUG_NAME (section_marker_group, "Arranger marker group");
|
||||
meter_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
|
||||
CANVAS_DEBUG_NAME (meter_group, "meter group");
|
||||
scene_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
|
||||
CANVAS_DEBUG_NAME (scene_marker_group, "scene marker_group");
|
||||
|
||||
float timebar_thickness = timebar_height; //was 4
|
||||
float timebar_top = (timebar_height - timebar_thickness)/2;
|
||||
|
@ -207,6 +209,9 @@ Editor::initialize_canvas ()
|
|||
cue_marker_bar = new ArdourCanvas::Rectangle (cue_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
|
||||
CANVAS_DEBUG_NAME (cue_marker_bar, "Cue Marker Bar");
|
||||
|
||||
scene_marker_bar = new ArdourCanvas::Rectangle (scene_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
|
||||
CANVAS_DEBUG_NAME (cue_marker_bar, "Scene Marker Bar");
|
||||
|
||||
ruler_separator = new ArdourCanvas::Line(_time_markers_group);
|
||||
CANVAS_DEBUG_NAME (ruler_separator, "separator between ruler and main canvas");
|
||||
ruler_separator->set (ArdourCanvas::Duple(0.0, 0.0), ArdourCanvas::Duple(ArdourCanvas::COORD_MAX, 0.0));
|
||||
|
@ -256,6 +261,7 @@ Editor::initialize_canvas ()
|
|||
cd_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), cd_marker_bar, CdMarkerBarItem, "cd marker bar"));
|
||||
section_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), section_marker_bar, SectionMarkerBarItem, "arrangement marker bar"));
|
||||
cue_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), cue_marker_bar, CueMarkerBarItem, "cd marker bar"));
|
||||
scene_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), scene_marker_bar, SceneMarkerBarItem, "scene marker bar"));
|
||||
videotl_group->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_videotl_bar_event), videotl_group));
|
||||
range_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), range_marker_bar, RangeMarkerBarItem, "range marker bar"));
|
||||
transport_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), transport_marker_bar, TransportMarkerBarItem, "transport marker bar"));
|
||||
|
@ -1091,6 +1097,9 @@ Editor::color_handler()
|
|||
section_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("arrangement marker bar", "marker bar"));
|
||||
section_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
|
||||
|
||||
scene_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("arrangement marker bar", "marker bar"));
|
||||
scene_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
|
||||
|
||||
cue_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("cd marker bar", "marker bar"));
|
||||
cue_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
|
||||
|
||||
|
@ -1498,6 +1507,7 @@ Editor::which_canvas_cursor(ItemType type) const
|
|||
case CdMarkerBarItem:
|
||||
case SectionMarkerBarItem:
|
||||
case CueMarkerBarItem:
|
||||
case SceneMarkerBarItem:
|
||||
case VideoBarItem:
|
||||
case TransportMarkerBarItem:
|
||||
case DropZoneItem:
|
||||
|
|
|
@ -27,11 +27,13 @@ enum ItemType {
|
|||
WaveItem,
|
||||
PlayheadCursorItem,
|
||||
MarkerItem,
|
||||
SceneMarkerItem,
|
||||
MarkerBarItem,
|
||||
RangeMarkerBarItem,
|
||||
CdMarkerBarItem,
|
||||
SectionMarkerBarItem,
|
||||
CueMarkerBarItem,
|
||||
SceneMarkerBarItem,
|
||||
VideoBarItem,
|
||||
TransportMarkerBarItem,
|
||||
SelectionItem,
|
||||
|
|
|
@ -145,6 +145,8 @@ Editor::add_new_location_internal (Location* location)
|
|||
color = X_("location loop");
|
||||
} else if (location->is_auto_punch()) {
|
||||
color = X_("location punch");
|
||||
} else if (location->is_scene()) {
|
||||
color = X_("location scene");
|
||||
} else {
|
||||
color = X_("location range");
|
||||
}
|
||||
|
@ -161,6 +163,9 @@ Editor::add_new_location_internal (Location* location)
|
|||
} else if (location->is_section()) {
|
||||
lam->start = new ArdourMarker (*this, *section_marker_group, color, location->name(), marker_type (location), location->start());
|
||||
group = section_marker_group;
|
||||
} else if (location->is_scene()) {
|
||||
lam->start = new ArdourMarker (*this, *scene_marker_group, color, location->name(), marker_type (location), location->start());
|
||||
group = scene_marker_group;
|
||||
} else {
|
||||
lam->start = new ArdourMarker (*this, *marker_group, color, location->name(), marker_type (location), location->start());
|
||||
group = marker_group;
|
||||
|
@ -514,6 +519,8 @@ void Editor::ensure_marker_updated (LocationMarkers* lam, Location* location)
|
|||
{
|
||||
if (location->is_cd_marker()) {
|
||||
reparent_location_markers (lam, cd_marker_group);
|
||||
} else if (location->is_scene()) {
|
||||
reparent_location_markers (lam, scene_marker_group);
|
||||
} else if (location->is_section()) {
|
||||
reparent_location_markers (lam, section_marker_group);
|
||||
} else if (location->is_cue_marker()) {
|
||||
|
|
|
@ -775,6 +775,9 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
}
|
||||
}
|
||||
return true;
|
||||
case SceneMarkerItem:
|
||||
_drags->set (new MarkerDrag (this, item), event);
|
||||
return true;
|
||||
|
||||
case TempoMarkerItem:
|
||||
if (ArdourKeyboard::indicates_constraint (event->button.state)) {
|
||||
|
@ -1731,6 +1734,10 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
marker_context_menu (&event->button, item);
|
||||
break;
|
||||
|
||||
case SceneMarkerItem:
|
||||
marker_context_menu (&event->button, item);
|
||||
break;
|
||||
|
||||
case TempoMarkerItem:
|
||||
case MeterMarkerItem:
|
||||
case BBTMarkerItem:
|
||||
|
|
|
@ -2683,6 +2683,22 @@ Editor::clear_cues ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::clear_scenes ()
|
||||
{
|
||||
begin_reversible_command (_("clear locations"));
|
||||
|
||||
XMLNode &before = _session->locations()->get_state();
|
||||
if (_session->locations()->clear_scene_markers (0, max_samplepos)) {
|
||||
XMLNode &after = _session->locations()->get_state();
|
||||
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
|
||||
|
||||
commit_reversible_command ();
|
||||
} else {
|
||||
abort_reversible_command ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::clear_locations ()
|
||||
{
|
||||
|
|
|
@ -180,6 +180,7 @@ Editor::initialize_rulers ()
|
|||
lab_children.push_back (Element(cd_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(cue_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(scene_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(section_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(videotl_label, PACK_SHRINK, PACK_START));
|
||||
|
||||
|
@ -257,6 +258,10 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
|
|||
}
|
||||
break;
|
||||
|
||||
case SceneMarkerBarItem:
|
||||
ruler_items.push_back (MenuElem (_("Delete all Scenes"), sigc::mem_fun (*this, &Editor::clear_scenes)));
|
||||
break;
|
||||
|
||||
case TempoBarItem:
|
||||
case TempoCurveItem:
|
||||
ruler_items.push_back (MenuElem (_("Add New Tempo"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_tempo_event), where)));
|
||||
|
@ -673,7 +678,26 @@ Editor::update_ruler_visibility ()
|
|||
cue_mark_label.hide();
|
||||
}
|
||||
|
||||
if (ruler_section_action->get_active()) {
|
||||
if (ruler_scene_marker_action->get_active()) {
|
||||
old_unit_pos = scene_marker_group->position().y;
|
||||
if (tbpos != old_unit_pos) {
|
||||
scene_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
|
||||
}
|
||||
scene_marker_group->show();
|
||||
scene_mark_label.show();
|
||||
|
||||
scene_marker_bar->set_outline(false);
|
||||
|
||||
tbpos += timebar_height;
|
||||
tbgpos += timebar_height;
|
||||
visible_timebars++;
|
||||
update_marker_display();
|
||||
} else {
|
||||
scene_marker_group->hide ();
|
||||
scene_mark_label.hide ();
|
||||
}
|
||||
|
||||
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));
|
||||
|
|
|
@ -152,11 +152,13 @@ setup_gtk_ardour_enums ()
|
|||
REGISTER_ENUM (StreamItem);
|
||||
REGISTER_ENUM (PlayheadCursorItem);
|
||||
REGISTER_ENUM (MarkerItem);
|
||||
REGISTER_ENUM (SceneMarkerItem);
|
||||
REGISTER_ENUM (MarkerBarItem);
|
||||
REGISTER_ENUM (RangeMarkerBarItem);
|
||||
REGISTER_ENUM (CdMarkerBarItem);
|
||||
REGISTER_ENUM (SectionMarkerBarItem);
|
||||
REGISTER_ENUM (CueMarkerBarItem);
|
||||
REGISTER_ENUM (SceneMarkerBarItem);
|
||||
REGISTER_ENUM (VideoBarItem);
|
||||
REGISTER_ENUM (TransportMarkerBarItem);
|
||||
REGISTER_ENUM (SelectionItem);
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
#include "pbd/convert.h"
|
||||
#include "pbd/enumwriter.h"
|
||||
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/plugin_manager.h"
|
||||
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
|
||||
#include "instrument_selector.h"
|
||||
|
@ -47,12 +49,20 @@ InstrumentSelector::drop_plugin_ptr()
|
|||
{
|
||||
unset_model ();
|
||||
clear ();
|
||||
_instrument_list->clear ();
|
||||
if (_instrument_list) {
|
||||
_instrument_list->clear ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
InstrumentSelector::refill()
|
||||
{
|
||||
/* XXX conditional can be removed once livetrax has its own simple add
|
||||
tracks dialog.
|
||||
*/
|
||||
if (Profile->get_livetrax()) {
|
||||
return;
|
||||
}
|
||||
TreeModel::iterator iter = get_active();
|
||||
std::string selected;
|
||||
if (iter) {
|
||||
|
|
|
@ -1107,20 +1107,20 @@ OptionEditor::add_path_to_treeview (std::string const & pn, Gtk::Widget& widget)
|
|||
}
|
||||
|
||||
/** Add a component to a given page.
|
||||
* @param pn Page name (will be created if it doesn't already exist)
|
||||
* @param page_name Page name (will be created if it doesn't already exist)
|
||||
* @param o Component.
|
||||
*/
|
||||
void
|
||||
OptionEditor::add_option (std::string const & pn, OptionEditorComponent* o)
|
||||
OptionEditor::add_option (std::string const & page_name, OptionEditorComponent* o)
|
||||
{
|
||||
if (_pages.find (pn) == _pages.end()) {
|
||||
OptionEditorPage* oep = new OptionEditorPage (_notebook, pn);
|
||||
_pages[pn] = oep;
|
||||
if (_pages.find (page_name) == _pages.end()) {
|
||||
OptionEditorPage* oep = new OptionEditorPage (_notebook, page_name);
|
||||
_pages[page_name] = oep;
|
||||
|
||||
add_path_to_treeview (pn, oep->box);
|
||||
add_path_to_treeview (page_name, oep->box);
|
||||
}
|
||||
|
||||
OptionEditorPage* p = _pages[pn];
|
||||
OptionEditorPage* p = _pages[page_name];
|
||||
p->components.push_back (o);
|
||||
|
||||
o->add_to_page (p);
|
||||
|
|
|
@ -462,7 +462,9 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
|||
if (type == DataType::AUDIO || type == DataType::NIL) {
|
||||
if (!inputs) {
|
||||
|
||||
program->add_bundle (session->the_auditioner()->output()->bundle());
|
||||
if (session->the_auditioner()) {
|
||||
program->add_bundle (session->the_auditioner()->output()->bundle());
|
||||
}
|
||||
if (session->click_io()) {
|
||||
program->add_bundle (session->click_io()->bundle());
|
||||
}
|
||||
|
|
|
@ -286,8 +286,10 @@ SoundFileBox::set_session(Session* s)
|
|||
auditioner_connections.drop_connections();
|
||||
} else {
|
||||
auditioner_connections.drop_connections();
|
||||
_session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context());
|
||||
_session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context());
|
||||
if (_session->the_auditioner()) {
|
||||
_session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context());
|
||||
_session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,15 +312,19 @@ SoundFileBox::audition_progress(ARDOUR::samplecnt_t pos, ARDOUR::samplecnt_t len
|
|||
}
|
||||
|
||||
bool
|
||||
SoundFileBox::seek_button_press(GdkEventButton*) {
|
||||
SoundFileBox::seek_button_press (GdkEventButton*)
|
||||
{
|
||||
_seeking = true;
|
||||
return false; // pass on to slider
|
||||
}
|
||||
|
||||
bool
|
||||
SoundFileBox::seek_button_release(GdkEventButton*) {
|
||||
SoundFileBox::seek_button_release (GdkEventButton*)
|
||||
{
|
||||
_seeking = false;
|
||||
_session->the_auditioner()->seek_to_percent(seek_slider.get_value() / 10.0);
|
||||
if (_session->the_auditioner()) {
|
||||
_session->the_auditioner()->seek_to_percent(seek_slider.get_value() / 10.0);
|
||||
}
|
||||
seek_slider.set_sensitive (false);
|
||||
return false; // pass on to slider
|
||||
}
|
||||
|
@ -991,18 +997,20 @@ SoundFileBrowser::add_gain_meter ()
|
|||
{
|
||||
delete gm;
|
||||
|
||||
gm = new GainMeter (_session, 250);
|
||||
|
||||
std::shared_ptr<Route> r = _session->the_auditioner ();
|
||||
|
||||
gm->set_controls (r, r->shared_peak_meter(), r->amp(), r->gain_control());
|
||||
gm->set_fader_name (X_("GainFader"));
|
||||
if (r) {
|
||||
gm = new GainMeter (_session, 250);
|
||||
|
||||
meter_packer.set_border_width (12);
|
||||
meter_packer.pack_start (*gm, false, true);
|
||||
hpacker.pack_end (meter_packer, false, false);
|
||||
meter_packer.show_all ();
|
||||
start_metering ();
|
||||
gm->set_controls (r, r->shared_peak_meter(), r->amp(), r->gain_control());
|
||||
gm->set_fader_name (X_("GainFader"));
|
||||
|
||||
meter_packer.set_border_width (12);
|
||||
meter_packer.pack_start (*gm, false, true);
|
||||
hpacker.pack_end (meter_packer, false, false);
|
||||
meter_packer.show_all ();
|
||||
start_metering ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2126,7 +2134,9 @@ SoundFileOmega::where_combo_changed()
|
|||
void
|
||||
SoundFileOmega::instrument_combo_changed()
|
||||
{
|
||||
_session->the_auditioner()->set_audition_synth_info( instrument_combo.selected_instrument() );
|
||||
if (_session->the_auditioner()) {
|
||||
_session->the_auditioner()->set_audition_synth_info( instrument_combo.selected_instrument() );
|
||||
}
|
||||
}
|
||||
|
||||
MidiTrackNameSource
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
IsXrun = 0x400,
|
||||
IsCueMarker = 0x800,
|
||||
IsSection = 0x1000,
|
||||
IsScene = 0x2000
|
||||
};
|
||||
|
||||
Location (Session &);
|
||||
|
@ -125,6 +126,7 @@ public:
|
|||
bool is_skipping() const { return (_flags & IsSkip) && (_flags & IsSkipping); }
|
||||
bool is_xrun() const { return _flags & IsXrun; }
|
||||
bool is_section() const { return _flags & IsSection; }
|
||||
bool is_scene() const { return (bool) _scene_change && _flags & IsScene; }
|
||||
bool matches (Flags f) const { return _flags & f; }
|
||||
|
||||
/* any range with start < end -- not a marker */
|
||||
|
@ -274,6 +276,7 @@ public:
|
|||
bool clear_ranges ();
|
||||
|
||||
bool clear_cue_markers (samplepos_t start, samplepos_t end);
|
||||
bool clear_scene_markers (samplepos_t start, samplepos_t end);
|
||||
|
||||
void cut_copy_section (timepos_t const& start, timepos_t const& end, timepos_t const& to, SectionOperation const op);
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
SmallScreen,
|
||||
SinglePackage,
|
||||
Mixbus,
|
||||
LiveTrax,
|
||||
LastElement,
|
||||
};
|
||||
|
||||
|
@ -44,6 +45,9 @@ public:
|
|||
bool get_mixbus() const { return bits[Mixbus]; }
|
||||
void set_mixbus() { bits[Mixbus] = true; }
|
||||
|
||||
bool get_livetrax() const { return bits[LiveTrax]; }
|
||||
void set_livetrax() { bits[LiveTrax] = true; }
|
||||
|
||||
void set_single_package () { bits[SinglePackage] = true; }
|
||||
bool get_single_package () const { return bits[SinglePackage]; }
|
||||
|
||||
|
|
|
@ -612,6 +612,7 @@ setup_enum_writer ()
|
|||
REGISTER_CLASS_ENUM (Location, IsXrun);
|
||||
REGISTER_CLASS_ENUM (Location, IsCueMarker);
|
||||
REGISTER_CLASS_ENUM (Location, IsSection);
|
||||
REGISTER_CLASS_ENUM (Location, IsScene);
|
||||
REGISTER_BITS (_Location_Flags);
|
||||
|
||||
REGISTER_CLASS_ENUM (Track, NoFreeze);
|
||||
|
|
|
@ -688,6 +688,14 @@ ARDOUR::init (bool try_optimization, const char* localedir, bool with_gui)
|
|||
|
||||
Profile = new RuntimeProfile;
|
||||
|
||||
if (g_getenv ("MIXBUS")) {
|
||||
ARDOUR::Profile->set_mixbus ();
|
||||
}
|
||||
|
||||
#ifdef LIVETRAX
|
||||
ARDOUR::Profile->set_livetrax ();
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS_VST_SUPPORT
|
||||
if (Config->get_use_windows_vst () && fst_init (0)) {
|
||||
return false;
|
||||
|
|
|
@ -47,9 +47,9 @@ InternalReturn::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t
|
|||
return;
|
||||
}
|
||||
|
||||
for (list<InternalSend*>::iterator i = _sends.begin(); i != _sends.end(); ++i) {
|
||||
if ((*i)->active () && (!(*i)->source_route() || (*i)->source_route()->active())) {
|
||||
bufs.merge_from ((*i)->get_buffers(), nframes);
|
||||
for (auto & send : _sends) {
|
||||
if (send->active () && (!send->source_route() || send->source_route()->active())) {
|
||||
bufs.merge_from (send->get_buffers(), nframes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -801,6 +801,11 @@ Location::set_scene_change (std::shared_ptr<SceneChange> sc)
|
|||
{
|
||||
if (_scene_change != sc) {
|
||||
_scene_change = sc;
|
||||
if (_scene_change) {
|
||||
_flags = Flags (_flags | IsScene);
|
||||
} else {
|
||||
_flags = Flags (_flags & ~IsScene);
|
||||
}
|
||||
_session.set_dirty ();
|
||||
emit_signal (Scene); /* EMIT SIGNAL */
|
||||
}
|
||||
|
@ -2046,6 +2051,60 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end)
|
|||
return removed_at_least_one;
|
||||
}
|
||||
|
||||
bool
|
||||
Locations::clear_scene_markers (samplepos_t start, samplepos_t end)
|
||||
{
|
||||
TempoMap::SharedPtr tmap (TempoMap::use());
|
||||
Temporal::Beats sb;
|
||||
Temporal::Beats eb;
|
||||
bool have_beats = false;
|
||||
vector<Location*> r;
|
||||
bool removed_at_least_one = false;
|
||||
|
||||
{
|
||||
Glib::Threads::RWLock::WriterLock lm (_lock);
|
||||
|
||||
for (LocationList::iterator i = locations.begin(); i != locations.end(); ) {
|
||||
|
||||
if ((*i)->is_scene()) {
|
||||
Location* l (*i);
|
||||
|
||||
if (l->start().time_domain() == AudioTime) {
|
||||
samplepos_t when = l->start().samples();
|
||||
if (when >= start && when < end) {
|
||||
i = locations.erase (i);
|
||||
r.push_back (l);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (!have_beats) {
|
||||
sb = tmap->quarters_at (timepos_t (start));
|
||||
eb = tmap->quarters_at (timepos_t (end));
|
||||
have_beats = true;
|
||||
}
|
||||
|
||||
Temporal::Beats when = l->start().beats();
|
||||
if (when >= sb && when < eb) {
|
||||
r.push_back (l);
|
||||
i = locations.erase (i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
removed_at_least_one = true;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
} /* end lock scope */
|
||||
|
||||
for (auto & l : r) {
|
||||
removed (l); /* EMIT SIGNAL */
|
||||
delete l;
|
||||
}
|
||||
|
||||
return removed_at_least_one;
|
||||
}
|
||||
|
||||
void
|
||||
Locations::start_domain_bounce (Temporal::DomainBounceInfo& cmd)
|
||||
{
|
||||
|
|
|
@ -200,8 +200,7 @@ PannerShell::set_state (const XMLNode& node, int version)
|
|||
if ((*niter)->get_property (X_("uri"), str)) {
|
||||
PannerInfo* p = PannerManager::instance().get_by_uri(str);
|
||||
if (p) {
|
||||
_panner.reset (p->descriptor.factory (
|
||||
_is_send ? _pannable_internal : _pannable_route, _session.get_speakers ()));
|
||||
_panner.reset (p->descriptor.factory (_is_send ? _pannable_internal : _pannable_route, _session.get_speakers ()));
|
||||
_current_panner_uri = p->descriptor.panner_uri;
|
||||
_panner_gui_uri = p->descriptor.gui_uri;
|
||||
if (_is_send) {
|
||||
|
@ -473,7 +472,7 @@ PannerShell::set_linked_to_route (bool onoff)
|
|||
*/
|
||||
if (pannable()) {
|
||||
XMLNode state = pannable()->get_state();
|
||||
pannable()->set_state(state, Stateful::loading_state_version);
|
||||
pannable()->set_state (state, Stateful::loading_state_version);
|
||||
}
|
||||
|
||||
_panlinked = onoff;
|
||||
|
|
|
@ -117,6 +117,7 @@ namespace Gtkmm2ext {
|
|||
|
||||
/* C++ API for rounded rectangles */
|
||||
|
||||
LIBGTKMM2EXT_API void rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
LIBGTKMM2EXT_API void rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
LIBGTKMM2EXT_API void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
LIBGTKMM2EXT_API void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
|
@ -128,6 +129,7 @@ namespace Gtkmm2ext {
|
|||
|
||||
/* C API for rounded rectangles */
|
||||
|
||||
LIBGTKMM2EXT_API void rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
LIBGTKMM2EXT_API void rounded_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
LIBGTKMM2EXT_API void rounded_top_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
LIBGTKMM2EXT_API void rounded_top_left_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
|
|
|
@ -588,6 +588,12 @@ Gtkmm2ext::container_clear (Gtk::Container& c, bool and_delete)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double /*r*/)
|
||||
{
|
||||
cairo_rectangle (context->cobj(), x, y, w, h);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
|
@ -631,6 +637,12 @@ Gtkmm2ext::rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context> context,
|
|||
rounded_right_half_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rectangle (cairo_t* cr, double x, double y, double w, double h, double /*r*/)
|
||||
{
|
||||
cairo_rectangle (cr, x, y, w, h);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
|
|
|
@ -53,6 +53,7 @@ using namespace std;
|
|||
ArdourButton::Element ArdourButton::default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text);
|
||||
ArdourButton::Element ArdourButton::led_default_elements = ArdourButton::Element (ArdourButton::default_elements|ArdourButton::Indicator);
|
||||
ArdourButton::Element ArdourButton::just_led_default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Indicator);
|
||||
ArdourButton::Tweaks ArdourButton::default_tweaks = ArdourButton::Tweaks (0);
|
||||
|
||||
ArdourButton::ArdourButton (Element e, bool toggle)
|
||||
: _markup (false)
|
||||
|
@ -60,7 +61,7 @@ ArdourButton::ArdourButton (Element e, bool toggle)
|
|||
, _icon (ArdourIcon::NoIcon)
|
||||
, _icon_render_cb (0)
|
||||
, _icon_render_cb_data (0)
|
||||
, _tweaks (Tweaks (0))
|
||||
, _tweaks (default_tweaks)
|
||||
, _char_pixel_width (0)
|
||||
, _char_pixel_height (0)
|
||||
, _char_avg_pixel_width (0)
|
||||
|
@ -108,7 +109,7 @@ ArdourButton::ArdourButton (const std::string& str, Element e, bool toggle)
|
|||
: _markup (false)
|
||||
, _elements (e)
|
||||
, _icon (ArdourIcon::NoIcon)
|
||||
, _tweaks (Tweaks (0))
|
||||
, _tweaks (default_tweaks)
|
||||
, _char_pixel_width (0)
|
||||
, _char_pixel_height (0)
|
||||
, _char_avg_pixel_width (0)
|
||||
|
@ -300,22 +301,25 @@ ArdourButton::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_
|
|||
}
|
||||
|
||||
void (*rounded_function)(cairo_t*, double, double, double, double, double);
|
||||
|
||||
switch (_corner_mask) {
|
||||
case 0x1: /* upper left only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_left_rectangle;
|
||||
break;
|
||||
case 0x2: /* upper right only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_right_rectangle;
|
||||
break;
|
||||
case 0x3: /* upper only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_rectangle;
|
||||
break;
|
||||
/* should really have functions for lower right, lower left,
|
||||
lower only, but for now, we don't
|
||||
*/
|
||||
default:
|
||||
rounded_function = Gtkmm2ext::rounded_rectangle;
|
||||
if (corner_radius) {
|
||||
switch (_corner_mask) {
|
||||
case 0x1: /* upper left only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_left_rectangle;
|
||||
break;
|
||||
case 0x2: /* upper right only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_right_rectangle;
|
||||
break;
|
||||
case 0x3: /* upper only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_rectangle;
|
||||
break;
|
||||
/* should really have functions for lower right, lower left,
|
||||
lower only, but for now, we don't
|
||||
*/
|
||||
default:
|
||||
rounded_function = Gtkmm2ext::rounded_rectangle;
|
||||
}
|
||||
} else {
|
||||
rounded_function = Gtkmm2ext::rectangle;
|
||||
}
|
||||
|
||||
// draw edge (filling a rect underneath, rather than stroking a border on top, allows the corners to be lighter-weight.
|
||||
|
|
|
@ -69,6 +69,9 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ
|
|||
ForceFlat = 0x20,
|
||||
};
|
||||
|
||||
static Tweaks default_tweaks;
|
||||
static void set_default_tweaks (Tweaks t) { default_tweaks = t; }
|
||||
|
||||
Tweaks tweaks() const { return _tweaks; }
|
||||
void set_tweaks (Tweaks);
|
||||
|
||||
|
|
Loading…
Reference in New Issue