Delete trailing whitespace

git-svn-id: svn://localhost/ardour2/branches/3.0@9656 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2011-06-01 17:00:29 +00:00
parent a473d630eb
commit ed626628b5
221 changed files with 2322 additions and 2322 deletions

View file

@ -41,7 +41,7 @@ AmbiguousFileDialog::AmbiguousFileDialog (const string& file, const vector<strin
}
get_vbox()->pack_start (*manage (new Label (_("\n\nPlease select the path that you want to get the file from."))));
add_button (_("Done"), RESPONSE_OK);
show_all ();

View file

@ -32,4 +32,4 @@ private:
std::vector<Gtk::RadioButton*> _radio_buttons;
};

View file

@ -175,7 +175,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
auditioning_alert_button (_("AUDITION")),
solo_alert_button (_("SOLO")),
error_log_button (_("Errors"))
{
@ -259,7 +259,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
ARDOUR::Session::AskAboutSampleRateMismatch.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::sr_mismatch_dialog, this, _1, _2));
/* handle requests to quit (coming from JACK session) */
ARDOUR::Session::Quit.connect (forever_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::finish, this), gui_context ());
/* handle requests to deal with missing files */
@ -309,11 +309,11 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
TimeAxisViewItem::set_constant_heights ();
/* The following must happen after ARDOUR::init() so that Config is set up */
location_ui = new ActionWindowProxy<LocationUIWindow> (X_("locations"), Config->extra_xml (X_("UI")), X_("ToggleLocations"));
big_clock_window = new ActionWindowProxy<Gtk::Window> (X_("bigclock"), Config->extra_xml (X_("UI")), X_("ToggleBigClock"));
speaker_config_window = new ActionWindowProxy<SpeakerDialog> (X_("speakerconf"), Config->extra_xml (X_("UI")), X_("toggle-speaker-config"));
for (ARDOUR::DataType::iterator i = ARDOUR::DataType::begin(); i != ARDOUR::DataType::end(); ++i) {
_global_port_matrix[*i] = new ActionWindowProxy<GlobalPortMatrixWindow> (
string_compose ("GlobalPortMatrix-%1", (*i).to_string()),
@ -327,7 +327,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
SpeakerDialog* s = new SpeakerDialog ();
s->signal_unmap().connect (sigc::bind (sigc::ptr_fun (&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/toggle-speaker-config")));
speaker_config_window->set (s);
starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup));
stopping.connect (sigc::mem_fun(*this, &ARDOUR_UI::shutdown));
}
@ -340,7 +340,7 @@ ARDOUR_UI::run_startup (bool should_be_new, string load_template)
_startup = new ArdourStartup ();
XMLNode* audio_setup = Config->extra_xml ("AudioSetup");
if (audio_setup && _startup->engine_control()) {
_startup->engine_control()->set_state (*audio_setup);
}
@ -409,7 +409,7 @@ ARDOUR_UI::post_engine ()
if (setup_windows ()) {
throw failed_constructor ();
}
check_memory_locking();
/* this is the first point at which all the keybindings are available */
@ -712,7 +712,7 @@ ARDOUR_UI::startup ()
for (ARDOUR::DataType::iterator i = ARDOUR::DataType::begin(); i != ARDOUR::DataType::end(); ++i) {
add_window_proxy (_global_port_matrix[*i]);
}
BootMessage (string_compose (_("%1 is ready for use"), PROGRAM_NAME));
}
@ -1588,7 +1588,7 @@ ARDOUR_UI::transport_record (bool roll)
//cerr << "ARDOUR_UI::transport_record () called roll = " << roll << " _session->record_status() = " << _session->record_status() << endl;
}
void
void
ARDOUR_UI::transport_roll ()
{
if (!_session) {
@ -1637,7 +1637,7 @@ ARDOUR_UI::transport_roll ()
void
ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
{
if (!_session) {
return;
}
@ -1664,7 +1664,7 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
/* drop out of loop/range playback but leave transport rolling */
if (_session->get_play_loop()) {
if (Config->get_seamless_loop()) {
/* the disk buffers contain copies of the loop - we can't
/* the disk buffers contain copies of the loop - we can't
just keep playing, so stop the transport. the user
can restart as they wish.
*/
@ -1677,8 +1677,8 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
} else if (_session->get_play_range ()) {
affect_transport = false;
_session->request_play_range (0, true);
}
}
}
}
if (affect_transport) {
if (rolling) {
@ -1687,7 +1687,7 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
if (join_play_range_button.get_active()) {
_session->request_play_range (&editor->get_selection().time, true);
}
_session->request_transport_speed (1.0f);
}
}
@ -1699,25 +1699,25 @@ ARDOUR_UI::toggle_session_auto_loop ()
if (!_session) {
return;
}
if (_session->get_play_loop()) {
if (_session->transport_rolling()) {
Location * looploc = _session->locations()->auto_loop_location();
if (looploc) {
_session->request_locate (looploc->start(), true);
_session->request_play_loop (false);
}
} else {
_session->request_play_loop (false);
}
} else {
Location * looploc = _session->locations()->auto_loop_location();
if (looploc) {
_session->request_play_loop (true);
}
@ -1837,13 +1837,13 @@ ARDOUR_UI::map_transport_state ()
auto_loop_button.set_visual_state (0);
} else if (_session->get_play_loop ()) {
auto_loop_button.set_visual_state (1);
play_selection_button.set_visual_state (0);
roll_button.set_visual_state (0);
} else {
roll_button.set_visual_state (1);
play_selection_button.set_visual_state (0);
auto_loop_button.set_visual_state (0);
@ -2081,7 +2081,7 @@ ARDOUR_UI::snapshot_session (bool switch_to_it)
char timebuf[128];
time_t n;
struct tm local_time;
time (&n);
localtime_r (&n, &local_time);
strftime (timebuf, sizeof(timebuf), "%FT%T", &local_time);
@ -2151,7 +2151,7 @@ ARDOUR_UI::save_state (const string & name, bool switch_to_it)
}
_session->add_extra_xml (*node);
save_state_canfail (name, switch_to_it);
}
@ -2559,7 +2559,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
/* not connected to the AudioEngine, so quit to avoid an infinite loop */
exit (1);
}
if (!ARDOUR_COMMAND_LINE::immediate_save.empty()) {
_session->save_state (ARDOUR_COMMAND_LINE::immediate_save, false);
exit (1);
@ -2992,7 +2992,7 @@ ARDOUR_UI::cleanup ()
(Gtk::ButtonsType)(Gtk::BUTTONS_NONE));
checker.set_title (_("Clean-up"));
checker.set_secondary_text(_("Clean-up is a destructive operation.\n\
ALL undo/redo information will be lost if you clean-up.\n\
Clean-up will move all unused files to a \"dead\" location."));
@ -3183,7 +3183,7 @@ ARDOUR_UI::editor_settings () const
} else {
node = Config->instant_xml(X_("Editor"));
}
if (!node) {
if (getenv("ARDOUR_INSTANT_XML_PATH")) {
node = Config->instant_xml(getenv("ARDOUR_INSTANT_XML_PATH"));

View file

@ -214,7 +214,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
uint32_t how_many,
std::string const & name_template
) {
session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
}
@ -225,7 +225,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
uint32_t how_many,
std::string const & name_template
) {
session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
}
@ -234,7 +234,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
uint32_t how_many,
std::string const & name_template
) {
session_add_midi_route (true, route_group, how_many, name_template);
}
@ -611,7 +611,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
/* Keyboard Handling */
ArdourKeyboard* keyboard;
/* Keymap handling */
void install_actions ();

View file

@ -195,7 +195,7 @@ XMLNode*
ARDOUR_UI::tearoff_settings (const char* name) const
{
XMLNode* ui_node = Config->extra_xml(X_("UI"));
if (ui_node) {
XMLNode* tearoff_node = ui_node->child (X_("Tearoffs"));
if (tearoff_node) {

View file

@ -117,13 +117,13 @@ ARDOUR_UI::toggle_mixer_window ()
}
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (tact->get_active()) {
goto_mixer_window ();
} else {
mixer->hide ();
}
}
}
void
ARDOUR_UI::toggle_mixer_on_top ()
@ -134,19 +134,19 @@ ARDOUR_UI::toggle_mixer_on_top ()
}
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (tact->get_active()) {
/* Toggle the mixer to `visible' if required */
act = ActionManager::get_action (X_("Common"), X_("toggle-mixer"));
if (act) {
tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (!tact->get_active()) {
tact->set_active ();
}
}
goto_mixer_window ();
} else {
goto_editor_window ();

View file

@ -97,7 +97,7 @@ ARDOUR_UI::set_session (Session *s)
big_clock.set_session (s);
preroll_clock.set_session (s);
postroll_clock.set_session (s);
/* sensitize menu bar options that are now valid */
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, true);

View file

@ -161,7 +161,7 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_action (main_actions, X_("ExportAudio"), _("Export To Audio File(s)..."), sigc::mem_fun (*editor, &PublicEditor::export_audio));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (main_actions, X_("StemExport"), _("Stem export..."), sigc::mem_fun (*editor, &PublicEditor::stem_export));
ActionManager::session_sensitive_actions.push_back (act);
@ -616,7 +616,7 @@ ARDOUR_UI::big_clock_realized ()
Pango::FontDescription fd (big_clock.get_style()->get_font());
original_big_clock_font_size = fd.get_size ();
if (!fd.get_size_is_absolute ()) {
original_big_clock_font_size /= PANGO_SCALE;
}
@ -661,7 +661,7 @@ ARDOUR_UI::idle_big_clock_text_resizer (int, int)
win->get_geometry (x, y, w, h, d);
double scale = min (((double) w / (double) original_big_clock_width),
double scale = min (((double) w / (double) original_big_clock_width),
((double) h / (double) original_big_clock_height));
int size = (int) lrintf (original_big_clock_font_size * scale);
@ -671,14 +671,14 @@ ARDOUR_UI::idle_big_clock_text_resizer (int, int)
string family = fd.get_family();
char buf[family.length()+16];
snprintf (buf, family.length()+16, "%s %d", family.c_str(), size);
try {
try {
Pango::FontDescription fd (buf);
Glib::RefPtr<Gtk::RcStyle> rcstyle = big_clock.get_modifier_style ();
rcstyle->set_font (fd);
big_clock.modify_style (rcstyle);
}
}
catch (...) {
/* oh well, do nothing */
}
@ -709,7 +709,7 @@ ARDOUR_UI::save_ardour_state ()
window_node->add_child_nocopy (*((*i)->get_state ()));
}
}
/* tearoffs */
XMLNode* tearoff_node = new XMLNode (X_("Tearoffs"));
@ -718,20 +718,20 @@ ARDOUR_UI::save_ardour_state ()
XMLNode* t = new XMLNode (X_("transport"));
transport_tearoff->add_state (*t);
tearoff_node->add_child_nocopy (*t);
}
}
if (mixer && mixer->monitor_section()) {
XMLNode* t = new XMLNode (X_("monitor-section"));
mixer->monitor_section()->tearoff().add_state (*t);
tearoff_node->add_child_nocopy (*t);
}
}
if (editor && editor->mouse_mode_tearoff()) {
XMLNode* t = new XMLNode (X_("mouse-mode"));
editor->mouse_mode_tearoff ()->add_state (*t);
tearoff_node->add_child_nocopy (*t);
}
}
window_node->add_child_nocopy (*tearoff_node);
Config->add_extra_xml (*window_node);
@ -760,7 +760,7 @@ void
ARDOUR_UI::toggle_global_port_matrix (ARDOUR::DataType t)
{
std::string const action = string_compose ("toggle-%1-connection-manager", t.to_string ());
if (_global_port_matrix[t]->get() == 0) {
_global_port_matrix[t]->set (new GlobalPortMatrixWindow (_session, t));
_global_port_matrix[t]->get()->signal_unmap().connect(sigc::bind (sigc::ptr_fun (&ActionManager::uncheck_toggleaction), string_compose (X_("<Actions>/Common/%1"), action)));

View file

@ -45,7 +45,7 @@ ARDOUR_UI::create_mixer ()
mixer->signal_window_state_event().connect (sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::main_window_state_event_handler), false));
mixer->signal_unmap().connect (sigc::bind (sigc::ptr_fun (&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/toggle-mixer")));
mixer->signal_unmap().connect (sigc::bind (sigc::ptr_fun (&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/toggle-mixer-on-top")));
return 0;
}

View file

@ -51,7 +51,7 @@ void
ARDOUR_UI::toggle_keep_tearoffs ()
{
ActionManager::toggle_config_state ("Common", "KeepTearoffs", &RCConfiguration::set_keep_tearoffs, &RCConfiguration::get_keep_tearoffs);
ARDOUR_UI::toggle_editing_space ();
}
@ -68,7 +68,7 @@ when the pull up/down setting is non-zero."));
return;
}
}
ActionManager::toggle_config_state_foo ("Transport", "ToggleExternalSync", sigc::mem_fun (_session->config, &SessionConfiguration::set_external_sync), sigc::mem_fun (_session->config, &SessionConfiguration::get_external_sync));
}
}
@ -240,12 +240,12 @@ ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
}
act->set_sensitive (false);
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (!tact) {
return;
}
if (!tact->get_active()) {
tact->set_active ();
}
@ -336,7 +336,7 @@ ARDOUR_UI::parameter_changed (std::string p)
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
}
} else if (p == "send-mtc") {
ActionManager::map_some_state ("options", "SendMTC", &RCConfiguration::get_send_mtc);

View file

@ -67,7 +67,7 @@ const uint32_t AudioClock::field_length[(int) AudioClock::AudioFrames+1] = {
10 /* Audio Frame */
};
AudioClock::AudioClock (const string& clock_name, bool transient, const string& widget_name,
AudioClock::AudioClock (const string& clock_name, bool transient, const string& widget_name,
bool allow_edit, bool follows_playhead, bool duration, bool with_info)
: _name (clock_name),
is_transient (transient),
@ -87,7 +87,7 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string&
_canonical_time (0)
{
/* XXX: these are leaked, but I don't suppose it's the end of the world */
_eboxes[Timecode_Hours] = new EventBox;
_eboxes[Timecode_Minutes] = new EventBox;
_eboxes[Timecode_Seconds] = new EventBox;
@ -113,7 +113,7 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string&
_labels[Beats] = new Label;
_labels[Ticks] = new Label;
_labels[AudioFrames] = new Label;
last_when = 0;
last_pdelta = 0;
last_sdelta = 0;
@ -283,7 +283,7 @@ void
AudioClock::setup_events ()
{
clock_base.set_flags (CAN_FOCUS);
for (std::map<Field, EventBox*>::iterator i = _eboxes.begin(); i != _eboxes.end(); ++i) {
i->second->add_events (
Gdk::BUTTON_PRESS_MASK |
@ -293,7 +293,7 @@ AudioClock::setup_events ()
Gdk::FOCUS_CHANGE_MASK |
Gdk::POINTER_MOTION_MASK |
Gdk::SCROLL_MASK);
i->second->set_flags (CAN_FOCUS);
i->second->signal_motion_notify_event().connect (sigc::bind (sigc::mem_fun (*this, &AudioClock::field_motion_notify_event), i->first));
i->second->signal_button_press_event().connect (sigc::bind (sigc::mem_fun (*this, &AudioClock::field_button_press_event), i->first));
@ -393,7 +393,7 @@ AudioClock::session_configuration_changed (std::string p)
if (p != "timecode-offset" && p != "timecode-offset-negative") {
return;
}
framecnt_t current;
switch (_mode) {
@ -1159,7 +1159,7 @@ AudioClock::current_time (framepos_t pos) const
if (!_canonical_time_is_displayed) {
return _canonical_time;
}
framepos_t ret = 0;
switch (_mode) {
@ -1770,7 +1770,7 @@ AudioClock::locate ()
if (!_session || is_duration) {
return;
}
_session->request_locate (current_time(), _session->transport_rolling ());
}
@ -1909,7 +1909,7 @@ AudioClock::set_is_duration (bool yn)
if (yn == is_duration) {
return;
}
is_duration = yn;
set (last_when, true, 0, 's');
}

View file

@ -44,7 +44,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
Off
};
AudioClock (const std::string& clock_name, bool is_transient, const std::string& widget_name,
AudioClock (const std::string& clock_name, bool is_transient, const std::string& widget_name,
bool editable, bool follows_playhead, bool duration = false, bool with_info = false);
Mode mode() const { return _mode; }

View file

@ -74,14 +74,14 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion>
b->set_spacing (6);
b->pack_start (_peak_amplitude);
b->pack_start (*Gtk::manage (new Gtk::Label (_("dBFS"))), false, false);
_peak_amplitude_label.set_name ("AudioRegionEditorLabel");
_peak_amplitude_label.set_text (_("Peak amplitude:"));
_peak_amplitude_label.set_alignment (1, 0.5);
_table.attach (_peak_amplitude_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (*b, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
gain_changed ();
gain_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &AudioRegionEditor::gain_adjustment_changed));
@ -106,7 +106,7 @@ void
AudioRegionEditor::region_changed (const PBD::PropertyChange& what_changed)
{
RegionEditor::region_changed (what_changed);
if (what_changed.contains (ARDOUR::Properties::scale_amplitude)) {
gain_changed ();
}

View file

@ -57,14 +57,14 @@ class AudioRegionEditor : public RegionEditor
~AudioRegionEditor ();
void peak_amplitude_thread ();
private:
void region_changed (PBD::PropertyChange const &);
void gain_changed ();
void gain_adjustment_changed ();
boost::shared_ptr<ARDOUR::AudioRegion> _audio_region;
Gtk::Label gain_label;

View file

@ -168,7 +168,7 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
fade_out_handle->property_outline_pixels() = 0;
fade_out_handle->set_data ("regionview", this);
fade_position_line = new ArdourCanvas::SimpleLine (*group);
fade_position_line->property_color_rgba() = 0xBBBBBBAA;
fade_position_line->property_y1() = 7;
@ -377,11 +377,11 @@ AudioRegionView::region_resized (const PropertyChange& what_changed)
}
}
}
/* hide transient lines that extend beyond the region end */
list<std::pair<framepos_t, ArdourCanvas::Line*> >::iterator l;
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
if (l->first > _region->length() - 1) {
l->second->hide();
@ -405,7 +405,7 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
}
else {
fade_in_handle->show();
fade_out_handle->show();
fade_out_handle->show();
}
}
@ -415,9 +415,9 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
list<std::pair<framepos_t, ArdourCanvas::Line*> >::iterator l;
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
float x_pos = trackview.editor().frame_to_pixel (*i);
ArdourCanvas::Points points;
points.push_back(Gnome::Art::Point(x_pos, 2.0)); // first x-coord needs to be a non-normal value
points.push_back(Gnome::Art::Point(x_pos, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
@ -425,7 +425,7 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
(*l).first = *i;
(*l).second->property_points() = points;
}
reset_fade_shapes ();
}
@ -498,16 +498,16 @@ AudioRegionView::set_height (gdouble height)
}
reset_fade_shapes ();
/* Update hights for any active feature lines */
list<std::pair<framepos_t, ArdourCanvas::Line*> >::iterator l;
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
float pos_x = trackview.editor().frame_to_pixel((*l).first);
ArdourCanvas::Points points;
points.push_back(Gnome::Art::Point(pos_x, 2.0)); // first x-coord needs to be a non-normal value
points.push_back(Gnome::Art::Point(pos_x, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
@ -1007,7 +1007,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
gain_line->view_to_model_coord (x, y);
/* XXX STATEFUL: can't convert to stateful diff until we
/* XXX STATEFUL: can't convert to stateful diff until we
can represent automation data with it.
*/
@ -1268,7 +1268,7 @@ AudioRegionView::set_frame_color ()
}
TimeAxisViewItem::set_frame_color ();
uint32_t wc;
uint32_t fc;
@ -1387,9 +1387,9 @@ AudioRegionView::transients_changed ()
while (feature_lines.size() < analysis_features.size()) {
ArdourCanvas::Line* canvas_item = new ArdourCanvas::Line(*group);
ArdourCanvas::Points points;
points.push_back(Gnome::Art::Point(-1.0, 2.0)); // first x-coord needs to be a non-normal value
points.push_back(Gnome::Art::Point(1.0, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
@ -1404,11 +1404,11 @@ AudioRegionView::transients_changed ()
canvas_item->raise_to_top ();
canvas_item->show ();
canvas_item->set_data ("regionview", this);
canvas_item->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_feature_line_event), canvas_item, this));
feature_lines.push_back (make_pair(0, canvas_item));
feature_lines.push_back (make_pair(0, canvas_item));
}
while (feature_lines.size() > analysis_features.size()) {
@ -1419,20 +1419,20 @@ AudioRegionView::transients_changed ()
AnalysisFeatureList::const_iterator i;
list<std::pair<framepos_t, ArdourCanvas::Line*> >::iterator l;
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
ArdourCanvas::Points points;
float *pos = new float;
*pos = trackview.editor().frame_to_pixel (*i);
points.push_back(Gnome::Art::Point(*pos, 2.0)); // first x-coord needs to be a non-normal value
points.push_back(Gnome::Art::Point(*pos, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
(*l).second->property_points() = points;
(*l).second->set_data ("position", pos);
(*l).first = *i;
}
}
@ -1446,16 +1446,16 @@ AudioRegionView::update_transient(float /*old_pos*/, float new_pos)
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
/* Line has been updated in drag so we compare to new_pos */
float* pos = (float*) (*l).second->get_data ("position");
if (rint(new_pos) == rint(*pos)) {
if (rint(new_pos) == rint(*pos)) {
framepos_t old_frame = (*l).first;
framepos_t new_frame = trackview.editor().pixel_to_frame (new_pos);
_region->update_transient (old_frame, new_frame);
break;
}
}
@ -1473,7 +1473,7 @@ AudioRegionView::remove_transient(float pos)
float *line_pos = (float*) (*l).second->get_data ("position");
if (rint(pos) == rint(*line_pos)) {
_region->remove_transient ((*l).first);
_region->remove_transient ((*l).first);
break;
}
}

View file

@ -101,13 +101,13 @@ class AudioRegionView : public RegionView
void reset_fade_in_shape_width (framecnt_t);
void reset_fade_out_shape_width (framecnt_t);
void show_fade_line(framepos_t pos);
void hide_fade_line();
void set_fade_visibility (bool);
void update_coverage_frames (LayerDisplay);
void update_transient(float old_pos, float new_pos);
void remove_transient(float pos);
@ -124,33 +124,33 @@ class AudioRegionView : public RegionView
to specify their visibility requirements
to the TimeAxisViewItem parent class
*/
enum Flags {
EnvelopeVisible = 0x1,
WaveformVisible = 0x4,
WaveformRectified = 0x8,
WaveformLogScaled = 0x10,
};
std::vector<ArdourCanvas::WaveView *> waves;
std::vector<ArdourCanvas::WaveView *> tmp_waves; ///< see ::create_waves()
std::list<std::pair<framepos_t, ArdourCanvas::Line*> > feature_lines;
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
ArdourCanvas::Polygon* fade_in_shape;
ArdourCanvas::Polygon* fade_out_shape;
ArdourCanvas::SimpleRect* fade_in_handle; ///< fade in handle, or 0
ArdourCanvas::SimpleRect* fade_out_handle; ///< fade out handle, or 0
ArdourCanvas::SimpleLine* fade_position_line;
AudioRegionGainLine * gain_line;
double _amplitude_above_axis;
uint32_t _flags;
uint32_t fade_color;
void reset_fade_shapes ();
void reset_fade_in_shape ();
void reset_fade_out_shape ();
@ -158,33 +158,33 @@ class AudioRegionView : public RegionView
void fade_out_changed ();
void fade_in_active_changed ();
void fade_out_active_changed ();
void region_resized (const PBD::PropertyChange&);
void region_muted ();
void region_scale_amplitude_changed ();
void region_renamed ();
void create_one_wave (uint32_t, bool);
void peaks_ready_handler (uint32_t);
void set_flags (XMLNode *);
void store_flags ();
void set_colors ();
void compute_colors (Gdk::Color const &);
void reset_width_dependent_items (double pixel_width);
void set_waveview_data_src();
void set_frame_color ();
void color_handler ();
std::vector<GnomeCanvasWaveViewCache*> wave_caches;
void transients_changed();
private:
void setup_fade_handle_positions ();
/** A ScopedConnection for each PeaksReady callback (one per channel). Each member
* may be 0 if no connection exists.
*/

View file

@ -121,7 +121,7 @@ AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_
if (recording) {
region_view = new AudioRegionView (_canvas_group, _trackview, region,
_samples_per_unit, region_color, recording, TimeAxisViewItem::Visibility(
TimeAxisViewItem::ShowFrame |
TimeAxisViewItem::ShowFrame |
TimeAxisViewItem::HideFrameRight |
TimeAxisViewItem::HideFrameLeft |
TimeAxisViewItem::HideFrameTB));
@ -163,7 +163,7 @@ RegionView*
AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wait_for_waves, bool recording)
{
RegionView *region_view = create_region_view (r, wait_for_waves, recording);
if (region_view == 0) {
return 0;
}
@ -483,8 +483,8 @@ AudioStreamView::setup_rec_box ()
+ _trackview.track()->get_captured_frames(rec_regions.size()-1);
}
PropertyList plist;
PropertyList plist;
plist.add (Properties::start, start);
plist.add (Properties::length, 1);
plist.add (Properties::name, string());
@ -636,44 +636,44 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
if (!Config->get_show_waveforms_while_recording ()) {
return;
}
uint32_t n = 0;
for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator tmp = iter;
++tmp;
assert (n < rec_rects.size());
if (!canvas_item_visible (rec_rects[n].rectangle)) {
/* rect already hidden, this region is done */
iter = tmp;
continue;
}
boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion>(iter->first);
if (!region) {
iter = tmp;
continue;
}
framecnt_t origlen = region->length();
if (region == rec_regions.back().first && rec_active) {
if (last_rec_data_frame > region->start()) {
framecnt_t nlen = last_rec_data_frame - region->start();
if (nlen != region->length()) {
region->suspend_property_changes ();
region->set_position (_trackview.track()->get_capture_start_frame(n));
region->set_length (nlen);
region->resume_property_changes ();
if (origlen == 1) {
/* our special initial length */
add_region_view_internal (region, false, true);
@ -681,7 +681,7 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
}
check_record_layers (region, (region->position() - region->start() + start + cnt));
/* also update rect */
ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
gdouble xend = _trackview.editor().frame_to_pixel (region->position() + region->length());
@ -689,11 +689,11 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
}
} else {
framecnt_t nlen = _trackview.track()->get_captured_frames(n);
if (nlen != region->length()) {
if (region->source_length(0) >= region->start() + nlen) {
region->suspend_property_changes ();
@ -843,7 +843,7 @@ void
AudioStreamView::horizontal_position_changed ()
{
/* we only `draw' the bit of the curve that is visible, so we need to update here */
for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
i->second->horizontal_position_changed ();
}

View file

@ -109,7 +109,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session* sess, boost::sh
}
if (_route->panner()) {
_route->panner_shell()->Changed.connect (*this, invalidator (*this),
_route->panner_shell()->Changed.connect (*this, invalidator (*this),
boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context());
}
@ -202,7 +202,7 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
ensure_pan_views (show);
} else if (param.type() == PluginAutomation) {
/* handled elsewhere */
} else {
@ -241,8 +241,8 @@ AudioTimeAxisView::ensure_pan_views (bool show)
boost::shared_ptr<AutomationTimeAxisView> t (
new AutomationTimeAxisView (_session,
_route,
_route->pannable(),
_route,
_route->pannable(),
pan_control,
pan_control->parameter (),
_editor,
@ -301,7 +301,7 @@ AudioTimeAxisView::update_pan_track_visibility ()
(*i)->hide ();
(*i)->get_state_node()->add_property ("shown", X_("no"));
}
/* now trigger a redisplay */
if (!no_redraw) {
_route->gui_changed (X_("visible_tracks"), (void *) 0); /* EMIT_SIGNAL */
@ -316,13 +316,13 @@ AudioTimeAxisView::show_all_automation (bool apply_to_selection)
if (apply_to_selection) {
_editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_all_automation, _1, false));
} else {
no_redraw = true;
RouteTimeAxisView::show_all_automation ();
no_redraw = false;
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
}
@ -334,11 +334,11 @@ AudioTimeAxisView::show_existing_automation (bool apply_to_selection)
_editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_existing_automation, _1, false));
} else {
no_redraw = true;
RouteTimeAxisView::show_existing_automation ();
no_redraw = false;
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
}
@ -350,9 +350,9 @@ AudioTimeAxisView::hide_all_automation (bool apply_to_selection)
_editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::hide_all_automation, _1, false));
} else {
no_redraw = true;
RouteTimeAxisView::hide_all_automation();
no_redraw = false;
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
@ -479,7 +479,7 @@ AudioTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> w
as its automation lane can be accessed using the special "Fader" menu
option
*/
boost::shared_ptr<Processor> p = wp.lock ();
if (!p) {
return;

View file

@ -111,7 +111,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
void update_pan_track_visibility ();
void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
Gtk::CheckMenuItem* gain_automation_item;
std::list<boost::shared_ptr<AutomationTimeAxisView> > pan_tracks;
Gtk::CheckMenuItem* pan_automation_item;

View file

@ -122,7 +122,7 @@ AutomationController::end_touch ()
bool mark = false;
double when = 0;
if (_controllable->session().transport_rolling()) {
mark = true;
when = _controllable->session().transport_frame();

View file

@ -249,7 +249,7 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y)
trackview.editor().session()->add_command (
new MementoCommand<AutomationList> (memento_command_binder(), 0, &alist->get_state())
);
trackview.editor().session()->commit_reversible_command ();
trackview.editor().session()->set_dirty ();
}
@ -446,7 +446,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
/* ok, we should display this point */
add_visible_control_point (view_index, pi, tx, ty, model, npoints);
prev_rx = this_rx;
prev_ry = this_ry;
@ -598,7 +598,7 @@ AutomationLine::start_drag_single (ControlPoint* cp, double x, float fraction)
}
}
}
start_drag_common (x, fraction);
}
@ -689,7 +689,7 @@ AutomationLine::drag_motion (double x, float fraction, bool ignore_x, bool with_
copy (_push_points.begin(), _push_points.end(), back_inserter (points));
points.sort (ControlPointSorter ());
}
double dx = ignore_x ? 0 : (x - _drag_x);
double dy = fraction - _last_drag_fraction;
@ -793,7 +793,7 @@ AutomationLine::end_drag ()
copy (_push_points.begin(), _push_points.end(), back_inserter (points));
points.sort (ControlPointSorter ());
}
sync_model_with_view_points (points, did_push, rint (_drag_distance * trackview.editor().get_current_zoom ()));
alist->thaw ();
@ -803,7 +803,7 @@ AutomationLine::end_drag ()
trackview.editor().session()->add_command (
new MementoCommand<AutomationList>(memento_command_binder (), 0, &alist->get_state())
);
trackview.editor().session()->set_dirty ();
}
@ -950,7 +950,7 @@ AutomationLine::remove_point (ControlPoint& cp)
trackview.editor().session()->add_command(
new MementoCommand<AutomationList> (memento_command_binder (), &before, &alist->get_state())
);
trackview.editor().session()->commit_reversible_command ();
trackview.editor().session()->set_dirty ();
}
@ -992,7 +992,7 @@ list<ControlPoint*>
AutomationLine::point_selection_to_control_points (PointSelection const & s)
{
list<ControlPoint*> cp;
for (PointSelection::const_iterator i = s.begin(); i != s.end(); ++i) {
if (i->track != &trackview) {
@ -1284,7 +1284,7 @@ AutomationLine::add_visible_control_point (uint32_t view_index, uint32_t pi, dou
control_points[view_index]->reset (tx, ty, model, view_index, shape);
/* finally, control visibility */
if (_visible && points_visible) {
control_points[view_index]->show ();
control_points[view_index]->set_visible (true);
@ -1313,9 +1313,9 @@ void
AutomationLine::connect_to_list ()
{
_list_connections.drop_connections ();
alist->StateChanged.connect (_list_connections, invalidator (*this), boost::bind (&AutomationLine::list_changed, this), gui_context());
alist->InterpolationChanged.connect (
_list_connections, invalidator (*this), boost::bind (&AutomationLine::interpolation_changed, this, _1), gui_context()
);
@ -1362,7 +1362,7 @@ AutomationLine::set_offset (framepos_t off)
if (_offset == off) {
return;
}
_offset = off;
reset ();
}

View file

@ -66,7 +66,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
void reset ();
void clear ();
std::list<ControlPoint*> point_selection_to_control_points (PointSelection const &);
std::list<ControlPoint*> point_selection_to_control_points (PointSelection const &);
void set_selected_points (PointSelection&);
void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*>&);
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
@ -147,7 +147,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
void set_offset (ARDOUR::framecnt_t);
void set_width (ARDOUR::framecnt_t);
protected:
std::string _name;
@ -234,7 +234,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
/** maximum time that a point on this line can be at, relative to the position of its region or start of its track */
ARDOUR::framecnt_t _maximum_time;
friend class AudioRegionGainLine;
};

View file

@ -43,7 +43,7 @@ struct AutomationRange
double low_fract;
double high_fract;
TimeAxisView* track; // ref would be better, but ARDOUR::SessionHandlePtr is non-assignable
AutomationRange (double s, double e, double l, double h, TimeAxisView* atv)
: start (s), end (e), low_fract (l), high_fract (h), track (atv) {}
};

View file

@ -98,23 +98,23 @@ AutomationRegionView::canvas_event (GdkEvent* ev)
/* XXX: icky dcast to Editor */
e.drags()->set (new RubberbandSelectDrag (dynamic_cast<Editor*> (&e), group), ev);
} else if (ev->type == GDK_BUTTON_RELEASE) {
if (trackview.editor().drags()->active() && trackview.editor().drags()->end_grab (ev)) {
return true;
}
double x = ev->button.x;
double y = ev->button.y;
/* convert to item coordinates in the time axis view */
automation_view()->canvas_display()->w2i (x, y);
/* clamp y */
y = max (y, 0.0);
y = min (y, _height - NAME_HIGHLIGHT_SIZE);
add_automation_event (ev, trackview.editor().pixel_to_frame (x) - _region->position(), y);
}
@ -137,7 +137,7 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double
assert(_line);
AutomationTimeAxisView* const view = automation_view ();
/* compute vertical fractional position */
const double h = trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2;
@ -158,11 +158,11 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double
/* XXX: hack! */
boost::shared_ptr<ARDOUR::MidiRegion> mr = boost::dynamic_pointer_cast<ARDOUR::MidiRegion> (_region);
assert (mr);
view->session()->commit_reversible_command (
new MementoCommand<ARDOUR::AutomationList> (new ARDOUR::MidiAutomationListBinder (mr->midi_source(), _parameter), &before, &after)
);
view->session()->set_dirty ();
}
@ -183,7 +183,7 @@ AutomationRegionView::set_position (framepos_t pos, void* src, double* ignored)
if (_line) {
_line->set_maximum_time (_region->length ());
}
return RegionView::set_position(pos, src, ignored);
}

View file

@ -131,7 +131,7 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
if (line && line->the_list()) {
line->the_list()->set_automation_state (automation_state ());
}
RegionViewAdded (region_view);
return region_view;
@ -147,7 +147,7 @@ void
AutomationStreamView::set_automation_state (AutoState state)
{
/* Setting the automation state for this view sets the state of all regions' lists to the same thing */
if (region_views.empty()) {
_pending_automation_state = state;
} else {
@ -218,7 +218,7 @@ bool
AutomationStreamView::has_automation () const
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
if ((*i)->npoints() > 0) {
return true;
@ -235,7 +235,7 @@ void
AutomationStreamView::set_interpolation (AutomationList::InterpolationStyle s)
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
(*i)->the_list()->set_interpolation (s);
}
@ -259,7 +259,7 @@ void
AutomationStreamView::clear ()
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
(*i)->clear ();
}
@ -286,7 +286,7 @@ void
AutomationStreamView::set_selected_points (PointSelection& ps)
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
(*i)->set_selected_points (ps);
}
@ -296,7 +296,7 @@ list<boost::shared_ptr<AutomationLine> >
AutomationStreamView::get_lines () const
{
list<boost::shared_ptr<AutomationLine> > lines;
for (list<RegionView*>::const_iterator i = region_views.begin(); i != region_views.end(); ++i) {
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
assert (arv);
@ -311,7 +311,7 @@ struct RegionPositionSorter {
return a->region()->position() < b->region()->position();
}
};
/** @param pos Position, in session frames.
* @return AutomationLine to paste to for that position, or 0 if there is none appropriate.

View file

@ -226,7 +226,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
} else {
/* no regions, just a single line for the entire track (e.g. bus gain) */
boost::shared_ptr<AutomationLine> line (
new AutomationLine (
ARDOUR::EventTypeMap::instance().to_symbol(_parameter),
@ -260,7 +260,7 @@ AutomationTimeAxisView::route_going_away ()
{
_route.reset ();
}
void
AutomationTimeAxisView::auto_clicked ()
{
@ -298,14 +298,14 @@ AutomationTimeAxisView::set_automation_state (AutoState state)
if (_route == _automatable) { // This is a time axis for route (not region) automation
_route->set_parameter_automation_state (_parameter, state);
}
if (_control->list()) {
_control->alist()->set_automation_state(state);
}
#endif
if (_view) {
_view->set_automation_state (state);
/* AutomationStreamViews don't signal when their automation state changes, so handle
our updates `manually'.
*/
@ -401,7 +401,7 @@ AutomationTimeAxisView::set_interpolation (AutomationList::InterpolationStyle st
/* Tell our view's list, if we have one, otherwise tell our own.
* Everything else will be signalled back from that.
*/
if (_view) {
_view->set_interpolation (style);
} else {
@ -413,9 +413,9 @@ void
AutomationTimeAxisView::clear_clicked ()
{
assert (_line || _view);
_session->begin_reversible_command (_("clear automation"));
if (_line) {
_line->clear ();
} else if (_view) {
@ -672,10 +672,10 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
const Evoral::TimeConverter<double, ARDOUR::framepos_t>& tc = line.time_converter ();
double const start = tc.from (selection.time.front().start - tc.origin_b ());
double const end = tc.from (selection.time.front().end - tc.origin_b ());
switch (op) {
case Cut:
if ((what_we_got = alist->cut (start, end)) != 0) {
_editor.get_cut_buffer().add (what_we_got);
_session->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &alist->get_state()));
@ -810,7 +810,7 @@ bool
AutomationTimeAxisView::paste (framepos_t pos, float times, Selection& selection, size_t nth)
{
boost::shared_ptr<AutomationLine> line;
if (_line) {
line = _line;
} else if (_view) {
@ -820,7 +820,7 @@ AutomationTimeAxisView::paste (framepos_t pos, float times, Selection& selection
if (!line) {
return false;
}
return paste_one (*line, pos, times, selection, nth);
}
@ -940,7 +940,7 @@ AutomationTimeAxisView::add_line (boost::shared_ptr<AutomationLine> line)
_control->alist()->automation_state_changed.connect (
_list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::automation_state_changed, this), gui_context()
);
_control->alist()->InterpolationChanged.connect (
_list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::interpolation_changed, this, _1), gui_context()
);
@ -988,7 +988,7 @@ AutomationTimeAxisView::set_state (const XMLNode& node, int version)
if (version < 3000) {
return set_state_2X (node, version);
}
XMLProperty const * type = node.property ("automation-id");
if (type && type->value () == ARDOUR::EventTypeMap::instance().to_symbol (_parameter)) {
XMLProperty const * shown = node.property ("shown");
@ -1084,7 +1084,7 @@ list<boost::shared_ptr<AutomationLine> >
AutomationTimeAxisView::lines () const
{
list<boost::shared_ptr<AutomationLine> > lines;
if (_line) {
lines.push_back (_line);
} else if (_view) {

View file

@ -45,7 +45,7 @@ using namespace ARDOUR;
list<Gdk::Color> AxisView::used_colors;
AxisView::AxisView (ARDOUR::Session* sess)
AxisView::AxisView (ARDOUR::Session* sess)
: SessionHandlePtr (sess)
{
_selected = false;

View file

@ -59,7 +59,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
virtual void set_marked_for_display (bool yn) {
_marked_for_display = yn;
}
sigc::signal<void> Hiding;
void set_old_order_key (uint32_t ok) { _old_order_key = ok; }

View file

@ -59,7 +59,7 @@ BundleEditorMatrix::setup_ports (int dim)
/* when we gather, allow the matrix to contain bundles with duplicate port sets,
otherwise in some cases the basic system IO ports may be hidden, making
the bundle editor useless */
_ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true);
_ports[OTHER].remove_bundle (_bundle);
_ports[OTHER].resume_signals ();
@ -86,7 +86,7 @@ BundleEditorMatrix::get_state (BundleChannel c[2]) const
if (pl.empty ()) {
return PortMatrixNode::NOT_ASSOCIATED;
}
for (Bundle::PortList::const_iterator i = pl.begin(); i != pl.end(); ++i) {
if (!c[OURS].bundle->port_attached_to_channel (c[OURS].channel, *i)) {
return PortMatrixNode::NOT_ASSOCIATED;
@ -401,7 +401,7 @@ BundleManager::row_activated (Gtk::TreeModel::Path const & p, Gtk::TreeViewColum
if (!i) {
return;
}
boost::shared_ptr<UserBundle> b = (*i)[_list_model_columns.bundle];
BundleEditor e (_session, b);
e.run ();

View file

@ -13,7 +13,7 @@ CanvasHit::CanvasHit (MidiRegionView& region,
Group& group,
double size,
const boost::shared_ptr<NoteType> note,
bool with_events)
bool with_events)
: Diamond(group, size)
, CanvasNoteEvent(region, this, note)
{
@ -27,7 +27,7 @@ CanvasHit::on_event(GdkEvent* ev)
{
if (!CanvasNoteEvent::on_event (ev)) {
return _region.get_time_axis_view().editor().canvas_note_event (ev, this);
}
}
return true;
}

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2009 Paul Davis <paul@linuxaudiosystems.com>
*
* This library is free software; you can redistribute it and/or
@ -29,7 +29,7 @@ namespace Gnome { namespace Canvas {
class NoEventText : public Text
{
public:
NoEventText(Group& parent, double x, double y, const std::string& text)
NoEventText(Group& parent, double x, double y, const std::string& text)
: Text (parent, x, y, text) {}
NoEventText(Group& parent)
: Text (parent) {}

View file

@ -138,7 +138,7 @@ void
CanvasNoteEvent::show_channel_selector(void)
{
if (_channel_selector_widget == 0) {
if(_region.channel_selector_scoped_note() != 0){
_region.channel_selector_scoped_note()->hide_channel_selector();
_region.set_channel_selector_scoped_note(0);
@ -162,7 +162,7 @@ CanvasNoteEvent::show_channel_selector(void)
_channel_selector_widget->property_width() = 100;
_channel_selector_widget->raise_to_top();
_channel_selector_widget->show();
_region.set_channel_selector_scoped_note(this);
} else {
hide_channel_selector();
@ -188,10 +188,10 @@ CanvasNoteEvent::set_selected(bool selected)
_selected = selected;
set_fill_color (base_color ());
if (_selected) {
set_outline_color(calculate_outline(ARDOUR_UI::config()->canvasvar_MidiNoteSelected.get()));
if(_region.channel_selector_scoped_note() != 0){
_region.channel_selector_scoped_note()->hide_channel_selector();
_region.set_channel_selector_scoped_note(0);
@ -223,13 +223,13 @@ CanvasNoteEvent::base_color()
SCALE_USHORT_TO_UINT8_T(color.get_red()),
SCALE_USHORT_TO_UINT8_T(color.get_green()),
SCALE_USHORT_TO_UINT8_T(color.get_blue()),
opacity),
opacity),
ARDOUR_UI::config()->canvasvar_MidiNoteSelected.get(), 0.5);
}
case ChannelColors:
return UINT_INTERPOLATE (UINT_RGBA_CHANGE_A (CanvasNoteEvent::midi_channel_colors[_note->channel()],
opacity),
opacity),
ARDOUR_UI::config()->canvasvar_MidiNoteSelected.get(), 0.5);
default:

View file

@ -159,7 +159,7 @@ class CanvasNoteEvent : virtual public sigc::trackable
bool _valid;
float _mouse_x_fraction;
float _mouse_y_fraction;
void set_mouse_fractions (GdkEvent*);
};

View file

@ -29,7 +29,7 @@
namespace Gnome {
namespace Canvas {
class CanvasNote : public SimpleRect, public CanvasNoteEvent
class CanvasNote : public SimpleRect, public CanvasNoteEvent
{
public:
typedef Evoral::Note<Evoral::MusicalTime> NoteType;
@ -61,7 +61,7 @@ class NoEventCanvasNote : public CanvasNote
Group& group,
const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>())
: CanvasNote (region, group, note, false) {}
double point_vfunc(double, double, int, int, GnomeCanvasItem**) {
/* return a huge value to tell the canvas that we're never the item for an event */
return 9999999999999.0;

View file

@ -223,7 +223,7 @@ gnome_canvas_simpleline_set_property (GObject *object,
case PROP_Y1:
d = g_value_get_double (value);
if (simpleline->y1 != d) {
simpleline->y1 = d;
simpleline->y1 = d;
bounds_changed = TRUE;
}
break;
@ -310,7 +310,7 @@ gnome_canvas_simpleline_update (GnomeCanvasItem *item, double *affine, ArtSVP *c
/* get current bounding box in parent-relative world coordinates */
gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
/* convert parent-relative item coordinates to world coordinates */
@ -325,7 +325,7 @@ gnome_canvas_simpleline_update (GnomeCanvasItem *item, double *affine, ArtSVP *c
y2 = ceil (y2);
/* force non-zero dimensionality for both axes */
if (x1 == x2) {
x2 += 1.0;
}
@ -375,12 +375,12 @@ gnome_canvas_simpleline_render (GnomeCanvasItem *item,
x1 = simpleline->cx1;
x2 = simpleline->cx2;
y1 = simpleline->cy1;
if (buf->is_bg) {
gnome_canvas_buf_ensure_buf (buf);
buf->is_bg = FALSE;
}
if (simpleline->x1 != simpleline->x2) {
PAINT_HORIZA(buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
x1, x2, y1);
@ -388,7 +388,7 @@ gnome_canvas_simpleline_render (GnomeCanvasItem *item,
y2 = simpleline->cy2;
PAINT_VERTA (buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
x1, y1, y2);
}
}

View file

@ -628,23 +628,23 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
if (simplerect->outline_a > 0) {
for (i = 0; i < simplerect->outline_pixels; ++i) {
if (simplerect->outline_what & 0x1) {
if (begin == simplerect->bbox_ulx) {
PAINT_VERTA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, begin + i, sy, ey);
}
}
if (simplerect->outline_what & 0x2) {
if (end == (simplerect->bbox_lrx - 1)) {
PAINT_VERTA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, end - i, sy, ey + 1);
}
}
if (simplerect->outline_what & 0x4) {
PAINT_HORIZA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, begin, end, sy+i);
}
if (simplerect->outline_what & 0x8) {
PAINT_HORIZA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, begin, end + 1, ey-i);
}
@ -662,7 +662,7 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
int end, begin;
int ey, sy;
int i;
simplerect = GNOME_CANVAS_SIMPLERECT (item);
if (parent_class->render) {
@ -707,23 +707,23 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
if (simplerect->outline_a) {
for (i = 0; i < (int) simplerect->outline_pixels; ++i) {
if (simplerect->outline_what & 0x1) {
if (begin == simplerect->bbox_ulx) {
PAINT_VERTA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, begin + i, sy, ey);
}
}
if (simplerect->outline_what & 0x2) {
if (end == (simplerect->bbox_lrx - 1)) {
PAINT_VERTA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, end - i, sy, ey + 1);
}
}
if (simplerect->outline_what & 0x4) {
PAINT_HORIZA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, begin, end, sy+i);
}
if (simplerect->outline_what & 0x8) {
PAINT_HORIZA(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, simplerect->outline_a, begin, end + 1, ey-i);
}

View file

@ -141,7 +141,7 @@ CanvasPatchChange::on_event (GdkEvent* ev)
_region.edit_patch_change (this);
return true;
} else if (ev->button.button == 1) {
e->drags()->set (new PatchChangeDrag (e, this, &_region), ev);
return true;

View file

@ -43,7 +43,7 @@ ClockGroup::remove (AudioClock& clock)
{
clocks.erase (&clock);
}
void
ClockGroup::one_clock_changed (AudioClock* clock)
{
@ -62,5 +62,5 @@ ClockGroup::set_clock_mode (AudioClock::Mode mode)
(*c)->set_mode (mode);
}
ignore_changes = false;
}
}

View file

@ -121,11 +121,11 @@ ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t v
/* If this is too big, libart will confuse itself and segfault after it casts the bounding box
of this automation line to ints. Sigh.
*/
if (x > INT32_MAX) {
x = INT32_MAX;
}
_model = mi;
_view_index = vi;
move_to (x, y, shape);

View file

@ -68,7 +68,7 @@ class ControlPoint : public Selectable
double size () const {
return _size;
}
void set_size (double);
void set_visible (bool);
bool visible () const;

View file

@ -97,7 +97,7 @@ CrossfadeEditor::CrossfadeEditor (Session* s, boost::shared_ptr<Crossfade> xf, d
select_out_button (_("Fade Out")),
_peaks_ready_connection (0)
{
set_session (s);
@ -509,7 +509,7 @@ CrossfadeEditor::Point::move_to (double nx, double ny, double xfract, double yfr
} else if ( xfract > 1.0 ) {
xfract = 1.0;
}
if ( yfract < 0.0 ) {
yfract = 0.0;
} else if ( yfract > 1.0 ) {
@ -788,7 +788,7 @@ CrossfadeEditor::apply ()
_session->begin_reversible_command (_("Edit crossfade"));
XMLNode& before = xfade->get_state ();
_apply_to (xfade);
_session->add_command (new MementoCommand<Crossfade> (*xfade.get(), &before, &xfade->get_state ()));
@ -1154,7 +1154,7 @@ CrossfadeEditor::make_waves (boost::shared_ptr<AudioRegion> region, WhichFade wh
delete _peaks_ready_connection;
_peaks_ready_connection = 0;
for (uint32_t n = 0; n < nchans; ++n) {
gdouble yoff = n * ht;
@ -1207,7 +1207,7 @@ CrossfadeEditor::peaks_ready (boost::weak_ptr<AudioRegion> wr, WhichFade which)
*/
delete _peaks_ready_connection;
_peaks_ready_connection = 0;
make_waves (r, which);
}
@ -1251,16 +1251,16 @@ CrossfadeEditor::audition (Audition which)
right_length = xfade->in()->length();
}
PropertyList left_plist;
PropertyList right_plist;
PropertyList left_plist;
PropertyList right_plist;
left_plist.add (ARDOUR::Properties::start, left_start_offset);
left_plist.add (ARDOUR::Properties::length, left_length);
left_plist.add (ARDOUR::Properties::name, string ("xfade out"));
left_plist.add (ARDOUR::Properties::layer, 0);
left_plist.add (ARDOUR::Properties::fade_in_active, true);
right_plist.add (ARDOUR::Properties::start, 0);
right_plist.add (ARDOUR::Properties::length, right_length);
right_plist.add (ARDOUR::Properties::name, string("xfade in"));
@ -1273,9 +1273,9 @@ CrossfadeEditor::audition (Audition which)
left_plist.add (ARDOUR::Properties::scale_amplitude, 0.0f);
}
boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion>
boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion>
(RegionFactory::create (xfade->out(), left_plist, false)));
boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion>
boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion>
(RegionFactory::create (xfade->in(), right_plist, false)));
// apply a 20ms declicking fade at the start and end of auditioning
@ -1302,14 +1302,14 @@ CrossfadeEditor::audition_both ()
void
CrossfadeEditor::audition_left_dry ()
{
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, xfade->out()->length() - xfade->length());
plist.add (ARDOUR::Properties::length, xfade->length());
plist.add (ARDOUR::Properties::name, string("xfade left"));
plist.add (ARDOUR::Properties::layer, 0);
boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion>
boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion>
(RegionFactory::create (xfade->out(), plist, false)));
_session->audition_region (left);
@ -1324,14 +1324,14 @@ CrossfadeEditor::audition_left ()
void
CrossfadeEditor::audition_right_dry ()
{
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, 0);
plist.add (ARDOUR::Properties::length, xfade->length());
plist.add (ARDOUR::Properties::name, string ("xfade right"));
plist.add (ARDOUR::Properties::layer, 0);
boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion>
boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion>
(RegionFactory::create (xfade->in(), plist, false)));
_session->audition_region (right);

View file

@ -179,7 +179,7 @@ CrossfadeView::redraw_curves ()
/* Hence the number of points that we will render */
int32_t const npoints = editor.frame_to_pixel (max_frames - min_frames);
if (!_visible || !crossfade->active() || npoints < 3) {
fade_in->hide();
fade_out->hide();
@ -215,7 +215,7 @@ CrossfadeView::redraw_curves ()
p.set_x (xoff + i + 1);
p.set_y (_height - ((_height - 2) * vec[i]));
}
fade_out->property_points() = *points;
delete [] vec;
@ -298,7 +298,7 @@ CrossfadeView::horizontal_position_changed ()
the other case where the horizontal position change will uncover `undrawn'
sections).
*/
if (!_all_in_view) {
redraw_curves ();
}

View file

@ -40,41 +40,41 @@ public:
Gdk::Color& basic_color,
AudioRegionView& leftview,
AudioRegionView& rightview);
~CrossfadeView ();
boost::shared_ptr<ARDOUR::Crossfade> crossfade; // ok, let 'em have it
AudioRegionView& left_view; // and these too
AudioRegionView& right_view;
void set_height (double);
bool valid() const { return _valid; }
bool visible() const { return _visible; }
void set_valid (bool yn);
static PBD::Signal1<void,CrossfadeView*> CatchDeletion;
AudioRegionView& upper_regionview () const;
void fake_hide ();
void hide ();
void show ();
void horizontal_position_changed ();
protected:
void reset_width_dependent_items (double pixel_width);
private:
bool _valid;
bool _visible;
bool _all_in_view;
bool _all_in_view;
ArdourCanvas::Line *fade_in;
ArdourCanvas::Line *fade_out;
ArdourCanvas::Item *active_button;
void crossfade_changed (const PBD::PropertyChange&);
void crossfade_fades_changed ();
void active_changed ();

View file

@ -120,7 +120,7 @@ EditNoteDialog::run ()
_velocity.update ();
_region_view->start_note_diff_command (_("edit note"));
bool had_change = false;
if (_channel.get_value_as_int() - 1 != _event->note()->channel()) {
@ -139,7 +139,7 @@ EditNoteDialog::run ()
}
double const t = _region_view->time_converter().from (_time_clock.current_time ());
if (t != _event->note()->time()) {
_region_view->change_note_time (_event, t);
had_change = true;
@ -158,7 +158,7 @@ EditNoteDialog::run ()
_region_view->apply_diff ();
_event->set_selected (_event->selected()); // change color
_event->set_selected (_event->selected()); // change color
return r;
}

View file

@ -420,35 +420,35 @@ Editor::Editor ()
tempo_label.set_padding (5,0);
tempo_label.hide();
tempo_label.set_no_show_all();
meter_label.set_name ("EditorTimeButton");
meter_label.set_size_request (-1, (int)timebar_height);
meter_label.set_alignment (1.0, 0.5);
meter_label.set_padding (5,0);
meter_label.hide();
meter_label.set_no_show_all();
mark_label.set_name ("EditorTimeButton");
mark_label.set_size_request (-1, (int)timebar_height);
mark_label.set_alignment (1.0, 0.5);
mark_label.set_padding (5,0);
mark_label.hide();
mark_label.set_no_show_all();
cd_mark_label.set_name ("EditorTimeButton");
cd_mark_label.set_size_request (-1, (int)timebar_height);
cd_mark_label.set_alignment (1.0, 0.5);
cd_mark_label.set_padding (5,0);
cd_mark_label.hide();
cd_mark_label.set_no_show_all();
range_mark_label.set_name ("EditorTimeButton");
range_mark_label.set_size_request (-1, (int)timebar_height);
range_mark_label.set_alignment (1.0, 0.5);
range_mark_label.set_padding (5,0);
range_mark_label.hide();
range_mark_label.set_no_show_all();
transport_mark_label.set_name ("EditorTimeButton");
transport_mark_label.set_size_request (-1, (int)timebar_height);
transport_mark_label.set_alignment (1.0, 0.5);
@ -458,14 +458,14 @@ Editor::Editor ()
initialize_rulers ();
initialize_canvas ();
_summary = new EditorSummary (this);
selection->TimeChanged.connect (sigc::mem_fun(*this, &Editor::time_selection_changed));
selection->TracksChanged.connect (sigc::mem_fun(*this, &Editor::track_selection_changed));
editor_regions_selection_changed_connection = selection->RegionsChanged.connect (sigc::mem_fun(*this, &Editor::region_selection_changed));
selection->PointsChanged.connect (sigc::mem_fun(*this, &Editor::point_selection_changed));
selection->MarkersChanged.connect (sigc::mem_fun(*this, &Editor::marker_selection_changed));
@ -491,10 +491,10 @@ Editor::Editor ()
ArdourCanvas::Canvas* time_pad = manage(new ArdourCanvas::Canvas());
ArdourCanvas::SimpleLine* pad_line_1 = manage(new ArdourCanvas::SimpleLine(*time_pad->root(),
0.0, 1.0, 100.0, 1.0));
pad_line_1->property_color_rgba() = 0xFF0000FF;
pad_line_1->show();
time_pad->show();
time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars) + 2);
@ -567,12 +567,12 @@ Editor::Editor ()
summary_arrows_left_left->add (*manage (new Arrow (ARROW_LEFT, SHADOW_NONE)));
summary_arrows_left_left->signal_pressed().connect (sigc::hide_return (sigc::bind (sigc::mem_fun (*this, &Editor::scroll_press), LEFT)));
summary_arrows_left_left->signal_released().connect (sigc::mem_fun (*this, &Editor::scroll_release));
Button* summary_arrows_left_right = manage (new Button);
summary_arrows_left_right->add (*manage (new Arrow (ARROW_RIGHT, SHADOW_NONE)));
summary_arrows_left_right->signal_pressed().connect (sigc::hide_return (sigc::bind (sigc::mem_fun (*this, &Editor::scroll_press), RIGHT)));
summary_arrows_left_right->signal_released().connect (sigc::mem_fun (*this, &Editor::scroll_release));
VBox* summary_arrows_left = manage (new VBox);
summary_arrows_left->pack_start (*summary_arrows_left_left);
summary_arrows_left->pack_start (*summary_arrows_left_right);
@ -581,26 +581,26 @@ Editor::Editor ()
summary_arrows_right_up->add (*manage (new Arrow (ARROW_UP, SHADOW_NONE)));
summary_arrows_right_up->signal_pressed().connect (sigc::hide_return (sigc::bind (sigc::mem_fun (*this, &Editor::scroll_press), UP)));
summary_arrows_right_up->signal_released().connect (sigc::mem_fun (*this, &Editor::scroll_release));
Button* summary_arrows_right_down = manage (new Button);
summary_arrows_right_down->add (*manage (new Arrow (ARROW_DOWN, SHADOW_NONE)));
summary_arrows_right_down->signal_pressed().connect (sigc::hide_return (sigc::bind (sigc::mem_fun (*this, &Editor::scroll_press), DOWN)));
summary_arrows_right_down->signal_released().connect (sigc::mem_fun (*this, &Editor::scroll_release));
VBox* summary_arrows_right = manage (new VBox);
summary_arrows_right->pack_start (*summary_arrows_right_up);
summary_arrows_right->pack_start (*summary_arrows_right_down);
Frame* summary_frame = manage (new Frame);
summary_frame->set_shadow_type (Gtk::SHADOW_ETCHED_IN);
summary_frame->add (*_summary);
summary_frame->show ();
_summary_hbox.pack_start (*summary_arrows_left, false, false);
_summary_hbox.pack_start (*summary_frame, true, true);
_summary_hbox.pack_start (*summary_arrows_right, false, false);
editor_summary_pane.pack2 (_summary_hbox);
edit_pane.pack1 (editor_summary_pane, true, true);
@ -703,7 +703,7 @@ Editor::Editor ()
ControlProtocol::ZoomOut.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, true), gui_context());
ControlProtocol::ScrollTimeline.connect (*this, invalidator (*this), ui_bind (&Editor::control_scroll, this, _1), gui_context());
BasicUI::AccessAction.connect (*this, invalidator (*this), ui_bind (&Editor::access_action, this, _1, _2), gui_context());
/* problematic: has to return a value and thus cannot be x-thread */
Session::AskAboutPlaylistDeletion.connect_same_thread (*this, boost::bind (&Editor::playlist_deletion_dialog, this, _1));
@ -1157,11 +1157,11 @@ Editor::set_session (Session *t)
Location* loc = _session->locations()->auto_loop_location();
if (loc == 0) {
loc = new Location (*_session, 0, _session->current_end_frame(), _("Loop"),(Location::Flags) (Location::IsAutoLoop | Location::IsHidden));
if (loc->start() == loc->end()) {
loc->set_end (loc->start() + 1);
}
_session->locations()->add (loc, false);
_session->set_auto_loop_location (loc);
} else {
@ -1170,14 +1170,14 @@ Editor::set_session (Session *t)
}
loc = _session->locations()->auto_punch_location();
if (loc == 0) {
loc = new Location (*_session, 0, _session->current_end_frame(), _("Punch"), (Location::Flags) (Location::IsAutoPunch | Location::IsHidden));
if (loc->start() == loc->end()) {
loc->set_end (loc->start() + 1);
}
_session->locations()->add (loc, false);
_session->set_auto_punch_location (loc);
} else {
@ -1202,7 +1202,7 @@ Editor::set_session (Session *t)
super_rapid_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (
sigc::mem_fun (*this, &Editor::super_rapid_screen_update)
);
switch (_snap_type) {
case SnapToRegionStart:
case SnapToRegionEnd:
@ -1268,10 +1268,10 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
items.push_back (SeparatorElem());
if (Profile->get_sae()) {
items.push_back (MenuElem (_("Linear"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLinear)));
items.push_back (MenuElem (_("Slowest"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeFast)));
} else {
items.push_back (
@ -1290,34 +1290,34 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
*_fade_in_images[FadeFast],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeFast)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Slow"),
*_fade_in_images[FadeLogB],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLogB)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Fast"),
*_fade_in_images[FadeLogA],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLogA)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Fastest"),
*_fade_in_images[FadeSlow],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeSlow)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
}
@ -1354,34 +1354,34 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
*_fade_out_images[FadeFast],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSlow)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Slow"),
*_fade_out_images[FadeLogB],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeLogA)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Fast"),
*_fade_out_images[FadeLogA],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeLogB)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Fastest"),
*_fade_out_images[FadeSlow],
sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeFast)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
}
@ -1744,13 +1744,13 @@ void
Editor::add_region_context_items (Menu_Helpers::MenuList& edit_items, boost::shared_ptr<Track> track)
{
using namespace Menu_Helpers;
/* OK, stick the region submenu at the top of the list, and then add
the standard items.
*/
RegionSelection rs = get_regions_from_selection_and_entered ();
string::size_type pos = 0;
string menu_item_name = (rs.size() == 1) ? rs.front()->region()->name() : _("Selected Regions");
@ -1775,7 +1775,7 @@ Editor::add_region_context_items (Menu_Helpers::MenuList& edit_items, boost::sha
dialogue. If we use the edit point it gets a bit messy because the user still has to click over
*some* region in order to get the region context menu stuff to be displayed at all.
*/
framepos_t mouse;
bool ignored;
mouse_frame (mouse, ignored);
@ -1816,7 +1816,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), false, true)
)
);
edit_items.push_back (
MenuElem (
_("Move Range End to Previous Region Boundary"),
@ -1830,7 +1830,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), true, true)
)
);
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Convert to Region In-Place"), mem_fun(*this, &Editor::separate_region_from_selection)));
edit_items.push_back (MenuElem (_("Convert to Region in Region List"), sigc::mem_fun(*this, &Editor::new_region_from_selection)));
@ -2190,7 +2190,7 @@ Editor::set_state (const XMLNode& node, int /*version*/)
set_default_size (g.base_width, g.base_height);
move (x, y);
if (_session && (prop = node.property ("playhead"))) {
framepos_t pos;
sscanf (prop->value().c_str(), "%" PRIi64, &pos);
@ -2198,7 +2198,7 @@ Editor::set_state (const XMLNode& node, int /*version*/)
} else {
playhead_cursor->set_position (0);
}
if ((prop = node.property ("mixer-width"))) {
editor_mixer_strip_width = Width (string_2_enum (prop->value(), editor_mixer_strip_width));
}
@ -2292,7 +2292,7 @@ Editor::set_state (const XMLNode& node, int /*version*/)
}
}
}
if ((prop = node.property ("region-list-sort-type"))) {
RegionListSortType st;
_regions->reset_sort_type ((RegionListSortType) string_2_enum (prop->value(), st), true);
@ -2311,9 +2311,9 @@ Editor::set_state (const XMLNode& node, int /*version*/)
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
bool yn = string_is_affirmative (prop->value());
/* do it twice to force the change */
tact->set_active (!yn);
tact->set_active (yn);
}
@ -2325,9 +2325,9 @@ Editor::set_state (const XMLNode& node, int /*version*/)
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
bool yn = string_is_affirmative (prop->value());
/* do it twice to force the change */
tact->set_active (!yn);
tact->set_active (yn);
}
@ -2445,13 +2445,13 @@ Editor::get_state ()
XMLNode* bb = new XMLNode (X_("Buttons"));
button_bindings->save (*bb);
node->add_child_nocopy (*bb);
}
}
node->add_property (X_("show-marker-lines"), _show_marker_lines ? "yes" : "no");
node->add_child_nocopy (selection->get_state ());
node->add_child_nocopy (_regions->get_state ());
return *node;
}
@ -2849,7 +2849,7 @@ Editor::setup_toolbar ()
_zoom_box.pack_start (zoom_out_full_button, false, false);
_zoom_box.pack_start (zoom_focus_selector);
/* Track zoom buttons */
tav_expand_button.set_name ("TrackHeightButton");
tav_expand_button.set_size_request (-1, 20);
@ -2865,7 +2865,7 @@ Editor::setup_toolbar ()
_zoom_box.pack_start (tav_shrink_button);
_zoom_box.pack_start (tav_expand_button);
_zoom_tearoff = manage (new TearOff (_zoom_box));
_zoom_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
@ -2876,7 +2876,7 @@ Editor::setup_toolbar ()
&_zoom_tearoff->tearoff_window()));
_zoom_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&_zoom_tearoff->tearoff_window(), 0));
snap_box.set_spacing (1);
snap_box.set_border_width (2);
@ -2918,7 +2918,7 @@ Editor::setup_toolbar ()
_tools_tearoff = manage (new TearOff (*hbox));
_tools_tearoff->set_name ("MouseModeBase");
_tools_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &_tools_tearoff->tearoff_window()), false);
if (Profile->get_sae()) {
_tools_tearoff->set_can_be_torn_off (false);
}
@ -2959,7 +2959,7 @@ Editor::setup_toolbar ()
toolbar_frame.set_shadow_type (SHADOW_OUT);
toolbar_frame.set_name ("BaseFrame");
toolbar_frame.add (_toolbar_viewport);
DPIReset.connect (sigc::mem_fun (*this, &Editor::resize_text_widgets));
}
@ -3032,7 +3032,7 @@ Editor::convert_drop_to_paths (
if (_session == 0) {
return -1;
}
vector<string> uris = data.get_uris();
if (uris.empty()) {
@ -3478,7 +3478,7 @@ Editor::edit_controls_button_release (GdkEventButton* ev)
} else if (ev->button == 1) {
selection->clear_tracks ();
}
return true;
}
@ -3534,7 +3534,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
};
static Pane done;
XMLNode* geometry;
width = default_width;
@ -3582,7 +3582,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
}
done = (Pane) (done | Horizontal);
} else if (which == static_cast<Paned*> (&editor_summary_pane)) {
if (done & Vertical) {
@ -3941,7 +3941,7 @@ Editor::control_layout_scroll (GdkEventScroll* ev)
void
Editor::session_state_saved (string)
{
update_title ();
update_title ();
_snapshots->redisplay ();
}
@ -3964,7 +3964,7 @@ Editor::maximise_editing_space ()
if (post_maximal_vertical_pane_position == 0) {
post_maximal_vertical_pane_position = editor_summary_pane.get_height();
}
fullscreen ();
if (post_maximal_editor_width) {
@ -4003,7 +4003,7 @@ Editor::restore_editing_space ()
if (post_maximal_vertical_pane_position != editor_summary_pane.get_position()) {
post_maximal_vertical_pane_position = editor_summary_pane.get_position();
}
unfullscreen();
_mouse_mode_tearoff->set_visible (true);
@ -4612,7 +4612,7 @@ RegionSelection
Editor::get_regions_from_selection_and_edit_point ()
{
RegionSelection regions;
if (_edit_point == EditAtMouse && entered_regionview && !selection->regions.contains (entered_regionview)) {
regions.add (entered_regionview);
} else {
@ -4629,14 +4629,14 @@ Editor::get_regions_from_selection_and_edit_point ()
edit-activated route group as one of our regions.
*/
for (RegionSelection::iterator i = regions.begin (); i != regions.end(); ++i) {
RouteGroup* g = (*i)->get_time_axis_view().route_group ();
if (g && g->is_active() && g->is_edit()) {
tracks.add (axis_views_from_routes (g->route_list()));
}
}
if (!tracks.empty()) {
/* now find regions that are at the edit position on those tracks */
framepos_t const where = get_preferred_edit_position ();
@ -4655,7 +4655,7 @@ RegionSelection
Editor::get_regions_from_selection_and_entered ()
{
RegionSelection regions = selection->regions;
if (regions.empty() && entered_regionview) {
regions.add (entered_regionview);
}
@ -4918,7 +4918,7 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
ENSURE_GUI_THREAD (*this, &Editor::timeaxisview_deleted, tv);
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (tv);
_routes->route_removed (tv);
if (tv == entered_track) {
@ -4946,7 +4946,7 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
if (rtav) {
route = rtav->route ();
}
}
if (current_mixer_strip && current_mixer_strip->route() == route) {
@ -4959,18 +4959,18 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
} else {
next_tv = (*i);
}
if (next_tv) {
set_selected_mixer_strip (*next_tv);
} else {
/* make the editor mixer strip go away setting the
* button to inactive (which also unticks the menu option)
*/
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
}
}
}
}
void
@ -4981,19 +4981,19 @@ Editor::hide_track_in_display (TimeAxisView* tv, bool apply_to_selection)
TrackSelection::iterator j = i;
++j;
hide_track_in_display (*i, false);
i = j;
}
} else {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
if (rtv && current_mixer_strip && (rtv->route() == current_mixer_strip->route())) {
// this will hide the mixer strip
set_selected_mixer_strip (*tv);
}
_routes->hide_track_in_display (*tv);
}
}
@ -5132,7 +5132,7 @@ bool
Editor::scroll_press (Direction dir)
{
++_scroll_callbacks;
if (_scroll_connection.connected() && _scroll_callbacks < 5) {
/* delay the first auto-repeat */
return true;
@ -5162,7 +5162,7 @@ Editor::scroll_press (Direction dir)
_scroll_connection = Glib::signal_timeout().connect (
sigc::bind (sigc::mem_fun (*this, &Editor::scroll_press), dir), 100
);
_scroll_callbacks = 0;
}
@ -5184,15 +5184,15 @@ Editor::reset_x_origin_to_follow_playhead ()
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
if (_session->transport_speed() < 0) {
if (frame > (current_page_frames() / 2)) {
center_screen (frame-(current_page_frames()/2));
} else {
center_screen (current_page_frames()/2);
}
} else {
if (frame < leftmost_frame) {
/* moving left */
framepos_t l = 0;
@ -5203,11 +5203,11 @@ Editor::reset_x_origin_to_follow_playhead ()
/* not rolling: end up with the playhead 3/4 of the way along the page */
l = frame - (3 * current_page_frames() / 4);
}
if (l < 0) {
l = 0;
}
center_screen_internal (l + (current_page_frames() / 2), current_page_frames ());
} else {
/* moving right */
@ -5276,12 +5276,12 @@ Editor::super_rapid_screen_update ()
}
} else {
/* don't do continuous scroll till the new position is in the rightmost quarter of the
editor canvas
*/
#if 0
// FIXME DO SOMETHING THAT WORKS HERE - this is 2.X code
#if 0
// FIXME DO SOMETHING THAT WORKS HERE - this is 2.X code
double target = ((double)frame - (double)current_page_frames()/2.0) / frames_per_unit;
if (target <= 0.0) {
target = 0.0;
@ -5291,12 +5291,12 @@ Editor::super_rapid_screen_update ()
} else {
/* relax */
}
current = target;
set_horizontal_position (current);
#endif
}
}
}
@ -5309,7 +5309,7 @@ Editor::session_going_away ()
_session_connections.drop_connections ();
super_rapid_screen_update_connection.disconnect ();
selection->clear ();
cut_buffer->clear ();
@ -5388,7 +5388,7 @@ void
Editor::change_region_layering_order ()
{
framepos_t const position = get_preferred_edit_position ();
if (!clicked_routeview) {
if (layering_order_editor) {
layering_order_editor->hide ();
@ -5407,7 +5407,7 @@ Editor::change_region_layering_order ()
if (!pl) {
return;
}
if (layering_order_editor == 0) {
layering_order_editor = new RegionLayeringOrderEditor(*this);
}
@ -5447,7 +5447,7 @@ Editor::action_menu_item (std::string const & name)
{
Glib::RefPtr<Action> a = editor_actions->get_action (name);
assert (a);
return *manage (a->create_menu_item ());
}
@ -5460,7 +5460,7 @@ Editor::resize_text_widgets ()
set_size_request_to_display_given_text (snap_mode_selector, snap_mode_strings, COMBO_FUDGE+10, 15);
set_size_request_to_display_given_text (edit_point_selector, edit_point_strings, COMBO_FUDGE+10, 15);
}
void
Editor::add_notebook_page (string const & name, Gtk::Widget& widget)
{

View file

@ -206,7 +206,7 @@ Editor::register_actions ()
string const n = string_compose (_("Goto View %1"), i);
reg_sens (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), i - 1));
}
for (int i = 1; i <= 9; ++i) {
string const a = string_compose (X_("goto-mark-%1"), i);
string const n = string_compose (_("Locate to Mark %1"), i);
@ -284,18 +284,18 @@ Editor::register_actions ()
act = reg_sens (editor_actions, "editor-separate", _("Separate"), sigc::mem_fun(*this, &Editor::separate_region_from_selection));
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = reg_sens (editor_actions, "separate-from-punch", _("Separate Using Punch Range"), sigc::mem_fun(*this, &Editor::separate_region_from_punch));
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = reg_sens (editor_actions, "separate-from-loop", _("Separate Using Loop Range"), sigc::mem_fun(*this, &Editor::separate_region_from_loop));
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = reg_sens (editor_actions, "editor-crop", _("Crop"), sigc::mem_fun(*this, &Editor::crop_region_to_selection));
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
reg_sens (editor_actions, "editor-cut", _("Cut"), sigc::mem_fun(*this, &Editor::cut));
reg_sens (editor_actions, "editor-copy", _("Copy"), sigc::mem_fun(*this, &Editor::copy));
reg_sens (editor_actions, "editor-paste", _("Paste"), sigc::mem_fun(*this, &Editor::keyboard_paste));
@ -319,28 +319,28 @@ Editor::register_actions ()
_("Move Range Start to Previous Region Boundary"),
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), false, false)
);
reg_sens (
editor_actions,
"move-range-start-to-next-region-boundary",
_("Move Range Start to Next Region Boundary"),
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), false, true)
);
reg_sens (
editor_actions,
"move-range-end-to-previous-region-boundary",
_("Move Range End to Previous Region Boundary"),
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), true, false)
);
reg_sens (
editor_actions,
"move-range-end-to-next-region-boundary",
_("Move Range End to Next Region Boundary"),
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), true, true)
);
toggle_reg_sens (editor_actions, "toggle-follow-playhead", _("Follow Playhead"), (sigc::mem_fun(*this, &Editor::toggle_follow_playhead)));
act = reg_sens (editor_actions, "remove-last-capture", _("Remove Last Capture"), (sigc::mem_fun(*this, &Editor::remove_last_capture)));
@ -560,16 +560,16 @@ Editor::register_actions ()
act = ActionManager::register_action (rl_actions, X_("rlAudition"), _("Audition"), sigc::mem_fun(*this, &Editor::audition_region_from_region_list));
ActionManager::region_list_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), sigc::mem_fun(*this, &Editor::hide_region_from_region_list));
ActionManager::region_list_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (rl_actions, X_("rlShow"), _("Show"), sigc::mem_fun(*this, &Editor::show_region_in_region_list));
ActionManager::region_list_selection_sensitive_actions.push_back (act);
ActionManager::register_toggle_action (rl_actions, X_("rlShowAll"), _("Show All"), sigc::mem_fun(*_regions, &EditorRegions::toggle_full));
ActionManager::register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show Automatic Regions"), sigc::mem_fun (*_regions, &EditorRegions::toggle_show_auto_regions));
ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortAscending"), _("Ascending"),
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_direction), true));
ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortDescending"), _("Descending"),
@ -678,7 +678,7 @@ Editor::toggle_ruler_visibility (RulerType rt)
}
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), action);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
update_ruler_visibility ();
@ -1218,30 +1218,30 @@ void
Editor::register_region_actions ()
{
_region_actions = ActionGroup::create (X_("Region"));
/* PART 1: actions that operate on the selection, and for which the edit point type and location is irrelevant */
/* Remove selected regions */
reg_sens (_region_actions, "remove-region", _("Remove"), sigc::mem_fun (*this, &Editor::remove_selected_regions));
/* Offer dialogue box to rename the first selected region */
reg_sens (_region_actions, "rename-region", _("Rename..."), sigc::mem_fun (*this, &Editor::rename_region));
/* Raise all selected regions by 1 layer */
reg_sens (_region_actions, "raise-region", _("Raise"), sigc::mem_fun (*this, &Editor::raise_region));
/* Raise all selected regions to the top */
reg_sens (_region_actions, "raise-region-to-top", _("Raise to Top"), sigc::mem_fun (*this, &Editor::raise_region_to_top));
/* Lower all selected regions by 1 layer */
reg_sens (_region_actions, "lower-region", _("Lower"), sigc::mem_fun (*this, &Editor::lower_region));
/* Lower all selected regions to the bottom */
reg_sens (_region_actions, "lower-region-to-bottom", _("Lower to Bottom"), sigc::mem_fun (*this, &Editor::lower_region_to_bottom));
/* Move selected regions to their original (`natural') position */
reg_sens (_region_actions, "naturalize-region", _("Move to Original Position"), sigc::mem_fun (*this, &Editor::naturalize_region));
/* Toggle `locked' status of selected regions */
toggle_reg_sens (_region_actions, "toggle-region-lock", _("Lock"), sigc::mem_fun(*this, &Editor::toggle_region_lock));
@ -1251,55 +1251,55 @@ Editor::register_region_actions ()
_("Glue to Bars and Beats"),
sigc::mem_fun (*this, &Editor::toggle_region_lock_style)
);
/* Remove sync points from selected regions */
reg_sens (_region_actions, "remove-region-sync", _("Remove Sync"), sigc::mem_fun(*this, &Editor::remove_region_sync));
/* Mute or unmute selected regions */
toggle_reg_sens (_region_actions, "toggle-region-mute", _("Mute"), sigc::mem_fun(*this, &Editor::toggle_region_mute));
/* Open the normalize dialogue to operate on the selected regions */
reg_sens (_region_actions, "normalize-region", _("Normalize..."), sigc::mem_fun(*this, &Editor::normalize_region));
/* Reverse selected regions */
reg_sens (_region_actions, "reverse-region", _("Reverse"), sigc::mem_fun (*this, &Editor::reverse_region));
/* Split selected multi-channel regions into mono regions */
reg_sens (_region_actions, "split-multichannel-region", _("Make Mono Regions"), sigc::mem_fun (*this, &Editor::split_multichannel_region));
/* Boost selected region gain */
reg_sens (_region_actions, "boost-region-gain", _("Boost Gain"), sigc::bind (sigc::mem_fun(*this, &Editor::adjust_region_gain), true));
/* Cut selected region gain */
reg_sens (_region_actions, "cut-region-gain", _("Cut Gain"), sigc::bind (sigc::mem_fun(*this, &Editor::adjust_region_gain), false));
/* Open the pitch shift dialogue for any selected audio regions */
reg_sens (_region_actions, "pitch-shift-region", _("Pitch Shift..."), sigc::mem_fun (*this, &Editor::pitch_shift_region));
/* Open the transpose dialogue for any selected MIDI regions */
reg_sens (_region_actions, "transpose-region", _("Transpose..."), sigc::mem_fun (*this, &Editor::transpose_region));
/* Toggle selected region opacity */
toggle_reg_sens (_region_actions, "toggle-opaque-region", _("Opaque"), sigc::mem_fun (*this, &Editor::toggle_opaque_region));
/* Toggle active status of selected regions' fade in */
toggle_reg_sens (
_region_actions, "toggle-region-fade-in", _("Fade In"), sigc::bind (sigc::mem_fun (*this, &Editor::toggle_region_fades), 1)
);
/* Toggle active status of selected regions' fade out */
toggle_reg_sens (
_region_actions, "toggle-region-fade-out", _("Fade Out"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_region_fades), -1)
);
/* Toggle active status of selected regions' fade in and out */
toggle_reg_sens (
_region_actions, "toggle-region-fades", _("Fades"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_region_fades), 0)
);
/* Open the dialogue to duplicate selected regions */
reg_sens (_region_actions, "duplicate-region", _("Duplicate"), sigc::bind (sigc::mem_fun (*this, &Editor::duplicate_dialog), false));
/* Open the dialogue to duplicate selected regions multiple times */
reg_sens (
_region_actions,
@ -1307,26 +1307,26 @@ Editor::register_region_actions ()
_("Multi-Duplicate..."),
sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true)
);
/* Fill tracks with selected regions */
reg_sens (_region_actions, "region-fill-track", _("Fill Track"), sigc::mem_fun (*this, &Editor::region_fill_track));
/* Set up the loop range from the selected regions */
reg_sens (
_region_actions, "set-loop-from-region", _("Set Loop Range"), sigc::bind (sigc::mem_fun (*this, &Editor::set_loop_from_region), false)
);
/* Set up the loop range from the selected regions, and start playback of it */
reg_sens (_region_actions, "loop-region", _("Loop"), sigc::bind (sigc::mem_fun(*this, &Editor::set_loop_from_region), true));
/* Set the punch range from the selected regions */
reg_sens (_region_actions, "set-punch-from-region", _("Set Punch"), sigc::mem_fun (*this, &Editor::set_punch_from_region));
/* Add a single range marker around all selected regions */
reg_sens (
_region_actions, "add-range-marker-from-region", _("Add 1 Range Marker"), sigc::mem_fun (*this, &Editor::add_location_from_region)
);
/* Add a range marker around each selected region */
reg_sens (
_region_actions, "add-range-markers-from-region", _("Add Range Marker(s)"), sigc::mem_fun (*this, &Editor::add_locations_from_region)
@ -1411,7 +1411,7 @@ Editor::register_region_actions ()
_("Nudge Forward by Capture Offset"),
sigc::mem_fun (*this, &Editor::nudge_forward_capture_offset)
);
reg_sens (
_region_actions,
"nudge-backward-by-capture-offset",
@ -1421,7 +1421,7 @@ Editor::register_region_actions ()
reg_sens (_region_actions, "trim-region-to-loop", _("Trim to Loop"), sigc::mem_fun (*this, &Editor::trim_region_to_loop));
reg_sens (_region_actions, "trim-region-to-punch", _("Trim to Punch"), sigc::mem_fun (*this, &Editor::trim_region_to_punch));
reg_sens (_region_actions, "trim-to-previous-region", _("Trim to Previous"), sigc::mem_fun(*this, &Editor::trim_region_to_previous_region_end));
reg_sens (_region_actions, "trim-to-next-region", _("Trim to Next"), sigc::mem_fun(*this, &Editor::trim_region_to_next_region_start));
@ -1448,14 +1448,14 @@ Editor::register_region_actions ()
_("Align Start"),
sigc::bind (sigc::mem_fun(*this, &Editor::align_regions), ARDOUR::Start)
);
reg_sens (
_region_actions,
"align-regions-start-relative",
_("Align Start Relative"),
sigc::bind (sigc::mem_fun (*this, &Editor::align_regions_relative), ARDOUR::Start)
);
reg_sens (_region_actions, "align-regions-end", _("Align End"), sigc::bind (sigc::mem_fun (*this, &Editor::align_regions), ARDOUR::End));
reg_sens (
@ -1471,7 +1471,7 @@ Editor::register_region_actions ()
_("Align Sync"),
sigc::bind (sigc::mem_fun(*this, &Editor::align_regions), ARDOUR::SyncPoint)
);
reg_sens (
_region_actions,
"align-regions-sync-relative",
@ -1485,4 +1485,4 @@ Editor::register_region_actions ()
_all_region_actions_sensitized = true;
ActionManager::add_action_group (_region_actions);
}
}

View file

@ -84,7 +84,7 @@ Editor::add_external_audio_action (ImportMode mode_hint)
msg.run ();
return;
}
if (sfbrowser == 0) {
sfbrowser = new SoundFileOmega (*this, _("Add Existing Media"), _session, 0, true, mode_hint);
} else {
@ -155,7 +155,7 @@ Editor::external_audio_dialog ()
for (vector<string>::iterator x = upaths.begin(); x != upaths.end(); ++x) {
paths.push_back (*x);
}
ImportPosition pos = sfbrowser->get_position ();
ImportMode mode = sfbrowser->get_mode ();
ImportDisposition chns = sfbrowser->get_channel_disposition ();
@ -370,7 +370,7 @@ Editor::do_import (vector<string> paths, ImportDisposition chns, ImportMode mode
for (vector<string>::iterator a = paths.begin(); a != paths.end(); ++a) {
const int check = check_whether_and_how_to_import (*a, true);
switch (check) {
case 2:
// user said skip
@ -388,36 +388,36 @@ Editor::do_import (vector<string> paths, ImportDisposition chns, ImportMode mode
}
/* have to reset this for every file we handle */
if (use_timestamp) {
pos = -1;
}
ipw.show ();
switch (chns) {
case Editing::ImportDistinctFiles:
to_import.clear ();
to_import.push_back (*a);
if (mode == Editing::ImportToTrack) {
track = get_nth_selected_audio_track (nth++);
}
ok = (import_sndfiles (to_import, mode, quality, pos, 1, -1, track, replace) == 0);
break;
case Editing::ImportDistinctChannels:
to_import.clear ();
to_import.push_back (*a);
ok = (import_sndfiles (to_import, mode, quality, pos, -1, -1, track, replace) == 0);
break;
case Editing::ImportSerializeFiles:
to_import.clear ();
to_import.push_back (*a);
@ -521,7 +521,7 @@ Editor::import_sndfiles (vector<string> paths, ImportMode mode, SrcQuality quali
import_status.target_regions = target_regions;
import_status.track = track;
import_status.replace = replace;
set_canvas_cursor (_cursors->wait);
gdk_flush ();
@ -719,8 +719,8 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
region_name = bump_name_once (region_name, '.');
}
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, 0);
plist.add (ARDOUR::Properties::length, sources[0]->length (pos));
plist.add (ARDOUR::Properties::name, region_name);
@ -769,7 +769,7 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
if (len == 0) {
len = (60 / 120) * _session->frame_rate ();
}
plist.add (ARDOUR::Properties::start, 0);
plist.add (ARDOUR::Properties::length, len);
plist.add (ARDOUR::Properties::name, region_name);
@ -806,19 +806,19 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
int n = 0;
framepos_t rlen = 0;
for (vector<boost::shared_ptr<Region> >::iterator r = regions.begin(); r != regions.end(); ++r, ++n) {
for (vector<boost::shared_ptr<Region> >::iterator r = regions.begin(); r != regions.end(); ++r, ++n) {
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> (*r);
if (use_timestamp) {
if (ar) {
/* get timestamp for this region */
const boost::shared_ptr<Source> s (ar->sources().front());
const boost::shared_ptr<AudioSource> as = boost::dynamic_pointer_cast<AudioSource> (s);
assert (as);
if (as->natural_position() != 0) {
pos = as->natural_position();
} else if (target_tracks == 1) {
@ -837,15 +837,15 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
pos = get_preferred_edit_position ();
}
}
finish_bringing_in_material (*r, input_chan, output_chan, pos, mode, track);
rlen = (*r)->length();
if (target_tracks != 1) {
track.reset ();
} else {
} else {
if (!use_timestamp || !ar) {
/* line each one up right after the other */
pos += (*r)->length();
@ -919,7 +919,7 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t
existing_track = mt.front();
}
existing_track->set_name (region->name());
}

View file

@ -74,7 +74,7 @@ Editor::toggle_meter_updating()
} else {
stop_updating_meters ();
}
track_canvas_allocate (track_canvas->get_allocation());
}

View file

@ -118,7 +118,7 @@ Editor::initialize_canvas ()
gint phys_height = physical_screen_height (Glib::RefPtr<Gdk::Window>());
_verbose_cursor = new VerboseCursor (this);
/* on the bottom, an image */
if (Profile->get_sae()) {
@ -341,7 +341,7 @@ Editor::reset_controls_layout_width ()
}
/* the controls layout has no horizontal scrolling, its visible
width is always equal to the total width of its contents.
width is always equal to the total width of its contents.
*/
controls_layout.property_width() = w;
@ -355,10 +355,10 @@ Editor::reset_controls_layout_height (int32_t h)
*/
controls_layout.property_height() = h;
/* size request is set elsewhere, see ::track_canvas_allocate() */
}
bool
Editor::track_canvas_map_handler (GdkEventAny* /*ev*/)
{

View file

@ -294,7 +294,7 @@ Editor::canvas_stream_view_event (GdkEvent *event, ArdourCanvas::Item* item, Rou
case GDK_LEAVE_NOTIFY:
set_entered_track (0);
break;
default:
break;
}

View file

@ -86,7 +86,7 @@ void
DragManager::abort ()
{
_ending = true;
for (list<Drag*>::const_iterator i = _drags.begin(); i != _drags.end(); ++i) {
(*i)->abort ();
delete *i;
@ -97,7 +97,7 @@ DragManager::abort ()
}
_drags.clear ();
_ending = false;
}
@ -122,9 +122,9 @@ DragManager::start_grab (GdkEvent* e, Gdk::Cursor* c)
/* Prevent follow playhead during the drag to be nice to the user */
_old_follow_playhead = _editor->follow_playhead ();
_editor->set_follow_playhead (false);
_current_pointer_frame = _editor->event_frame (e, &_current_pointer_x, &_current_pointer_y);
for (list<Drag*>::const_iterator i = _drags.begin(); i != _drags.end(); ++i) {
(*i)->start_grab (e, c);
}
@ -137,7 +137,7 @@ bool
DragManager::end_grab (GdkEvent* e)
{
_ending = true;
bool r = false;
for (list<Drag*>::iterator i = _drags.begin(); i != _drags.end(); ++i) {
bool const t = (*i)->end_grab (e);
@ -152,7 +152,7 @@ DragManager::end_grab (GdkEvent* e)
_ending = false;
_editor->set_follow_playhead (_old_follow_playhead, false);
return r;
}
@ -162,13 +162,13 @@ DragManager::motion_handler (GdkEvent* e, bool from_autoscroll)
bool r = false;
_current_pointer_frame = _editor->event_frame (e, &_current_pointer_x, &_current_pointer_y);
for (list<Drag*>::iterator i = _drags.begin(); i != _drags.end(); ++i) {
bool const t = (*i)->motion_handler (e, from_autoscroll);
if (t) {
r = true;
}
}
return r;
@ -185,7 +185,7 @@ DragManager::have_item (ArdourCanvas::Item* i) const
return j != _drags.end ();
}
Drag::Drag (Editor* e, ArdourCanvas::Item* i)
Drag::Drag (Editor* e, ArdourCanvas::Item* i)
: _editor (e)
, _item (i)
, _pointer_frame_offset (0)
@ -337,7 +337,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
_last_pointer_x = _drags->current_pointer_x ();
_last_pointer_y = _drags->current_pointer_y ();
_last_pointer_frame = adjusted_current_frame (event);
return true;
}
}
@ -374,7 +374,7 @@ void
Drag::show_verbose_cursor_duration (framepos_t start, framepos_t end, double xoffset)
{
_editor->verbose_cursor()->show (xoffset);
_editor->verbose_cursor()->set_duration (
start, end,
_drags->current_pointer_x() + 10 - _editor->horizontal_position(),
@ -386,7 +386,7 @@ void
Drag::show_verbose_cursor_text (string const & text)
{
_editor->verbose_cursor()->show ();
_editor->verbose_cursor()->set (
text,
_drags->current_pointer_x() + 10 - _editor->horizontal_position(),
@ -417,7 +417,7 @@ RegionDrag::RegionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<Re
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
if (!(*i)->hidden()) {
_time_axis_views.push_back (*i);
TimeAxisView::Children children_list = (*i)->get_child_list ();
@ -429,11 +429,11 @@ RegionDrag::RegionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<Re
/* the list of views can be empty at this point if this is a region list-insert drag
*/
for (list<RegionView*>::const_iterator i = v.begin(); i != v.end(); ++i) {
_views.push_back (DraggingView (*i, this));
}
RegionView::RegionViewGoingAway.connect (death_connection, invalidator (*this), ui_bind (&RegionDrag::region_going_away, this, _1), gui_context());
}
@ -463,7 +463,7 @@ RegionDrag::find_time_axis_view (TimeAxisView* t) const
if (i == N) {
return -1;
}
return i;
}
@ -499,19 +499,19 @@ RegionMotionDrag::compute_x_delta (GdkEvent const * event, framepos_t* pending_r
framepos_t sync_frame;
framecnt_t sync_offset;
int32_t sync_dir;
sync_offset = _primary->region()->sync_offset (sync_dir);
/* we don't handle a sync point that lies before zero.
*/
if (sync_dir >= 0 || (sync_dir < 0 && *pending_region_position >= sync_offset)) {
sync_frame = *pending_region_position + (sync_dir*sync_offset);
_editor->snap_to_with_modifier (sync_frame, event);
*pending_region_position = _primary->region()->adjust_to_sync (sync_frame);
} else {
*pending_region_position = _last_frame_position;
}
@ -566,7 +566,7 @@ RegionMotionDrag::y_movement_allowed (int delta_track, layer_t delta_layer) cons
/* not a track, or the wrong type */
return false;
}
int const l = i->layer + delta_layer;
if (delta_track == 0 && (l < 0 || l >= int (to->view()->layers()))) {
/* Off the top or bottom layer; note that we only refuse if the track hasn't changed.
@ -637,39 +637,39 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
/* here we are calculating the y distance from the
top of the first track view to the top of the region
area of the track view that we're working on */
/* this x value is just a dummy value so that we have something
to pass to i2w () */
double ix1 = 0;
/* distance from the top of this track view to the region area
of our track view is always 1 */
double iy1 = 1;
/* convert to world coordinates, ie distance from the top of
the ruler section */
rv->get_canvas_frame()->i2w (ix1, iy1);
/* compensate for the ruler section and the vertical scrollbar position */
iy1 += _editor->get_trackview_group_vertical_offset ();
// hide any dependent views
rv->get_time_axis_view().hide_dependent_views (*rv);
/*
reparent to a non scrolling group so that we can keep the
region selection above all time axis views.
reparenting means we have to move the rv as the two
parent groups have different coordinates.
*/
rv->get_canvas_group()->property_y() = iy1 - 1;
rv->get_canvas_group()->reparent (*(_editor->_region_motion_group));
rv->fake_set_opaque (true);
}
@ -727,7 +727,7 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
} /* foreach region */
_total_x_delta += x_delta;
if (first_move) {
_editor->cursor_group->raise_to_top();
}
@ -750,7 +750,7 @@ RegionMoveDrag::motion (GdkEvent* event, bool first_move)
list<DraggingView> new_regionviews;
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
RegionView* rv = i->view;
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(rv);
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(rv);
@ -758,12 +758,12 @@ RegionMoveDrag::motion (GdkEvent* event, bool first_move)
const boost::shared_ptr<const Region> original = rv->region();
boost::shared_ptr<Region> region_copy = RegionFactory::create (original, true);
region_copy->set_position (original->position());
RegionView* nrv;
if (arv) {
boost::shared_ptr<AudioRegion> audioregion_copy
= boost::dynamic_pointer_cast<AudioRegion>(region_copy);
nrv = new AudioRegionView (*arv, audioregion_copy);
} else if (mrv) {
boost::shared_ptr<MidiRegion> midiregion_copy
@ -772,29 +772,29 @@ RegionMoveDrag::motion (GdkEvent* event, bool first_move)
} else {
continue;
}
nrv->get_canvas_group()->show ();
new_regionviews.push_back (DraggingView (nrv, this));
/* swap _primary to the copy */
if (rv == _primary) {
_primary = nrv;
}
/* ..and deselect the one we copied */
rv->set_selected (false);
}
if (!new_regionviews.empty()) {
/* reflect the fact that we are dragging the copies */
_views = new_regionviews;
swap_grab (new_regionviews.front().view->get_canvas_group (), 0, event ? event->motion.time : 0);
/*
sync the canvas to what we think is its current state
without it, the canvas seems to
@ -832,23 +832,23 @@ RegionMoveDrag::finished (GdkEvent *, bool movement_occurred)
framecnt_t const drag_delta = _primary->region()->position() - _last_frame_position;
_editor->update_canvas_now ();
if (_copy) {
finished_copy (
changed_position,
changed_tracks,
drag_delta
);
} else {
finished_no_copy (
changed_position,
changed_tracks,
drag_delta
);
}
}
@ -894,13 +894,13 @@ RegionMoveDrag::finished_copy (bool const changed_position, bool const /*changed
RegionView* new_view = insert_region_into_playlist (
i->view->region(), dynamic_cast<RouteTimeAxisView*> (_time_axis_views[i->time_axis_view]), i->layer, where, modified_playlists
);
if (new_view == 0) {
continue;
}
new_views.push_back (new_view);
/* we don't need the copied RegionView any more */
views_to_delete.push_back (i->view);
}
@ -913,8 +913,8 @@ RegionMoveDrag::finished_copy (bool const changed_position, bool const /*changed
delete *i;
}
/* If we've created new regions either by copying or moving
to a new track, we want to replace the old selection with the new ones
/* If we've created new regions either by copying or moving
to a new track, we want to replace the old selection with the new ones
*/
if (new_views.size() > 0) {
@ -998,7 +998,7 @@ RegionMoveDrag::finished_no_copy (
remove_region_from_playlist (rv->region(), i->initial_playlist, modified_playlists);
} else {
rv->region()->clear_changes ();
/*
@ -1014,12 +1014,12 @@ RegionMoveDrag::finished_no_copy (
/* just change the model */
boost::shared_ptr<Playlist> playlist = dest_rtv->playlist();
if (dest_rtv->view()->layer_display() == Stacked) {
rv->region()->set_layer (dest_layer);
rv->region()->set_pending_explicit_relayer (true);
}
/* freeze playlist to avoid lots of relayering in the case of a multi-region drag */
pair<PlaylistSet::iterator, bool> r = frozen_playlists.insert (playlist);
@ -1031,7 +1031,7 @@ RegionMoveDrag::finished_no_copy (
/* this movement may result in a crossfade being modified, so we need to get undo
data from the playlist as well as the region.
*/
r = modified_playlists.insert (playlist);
if (r.second) {
playlist->clear_changes ();
@ -1043,7 +1043,7 @@ RegionMoveDrag::finished_no_copy (
}
if (changed_tracks) {
/* OK, this is where it gets tricky. If the playlist was being used by >1 tracks, and the region
was selected in all of them, then removing it from a playlist will have removed all
trace of it from _views (i.e. there were N regions selected, we removed 1,
@ -1061,7 +1061,7 @@ RegionMoveDrag::finished_no_copy (
we can just iterate.
*/
if (_views.empty()) {
break;
} else {
@ -1073,8 +1073,8 @@ RegionMoveDrag::finished_no_copy (
}
}
/* If we've created new regions either by copying or moving
to a new track, we want to replace the old selection with the new ones
/* If we've created new regions either by copying or moving
to a new track, we want to replace the old selection with the new ones
*/
if (new_views.size() > 0) {
@ -1112,7 +1112,7 @@ RegionMoveDrag::remove_region_from_playlist (
playlist->remove_region (region);
}
/** Insert a region into a playlist, handling the recovery of the resulting new RegionView, and
* clearing the playlist's diff history first if necessary.
@ -1121,7 +1121,7 @@ RegionMoveDrag::remove_region_from_playlist (
* @param dest_layer Destination layer.
* @param where Destination position.
* @param modified_playlists The playlist will be added to this if it is not there already; used to ensure
* that clear_changes () is only called once per playlist.
* that clear_changes () is only called once per playlist.
* @return New RegionView, or 0 if no insert was performed.
*/
RegionView *
@ -1142,7 +1142,7 @@ RegionMoveDrag::insert_region_into_playlist (
_new_region_view = 0;
sigc::connection c = dest_rtv->view()->RegionViewAdded.connect (sigc::mem_fun (*this, &RegionMoveDrag::collect_new_region_view));
/* clear history for the playlist we are about to insert to, provided we haven't already done so */
/* clear history for the playlist we are about to insert to, provided we haven't already done so */
pair<PlaylistSet::iterator, bool> r = modified_playlists.insert (dest_playlist);
if (r.second) {
dest_playlist->clear_changes ();
@ -1225,7 +1225,7 @@ RegionMoveDrag::RegionMoveDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p,
_copy (c)
{
DEBUG_TRACE (DEBUG::Drags, "New RegionMoveDrag\n");
double speed = 1;
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&_primary->get_time_axis_view ());
if (rtv && rtv->is_track()) {
@ -1245,7 +1245,7 @@ RegionInsertDrag::RegionInsertDrag (Editor* e, boost::shared_ptr<Region> r, Rout
: RegionMotionDrag (e, 0, 0, list<RegionView*> (), false)
{
DEBUG_TRACE (DEBUG::Drags, "New RegionInsertDrag\n");
assert ((boost::dynamic_pointer_cast<AudioRegion> (r) && dynamic_cast<AudioTimeAxisView*> (v)) ||
(boost::dynamic_pointer_cast<MidiRegion> (r) && dynamic_cast<MidiTimeAxisView*> (v)));
@ -1393,7 +1393,7 @@ RegionCreateDrag::RegionCreateDrag (Editor* e, ArdourCanvas::Item* i, TimeAxisVi
_view (dynamic_cast<MidiTimeAxisView*> (v))
{
DEBUG_TRACE (DEBUG::Drags, "New RegionCreateDrag\n");
assert (_view);
}
@ -1409,14 +1409,14 @@ RegionCreateDrag::motion (GdkEvent* event, bool first_move)
if (f < grab_frame()) {
_region->set_position (f);
}
/* Don't use a zero-length region, and subtract 1 frame from the snapped length
so that if this region is duplicated, its duplicate starts on
a snap point rather than 1 frame after a snap point. Otherwise things get
a bit confusing as if a region starts 1 frame after a snap point, one cannot
place snapped notes at the start of the region.
*/
framecnt_t const len = abs (f - grab_frame () - 1);
_region->set_length (len < 1 ? 1 : len);
}
@ -1717,7 +1717,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
}
framecnt_t frame_delta = 0;
bool left_direction = false;
if (last_pointer_frame() > adjusted_current_frame(event)) {
left_direction = true;
@ -1765,7 +1765,7 @@ TrimDrag::finished (GdkEvent* event, bool movement_occurred)
i->view->trim_front_ending ();
}
}
if (!_editor->selection->selected (_primary)) {
_primary->thaw_after_trim ();
} else {
@ -1807,7 +1807,7 @@ TrimDrag::finished (GdkEvent* event, bool movement_occurred)
if (_operation == StartTrim) {
i->view->trim_front_ending ();
}
i->view->region()->resume_property_changes ();
}
}
@ -1821,7 +1821,7 @@ TrimDrag::aborted (bool movement_occurred)
*/
finished (0, true);
if (movement_occurred) {
_editor->undo ();
}
@ -1860,7 +1860,7 @@ MeterMarkerDrag::MeterMarkerDrag (Editor* e, ArdourCanvas::Item* i, bool c)
_copy (c)
{
DEBUG_TRACE (DEBUG::Drags, "New MeterMarkerDrag\n");
_marker = reinterpret_cast<MeterMarker*> (_item->get_data ("marker"));
assert (_marker);
}
@ -1912,7 +1912,7 @@ MeterMarkerDrag::motion (GdkEvent* event, bool)
framepos_t const pf = adjusted_current_frame (event);
_marker->set_position (pf);
show_verbose_cursor_time (pf);
}
@ -1962,7 +1962,7 @@ TempoMarkerDrag::TempoMarkerDrag (Editor* e, ArdourCanvas::Item* i, bool c)
_copy (c)
{
DEBUG_TRACE (DEBUG::Drags, "New TempoMarkerDrag\n");
_marker = reinterpret_cast<TempoMarker*> (_item->get_data ("marker"));
assert (_marker);
}
@ -1999,7 +1999,7 @@ void
TempoMarkerDrag::setup_pointer_frame_offset ()
{
_pointer_frame_offset = raw_grab_frame() - _marker->tempo().frame();
}
}
void
TempoMarkerDrag::motion (GdkEvent* event, bool)
@ -2065,7 +2065,7 @@ void
CursorDrag::fake_locate (framepos_t t)
{
_editor->playhead_cursor->set_position (t);
Session* s = _editor->session ();
if (s->timecode_transmission_suspended ()) {
framepos_t const f = _editor->playhead_cursor->current_frame;
@ -2088,24 +2088,24 @@ CursorDrag::start_grab (GdkEvent* event, Gdk::Cursor* c)
_editor->snap_to_with_modifier (where, event);
_editor->_dragging_playhead = true;
Session* s = _editor->session ();
if (s) {
if (_was_rolling && _stop) {
s->request_stop ();
}
if (s->is_auditioning()) {
s->cancel_audition ();
}
s->request_suspend_timecode_transmission ();
while (!s->timecode_transmission_suspended ()) {
/* twiddle our thumbs */
}
}
fake_locate (where);
}
@ -2122,7 +2122,7 @@ CursorDrag::motion (GdkEvent* event, bool)
double const scale_range = 4;
/* dead zone around the grab point in which to do no zooming (pixels) */
double const dead_zone = 16;
/* current dy */
double dy = _drags->current_pointer_y() - grab_y();
@ -2133,7 +2133,7 @@ CursorDrag::motion (GdkEvent* event, bool)
} else {
dy -= dead_zone;
}
/* get a number from -1 to 1 as dy ranges from -y_range to y_range */
double udy = max (min (dy / y_range, 1.0), -1.0);
@ -2144,7 +2144,7 @@ CursorDrag::motion (GdkEvent* event, bool)
_editor->set_zoom_focus (zf);
}
}
framepos_t const adjusted_frame = adjusted_current_frame (event);
if (adjusted_frame != last_pointer_frame()) {
fake_locate (adjusted_frame);
@ -2180,7 +2180,7 @@ CursorDrag::aborted (bool)
_editor->session()->request_resume_timecode_transmission ();
_editor->_dragging_playhead = false;
}
_editor->playhead_cursor->set_position (adjusted_frame (grab_frame (), 0, false));
}
@ -2199,7 +2199,7 @@ FadeInDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
boost::shared_ptr<AudioRegion> const r = arv->audio_region ();
show_verbose_cursor_duration (r->position(), r->position() + r->fade_in()->back()->when, 32);
arv->show_fade_line((framepos_t) r->fade_in()->back()->when);
}
@ -2318,7 +2318,7 @@ FadeOutDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
boost::shared_ptr<AudioRegion> r = arv->audio_region ();
show_verbose_cursor_duration (r->last_frame() - r->fade_out()->back()->when, r->last_frame());
arv->show_fade_line(r->length() - r->fade_out()->back()->when);
}
@ -2328,7 +2328,7 @@ FadeOutDrag::setup_pointer_frame_offset ()
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (_primary);
boost::shared_ptr<AudioRegion> r = arv->audio_region ();
_pointer_frame_offset = raw_grab_frame() - (r->length() - (framecnt_t) r->fade_out()->back()->when + r->position());
}
}
void
FadeOutDrag::motion (GdkEvent* event, bool)
@ -2430,7 +2430,7 @@ MarkerDrag::MarkerDrag (Editor* e, ArdourCanvas::Item* i)
: Drag (e, i)
{
DEBUG_TRACE (DEBUG::Drags, "New MarkerDrag\n");
_marker = reinterpret_cast<Marker*> (_item->get_data ("marker"));
assert (_marker);
@ -2753,7 +2753,7 @@ ControlPointDrag::ControlPointDrag (Editor* e, ArdourCanvas::Item* i)
_cumulative_y_drag (0)
{
DEBUG_TRACE (DEBUG::Drags, "New ControlPointDrag\n");
_point = reinterpret_cast<ControlPoint*> (_item->get_data ("control_point"));
assert (_point);
}
@ -2819,7 +2819,7 @@ ControlPointDrag::motion (GdkEvent* event, bool)
cy = min ((double) _point->line().height(), cy);
framepos_t cx_frames = _editor->unit_to_frame (cx);
if (!_x_constrained) {
_editor->snap_to_with_modifier (cx_frames, event);
}
@ -2849,7 +2849,7 @@ ControlPointDrag::finished (GdkEvent* event, bool movement_occurred)
} else {
motion (event, false);
}
_point->line().end_drag ();
_editor->session()->commit_reversible_command ();
}
@ -2901,7 +2901,7 @@ LineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
uint32_t before;
uint32_t after;
if (!_line->control_points_adjacent (frame_within_region, before, after)) {
/* no adjacent points */
return;
@ -2982,7 +2982,7 @@ void
FeatureLineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
{
Drag::start_grab (event);
_line = reinterpret_cast<Line*> (_item);
assert (_line);
@ -2995,9 +2995,9 @@ FeatureLineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
/* store grab start in parent frame */
_region_view_grab_x = cx;
_before = *(float*) _item->get_data ("position");
_arv = reinterpret_cast<AudioRegionView*> (_item->get_data ("regionview"));
_max_x = _editor->frame_to_pixel(_arv->get_duration());
@ -3007,34 +3007,34 @@ void
FeatureLineDrag::motion (GdkEvent*, bool)
{
double dx = _drags->current_pointer_x() - last_pointer_x();
double cx = _region_view_grab_x + _cumulative_x_drag + dx;
_cumulative_x_drag += dx;
/* Clamp the min and max extent of the drag to keep it within the region view bounds */
if (cx > _max_x){
cx = _max_x;
}
else if(cx < 0){
cx = 0;
}
ArdourCanvas::Points points;
double x1 = 0, x2 = 0, y1 = 0, y2 = 0;
_line->get_bounds(x1, y2, x2, y2);
points.push_back(Gnome::Art::Point(cx, 2.0)); // first x-coord needs to be a non-normal value
points.push_back(Gnome::Art::Point(cx, y2 - y1));
_line->property_points() = points;
float *pos = new float;
*pos = cx;
_line->set_data ("position", pos);
_before = cx;
@ -3354,7 +3354,7 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
if (pending_time_axis.first == 0) {
return;
}
framepos_t const pending_position = adjusted_current_frame (event);
/* only alter selection if things have changed */
@ -3399,7 +3399,7 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
//_editor->selection->set (_editor->clicked_axisview);
_editor->set_selected_track_as_side_effect (Selection::Set);
}
_editor->clicked_selection = _editor->selection->set (start, end);
}
}
@ -3414,7 +3414,7 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
/* deselect any tracks that this drag no longer includes, being careful to only deselect
tracks that we selected in the first place.
*/
int min_order = min (_original_pointer_time_axis, pending_time_axis.first->order());
int max_order = max (_original_pointer_time_axis, pending_time_axis.first->order());
@ -3423,7 +3423,7 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
list<TimeAxisView*>::iterator tmp = i;
++tmp;
if ((*i)->order() < min_order || (*i)->order() > max_order) {
_editor->selection->remove (*i);
_added_time_axes.remove (*i);
@ -3518,7 +3518,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
if (_editor->clicked_axisview && !_editor->selection->selected (_editor->clicked_axisview)) {
_editor->selection->set (_editor->clicked_axisview);
}
if (s && s->get_play_range () && s->transport_rolling()) {
s->request_stop (false, false);
}
@ -3540,8 +3540,8 @@ RangeMarkerBarDrag::RangeMarkerBarDrag (Editor* e, ArdourCanvas::Item* i, Operat
_copy (false)
{
DEBUG_TRACE (DEBUG::Drags, "New RangeMarkerBarDrag\n");
_drag_rect = new ArdourCanvas::SimpleRect (*_editor->time_line_group, 0.0, 0.0, 0.0,
_drag_rect = new ArdourCanvas::SimpleRect (*_editor->time_line_group, 0.0, 0.0, 0.0,
physical_screen_height (_editor->get_window()));
_drag_rect->hide ();
@ -3609,7 +3609,7 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
if (_operation == CreateRangeMarker || _operation == CreateTransportMarker || _operation == CreateCDMarker) {
framepos_t grab = grab_frame ();
_editor->snap_to (grab);
if (pf < grab_frame()) {
start = pf;
end = grab;
@ -3683,7 +3683,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
newloc = new Location (
*_editor->session(), _editor->temp_location->start(), _editor->temp_location->end(), rangename, (Location::Flags) flags
);
_editor->session()->locations()->add (newloc, true);
XMLNode &after = _editor->session()->locations()->get_state();
_editor->session()->add_command(new MementoCommand<Locations>(*(_editor->session()->locations()), &before, &after));
@ -3767,7 +3767,7 @@ MouseZoomDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
Drag::start_grab (event, _editor->cursors()->zoom_in);
_zoom_out = false;
}
show_verbose_cursor_time (adjusted_current_frame (event));
}
@ -3879,7 +3879,7 @@ NoteDrag::total_dx () const
/* primary note time */
frameoffset_t const n = _region->beats_to_frames (_primary->note()->time ());
/* new time of the primary note relative to the region position */
frameoffset_t st = n + dx;
@ -3911,11 +3911,11 @@ NoteDrag::total_dy () const
}
/* more positive value = higher pitch and higher y-axis position on track,
which is the inverse of the X-centric geometric universe
which is the inverse of the X-centric geometric universe
*/
return -ndy;
}
return -ndy;
}
void
NoteDrag::motion (GdkEvent *, bool)
@ -3939,7 +3939,7 @@ NoteDrag::motion (GdkEvent *, bool)
char buf[12];
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (_primary->note()->note() + note_delta).c_str(),
(int) floor (_primary->note()->note() + note_delta));
show_verbose_cursor_text (buf);
}
}
@ -3985,7 +3985,7 @@ AutomationRangeDrag::AutomationRangeDrag (Editor* editor, ArdourCanvas::Item* it
, _nothing_to_drag (false)
{
DEBUG_TRACE (DEBUG::Drags, "New AutomationRangeDrag\n");
_atav = reinterpret_cast<AutomationTimeAxisView*> (_item->get_data ("trackview"));
assert (_atav);
@ -4043,13 +4043,13 @@ AutomationRangeDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
i->points.push_back (i->line->nth (j));
}
}
} else {
for (list<AudioRange>::const_iterator i = _ranges.begin(); i != _ranges.end(); ++i) {
framecnt_t const half = (i->start + i->end) / 2;
/* find the line that this audio range starts in */
list<Line>::iterator j = _lines.begin();
while (j != _lines.end() && (j->range.first > i->start || j->range.second < i->start)) {
@ -4058,7 +4058,7 @@ AutomationRangeDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
if (j != _lines.end()) {
boost::shared_ptr<AutomationList> the_list = j->line->the_list ();
/* j is the line that this audio range starts in; fade into it;
64 samples length plucked out of thin air.
*/
@ -4078,7 +4078,7 @@ AutomationRangeDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
}
/* same thing for the end */
j = _lines.begin();
while (j != _lines.end() && (j->range.first > i->end || j->range.second < i->end)) {
++j;
@ -4086,11 +4086,11 @@ AutomationRangeDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
if (j != _lines.end()) {
boost::shared_ptr<AutomationList> the_list = j->line->the_list ();
/* j is the line that this audio range starts in; fade out of it;
64 samples length plucked out of thin air.
*/
framepos_t b = i->end - 64;
if (b < half) {
b = half;
@ -4098,7 +4098,7 @@ AutomationRangeDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
double const p = j->line->time_converter().from (b - j->line->time_converter().origin_b ());
double const q = j->line->time_converter().from (i->end - j->line->time_converter().origin_b ());
the_list->add (p, the_list->eval (p));
j->line->add_always_in_view (p);
the_list->add (q, the_list->eval (q));
@ -4166,7 +4166,7 @@ AutomationRangeDrag::finished (GdkEvent* event, bool)
if (_nothing_to_drag) {
return;
}
motion (event, false);
for (list<Line>::iterator i = _lines.begin(); i != _lines.end(); ++i) {
i->line->end_drag ();
@ -4212,7 +4212,7 @@ PatchChangeDrag::motion (GdkEvent* ev, bool)
boost::shared_ptr<Region> r = _region_view->region ();
f = max (f, r->position ());
f = min (f, r->last_frame ());
framecnt_t const dxf = f - grab_frame();
double const dxu = _editor->frame_to_unit (dxf);
_patch_change->move (dxu - _cumulative_dx, 0);
@ -4227,11 +4227,11 @@ PatchChangeDrag::finished (GdkEvent* ev, bool movement_occurred)
}
boost::shared_ptr<Region> r (_region_view->region ());
framepos_t f = adjusted_current_frame (ev);
f = max (f, r->position ());
f = min (f, r->last_frame ());
_region_view->move_patch_change (
*_patch_change,
_region_view->frames_to_beats (f - r->position() - r->start())

View file

@ -124,7 +124,7 @@ public:
ARDOUR::framepos_t adjusted_frame (ARDOUR::framepos_t, GdkEvent const *, bool snap = true) const;
ARDOUR::framepos_t adjusted_current_frame (GdkEvent const *, bool snap = true) const;
/** Called to start a grab of an item.
* @param e Event that caused the grab to start.
* @param c Cursor to use, or 0.
@ -275,9 +275,9 @@ protected:
int _visible_y_high;
friend class DraggingView;
private:
void region_going_away (RegionView *);
PBD::ScopedConnection death_connection;
};
@ -369,7 +369,7 @@ private:
void add_stateful_diff_commands_for_playlists (PlaylistSet const &);
void collect_new_region_view (RegionView *);
bool _copy;
RegionView* _new_region_view;
};
@ -447,7 +447,7 @@ class NoteDrag : public Drag
ARDOUR::frameoffset_t total_dx () const;
int8_t total_dy () const;
MidiRegionView* _region;
Gnome::Canvas::CanvasNoteEvent* _primary;
double _cumulative_dx;
@ -515,7 +515,7 @@ public:
}
void setup_pointer_frame_offset ();
private:
Operation _operation;
@ -541,7 +541,7 @@ public:
}
void setup_pointer_frame_offset ();
private:
MeterMarker* _marker;
bool _copy;
@ -567,7 +567,7 @@ public:
}
void setup_pointer_frame_offset ();
private:
TempoMarker* _marker;
bool _copy;
@ -596,10 +596,10 @@ public:
bool y_movement_matters () const {
return true;
}
private:
void fake_locate (framepos_t);
bool _stop; ///< true to stop the transport on starting the drag, otherwise false
double _grab_zoom; ///< editor frames per unit when our grab started
};
@ -661,7 +661,7 @@ public:
}
void setup_pointer_frame_offset ();
private:
void update_item (ARDOUR::Location *);
@ -737,10 +737,10 @@ private:
ArdourCanvas::Line* _line;
AudioRegionView* _arv;
double _region_view_grab_x;
double _cumulative_x_drag;
float _before;
uint32_t _max_x;
};
@ -891,9 +891,9 @@ private:
std::pair<ARDOUR::framepos_t, ARDOUR::framepos_t> range; ///< the range of all points on the line, in session frames
XMLNode* state; ///< the XML state node before the drag
};
std::list<Line> _lines;
bool _nothing_to_drag;
};

View file

@ -85,7 +85,7 @@ EditorGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
} else {
cairo_set_source_rgba (cr, 1, 1, 1, 0.2);
}
cairo_move_to (cr, 0, tab.from + arc_radius);
cairo_arc (cr, _width, tab.from + arc_radius, arc_radius, M_PI, 3 * M_PI / 2);
cairo_line_to (cr, _width, tab.to);
@ -95,10 +95,10 @@ EditorGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
if (tab.group) {
pair<string, double> const f = fit_to_pixels (cr, tab.group->name(), tab.to - tab.from - arc_radius * 2);
cairo_text_extents_t ext;
cairo_text_extents (cr, tab.group->name().c_str(), &ext);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_move_to (cr, _width - ext.height / 2, tab.from + (f.second + tab.to - tab.from) / 2);
cairo_save (cr);
@ -119,7 +119,7 @@ EditorGroupTabs::routes_for_tab (Tab const * t) const
{
RouteList routes;
int32_t y = 0;
for (TrackViewList::iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
if ((*i)->marked_for_display() == false) {
@ -152,7 +152,7 @@ void
EditorGroupTabs::add_menu_items (Gtk::Menu* m, RouteGroup* g)
{
using namespace Gtk::Menu_Helpers;
if (g) {
MenuList& items = m->items ();
items.push_back (MenuElem (_("Fit to Window"), sigc::bind (sigc::mem_fun (*_editor, &Editor::fit_route_group), g)));
@ -163,7 +163,7 @@ PBD::PropertyList
EditorGroupTabs::default_properties () const
{
PBD::PropertyList plist;
plist.add (Properties::active, true);
plist.add (Properties::mute, true);
plist.add (Properties::solo, true);
@ -172,7 +172,7 @@ EditorGroupTabs::default_properties () const
return plist;
}
string
EditorGroupTabs::order_key () const
{

View file

@ -41,7 +41,7 @@ EditorLocations::set_session (ARDOUR::Session* s)
}
Widget&
EditorLocations::widget()
EditorLocations::widget()
{
return _scroller;
}

View file

@ -103,11 +103,11 @@ Editor::add_new_location_internal (Location* location)
lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
group = marker_group;
}
lam->end = 0;
} else if (location->is_auto_loop()) {
// transport marker
lam->start = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::LoopStart, location->start());
@ -116,21 +116,21 @@ Editor::add_new_location_internal (Location* location)
group = transport_marker_group;
} else if (location->is_auto_punch()) {
// transport marker
lam->start = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::PunchIn, location->start());
lam->end = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::PunchOut, location->end());
group = transport_marker_group;
} else if (location->is_session_range()) {
// session range
lam->start = new Marker (*this, *marker_group, color, _("start"), Marker::SessionStart, location->start());
lam->end = new Marker (*this, *marker_group, color, _("end"), Marker::SessionEnd, location->end());
group = marker_group;
} else {
// range marker
if (location->is_cd_marker() && ruler_cd_marker_action->get_active()) {
@ -222,7 +222,7 @@ Editor::check_marker_label (Marker* m)
{
/* Get a time-ordered list of markers from the last time anything changed */
std::list<Marker*>& sorted = _sorted_marker_lists[m->get_parent()];
list<Marker*>::iterator i = find (sorted.begin(), sorted.end(), m);
list<Marker*>::iterator prev = sorted.end ();
@ -256,7 +256,7 @@ Editor::check_marker_label (Marker* m)
if (prev != sorted.end()) {
/* Update just the available space between the previous marker and this one */
double const p = frame_to_pixel (m->position() - (*prev)->position());
if (m->label_on_left()) {
@ -264,7 +264,7 @@ Editor::check_marker_label (Marker* m)
} else {
(*prev)->set_right_label_limit (p);
}
if ((*prev)->label_on_left ()) {
m->set_left_label_limit (p);
} else {
@ -275,7 +275,7 @@ Editor::check_marker_label (Marker* m)
if (next != sorted.end()) {
/* Update just the available space between this marker and the next */
double const p = frame_to_pixel ((*next)->position() - m->position());
if ((*next)->label_on_left()) {
@ -318,7 +318,7 @@ Editor::update_marker_labels (ArdourCanvas::Group* group)
}
/* We sort the list of markers and then set up the space available between each one */
sorted.sort (MarkerComparator ());
list<Marker*>::iterator i = sorted.begin ();
@ -326,18 +326,18 @@ Editor::update_marker_labels (ArdourCanvas::Group* group)
list<Marker*>::iterator prev = sorted.end ();
list<Marker*>::iterator next = i;
++next;
while (i != sorted.end()) {
if (prev != sorted.end()) {
double const p = frame_to_pixel ((*i)->position() - (*prev)->position());
if ((*prev)->label_on_left()) {
(*i)->set_left_label_limit (p);
} else {
(*i)->set_left_label_limit (p / 2);
}
}
if (next != sorted.end()) {
@ -573,7 +573,7 @@ Editor::LocationMarkers::set_name (const string& str)
if (start->type() != Marker::SessionStart) {
start->set_name (str);
}
if (end && end->type() != Marker::SessionEnd) {
end->set_name (str);
}
@ -730,7 +730,7 @@ void
Editor::tempo_or_meter_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
{
marker_menu_item = item;
MeterMarker* mm;
TempoMarker* tm;
dynamic_cast_marker_object (marker_menu_item->get_data ("marker"), &mm, &tm);
@ -744,7 +744,7 @@ Editor::tempo_or_meter_marker_context_menu (GdkEventButton* ev, ArdourCanvas::It
} else {
return;
}
delete tempo_or_meter_marker_menu;
build_tempo_or_meter_marker_menu (can_remove);
tempo_or_meter_marker_menu->popup (1, ev->time);
@ -767,12 +767,12 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
if (transport_marker_menu == 0) {
build_range_marker_menu (true);
}
marker_menu_item = item;
transport_marker_menu->popup (1, ev->time);
} else if (loc->is_mark()) {
delete marker_menu;
build_marker_menu (loc);
@ -792,7 +792,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
#endif
marker_menu_item = item;
marker_menu->popup (1, ev->time);
} else if (loc->is_range_marker()) {
if (range_marker_menu == 0) {
build_range_marker_menu (false);
@ -856,7 +856,7 @@ Editor::build_marker_menu (Location* loc)
glue_item->set_active ();
}
glue_item->signal_activate().connect (sigc::mem_fun (*this, &Editor::toggle_marker_menu_glue));
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(*this, &Editor::marker_menu_remove)));
@ -1494,7 +1494,7 @@ void
Editor::toggle_marker_lines ()
{
_show_marker_lines = !_show_marker_lines;
for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
i->second->set_show_lines (_show_marker_lines);
}

View file

@ -191,7 +191,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
boost::shared_ptr<ARDOUR::Route> route;
AutomationTimeAxisView* atv;
if ((atv = dynamic_cast<AutomationTimeAxisView*>(&view)) != 0) {
AudioTimeAxisView *parent = dynamic_cast<AudioTimeAxisView*>(view.get_parent());
@ -213,7 +213,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
}
}
}
if (current_mixer_strip->route() == route) {
return;
}

View file

@ -207,7 +207,7 @@ Editor::which_grabber_cursor ()
boost::shared_ptr<Movable> m = _movable.lock();
if (m && m->locked()) {
c = _cursors->speaker;
}
}
break;
}
}
@ -373,24 +373,24 @@ Editor::mouse_mode_toggled (MouseMode m)
mouse_mode = m;
instant_save ();
if (!internal_editing()) {
if (mouse_mode != MouseRange && _join_object_range_state == JOIN_OBJECT_RANGE_NONE) {
/* in all modes except range and joined object/range, hide the range selection,
show the object (region) selection.
*/
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
(*i)->hide_selection ();
}
} else {
/*
in range or object/range mode, show the range selection.
*/
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
(*i)->show_selection (selection->time);
}
@ -770,7 +770,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
return true;
}
break;
default:
break;
}
@ -798,12 +798,12 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
case FeatureLineItem:
{
{
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::TertiaryModifier)) {
remove_transient(item);
return true;
}
_drags->set (new FeatureLineDrag (this, item), event);
return true;
break;
@ -821,7 +821,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
/* no region drags in internal edit mode */
break;
}
/* click on a normal region view */
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
add_region_copy_drag (item, event, clicked_regionview);
@ -830,7 +830,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
} else {
add_region_drag (item, event, clicked_regionview);
}
if (_join_object_range_state == JOIN_OBJECT_RANGE_OBJECT && !selection->regions.empty()) {
_drags->add (new SelectionDrag (this, clicked_axisview->get_selection_rect (clicked_selection)->rect, SelectionDrag::SelectionMove));
}
@ -877,7 +877,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drags->set (new RubberbandSelectDrag (this, item), event);
}
break;
case AutomationTrackItem:
/* rubberband drag to select automation points */
_drags->set (new RubberbandSelectDrag (this, item), event);
@ -905,7 +905,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
if (t) {
boost::shared_ptr<Playlist> pl = t->playlist ();
if (pl) {
boost::shared_ptr<Region> r = pl->top_region_at (event_frame (event));
if (r) {
RegionView* rv = rtv->view()->find_view (r);
@ -1054,7 +1054,7 @@ Editor::button_press_handler_2 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
/* no region drags in internal edit mode */
return false;
}
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
add_region_copy_drag (item, event, clicked_regionview);
} else {
@ -1505,7 +1505,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
default:
break;
}
/* do any (de)selection operations that should occur on button release */
@ -1751,7 +1751,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
set_canvas_cursor ();
}
break;
default:
break;
}
@ -1821,7 +1821,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
#endif
_over_region_trim_target = false;
if (is_drawable()) {
set_canvas_cursor (current_canvas_cursor);
}
@ -1843,7 +1843,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
case RegionViewName:
/* see enter_handler() for notes */
_over_region_trim_target = false;
if (!reinterpret_cast<RegionView *> (item->get_data ("regionview"))->name_active()) {
if (is_drawable() && mouse_mode == MouseObject) {
set_canvas_cursor (current_canvas_cursor);
@ -2007,7 +2007,7 @@ bool
Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from_autoscroll)
{
_last_motion_y = event->motion.y;
if (event->motion.is_hint) {
gint x, y;
@ -2048,7 +2048,7 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
if (_drags->active ()) {
handled = _drags->motion_handler (event, from_autoscroll);
}
if (!handled) {
return false;
}
@ -2122,7 +2122,7 @@ Editor::edit_note (ArdourCanvas::Item* item)
d.run ();
}
void
Editor::visible_order_range (int* low, int* high) const
@ -2429,7 +2429,7 @@ Editor::add_region_brush_drag (ArdourCanvas::Item* item, GdkEvent* event, Region
if (!region_view->region()->playlist()) {
return;
}
if (Config->get_edit_mode() == Splice) {
return;
}
@ -2558,12 +2558,12 @@ Editor::update_join_object_range_location (double x, double y)
entered_{track,regionview} is not always setup (e.g. if the mouse is over a TimeSelection), and to get a Region
that we're over requires searching the playlist.
*/
if (join_object_range_button.get_active() == false || (mouse_mode != MouseRange && mouse_mode != MouseObject)) {
_join_object_range_state = JOIN_OBJECT_RANGE_NONE;
return;
}
if (mouse_mode == MouseObject) {
_join_object_range_state = JOIN_OBJECT_RANGE_OBJECT;
} else if (mouse_mode == MouseRange) {
@ -2572,7 +2572,7 @@ Editor::update_join_object_range_location (double x, double y)
/* XXX: maybe we should make entered_track work in all cases, rather than resorting to this */
pair<TimeAxisView*, int> tvp = trackview_by_y_position (y + vertical_adjustment.get_value() - canvas_timebars_vsize);
if (tvp.first) {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tvp.first);
@ -2616,7 +2616,7 @@ void
Editor::set_canvas_cursor_for_region_view (double x, RegionView* rv)
{
assert (rv);
ArdourCanvas::Group* g = rv->get_canvas_group ();
ArdourCanvas::Group* p = g->get_parent_group ();

View file

@ -146,7 +146,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
}
} else {
snap_to (where);
frozen = true;
EditorFreeze(); /* Emit Signal */
}
@ -198,7 +198,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
}
commit_reversible_command ();
if (frozen){
EditorThaw(); /* Emit Signal */
}
@ -245,7 +245,7 @@ Editor::move_range_selection_start_or_end_to_region_boundary (bool move_end, boo
if (end < start) {
return;
}
begin_reversible_command (_("alter selection"));
selection->set_preserving_all_ranges (start, end);
commit_reversible_command ();
@ -379,7 +379,7 @@ Editor::nudge_backward (bool next, bool force_playhead)
if (next) {
distance = next_distance;
}
r->clear_changes ();
if (r->position() > distance) {
@ -453,23 +453,23 @@ void
Editor::nudge_forward_capture_offset ()
{
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
return;
}
begin_reversible_command (_("nudge forward"));
framepos_t const distance = _session->worst_output_latency();
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
boost::shared_ptr<Region> r ((*i)->region());
r->clear_changes ();
r->set_position (r->position() + distance);
_session->add_command(new StatefulDiffCommand (r));
}
commit_reversible_command ();
}
@ -483,14 +483,14 @@ Editor::nudge_backward_capture_offset ()
}
begin_reversible_command (_("nudge forward"));
framepos_t const distance = _session->worst_output_latency();
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
boost::shared_ptr<Region> r ((*i)->region());
r->clear_changes ();
if (r->position() > distance) {
r->set_position (r->position() - distance);
} else {
@ -498,7 +498,7 @@ Editor::nudge_backward_capture_offset ()
}
_session->add_command(new StatefulDiffCommand (r));
}
commit_reversible_command ();
}
@ -705,7 +705,7 @@ Editor::find_next_region_boundary (framepos_t pos, int32_t dir, const TrackViewL
for (TrackViewList::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
framepos_t contender;
framecnt_t d;
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
if (!rtv) {
@ -1238,7 +1238,7 @@ Editor::scroll_tracks_down ()
if (vert_value > vertical_adjustment.get_upper() - _canvas_height) {
vert_value = vertical_adjustment.get_upper() - _canvas_height;
}
vertical_adjustment.set_value (vert_value);
}
@ -1256,7 +1256,7 @@ Editor::scroll_tracks_down_line ()
if (vert_value > vertical_adjustment.get_upper() - _canvas_height) {
vert_value = vertical_adjustment.get_upper() - _canvas_height;
}
vertical_adjustment.set_value (vert_value);
}
@ -1709,7 +1709,7 @@ void
Editor::add_locations_from_region ()
{
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
@ -1736,7 +1736,7 @@ void
Editor::add_location_from_region ()
{
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
@ -1808,11 +1808,11 @@ Editor::set_mark ()
string markername;
_session->locations()->next_available_name (markername, "mark");
if (!choose_new_marker_name (markername)) {
return;
}
_session->locations()->add (new Location (*_session, pos, 0, markername, Location::IsMark), true);
}
@ -2168,7 +2168,7 @@ void
Editor::rename_region ()
{
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
@ -2207,7 +2207,7 @@ Editor::rename_region ()
if (ret != RESPONSE_OK) {
return;
}
std::string str = entry.get_text();
strip_whitespace_edges (str);
if (!str.empty()) {
@ -2253,7 +2253,7 @@ Editor::play_selected_region ()
framepos_t end = 0;
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
@ -2311,8 +2311,8 @@ Editor::region_from_selection ()
internal_start = start - current->position();
RegionFactory::region_name (new_name, current->name(), true);
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, current->start() + internal_start);
plist.add (ARDOUR::Properties::length, selection_cnt);
plist.add (ARDOUR::Properties::name, new_name);
@ -2351,8 +2351,8 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<Region> >& new_re
internal_start = start - current->position();
RegionFactory::region_name (new_name, current->name(), true);
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, current->start() + internal_start);
plist.add (ARDOUR::Properties::length, end - start + 1);
plist.add (ARDOUR::Properties::name, new_name);
@ -2365,7 +2365,7 @@ void
Editor::split_multichannel_region ()
{
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
@ -2483,12 +2483,12 @@ Editor::separate_regions_between (const TimeSelection& ts)
rtv->view()->foreach_regionview (sigc::bind (
sigc::ptr_fun (add_if_covered),
&(*t), &new_selection));
if (!in_command) {
begin_reversible_command (_("separate"));
in_command = true;
}
/* pick up changes to existing regions */
vector<Command*> cmds;
@ -2591,7 +2591,7 @@ Editor::separate_under_selected_regions ()
vector<PlaylistState> playlists;
RegionSelection rs;
rs = get_regions_from_selection_and_entered();
if (!_session || rs.empty()) {
@ -2645,7 +2645,7 @@ Editor::separate_under_selected_regions ()
//Partition on the region bounds
playlist->partition ((*rl)->first_frame() - 1, (*rl)->last_frame() + 1, true);
//Re-add region that was just removed due to the partition operation
playlist->add_region( (*rl), (*rl)->first_frame() );
}
@ -2871,20 +2871,20 @@ void
Editor::remove_region_sync ()
{
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
begin_reversible_command (_("remove region sync"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->clear_sync_position ();
_session->add_command(new StatefulDiffCommand ((*i)->region()));
}
commit_reversible_command ();
}
@ -2902,13 +2902,13 @@ Editor::naturalize_region ()
} else {
begin_reversible_command (_("move region to original position"));
}
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->move_to_natural_position ();
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
commit_reversible_command ();
}
@ -2916,7 +2916,7 @@ void
Editor::align_regions (RegionPoint what)
{
RegionSelection const rs = get_regions_from_selection_and_edit_point ();
if (rs.empty()) {
return;
}
@ -2942,7 +2942,7 @@ void
Editor::align_regions_relative (RegionPoint point)
{
RegionSelection const rs = get_regions_from_selection_and_edit_point ();
if (rs.empty()) {
return;
}
@ -3018,7 +3018,7 @@ Editor::align_regions_relative (RegionPoint point)
} else {
region->set_position (region->position() - distance);
}
_session->add_command(new StatefulDiffCommand (region));
}
@ -3089,15 +3089,15 @@ Editor::trim_region (bool front)
for (list<RegionView*>::const_iterator i = rs.by_layer().begin(); i != rs.by_layer().end(); ++i) {
if (!(*i)->region()->locked()) {
(*i)->region()->clear_changes ();
if (front) {
(*i)->region()->trim_front (where);
} else {
(*i)->region()->trim_end (where);
}
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
}
@ -3159,7 +3159,7 @@ Editor::trim_region_to_location (const Location& loc, const char* str)
start = session_frame_to_track_frame (loc.start(), speed);
end = session_frame_to_track_frame (loc.end(), speed);
rv->region()->clear_changes ();
rv->region()->trim_to (start, (end - start));
_session->add_command(new StatefulDiffCommand (rv->region()));
@ -3355,7 +3355,7 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
playlist->clear_changes ();
playlist->clear_owned_changes ();
boost::shared_ptr<Region> r = rtv->track()->bounce_range (start, start+cnt, itt, enable_processing);
if (replace) {
@ -3820,7 +3820,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
} else {
_last_cut_copy_source_track = pmap.front().tv;
}
for (FreezeList::iterator pl = freezelist.begin(); pl != freezelist.end(); ++pl) {
(*pl)->thaw ();
_session->add_command (new StatefulDiffCommand (*pl));
@ -3916,15 +3916,15 @@ Editor::paste_internal (framepos_t position, float times)
if (internal_editing ()) {
/* undo/redo is handled by individual tracks/regions */
for (nth = 0, i = ts.begin(); i != ts.end(); ++i, ++nth) {
RegionSelection rs;
RegionSelection::iterator r;
MidiNoteSelection::iterator cb;
get_regions_at (rs, position, ts);
for (cb = cut_buffer->midi_notes.begin(), r = rs.begin();
cb != cut_buffer->midi_notes.end() && r != rs.end(); ++r) {
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (*r);
@ -3934,17 +3934,17 @@ Editor::paste_internal (framepos_t position, float times)
}
}
}
} else {
/* we do redo (do you do voodoo?) */
begin_reversible_command (Operations::paste);
for (nth = 0, i = ts.begin(); i != ts.end(); ++i, ++nth) {
(*i)->paste (position, times, *cut_buffer, nth);
}
commit_reversible_command ();
}
}
@ -4099,12 +4099,12 @@ Editor::nudge_track (bool use_edit, bool forwards)
playlist->clear_owned_changes ();
playlist->nudge_after (start, distance, forwards);
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command (new StatefulDiffCommand (playlist));
}
@ -4149,7 +4149,7 @@ Editor::normalize_region ()
}
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty()) {
return;
}
@ -4182,7 +4182,7 @@ Editor::normalize_region ()
set_canvas_cursor (current_canvas_cursor);
return;
}
max_amps.push_back (a);
max_amp = max (max_amp, a);
dialog.ascend ();
@ -4192,7 +4192,7 @@ Editor::normalize_region ()
begin_reversible_command (_("normalize"));
list<double>::const_iterator a = max_amps.begin ();
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*> (*r);
if (!arv) {
@ -4202,7 +4202,7 @@ Editor::normalize_region ()
arv->region()->clear_changes ();
double const amp = dialog.normalize_individually() ? *a : max_amp;
arv->audio_region()->normalize (amp, dialog.target ());
_session->add_command (new StatefulDiffCommand (arv->region()));
@ -4313,13 +4313,13 @@ Editor::strip_region_silence ()
int const r = d.run ();
d.drop_rects ();
if (r == Gtk::RESPONSE_OK) {
ARDOUR::AudioIntervalMap silences;
d.silences (silences);
StripSilence s (*_session, silences, d.fade_length());
apply_filter (s, _("strip silence"), &d);
}
}
}
Command*
@ -4393,7 +4393,7 @@ Editor::fork_region ()
if (mrv) {
boost::shared_ptr<Playlist> playlist = mrv->region()->playlist();
boost::shared_ptr<MidiRegion> newregion = mrv->midi_region()->clone ();
playlist->clear_changes ();
playlist->replace_region (mrv->region(), newregion, mrv->region()->position());
_session->add_command(new StatefulDiffCommand (playlist));
@ -4461,7 +4461,7 @@ Editor::insert_patch_change ()
Evoral::PatchChange<Evoral::MusicalTime> empty (0, 0, 0, 0);
PatchChangeDialog d (0, _session, empty, Gtk::Stock::ADD);
if (d.run() == RESPONSE_CANCEL) {
return;
}
@ -4492,7 +4492,7 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
int n = 0;
int const N = rs.size ();
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ) {
RegionSelection::iterator tmp = r;
++tmp;
@ -4587,7 +4587,7 @@ Editor::toggle_gain_envelope_visibility ()
if (_ignore_region_action) {
return;
}
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
@ -4614,7 +4614,7 @@ Editor::toggle_gain_envelope_active ()
if (_ignore_region_action) {
return;
}
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
@ -4665,7 +4665,7 @@ Editor::toggle_region_lock_style ()
if (_ignore_region_action) {
return;
}
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
@ -4690,7 +4690,7 @@ Editor::toggle_opaque_region ()
if (_ignore_region_action) {
return;
}
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
@ -4882,7 +4882,7 @@ Editor::set_fade_in_active (bool yn)
boost::shared_ptr<AudioRegion> ar (tmp->audio_region());
ar->clear_changes ();
ar->set_fade_in_active (yn);
_session->add_command (new StatefulDiffCommand (ar));
@ -4931,7 +4931,7 @@ Editor::toggle_region_fades (int dir)
return;
}
RegionSelection::iterator i;
RegionSelection::iterator i;
for (i = rs.begin(); i != rs.end(); ++i) {
if ((ar = boost::dynamic_pointer_cast<AudioRegion>((*i)->region())) != 0) {
if (dir == -1) {
@ -5051,12 +5051,12 @@ Editor::set_playhead_cursor ()
void
Editor::split_region ()
{
if (((mouse_mode == MouseRange) ||
(mouse_mode != MouseObject && _join_object_range_state == JOIN_OBJECT_RANGE_RANGE)) &&
if (((mouse_mode == MouseRange) ||
(mouse_mode != MouseObject && _join_object_range_state == JOIN_OBJECT_RANGE_RANGE)) &&
!selection->time.empty()) {
separate_regions_between (selection->time);
return;
}
}
RegionSelection rs = get_regions_from_selection_and_edit_point ();
@ -5422,7 +5422,7 @@ Editor::define_one_bar (framepos_t start, framepos_t end)
_("Do you want to set the global tempo or add a new tempo marker?"),
options
);
c.set_default_response (2);
switch (c.run()) {
@ -5500,9 +5500,9 @@ void
Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList& positions, bool can_ferret, bool select_new)
{
bool use_rhythmic_rodent = false;
boost::shared_ptr<Playlist> pl = r->playlist();
list<boost::shared_ptr<Region> > new_regions;
if (!pl) {
@ -5533,7 +5533,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
int response = msg.run();
msg.hide ();
switch (response) {
case RESPONSE_OK:
break;
@ -5566,7 +5566,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
framepos_t pos = 0;
while (x != positions.end()) {
/* deal with positons that are out of scope of present region bounds */
if (*x <= 0 || *x > r->length()) {
++x;
@ -5582,7 +5582,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
*/
framepos_t len = (*x) - pos;
/* XXX we do we really want to allow even single-sample regions?
shouldn't we have some kind of lower limit on region size?
*/
@ -5599,8 +5599,8 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
/* do NOT announce new regions 1 by one, just wait till they are all done */
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, file_start);
plist.add (ARDOUR::Properties::length, len);
plist.add (ARDOUR::Properties::name, new_name);
@ -5621,10 +5621,10 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
string new_name;
RegionFactory::region_name (new_name, r->name());
/* Add the final region */
PropertyList plist;
PropertyList plist;
plist.add (ARDOUR::Properties::start, r->start() + pos);
plist.add (ARDOUR::Properties::length, r->last_frame() - (r->position() + pos) + 1);
plist.add (ARDOUR::Properties::name, new_name);
@ -5632,7 +5632,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
boost::shared_ptr<Region> nr = RegionFactory::create (r->sources(), plist, false);
pl->add_region (nr, r->position() + pos);
if (select_new) {
new_regions.push_front(nr);
}
@ -5640,7 +5640,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
pl->thaw ();
_session->add_command (new StatefulDiffCommand (pl));
if (select_new) {
for (list<boost::shared_ptr<Region> >::iterator i = new_regions.begin(); i != new_regions.end(); ++i){
@ -5661,16 +5661,16 @@ Editor::place_transient()
if (rs.empty()) {
return;
}
framepos_t where = get_preferred_edit_position();
_session->begin_reversible_command (_("place transient"));
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
framepos_t position = (*r)->region()->position();
(*r)->region()->add_transient(where - position);
}
_session->commit_reversible_command ();
}
@ -5692,19 +5692,19 @@ void
Editor::snap_regions_to_grid ()
{
list <boost::shared_ptr<Playlist > > used_playlists;
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
return;
}
_session->begin_reversible_command (_("snap regions to grid"));
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
boost::shared_ptr<Playlist> pl = (*r)->region()->playlist();
if (!pl->frozen()) {
/* we haven't seen this playlist before */
@ -5717,7 +5717,7 @@ Editor::snap_regions_to_grid ()
snap_to (start_frame);
(*r)->region()->set_position (start_frame);
}
while (used_playlists.size() > 0) {
list <boost::shared_ptr<Playlist > >::iterator i = used_playlists.begin();
(*i)->thaw();
@ -5731,7 +5731,7 @@ void
Editor::close_region_gaps ()
{
list <boost::shared_ptr<Playlist > > used_playlists;
RegionSelection rs = get_regions_from_selection_and_entered ();
if (!_session || rs.empty()) {
@ -5746,7 +5746,7 @@ Editor::close_region_gaps ()
Label* l = manage (new Label (_("Crossfade length")));
l->set_alignment (0, 0.5);
table.attach (*l, 0, 1, 0, 1);
SpinButton spin_crossfade (1, 0);
spin_crossfade.set_range (0, 15);
spin_crossfade.set_increments (1, 1);
@ -5758,7 +5758,7 @@ Editor::close_region_gaps ()
l = manage (new Label (_("Pull-back length")));
l->set_alignment (0, 0.5);
table.attach (*l, 0, 1, 1, 2);
SpinButton spin_pullback (1, 0);
spin_pullback.set_range (0, 100);
spin_pullback.set_increments (1, 1);
@ -5766,7 +5766,7 @@ Editor::close_region_gaps ()
table.attach (spin_pullback, 1, 2, 1, 2);
table.attach (*manage (new Label (_("ms"))), 2, 3, 1, 2);
dialog.get_vbox()->pack_start (table);
dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL);
dialog.add_button (_("Ok"), RESPONSE_ACCEPT);
@ -5776,25 +5776,25 @@ Editor::close_region_gaps ()
return;
}
framepos_t crossfade_len = spin_crossfade.get_value();
framepos_t crossfade_len = spin_crossfade.get_value();
framepos_t pull_back_frames = spin_pullback.get_value();
crossfade_len = lrintf (crossfade_len * _session->frame_rate()/1000);
pull_back_frames = lrintf (pull_back_frames * _session->frame_rate()/1000);
/* Iterate over the region list and make adjacent regions overlap by crossfade_len_ms */
_session->begin_reversible_command (_("close region gaps"));
int idx = 0;
boost::shared_ptr<Region> last_region;
rs.sort_by_position_and_track();
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
boost::shared_ptr<Playlist> pl = (*r)->region()->playlist();
if (!pl->frozen()) {
/* we haven't seen this playlist before */
@ -5804,21 +5804,21 @@ Editor::close_region_gaps ()
}
framepos_t position = (*r)->region()->position();
if (idx == 0 || position < last_region->position()){
last_region = (*r)->region();
idx++;
continue;
}
(*r)->region()->trim_front( (position - pull_back_frames));
last_region->trim_end( (position - pull_back_frames + crossfade_len));
last_region = (*r)->region();
idx++;
}
while (used_playlists.size() > 0) {
list <boost::shared_ptr<Playlist > >::iterator i = used_playlists.begin();
(*i)->thaw();
@ -6135,7 +6135,7 @@ Editor::insert_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
vector<Command*> cmds;
pl->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command (new StatefulDiffCommand (pl));
commit = true;
}
@ -6172,7 +6172,7 @@ Editor::insert_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
}
moved = true;
}
}
if (was_locked) {
@ -6209,7 +6209,7 @@ Editor::fit_selected_tracks ()
for (RegionSelection::iterator r = selection->regions.begin(); r != selection->regions.end(); ++r) {
tvl.push_back (&(*r)->get_time_axis_view ());
}
if (!tvl.empty()) {
fit_tracks (tvl);
}
@ -6382,7 +6382,7 @@ Editor::toggle_region_mute ()
if (_ignore_region_action) {
return;
}
RegionSelection rs = get_regions_from_selection_and_entered ();
if (rs.empty ()) {
@ -6394,15 +6394,15 @@ Editor::toggle_region_mute ()
} else {
begin_reversible_command (_("mute region"));
}
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->playlist()->clear_changes ();
(*i)->region()->set_muted (!(*i)->region()->muted ());
_session->add_command (new StatefulDiffCommand ((*i)->region()->playlist()));
}
commit_reversible_command ();
}
@ -6430,7 +6430,7 @@ Editor::combine_regions ()
}
begin_reversible_command (_("combine regions"));
vector<RegionView*> new_selection;
for (RTVS::iterator i = tracks.begin(); i != tracks.end(); ++i) {

View file

@ -66,14 +66,14 @@ EditorRegions::EditorRegions (Editor* e)
, _show_automatic_regions (true)
, ignore_region_list_selection_change (false)
, ignore_selected_region_change (false)
, _no_redisplay (false)
, _no_redisplay (false)
, _sort_type ((Editing::RegionListSortType) 0)
, expanded (false)
{
_display.set_size_request (100, -1);
_display.set_name ("RegionListDisplay");
_display.set_rules_hint (true);
/* Try to prevent single mouse presses from initiating edits.
This relies on a hack in gtktreeview.c:gtk_treeview_button_press()
*/
@ -119,31 +119,31 @@ EditorRegions::EditorRegions (Editor* e)
CellRendererToggle* locked_cell = dynamic_cast<CellRendererToggle*> (_display.get_column_cell_renderer (7));
locked_cell->property_activatable() = true;
locked_cell->signal_toggled().connect (sigc::mem_fun (*this, &EditorRegions::locked_changed));
TreeViewColumn* locked_col = _display.get_column (7);
locked_col->add_attribute (locked_cell->property_visible(), _columns.property_toggles_visible);
CellRendererToggle* glued_cell = dynamic_cast<CellRendererToggle*> (_display.get_column_cell_renderer (8));
glued_cell->property_activatable() = true;
glued_cell->signal_toggled().connect (sigc::mem_fun (*this, &EditorRegions::glued_changed));
TreeViewColumn* glued_col = _display.get_column (8);
glued_col->add_attribute (glued_cell->property_visible(), _columns.property_toggles_visible);
CellRendererToggle* muted_cell = dynamic_cast<CellRendererToggle*> (_display.get_column_cell_renderer (9));
muted_cell->property_activatable() = true;
muted_cell->signal_toggled().connect (sigc::mem_fun (*this, &EditorRegions::muted_changed));
TreeViewColumn* muted_col = _display.get_column (9);
muted_col->add_attribute (muted_cell->property_visible(), _columns.property_toggles_visible);
CellRendererToggle* opaque_cell = dynamic_cast<CellRendererToggle*> (_display.get_column_cell_renderer (10));
opaque_cell->property_activatable() = true;
opaque_cell->signal_toggled().connect (sigc::mem_fun (*this, &EditorRegions::opaque_changed));
TreeViewColumn* opaque_col = _display.get_column (10);
opaque_col->add_attribute (opaque_cell->property_visible(), _columns.property_toggles_visible);
_display.get_selection()->set_mode (SELECTION_MULTIPLE);
_display.add_object_drag (_columns.region.index(), "regions");
@ -177,7 +177,7 @@ EditorRegions::EditorRegions (Editor* e)
ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::update_all_rows));
ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::region_changed, this, _1, _2), gui_context());
ARDOUR::RegionFactory::CheckNewRegion.connect (check_new_region_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::add_region, this, _1), gui_context());
e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::freeze_tree_model, this), gui_context());
e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::thaw_tree_model, this), gui_context());
}
@ -218,8 +218,8 @@ EditorRegions::enter_notify (GdkEventCrossing* ev)
if (name_editable) {
return true;
}
/* arm counter so that ::selection_filter() will deny selecting anything for the
/* arm counter so that ::selection_filter() will deny selecting anything for the
next two attempts to change selection status.
*/
_scroller.grab_focus ();
@ -369,15 +369,15 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
// find parent node, add as new child
TreeModel::iterator i;
TreeModel::Children rows = _model->children();
boost::unordered_map<string, Gtk::TreeModel::RowReference>::iterator it;
it = parent_regions_sources_map.find (region->source_string());
if (it != parent_regions_sources_map.end()){
TreeModel::iterator j = _model->get_iter ((*it).second.get_path());
TreeModel::iterator ii;
TreeModel::Children subrows = (*j).children();
@ -391,7 +391,7 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
}
}
*/
row = *(_model->insert (subrows.end()));
}
else {
@ -449,7 +449,7 @@ EditorRegions::region_changed (boost::shared_ptr<Region> r, const PropertyChange
our_interests.add (ARDOUR::Properties::opaque);
our_interests.add (ARDOUR::Properties::fade_in);
our_interests.add (ARDOUR::Properties::fade_out);
if (what_changed.contains (our_interests)) {
if (last_row != 0) {
@ -459,19 +459,19 @@ EditorRegions::region_changed (boost::shared_ptr<Region> r, const PropertyChange
if (c == r) {
populate_row (r, (*j));
if (what_changed.contains (ARDOUR::Properties::hidden)) {
redisplay ();
}
return;
}
}
RegionRowMap::iterator it;
it = region_row_map.find (r);
if (it != region_row_map.end()){
TreeModel::iterator j = _model->get_iter ((*it).second.get_path());
@ -479,13 +479,13 @@ EditorRegions::region_changed (boost::shared_ptr<Region> r, const PropertyChange
if (c == r) {
populate_row (r, (*j));
if (what_changed.contains (ARDOUR::Properties::hidden)) {
redisplay ();
}
return;
}
}
}
/* find the region in our model and update its row */
@ -517,7 +517,7 @@ EditorRegions::selection_changed ()
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
if (iter = _model->get_iter (*i)) {
if (iter = _model->get_iter (*i)) {
boost::shared_ptr<Region> region = (*iter)[_columns.region];
// they could have clicked on a row that is just a placeholder, like "Hidden"
@ -525,7 +525,7 @@ EditorRegions::selection_changed ()
// since we need a region ptr.
if (region) {
if (region->automatic()) {
_display.get_selection()->unselect(*i);
@ -552,9 +552,9 @@ EditorRegions::set_selected (RegionSelection& regions)
for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
boost::shared_ptr<Region> r ((*i)->region());
RegionRowMap::iterator it;
it = region_row_map.find (r);
if (it != region_row_map.end()){
@ -581,17 +581,17 @@ EditorRegions::redisplay ()
_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
_model->clear ();
_model->set_sort_column (-2, SORT_ASCENDING); //Disable sorting to gain performance
region_row_map.clear();
parent_regions_sources_map.clear();
/* now add everything we have, via a temporary list used to help with sorting */
const RegionFactory::RegionMap& regions (RegionFactory::regions());
for (RegionFactory::RegionMap::const_iterator i = regions.begin(); i != regions.end(); ++i) {
if ( i->second->whole_file()) {
/* add automatic regions first so that children can find their parents as we add them */
add_region (i->second);
@ -604,7 +604,7 @@ EditorRegions::redisplay ()
for (list<boost::shared_ptr<Region> >::iterator r = tmp_region_list.begin(); r != tmp_region_list.end(); ++r) {
add_region (*r);
}
_model->set_sort_column (0, SORT_ASCENDING); // renabale sorting
_display.set_model (_model);
@ -623,7 +623,7 @@ EditorRegions::update_row (boost::shared_ptr<Region> region)
}
RegionRowMap::iterator it;
it = region_row_map.find (region);
if (it != region_row_map.end()){
@ -645,9 +645,9 @@ EditorRegions::update_all_rows ()
for (i = region_row_map.begin(); i != region_row_map.end(); ++i) {
TreeModel::iterator j = _model->get_iter ((*i).second.get_path());
boost::shared_ptr<Region> region = (*j)[_columns.region];
if (!region->automatic()) {
populate_row(region, (*j));
}
@ -701,7 +701,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
//uint32_t used = _session->playlists->region_use_count (region);
/* Presently a region is only used once so let's save on the sequential scan to determine use count */
uint32_t used = 1;
populate_row_position (region, row, used);
populate_row_end (region, row, used);
populate_row_sync (region, row, used);
@ -825,7 +825,7 @@ EditorRegions::populate_row_fade_in (boost::shared_ptr<Region> region, TreeModel
char buf[16];
format_position (audioregion->fade_in()->back()->when, buf, sizeof (buf));
row[_columns.fadein] = buf;
if (audioregion->fade_in_active()) {
row[_columns.fadein] = string_compose("%1%2%3", " ", buf, " ");
} else {
@ -846,16 +846,16 @@ EditorRegions::populate_row_fade_out (boost::shared_ptr<Region> region, TreeMode
} else {
char buf[16];
format_position (audioregion->fade_out()->back()->when, buf, sizeof (buf));
if (audioregion->fade_out_active()) {
row[_columns.fadeout] = string_compose("%1%2%3", " ", buf, " ");
} else {
row[_columns.fadeout] = string_compose("%1%2%3", "(", buf, ")");
}
}
}
}
}
void
EditorRegions::populate_row_locked (boost::shared_ptr<Region> region, TreeModel::Row const &row, uint32_t used)
{
@ -910,7 +910,7 @@ EditorRegions::populate_row_name (boost::shared_ptr<Region> region, TreeModel::R
} else {
row[_columns.name] = region->name();
}
}
}
void
EditorRegions::populate_row_source (boost::shared_ptr<Region> region, TreeModel::Row const &row)
@ -964,7 +964,7 @@ EditorRegions::show_context_menu (int button, int time)
bool have_shown = false;
bool have_hidden = false;
TreeView::Selection::ListHandle_Path rows = _display.get_selection()->get_selected_rows ();
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
TreeIter t = _model->get_iter (*i);
@ -992,7 +992,7 @@ EditorRegions::key_press (GdkEventKey* ev)
switch (ev->keyval) {
case GDK_Tab:
case GDK_ISO_Left_Tab:
if (name_editable) {
name_editable->editing_done ();
name_editable = 0;
@ -1237,7 +1237,7 @@ void
EditorRegions::name_editing_started (CellEditable* ce, const Glib::ustring&)
{
name_editable = ce;
/* give it a special name */
Gtk::Entry *e = dynamic_cast<Gtk::Entry*> (ce);
@ -1246,7 +1246,7 @@ EditorRegions::name_editing_started (CellEditable* ce, const Glib::ustring&)
e->set_name (X_("RegionNameEditorEntry"));
}
}
void
EditorRegions::name_edit (const std::string& path, const std::string& new_text)
{
@ -1286,7 +1286,7 @@ EditorRegions::get_dragged_region ()
if (regions.empty()) {
return boost::shared_ptr<Region> ();
}
assert (regions.size() == 1);
return regions.front ();
}
@ -1297,7 +1297,7 @@ EditorRegions::clear ()
_display.set_model (Glib::RefPtr<Gtk::TreeStore> (0));
_model->clear ();
_display.set_model (_model);
/* Clean up the maps */
region_row_map.clear();
parent_regions_sources_map.clear();
@ -1325,15 +1325,15 @@ EditorRegions::get_single_selection ()
return (*iter)[_columns.region];
}
void
void
EditorRegions::freeze_tree_model (){
_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
_model->set_sort_column (-2, SORT_ASCENDING); //Disable sorting to gain performance
}
void
void
EditorRegions::thaw_tree_model (){
_model->set_sort_column (0, SORT_ASCENDING); // renabale sorting
@ -1422,7 +1422,7 @@ EditorRegions::set_state (const XMLNode & node)
}
XMLProperty const * p = node.property (X_("sort-type"));
if (p) {
Editing::RegionListSortType const t = static_cast<Editing::RegionListSortType> (string_2_enum (p->value(), _sort_type));
@ -1436,21 +1436,21 @@ EditorRegions::set_state (const XMLNode & node)
}
p = node.property (X_("sort-ascending"));
if (p) {
bool const yn = string_is_affirmative (p->value ());
SortType old_sort_type;
int old_sort_column;
_model->get_sort_column_id (old_sort_column, old_sort_type);
if (old_sort_type != (yn ? SORT_ASCENDING : SORT_DESCENDING)) {
changed = true;
}
reset_sort_direction (yn);
RefPtr<Action> act;
if (yn) {
act = ActionManager::get_action (X_("RegionList"), X_("SortAscending"));
} else {
@ -1467,7 +1467,7 @@ EditorRegions::set_state (const XMLNode & node)
if (expanded != yn) {
changed = true;
}
set_full (yn);
toggle_full_action()->set_active (yn);
}
@ -1482,7 +1482,7 @@ EditorRegions::set_state (const XMLNode & node)
changed = true;
}
}
if (changed) {
redisplay ();
}
@ -1539,7 +1539,7 @@ RefPtr<Action>
EditorRegions::hide_action () const
{
return ActionManager::get_action (X_("RegionList"), X_("rlHide"));
}
RefPtr<Action>

View file

@ -41,20 +41,20 @@ public:
void reset_sort_type (Editing::RegionListSortType, bool);
void set_selected (RegionSelection &);
void selection_mapover (sigc::slot<void,boost::shared_ptr<ARDOUR::Region> >);
boost::shared_ptr<ARDOUR::Region> get_dragged_region ();
boost::shared_ptr<ARDOUR::Region> get_single_selection ();
Editing::RegionListSortType sort_type () const {
return _sort_type;
}
void redisplay ();
void suspend_redisplay () {
_no_redisplay = true;
}
void resume_redisplay () {
_no_redisplay = false;
redisplay ();
@ -67,7 +67,7 @@ public:
void unselect_all () {
_display.get_selection()->unselect_all ();
}
void delete_unused_regions();
XMLNode& get_state () const;
@ -115,14 +115,14 @@ private:
};
Columns _columns;
Gtk::TreeModel::RowReference last_row;
void freeze_tree_model ();
void thaw_tree_model ();
void region_changed (boost::shared_ptr<ARDOUR::Region>, PBD::PropertyChange const &);
void selection_changed ();
sigc::connection _change_connection;
bool selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
@ -130,7 +130,7 @@ private:
Gtk::Widget* old_focus;
Gtk::CellEditable* name_editable;
void name_editing_started (Gtk::CellEditable*, const Glib::ustring&);
void name_edit (const std::string&, const std::string&);
void locked_changed (std::string const &);
void glued_changed (std::string const &);
@ -168,7 +168,7 @@ private:
void populate_row_name (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void populate_row_source (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void update_row (boost::shared_ptr<ARDOUR::Region>);
void update_row (boost::shared_ptr<ARDOUR::Region>);
void update_all_rows ();
void insert_into_tmp_regionlist (boost::shared_ptr<ARDOUR::Region>);
@ -185,36 +185,36 @@ private:
Glib::RefPtr<Gtk::Action> delete_unused_regions_action() const;
Glib::RefPtr<Gtk::ToggleAction> toggle_full_action () const;
Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action () const;
Gtk::Menu* _menu;
Gtk::ScrolledWindow _scroller;
Gtk::Frame _frame;
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > _display;
Glib::RefPtr<Gtk::TreeStore> _model;
bool _show_automatic_regions;
bool ignore_region_list_selection_change;
bool ignore_selected_region_change;
bool _no_redisplay;
Editing::RegionListSortType _sort_type;
std::list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list;
typedef boost::unordered_map<boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::RowReference> RegionRowMap;
typedef boost::unordered_map<std::string, Gtk::TreeModel::RowReference > RegionSourceMap;
RegionRowMap region_row_map;
RegionSourceMap parent_regions_sources_map;
PBD::ScopedConnection region_property_connection;
PBD::ScopedConnection check_new_region_connection;
PBD::ScopedConnection editor_freeze_connection;
PBD::ScopedConnection editor_thaw_connection;
bool expanded;
};

View file

@ -363,9 +363,9 @@ EditorRouteGroups::row_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel
val = (*iter)[_columns.edits];
plist.add (Properties::edit, val);
plist.add (Properties::name, string ((*iter)[_columns.text]));
group->set_hidden (!(*iter)[_columns.is_visible], this);
group->apply_changes (plist);
}
@ -498,7 +498,7 @@ EditorRouteGroups::set_session (Session* s)
if (_session) {
RouteGroup& arg (_session->all_route_group());
arg.PropertyChanged.connect (all_route_groups_changed_connection, MISSING_INVALIDATOR, ui_bind (&EditorRouteGroups::all_group_changed, this, _1), gui_context());
_session->route_group_added.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&EditorRouteGroups::add, this, _1), gui_context());
@ -522,7 +522,7 @@ void
EditorRouteGroups::run_new_group_dialog ()
{
RouteList rl;
return _editor->_group_tabs->run_new_group_dialog (rl);
}
@ -544,7 +544,7 @@ EditorRouteGroups::all_group_changed (const PropertyChange&)
_all_group_active_button.set_active (false);
}
}
/** Called when a model row is deleted, but also when the model is
* reordered by a user drag-and-drop; the latter is what we are
* interested in here.
@ -558,7 +558,7 @@ EditorRouteGroups::row_deleted (Gtk::TreeModel::Path const &)
*/
return;
}
/* Re-write the session's route group list so that the new order is preserved */
list<RouteGroup*> new_list;

View file

@ -158,12 +158,12 @@ EditorRoutes::EditorRoutes (Editor* e)
_display.append_column (*solo_state_column);
_display.append_column (*solo_isolate_state_column);
_display.append_column (*solo_safe_state_column);
int colnum = _display.append_column (_("Name"), _columns.text);
TreeViewColumn* c = _display.get_column (colnum-1);
c->set_data ("i_am_the_tab_column", (void*) 0xfeedface);
_display.append_column (_("V"), _columns.visible);
_display.set_headers_visible (true);
_display.set_name ("TrackListDisplay");
_display.get_selection()->set_mode (SELECTION_SINGLE);
@ -196,16 +196,16 @@ EditorRoutes::EditorRoutes (Editor* e)
visible_cell->property_activatable() = true;
visible_cell->property_radio() = false;
visible_cell->signal_toggled().connect (sigc::mem_fun (*this, &EditorRoutes::visible_changed));
TreeViewColumn* visible_col = dynamic_cast<TreeViewColumn*> (_display.get_column (6));
visible_col->set_expand(false);
visible_col->set_sizing(TREE_VIEW_COLUMN_FIXED);
visible_col->set_fixed_width(30);
visible_col->set_alignment(ALIGN_CENTER);
_model->signal_row_deleted().connect (sigc::mem_fun (*this, &EditorRoutes::route_deleted));
_model->signal_rows_reordered().connect (sigc::mem_fun (*this, &EditorRoutes::reordered));
_display.signal_button_press_event().connect (sigc::mem_fun (*this, &EditorRoutes::button_press), false);
_scroller.signal_key_press_event().connect (sigc::mem_fun(*this, &EditorRoutes::key_press), false);
@ -254,8 +254,8 @@ EditorRoutes::enter_notify (GdkEventCrossing*)
if (name_editable) {
return true;
}
/* arm counter so that ::selection_filter() will deny selecting anything for the
/* arm counter so that ::selection_filter() will deny selecting anything for the
next two attempts to change selection status.
*/
selection_countdown = 2;
@ -315,7 +315,7 @@ EditorRoutes::on_tv_mute_enable_toggled (std::string const & path_string)
TimeAxisView *tv = row[_columns.tv];
RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
if (rtv != 0) {
boost::shared_ptr<RouteList> rl (new RouteList);
rl->push_back (rtv->route());
@ -477,7 +477,7 @@ EditorRoutes::route_deleted (Gtk::TreeModel::Path const &)
if (!_session || _session->deletion_in_progress()) {
return;
}
/* this could require an order reset & sync */
_session->set_remote_control_ids();
_ignore_reorder = true;
@ -733,7 +733,7 @@ EditorRoutes::sync_order_keys (string const & src)
for (map<int, int>::const_iterator i = new_order.begin(); i != new_order.end(); ++i) {
co.push_back (i->second);
}
_model->reorder (co);
_redisplay_does_not_reset_order_keys = false;
}
@ -801,13 +801,13 @@ EditorRoutes::set_all_audio_midi_visibility (int tracks, bool yn)
suspend_redisplay ();
for (i = rows.begin(); i != rows.end(); ++i) {
TreeModel::Row row = (*i);
TimeAxisView* tv = row[_columns.tv];
AudioTimeAxisView* atv;
MidiTimeAxisView* mtv;
if (tv == 0) {
continue;
}
@ -910,7 +910,7 @@ EditorRoutes::key_press (GdkEventKey* ev)
if (name_editable) {
name_editable->editing_done ();
name_editable = 0;
}
}
col = _display.get_column (5); // select&focus on name column
@ -1002,35 +1002,35 @@ EditorRoutes::button_press (GdkEventButton* ev)
show_menu ();
return true;
}
//Scroll editor canvas to selected track
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
TreeModel::Path path;
TreeViewColumn *tvc;
int cell_x;
int cell_y;
_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, tvc, cell_x, cell_y);
// Get the model row.
Gtk::TreeModel::Row row = *_model->get_iter (path);
TimeAxisView *tv = row[_columns.tv];
int y_pos = tv->y_position();
//Clamp the y pos so that we do not extend beyond the canvas full height.
if (_editor->full_canvas_height - y_pos < _editor->_canvas_height){
y_pos = _editor->full_canvas_height - _editor->_canvas_height;
}
//Only scroll to if the track is visible
if(y_pos != -1){
_editor->reset_y_origin (y_pos);
}
}
return false;
}
@ -1259,7 +1259,7 @@ EditorRoutes::update_rec_display ()
} else {
(*i)[_columns.rec_state] = 0;
}
(*i)[_columns.name_editable] = !route->record_enabled ();
}
}
@ -1384,7 +1384,7 @@ EditorRoutes::show_tracks_with_regions_at_playhead ()
}
suspend_redisplay ();
TreeModel::Children rows = _model->children ();
for (TreeModel::Children::iterator i = rows.begin(); i != rows.end(); ++i) {
TimeAxisView* tv = (*i)[_columns.tv];

View file

@ -36,16 +36,16 @@ public:
void move_selected_tracks (bool);
void show_track_in_display (TimeAxisView &);
void suspend_redisplay () {
_no_redisplay = true;
}
void resume_redisplay () {
_no_redisplay = false;
redisplay ();
}
void redisplay ();
void update_visibility ();
void routes_added (std::list<RouteTimeAxisView*> routes);
@ -88,11 +88,11 @@ private:
void show_all_miditracks ();
void hide_all_miditracks ();
void show_tracks_with_regions_at_playhead ();
void display_drag_data_received (
Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
);
void track_list_reorder (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const & iter, int* new_order);
bool selection_filter (Glib::RefPtr<Gtk::TreeModel> const &, Gtk::TreeModel::Path const &, bool);
void name_edit (std::string const &, std::string const &);
@ -112,7 +112,7 @@ private:
add (route);
add (name_editable);
}
Gtk::TreeModelColumn<std::string> text;
Gtk::TreeModelColumn<bool> visible;
Gtk::TreeModelColumn<uint32_t> rec_state;
@ -130,14 +130,14 @@ private:
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
Glib::RefPtr<Gtk::ListStore> _model;
ModelColumns _columns;
bool _ignore_reorder;
bool _no_redisplay;
bool _redisplay_does_not_sync_order_keys;
bool _redisplay_does_not_reset_order_keys;
Gtk::Menu* _menu;
Gtk::Widget* old_focus;
Gtk::Widget* old_focus;
uint32_t selection_countdown;
Gtk::CellEditable* name_editable;

View file

@ -191,9 +191,9 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op, bool /*force
bool had_tracks = !selection->tracks.empty();
RouteGroup* group = clicked_routeview->route()->route_group();
RouteGroup& arg (_session->all_route_group());
switch (op) {
case Selection::Toggle:
case Selection::Toggle:
if (selection->selected (clicked_axisview)) {
if (arg.is_select() && arg.is_active()) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
@ -222,8 +222,8 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op, bool /*force
}
}
break;
case Selection::Add:
case Selection::Add:
if (!had_tracks && arg.is_select() && arg.is_active()) {
/* nothing was selected already, and all group is active etc. so use
all tracks.
@ -240,7 +240,7 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op, bool /*force
selection->add (clicked_axisview);
}
break;
case Selection::Set:
selection->clear();
if (!had_tracks && arg.is_select() && arg.is_active()) {
@ -259,8 +259,8 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op, bool /*force
selection->set (clicked_axisview);
}
break;
case Selection::Extend:
case Selection::Extend:
selection->clear();
cerr << ("Editor::set_selected_track_as_side_effect case Selection::Add not yet implemented\n");
break;
@ -329,7 +329,7 @@ Editor::set_selected_control_point_from_click (Selection::Operation op, bool /*n
if (!clicked_control_point) {
return false;
}
switch (op) {
case Selection::Set:
selection->set (clicked_control_point);
@ -395,7 +395,7 @@ Editor::mapover_tracks (sigc::slot<void, RouteTimeAxisView&, uint32_t> sl, TimeA
/* call the slots */
uint32_t const sz = tracks.size ();
for (set<RouteTimeAxisView*>::iterator i = tracks.begin(); i != tracks.end(); ++i) {
sl (**i, sz);
}
@ -535,7 +535,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
if (button_release_can_deselect) {
/* just remove this one region, but only on a permitted button release */
selection->remove (clicked_regionview);
commit = true;
@ -685,7 +685,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
relevant_tracks.insert (r);
}
}
set<RouteTimeAxisView*> already_in_selection;
if (relevant_tracks.empty()) {
@ -886,16 +886,16 @@ Editor::track_selection_changed ()
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
bool yn = (find (selection->tracks.begin(), selection->tracks.end(), *i) != selection->tracks.end());
(*i)->set_selected (yn);
TimeAxisView::Children c = (*i)->get_child_list ();
for (TimeAxisView::Children::iterator j = c.begin(); j != c.end(); ++j) {
(*j)->set_selected (find (selection->tracks.begin(), selection->tracks.end(), j->get()) != selection->tracks.end());
}
if (yn &&
((mouse_mode == MouseRange) ||
if (yn &&
((mouse_mode == MouseRange) ||
((mouse_mode == MouseObject) && (_join_object_range_state == JOIN_OBJECT_RANGE_OBJECT)))) {
(*i)->reshow_selection (selection->time);
} else {
@ -965,14 +965,14 @@ Editor::sensitize_the_right_region_actions ()
}
/* We get here if we are in Object mode */
RegionSelection rs = get_regions_from_selection_and_entered ();
sensitize_all_region_actions (!rs.empty ());
_ignore_region_action = true;
/* Look through the regions that are selected and make notes about what we have got */
bool have_audio = false;
bool have_midi = false;
bool have_locked = false;
@ -995,11 +995,11 @@ Editor::sensitize_the_right_region_actions ()
boost::shared_ptr<Region> r = (*i)->region ();
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> (r);
if (ar) {
have_audio = true;
}
if (boost::dynamic_pointer_cast<MidiRegion> (r)) {
have_midi = true;
}
@ -1076,7 +1076,7 @@ Editor::sensitize_the_right_region_actions ()
_region_actions->get_action("add-range-markers-from-region")->set_sensitive (false);
_region_actions->get_action("close-region-gaps")->set_sensitive (false);
_region_actions->get_action("combine-regions")->set_sensitive (false);
}
}
if (!have_midi) {
_region_actions->get_action("show-region-list-editor")->set_sensitive (false);
@ -1100,40 +1100,40 @@ Editor::sensitize_the_right_region_actions ()
}
if (have_audio) {
if (have_envelope_visible && !have_envelope_invisible) {
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-visible"))->set_active ();
} else if (have_envelope_visible && have_envelope_invisible) {
// _region_actions->get_action("toggle-region-gain-envelope-visible")->set_inconsistent ();
}
if (have_envelope_active && !have_envelope_inactive) {
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-active"))->set_active ();
} else if (have_envelope_active && have_envelope_inactive) {
// _region_actions->get_action("toggle-region-gain-envelope-active")->set_inconsistent ();
}
} else {
_region_actions->get_action("analyze-region")->set_sensitive (false);
_region_actions->get_action("reset-region-gain-envelopes")->set_sensitive (false);
_region_actions->get_action("toggle-region-gain-envelope-visible")->set_sensitive (false);
_region_actions->get_action("toggle-region-gain-envelope-active")->set_sensitive (false);
_region_actions->get_action("pitch-shift-region")->set_sensitive (false);
}
if (!have_non_unity_scale_amplitude || !have_audio) {
_region_actions->get_action("reset-region-scale-amplitude")->set_sensitive (false);
}
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-lock"))->set_active (have_locked && !have_unlocked);
if (have_locked && have_unlocked) {
// _region_actions->get_action("toggle-region-lock")->set_inconsistent ();
}
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-lock-style"))->set_active (have_position_lock_style_music && !have_position_lock_style_audio);
if (have_position_lock_style_music && have_position_lock_style_audio) {
// _region_actions->get_action("toggle-region-lock-style")->set_inconsistent ();
}
@ -1142,7 +1142,7 @@ Editor::sensitize_the_right_region_actions ()
if (have_muted && have_unmuted) {
// _region_actions->get_action("toggle-region-mute")->set_inconsistent ();
}
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-opaque-region"))->set_active (have_opaque && !have_non_opaque);
if (have_opaque && have_non_opaque) {
// _region_actions->get_action("toggle-opaque-region")->set_inconsistent ();
@ -1160,7 +1160,7 @@ Editor::sensitize_the_right_region_actions ()
}
_ignore_region_action = false;
_all_region_actions_sensitized = false;
}
@ -1318,7 +1318,7 @@ Editor::select_all_within (
list<Selectable*> found;
for (TrackViewList::const_iterator iter = tracklist.begin(); iter != tracklist.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
}
@ -1741,9 +1741,9 @@ long
Editor::select_range_around_region (RegionView* rv)
{
assert (rv);
selection->set (&rv->get_time_axis_view());
selection->time.clear ();
boost::shared_ptr<Region> r = rv->region ();
return selection->set (r->position(), r->position() + r->length());

View file

@ -194,7 +194,7 @@ Editor::create_named_selection ()
}
boost::shared_ptr<NamedSelection> ns (new NamedSelection (name, thelist));
/* make the one we just added be selected */
TreeModel::Children::iterator added = named_selection_model->children().end();

View file

@ -56,7 +56,7 @@ EditorSummary::EditorSummary (Editor* e)
Region::RegionPropertyChanged.connect (region_property_connection, invalidator (*this), boost::bind (&CairoWidget::set_dirty, this), gui_context());
_editor->playhead_cursor->PositionChanged.connect (position_connection, invalidator (*this), ui_bind (&EditorSummary::playhead_position_changed, this, _1), gui_context());
add_events (Gdk::POINTER_MOTION_MASK);
add_events (Gdk::POINTER_MOTION_MASK);
}
/** Connect to a session.
@ -148,7 +148,7 @@ EditorSummary::render (cairo_t* cr)
}
/* compute start and end points for the summary */
framecnt_t const session_length = _session->current_end_frame() - _session->current_start_frame ();
double const theoretical_start = _session->current_start_frame() - session_length * _overhang_fraction;
_start = theoretical_start > 0 ? theoretical_start : 0;
@ -161,7 +161,7 @@ EditorSummary::render (cairo_t* cr)
++N;
}
}
if (N == 0) {
_track_height = 16;
} else {
@ -189,7 +189,7 @@ EditorSummary::render (cairo_t* cr)
cairo_move_to (cr, 0, y + _track_height / 2);
cairo_line_to (cr, _width, y + _track_height / 2);
cairo_stroke (cr);
StreamView* s = (*i)->view ();
if (s) {
@ -201,7 +201,7 @@ EditorSummary::render (cairo_t* cr)
y + _track_height / 2
));
}
y += _track_height;
}
@ -355,7 +355,7 @@ EditorSummary::get_editor (pair<double, double>* x, pair<double, double>* y) con
{
assert (x);
assert (y);
x->first = (_editor->leftmost_position () - _start) * _x_scale;
x->second = x->first + _editor->current_page_frames() * _x_scale;
@ -377,7 +377,7 @@ EditorSummary::get_position (double x, double y) const
int y_edge_size = (_view_rectangle_y.second - _view_rectangle_y.first) / 4;
y_edge_size = min (y_edge_size, 8);
y_edge_size = max (y_edge_size, 1);
bool const near_left = (std::abs (x - _view_rectangle_x.first) < x_edge_size);
bool const near_right = (std::abs (x - _view_rectangle_x.second) < x_edge_size);
bool const near_top = (std::abs (y - _view_rectangle_y.first) < y_edge_size);
@ -525,7 +525,7 @@ EditorSummary::on_button_release_event (GdkEventButton*)
_zoom_dragging = false;
_editor->_dragging_playhead = false;
_editor->set_follow_playhead (_old_follow_playhead, false);
return true;
}
@ -598,7 +598,7 @@ EditorSummary::set_editor (double const x, double const y)
return;
}
set_editor_x (x);
set_editor_y (y);
}
@ -614,7 +614,7 @@ EditorSummary::set_editor (pair<double,double> const & x, double const y)
/* see comment in other set_editor () */
return;
}
set_editor_x (x);
set_editor_y (y);
}
@ -658,10 +658,10 @@ EditorSummary::set_editor_x (pair<double, double> const & x)
((x.second - x.first) / _x_scale) /
_editor->frame_to_unit (_editor->current_page_frames())
);
if (nx != _editor->get_current_zoom ()) {
_editor->reset_zoom (nx);
}
}
}
/** Set the top of the y range visible in the editor.
@ -674,13 +674,13 @@ EditorSummary::set_editor_y (double const y)
double y1 = summary_y_to_editor (y);
double const eh = _editor->canvas_height() - _editor->get_canvas_timebars_vsize ();
double y2 = y1 + eh;
double const full_editor_height = _editor->full_canvas_height - _editor->get_canvas_timebars_vsize();
if (y2 > full_editor_height) {
y1 -= y2 - full_editor_height;
}
if (y1 < 0) {
y1 = 0;
}
@ -709,7 +709,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y)
double partial_height = 0;
/* Height of any tracks that are fully in the desired range */
double scale_height = 0;
_editor->_routes->suspend_redisplay ();
for (TrackViewList::const_iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
@ -717,7 +717,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y)
if ((*i)->hidden()) {
continue;
}
double const h = (*i)->effective_height ();
total_height += h;
@ -738,7 +738,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y)
enough tracks to fill it.
*/
double const ch = min (total_height, _editor->canvas_height() - _editor->get_canvas_timebars_vsize());
/* hence required scale factor of the complete tracks to fit the required y range;
the amount of space they should take up divided by the amount they currently take up.
*/
@ -747,7 +747,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y)
yc = y;
/* Scale complete tracks within the range to make it fit */
for (TrackViewList::const_iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
if ((*i)->hidden()) {
@ -763,7 +763,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y)
}
_editor->_routes->resume_redisplay ();
set_editor_y (y.first);
}
@ -780,11 +780,11 @@ EditorSummary::summary_y_to_editor (double y) const
{
double ey = 0;
for (TrackViewList::const_iterator i = _editor->track_views.begin (); i != _editor->track_views.end(); ++i) {
if ((*i)->hidden()) {
continue;
}
double const h = (*i)->effective_height ();
if (y < _track_height) {
/* in this track */
@ -803,7 +803,7 @@ EditorSummary::editor_y_to_summary (double y) const
{
double sy = 0;
for (TrackViewList::const_iterator i = _editor->track_views.begin (); i != _editor->track_views.end(); ++i) {
if ((*i)->hidden()) {
continue;
}

View file

@ -75,7 +75,7 @@ Editor::time_stretch (RegionSelection& regions, float fraction)
return -1;
boost::shared_ptr<Playlist> playlist = rtv->track()->playlist();
ARDOUR::TimeFXRequest request;
request.time_fraction = fraction;
MidiStretch stretch(*_session, request);
@ -179,22 +179,22 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
break;
}
}
switch (rb_current_opt) {
case 0:
transients = NoTransients; peaklock = false; longwin = true; shortwin = false;
transients = NoTransients; peaklock = false; longwin = true; shortwin = false;
break;
case 1:
transients = NoTransients; peaklock = false; longwin = false; shortwin = false;
transients = NoTransients; peaklock = false; longwin = false; shortwin = false;
break;
case 2:
transients = NoTransients; peaklock = true; longwin = false; shortwin = false;
transients = NoTransients; peaklock = true; longwin = false; shortwin = false;
break;
case 3:
transients = BandLimitedTransients; peaklock = true; longwin = false; shortwin = false;
transients = BandLimitedTransients; peaklock = true; longwin = false; shortwin = false;
break;
case 5:
transients = Transients; peaklock = false; longwin = false; shortwin = true;
transients = Transients; peaklock = false; longwin = false; shortwin = true;
break;
case 6:
transients = NoTransients;
@ -205,8 +205,8 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
// peaklock = false;
break;
default:
/* default/4 */
transients = Transients; peaklock = true; longwin = false; shortwin = false;
/* default/4 */
transients = Transients; peaklock = true; longwin = false; shortwin = false;
break;
};

View file

@ -427,14 +427,14 @@ EngineControl::build_command_line (vector<string>& cmd)
/* now jackd arguments */
str = timeout_combo.get_active_text ();
if (str != _("Ignore")) {
double secs = 0;
uint32_t msecs;
secs = atof (str);
msecs = (uint32_t) floor (secs * 1000.0);
if (msecs > 0) {
cmd.push_back ("-t");
cmd.push_back (to_string (msecs, std::dec));
@ -473,7 +473,7 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-d");
driver = driver_combo.get_active_text ();
if (driver == X_("ALSA")) {
using_alsa = true;
cmd.push_back ("alsa");
@ -515,7 +515,7 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-C");
cmd.push_back (input_device);
cmd.push_back ("-P");
cmd.push_back (output_device);
@ -536,7 +536,7 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-p");
cmd.push_back (period_size_combo.get_active_text());
if (using_alsa || using_ffado || using_coreaudio) {
double val = input_latency_adjustment.get_value();
@ -547,7 +547,7 @@ EngineControl::build_command_line (vector<string>& cmd)
}
val = output_latency_adjustment.get_value();
if (val) {
cmd.push_back ("-O");
cmd.push_back (to_string ((uint32_t) val, std::dec));
@ -1243,7 +1243,7 @@ EngineControl::set_state (const XMLNode& root)
if ( (child = root.child ("driver"))){
prop = child->property("val");
if (prop && (prop->value() == "Dummy") ) {
using_dummy = true;
}
@ -1263,15 +1263,15 @@ EngineControl::set_state (const XMLNode& root)
if (!prop || prop->value().empty()) {
if (((using_dummy || using_ffado)
&& ( child->name() == "interface"
|| child->name() == "inputdevice"
|| child->name() == "outputdevice"))
if (((using_dummy || using_ffado)
&& ( child->name() == "interface"
|| child->name() == "inputdevice"
|| child->name() == "outputdevice"))
|| child->name() == "timeout")
{
continue;
}
error << string_compose (_("AudioSetup value for %1 is missing data"), child->name()) << endmsg;
continue;
}
@ -1338,13 +1338,13 @@ EngineControl::set_state (const XMLNode& root)
} else if (child->name() == "periodsize") {
period_size_combo.set_active_text(strval);
} else if (child->name() == "serverpath") {
/* only attempt to set this if we have bothered to look
up server names already. otherwise this is all
redundant (actually, all of this dialog/widget
is redundant in that case ...)
*/
if (!server_strings.empty()) {
/* do not allow us to use a server path that doesn't
exist on this system. this handles cases where
@ -1365,7 +1365,7 @@ EngineControl::set_state (const XMLNode& root)
<< endmsg;
}
}
} else if (child->name() == "driver") {
driver_combo.set_active_text(strval);
} else if (child->name() == "interface") {

View file

@ -510,12 +510,12 @@ TrackExportChannelSelector::TrackExportChannelSelector (ARDOUR::Session * sessio
track_scroller.set_size_request (-1, 130);
track_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
pack_start(track_scroller);
// Track list
track_list = Gtk::ListStore::create (track_cols);
track_view.set_model (track_list);
track_view.set_headers_visible (true);
track_view.append_column_editable (_("Track"), track_cols.selected);
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(track_view.get_column_cell_renderer (0));
toggle->signal_toggled().connect (sigc::hide (sigc::mem_fun (*this, &TrackExportChannelSelector::update_config)));
@ -526,9 +526,9 @@ TrackExportChannelSelector::TrackExportChannelSelector (ARDOUR::Session * sessio
Gtk::TreeView::Column* column = track_view.get_column (0);
column->pack_start (*text_renderer);
column->add_attribute (text_renderer->property_text(), track_cols.label);
fill_list();
show_all_children ();
}
@ -575,7 +575,7 @@ TrackExportChannelSelector::update_config()
if (!row[track_cols.selected]) {
continue;
}
ExportProfileManager::ChannelConfigStatePtr state = manager->add_channel_config();
Route * track = row[track_cols.track];

View file

@ -256,7 +256,7 @@ class TrackExportChannelSelector : public ExportChannelSelector
Gtk::TreeView track_view;
Gtk::ScrolledWindow track_scroller;
};
#endif /* __export_channel_selector_h__ */

View file

@ -319,7 +319,7 @@ ExportDialog::show_progress ()
usleep (10000);
}
}
if (!status->aborted()) {
status->finish ();
}
@ -437,7 +437,7 @@ ExportRegionDialog::init_components ()
StemExportDialog::StemExportDialog (PublicEditor & editor)
: ExportDialog(editor, _("Stem Export"), X_("StemExportProfile"))
{
}
void

View file

@ -146,7 +146,7 @@ class ExportRangeDialog : public ExportDialog
private:
void init_components ();
std::string range_id;
};
@ -176,7 +176,7 @@ class StemExportDialog : public ExportDialog
{
public:
StemExportDialog (PublicEditor & editor);
private:
void init_components ();
};

View file

@ -30,11 +30,11 @@ using namespace ARDOUR;
ExportFilenameSelector::ExportFilenameSelector () :
include_label (_("Include in Filename(s):"), Gtk::ALIGN_LEFT),
label_label (_("Label:"), Gtk::ALIGN_LEFT),
session_checkbox (_("Session Name")),
revision_checkbox (_("Revision:")),
path_label (_("Folder:"), Gtk::ALIGN_LEFT),
browse_button (_("Browse"))
{

View file

@ -28,7 +28,7 @@
#include "ardour/session_handle.h"
///
class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
{
public:
typedef boost::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;

View file

@ -405,7 +405,7 @@ ExportFormatDialog::init_format_table ()
row[sample_rate_cols.ptr] = *it;
row[sample_rate_cols.color] = "white";
row[sample_rate_cols.label] = (*it)->name();
WeakSampleRatePtr ptr (*it);
(*it)->SelectChanged.connect (*this, invalidator (*this), ui_bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr), gui_context());
(*it)->CompatibleChanged.connect (*this, invalidator (*this), ui_bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr), gui_context());

View file

@ -208,7 +208,7 @@ ExportTimespanSelector::construct_length (ARDOUR::Location const * location) con
}
std::stringstream s;
switch (state->time_format) {
case AudioClock::BBT:
s << bbt_str (location->length ());
@ -225,11 +225,11 @@ ExportTimespanSelector::construct_length (ARDOUR::Location const * location) con
case AudioClock::MinSec:
s << ms_str (location->length ());
break;
case AudioClock::Frames:
s << location->length ();
break;
case AudioClock::Off:
break;
}

View file

@ -97,7 +97,7 @@ GainMeterBase::GainMeterBase (Session* s,
_width = Wide;
if (horizontal) {
gain_slider = manage (new HSliderController (pix,
gain_slider = manage (new HSliderController (pix,
&gain_adjustment,
fader_length,
false));
@ -223,13 +223,13 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
connections.push_back (gain_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false));
boost::shared_ptr<AutomationControl> gc = amp->gain_control();
gc->alist()->automation_state_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_state_changed, this), gui_context());
gc->alist()->automation_style_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_style_changed, this), gui_context());
gain_automation_state_changed ();
}
amp->gain_control()->Changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeterBase::gain_changed, this), gui_context());
gain_changed ();
@ -480,7 +480,7 @@ next_meter_point (MeterPoint mp)
break;
case MeterCustom:
return MeterInput;
return MeterInput;
break;
}
@ -864,11 +864,11 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
_meter->ConfigurationChanged.connect (
model_connections, invalidator (*this), ui_bind (&GainMeter::meter_configuration_changed, this, _1), gui_context()
);
meter_configuration_changed (_meter->input_streams ());
}
/*
if we have a non-hidden route (ie. we're not the click or the auditioner),
pack some route-dependent stuff.
@ -913,7 +913,7 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
for (vector<DataType>::const_iterator i = types.begin(); i != types.end(); ++i) {
Glib::RefPtr<Gdk::GC> fg_gc (w.get_style()->get_fg_gc (Gtk::STATE_NORMAL));
if (types.size() > 1) {
/* we're overlaying more than 1 set of marks, so use different colours */
Gdk::Color c;
@ -925,12 +925,12 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
c.set_rgb_p (0.2, 0.2, 0.5);
break;
}
fg_gc->set_rgb_fg_color (c);
}
vector<int> points;
switch (*i) {
case DataType::AUDIO:
points.push_back (-50);
@ -942,13 +942,13 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
points.push_back (0);
points.push_back (4);
break;
case DataType::MIDI:
points.push_back (0);
if (types.size() == 1) {
points.push_back (32);
} else {
/* tweak so as not to overlay the -30dB mark */
/* tweak so as not to overlay the -30dB mark */
points.push_back (48);
}
points.push_back (64);
@ -956,11 +956,11 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
points.push_back (127);
break;
}
char buf[32];
for (vector<int>::const_iterator j = points.begin(); j != points.end(); ++j) {
float fraction = 0;
switch (*i) {
case DataType::AUDIO:
@ -970,24 +970,24 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
fraction = *j / 127.0;
break;
}
gint const pos = height - (gint) floor (height * fraction);
snprintf (buf, sizeof (buf), "%d", abs (*j));
layout->set_text (buf);
/* we want logical extents, not ink extents here */
int tw, th;
layout->get_pixel_size (tw, th);
pixmap->draw_line (fg_gc, 0, pos, 4, pos);
int p = pos - (th / 2);
p = min (p, height - th);
p = max (p, 0);
pixmap->draw_layout (fg_gc, 6, p, layout);
}
}

View file

@ -207,7 +207,7 @@ class GainMeter : public GainMeterBase, public Gtk::VBox
private:
void meter_configuration_changed (ARDOUR::ChanCount);
Gtk::HBox gain_display_box;
Gtk::HBox fader_box;
Gtk::VBox* fader_vbox;

View file

@ -447,7 +447,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
mcontrol->Changed.connect (control_connections, invalidator (*this), boost::bind (&GenericPluginUI::toggle_parameter_changed, this, control_ui), gui_context());
mcontrol->alist()->automation_state_changed.connect (control_connections, invalidator (*this), boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui), gui_context());
if (plugin->get_parameter (port_index) > 0.5){
control_ui->button->set_active(true);
}
@ -727,11 +727,11 @@ GenericPluginUI::stop_updating (GdkEventAny*)
for (vector<ControlUI*>::iterator i = input_controls.begin(); i != input_controls.end(); ++i) {
(*i)->controller->stop_updating ();
}
if (output_controls.size() > 0 ) {
screen_update_connection.disconnect();
}
return false;
}

View file

@ -104,7 +104,7 @@ GhostRegion::is_automation_ghost()
AudioGhostRegion::AudioGhostRegion(TimeAxisView& tv, TimeAxisView& source_tv, double initial_unit_pos)
: GhostRegion(tv.ghost_group(), tv, source_tv, initial_unit_pos)
{
}
void
@ -192,7 +192,7 @@ MidiGhostRegion::~MidiGhostRegion()
MidiGhostRegion::Event::Event(ArdourCanvas::CanvasNoteEvent* e)
: event(e)
{
}
MidiGhostRegion::Note::Note(ArdourCanvas::CanvasNote* n, ArdourCanvas::Group* g)
@ -339,7 +339,7 @@ MidiGhostRegion::find_event (ArdourCanvas::CanvasNote* parent)
/* we are using _optimization_iterator to speed up the common case where a caller
is going through our notes in order.
*/
if (_optimization_iterator != events.end()) {
++_optimization_iterator;
}

View file

@ -89,7 +89,7 @@ GlobalPortMatrix::get_state (BundleChannel c[2]) const
if (_session == 0) {
return PortMatrixNode::NOT_ASSOCIATED;
}
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
if (in_ports.empty() || out_ports.empty()) {
@ -114,11 +114,11 @@ GlobalPortMatrix::get_state (BundleChannel c[2]) const
if (jp == 0) {
return PortMatrixNode::NOT_ASSOCIATED;
}
char const ** c = jack_port_get_all_connections (jack, jp);
char const ** p = c;
while (p && *p != 0) {
if (strcmp (*p, j->c_str()) == 0) {
free (c);
@ -185,4 +185,4 @@ GlobalPortMatrix::channel_noun () const
{
return _("port");
}

View file

@ -97,7 +97,7 @@ GroupTabs::on_button_press_event (GdkEventButton* ev)
list<Tab>::iterator j = _tabs.insert (next, n);
t = &(*j);
}
} else {
_dragging_new_tab = false;
}
@ -169,18 +169,18 @@ GroupTabs::on_button_release_event (GdkEventButton* ev)
if (!_drag_moved) {
if (_dragging->group) {
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
/* edit */
RouteGroupDialog d (_dragging->group, false);
d.do_run ();
} else {
/* toggle active state */
_dragging->group->set_active (!_dragging->group->is_active (), this);
}
}
@ -305,7 +305,7 @@ GroupTabs::get_menu (RouteGroup* g)
items.push_back (MenuElem (_("New..."), hide_return (sigc::mem_fun(*this, &GroupTabs::create_and_add_group))));
items.push_back (MenuElem (_("New From"), *new_from));
if (g) {
items.push_back (MenuElem (_("Edit..."), sigc::bind (sigc::mem_fun (*this, &GroupTabs::edit_group), g)));
items.push_back (MenuElem (_("Add New Subgroup Bus"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::subgroup), g, false, PreFader)));
@ -316,13 +316,13 @@ GroupTabs::get_menu (RouteGroup* g)
}
add_menu_items (_menu, g);
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Activate All"), sigc::mem_fun(*this, &GroupTabs::activate_all)));
items.push_back (MenuElem (_("Disable All"), sigc::mem_fun(*this, &GroupTabs::disable_all)));
return _menu;
}
void
@ -407,7 +407,7 @@ GroupTabs::create_and_add_group () const
delete g;
return 0;
}
_session->add_route_group (g);
return g;
}
@ -427,7 +427,7 @@ GroupTabs::subgroup (RouteGroup* g, bool aux, Placement placement)
struct CollectSorter {
CollectSorter (std::string const & key) : _key (key) {}
bool operator () (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
return a->order_key (_key) < b->order_key (_key);
}
@ -470,9 +470,9 @@ GroupTabs::collect (RouteGroup* g)
++i;
} else {
(*j)->set_order_key (order_key (), k + diff);
}
++j;
@ -502,7 +502,7 @@ GroupTabs::set_activation (RouteGroup* g, bool a)
{
g->set_active (a, this);
}
void
GroupTabs::remove_group (RouteGroup* g)
{

View file

@ -50,7 +50,7 @@ protected:
struct Tab {
Tab () : group (0) {}
double from;
double to;
Gdk::Color colour; ///< colour
@ -97,7 +97,7 @@ private:
void activate_all ();
void disable_all ();
void remove_group (ARDOUR::RouteGroup *);
void render (cairo_t *);
void on_size_request (Gtk::Requisition *);
bool on_button_press_event (GdkEventButton *);

View file

@ -92,7 +92,7 @@ queue_note_draw (PianoKeyboard* pk, int note)
}
}
static void
static void
draw_note(PianoKeyboard *pk, cairo_t* cr, int note)
{
int is_white = pk->notes[note].white;
@ -138,7 +138,7 @@ draw_note(PianoKeyboard *pk, cairo_t* cr, int note)
}
}
static int
static int
press_key(PianoKeyboard *pk, int key)
{
assert(key >= 0);
@ -163,7 +163,7 @@ press_key(PianoKeyboard *pk, int key)
return 1;
}
static int
static int
release_key(PianoKeyboard *pk, int key)
{
assert(key >= 0);
@ -192,9 +192,9 @@ static void
rest (PianoKeyboard* pk)
{
g_signal_emit_by_name(GTK_WIDGET(pk), "rest");
}
}
static void
static void
stop_unsustained_notes(PianoKeyboard *pk)
{
int i;
@ -208,7 +208,7 @@ stop_unsustained_notes(PianoKeyboard *pk)
}
}
static void
static void
stop_sustained_notes(PianoKeyboard *pk)
{
int i;
@ -255,7 +255,7 @@ clear_notes(PianoKeyboard *pk)
g_hash_table_remove_all(pk->key_bindings);
}
static void
static void
bind_keys_qwerty(PianoKeyboard *pk)
{
clear_notes(pk);
@ -298,7 +298,7 @@ bind_keys_qwerty(PianoKeyboard *pk)
bind_key(pk, "p", 40);
}
static void
static void
bind_keys_qwertz(PianoKeyboard *pk)
{
bind_keys_qwerty(pk);
@ -351,7 +351,7 @@ bind_keys_azerty(PianoKeyboard *pk)
bind_key(pk, "p", 40);
}
static gint
static gint
keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer notused)
{
int note;
@ -386,7 +386,7 @@ keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer notused)
if (event->type == GDK_KEY_RELEASE) {
rest (pk);
}
return TRUE;
}
@ -405,7 +405,7 @@ keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer notused)
return TRUE;
}
static int
static int
get_note_for_xy(PianoKeyboard *pk, int x, int y)
{
int height = GTK_WIDGET(pk)->allocation.height;
@ -432,7 +432,7 @@ get_note_for_xy(PianoKeyboard *pk, int x, int y)
return -1;
}
static gboolean
static gboolean
mouse_button_event_handler(PianoKeyboard *pk, GdkEventButton *event, gpointer notused)
{
int x = event->x;
@ -472,7 +472,7 @@ mouse_button_event_handler(PianoKeyboard *pk, GdkEventButton *event, gpointer no
return TRUE;
}
static gboolean
static gboolean
mouse_motion_event_handler(PianoKeyboard *pk, GdkEventMotion *event, gpointer notused)
{
int note;
@ -483,7 +483,7 @@ mouse_motion_event_handler(PianoKeyboard *pk, GdkEventMotion *event, gpointer no
note = get_note_for_xy(pk, event->x, event->y);
if (note != pk->note_being_pressed_using_mouse && note >= 0) {
if (pk->note_being_pressed_using_mouse >= 0)
release_key(pk, pk->note_being_pressed_using_mouse);
press_key(pk, note);
@ -499,7 +499,7 @@ piano_keyboard_expose(GtkWidget *widget, GdkEventExpose *event)
int i;
PianoKeyboard *pk = PIANO_KEYBOARD(widget);
cairo_t* cr = gdk_cairo_create (GDK_DRAWABLE (GTK_WIDGET(pk)->window));
gdk_cairo_region (cr, event->region);
cairo_clip (cr);
@ -526,7 +526,7 @@ piano_keyboard_expose(GtkWidget *widget, GdkEventExpose *event)
return TRUE;
}
static void
static void
piano_keyboard_size_request(GtkWidget* widget, GtkRequisition *requisition)
{
requisition->width = PIANO_KEYBOARD_DEFAULT_WIDTH;
@ -613,7 +613,7 @@ piano_keyboard_class_init(PianoKeyboardClass *klass)
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
widget_klass = (GtkWidgetClass*) klass;
widget_klass = (GtkWidgetClass*) klass;
widget_klass->expose_event = piano_keyboard_expose;
widget_klass->size_request = piano_keyboard_size_request;
@ -691,7 +691,7 @@ piano_keyboard_sustain_press(PianoKeyboard *pk)
}
}
void
void
piano_keyboard_sustain_release(PianoKeyboard *pk)
{
if (pk->maybe_stop_sustained_notes)

View file

@ -34,7 +34,7 @@ InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
, _clock ("insertTimeClock", true, X_("InsertTimeClock"), true, false, true, true)
{
set_session (_editor.session ());
framepos_t const pos = _editor.get_preferred_edit_position ();
get_vbox()->set_border_width (12);

View file

@ -37,7 +37,7 @@ public:
private:
void move_markers_toggled ();
PublicEditor& _editor;
Gtk::ComboBoxText _intersected_combo;
Gtk::CheckButton _move_glued;

View file

@ -99,7 +99,7 @@ ImportProgressWindow::update ()
if (c > _import_status->total) {
c = _import_status->total;
}
_bar.set_text (string_compose (_("Importing file: %1 of %2"), c, _import_status->total));
return !(_import_status->all_done || _import_status->cancel);

View file

@ -42,11 +42,11 @@ public:
protected:
virtual bool update ();
Gtk::Button _cancel_button;
Gtk::Label _cancel_label;
Gtk::ProgressBar _bar;
private:
void cancel_clicked ();

View file

@ -47,7 +47,7 @@ IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session* session, boost::shared_
, _io (io)
{
setup_type ();
/* signal flow from 0 to 1 */
_find_inputs_for_io_outputs = (_io->direction() == IO::Output);
@ -97,7 +97,7 @@ IOSelector::io_changed_proxy ()
so we can't call setup_all_ports (which results in a call to Route::foreach_processor)
without a deadlock unless we break things up with this idle handler.
*/
Glib::signal_idle().connect_once (sigc::mem_fun (*this, &IOSelector::io_changed));
}
@ -143,7 +143,7 @@ IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
if (!f) {
return;
}
if (s) {
_io->connect (f, *j, 0);
} else {
@ -219,7 +219,7 @@ IOSelectorWindow::IOSelectorWindow (ARDOUR::Session* session, boost::shared_ptr<
set_name ("IOSelectorWindow2");
get_vbox()->pack_start (_selector);
set_position (Gtk::WIN_POS_MOUSE);
io_name_changed (this);

View file

@ -58,7 +58,7 @@ class IOSelector : public PortMatrix
void setup_type ();
void io_changed ();
void io_changed_proxy ();
int _other;
int _ours;
boost::shared_ptr<ARDOUR::IO> _io;

View file

@ -161,7 +161,7 @@ LED::set_colors_from_style ()
{
RefPtr<Style> style = get_style();
Color c;
switch (_visual_state) {
case 0:
c = style->get_fg (STATE_NORMAL);
@ -170,10 +170,10 @@ LED::set_colors_from_style ()
c = style->get_fg (STATE_ACTIVE);
break;
}
_red = c.get_red_p ();
_green = c.get_green_p ();
_blue = c.get_blue_p ();
set_dirty ();
}

View file

@ -29,7 +29,7 @@ class LED : public CairoWidget
public:
LED ();
virtual ~LED ();
void set_visual_state (int32_t s);
int32_t visual_state() const { return _visual_state; }
void set_diameter (float);

View file

@ -69,7 +69,7 @@ class LevelMeter : public Gtk::HBox, public ARDOUR::SessionHandlePtr
private:
ARDOUR::PeakMeter* _meter;
Width _width;
struct MeterInfo {

View file

@ -417,7 +417,7 @@ LineSet::update_bounds()
if (fx1 > INT_MAX) {
fx1 = INT_MAX;
}
cv.w2c (fx0, new_b.y0, bbox.x0, bbox.y0);
cv.w2c (fx1, new_b.y1, bbox.x1, bbox.y1);

View file

@ -45,7 +45,7 @@ using namespace Gtkmm2ext;
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
: SessionHandlePtr (0) /* explicitly set below */
, location(0)
, location(0)
, item_table (1, 6, false)
, start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true, false)
, end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true, false)
@ -88,7 +88,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
ARDOUR_UI::instance()->tooltips().set_tip (*start_to_playhead_button, _("Set value to playhead"));
ARDOUR_UI::instance()->tooltips().set_tip (*end_to_playhead_button, _("Set value to playhead"));
isrc_label.set_text ("ISRC: ");
isrc_label.set_size_request (30, -1);
performer_label.set_text ("Performer: ");
@ -197,7 +197,7 @@ LocationEditRow::set_session (Session *sess)
{
SessionHandlePtr::set_session (sess);
if (!_session) {
if (!_session) {
return;
}
@ -343,7 +343,7 @@ void
LocationEditRow::name_entry_changed ()
{
ENSURE_GUI_THREAD (*this, &LocationEditRow::name_entry_changed)
if (i_am_the_modifier || !location) {
return;
}
@ -748,12 +748,12 @@ LocationUI::LocationUI ()
loop_punch_box.pack_start (loop_edit_row, false, false);
loop_punch_box.pack_start (punch_edit_row, false, false);
table->attach (loop_punch_box, 1, 2, table_row, table_row + 1);
++table_row;
vbox->pack_start (*table, false, false);
table = manage (new Table (3, 2));
table->set_spacings (4);
table->set_col_spacing (0, 32);
@ -761,7 +761,7 @@ LocationUI::LocationUI ()
table->attach (*manage (new Label ("")), 0, 2, table_row, table_row + 1, Gtk::SHRINK, Gtk::SHRINK);
++table_row;
l = manage (new Label (_("<b>Markers (Including CD Index)</b>")));
l->set_alignment (0, 0.5);
l->set_use_markup (true);
@ -796,7 +796,7 @@ LocationUI::LocationUI ()
table->attach (*manage (new Label ("")), 0, 2, table_row, table_row + 1, Gtk::SHRINK, Gtk::SHRINK);
++table_row;
l = manage (new Label (_("<b>Ranges (Including CD Track Ranges)</b>")));
l->set_alignment (0, 0.5);
l->set_use_markup (true);
@ -832,7 +832,7 @@ LocationUI::LocationUI ()
add_location_button.signal_clicked().connect (sigc::mem_fun(*this, &LocationUI::add_new_location));
add_range_button.signal_clicked().connect (sigc::mem_fun(*this, &LocationUI::add_new_range));
show_all ();
}
@ -841,7 +841,7 @@ LocationUI::~LocationUI()
delete _clock_group;
}
gint
gint
LocationUI::do_location_remove (ARDOUR::Location *loc)
{
/* this is handled internally by Locations, but there's
@ -863,7 +863,7 @@ LocationUI::do_location_remove (ARDOUR::Location *loc)
return FALSE;
}
void
void
LocationUI::location_remove_requested (ARDOUR::Location *loc)
{
// must do this to prevent problems when destroying
@ -873,7 +873,7 @@ LocationUI::location_remove_requested (ARDOUR::Location *loc)
}
void
void
LocationUI::location_redraw_ranges ()
{
range_rows.hide();
@ -921,7 +921,7 @@ LocationUI::location_added (Location* location)
}
++i;
if (j != children.end()) {
++j;
}
@ -1133,7 +1133,7 @@ LocationUIWindow::~LocationUIWindow()
{
}
void
void
LocationUIWindow::on_map ()
{
ArdourDialog::on_map ();

View file

@ -58,7 +58,7 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr
void set_number (int);
void focus_name();
void set_clock_group (ClockGroup&);
sigc::signal<void,ARDOUR::Location*> remove_requested;
sigc::signal<void> redraw_ranges;
@ -148,7 +148,7 @@ class LocationUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
public:
LocationUI ();
~LocationUI ();
void set_session (ARDOUR::Session *);
void set_clock_mode (AudioClock::Mode);

View file

@ -61,7 +61,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
private:
void parameter_changed (uint32_t, float);
boost::shared_ptr<ARDOUR::LV2Plugin> _lv2;
std::vector<int> _output_ports;
sigc::connection _screen_update_connection;

View file

@ -162,7 +162,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
case SessionStart:
case RangeStart:
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (6.5, 6.5));
@ -234,7 +234,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
frame_position = frame;
unit_position = editor.frame_to_unit (frame);
unit_position -= _shift;
group = new Group (parent, unit_position, 1.0);
_name_background = new ArdourCanvas::SimpleRect (*group);
@ -317,7 +317,7 @@ Marker::setup_line ()
_line->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
}
/* work out where to start the line from so that it extends from the top of the canvas */
double yo = 0;
double xo = 0;
@ -372,7 +372,7 @@ void
Marker::setup_name_display ()
{
double limit = DBL_MAX;
if (label_on_left ()) {
limit = _left_label_limit;
} else {
@ -398,7 +398,7 @@ Marker::setup_name_display ()
_name_background->property_x1() = name_pixbuf->property_x() - _label_offset + 2;
_name_background->property_x2() = name_pixbuf->property_x() + name_width;
}
_name_background->property_y1() = 0;
_name_background->property_y2() = 13;
}
@ -423,7 +423,7 @@ void
Marker::show ()
{
_shown = true;
group->show ();
setup_line ();
}
@ -432,7 +432,7 @@ void
Marker::hide ()
{
_shown = false;
group->hide ();
setup_line ();
}
@ -462,7 +462,7 @@ Marker::set_left_label_limit (double p)
if (_left_label_limit < 0) {
_left_label_limit = 0;
}
if (label_on_left ()) {
setup_name_display ();
}
@ -477,7 +477,7 @@ Marker::set_right_label_limit (double p)
if (_right_label_limit < 0) {
_right_label_limit = 0;
}
if (!label_on_left ()) {
setup_name_display ();
}

View file

@ -92,7 +92,7 @@ class Marker : public sigc::trackable
}
bool label_on_left () const;
protected:
PublicEditor& editor;

View file

@ -78,7 +78,7 @@ public:
* of the currently selected channels.
*/
sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
/**

Some files were not shown because too many files have changed in this diff Show more