summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-01 17:00:29 +0000
committerDavid Robillard <d@drobilla.net>2011-06-01 17:00:29 +0000
commited626628b54e67dd9621c08d82a42afaed00c7ac (patch)
treecf621db4c44f07f75a6e6a3fb7f572cd2c3622cd
parenta473d630eb165272992e90f8d854b1d66ec0be63 (diff)
Delete trailing whitespace
git-svn-id: svn://localhost/ardour2/branches/3.0@9656 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ambiguous_file_dialog.cc2
-rw-r--r--gtk2_ardour/ambiguous_file_dialog.h2
-rw-r--r--gtk2_ardour/ardour_ui.cc54
-rw-r--r--gtk2_ardour/ardour_ui.h8
-rw-r--r--gtk2_ardour/ardour_ui2.cc2
-rw-r--r--gtk2_ardour/ardour_ui_dependents.cc10
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc2
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc26
-rw-r--r--gtk2_ardour/ardour_ui_mixer.cc2
-rw-r--r--gtk2_ardour/ardour_ui_options.cc10
-rw-r--r--gtk2_ardour/audio_clock.cc18
-rw-r--r--gtk2_ardour/audio_clock.h2
-rw-r--r--gtk2_ardour/audio_region_editor.cc6
-rw-r--r--gtk2_ardour/audio_region_editor.h6
-rw-r--r--gtk2_ardour/audio_region_view.cc52
-rw-r--r--gtk2_ardour/audio_region_view.h38
-rw-r--r--gtk2_ardour/audio_streamview.cc40
-rw-r--r--gtk2_ardour/audio_time_axis.cc28
-rw-r--r--gtk2_ardour/audio_time_axis.h2
-rw-r--r--gtk2_ardour/automation_controller.cc2
-rw-r--r--gtk2_ardour/automation_line.cc24
-rw-r--r--gtk2_ardour/automation_line.h6
-rw-r--r--gtk2_ardour/automation_range.h2
-rw-r--r--gtk2_ardour/automation_region_view.cc16
-rw-r--r--gtk2_ardour/automation_streamview.cc16
-rw-r--r--gtk2_ardour/automation_time_axis.cc28
-rw-r--r--gtk2_ardour/axis_view.cc2
-rw-r--r--gtk2_ardour/axis_view.h2
-rw-r--r--gtk2_ardour/bundle_manager.cc6
-rw-r--r--gtk2_ardour/canvas-hit.cc4
-rw-r--r--gtk2_ardour/canvas-noevent-text.h4
-rw-r--r--gtk2_ardour/canvas-note-event.cc12
-rw-r--r--gtk2_ardour/canvas-note-event.h2
-rw-r--r--gtk2_ardour/canvas-note.h4
-rw-r--r--gtk2_ardour/canvas-simpleline.c12
-rw-r--r--gtk2_ardour/canvas-simplerect.c18
-rw-r--r--gtk2_ardour/canvas_patch_change.cc2
-rw-r--r--gtk2_ardour/clock_group.cc4
-rw-r--r--gtk2_ardour/control_point.cc4
-rw-r--r--gtk2_ardour/control_point.h2
-rw-r--r--gtk2_ardour/crossfade_edit.cc32
-rw-r--r--gtk2_ardour/crossfade_view.cc6
-rw-r--r--gtk2_ardour/crossfade_view.h22
-rw-r--r--gtk2_ardour/edit_note_dialog.cc8
-rw-r--r--gtk2_ardour/editor.cc194
-rw-r--r--gtk2_ardour/editor_actions.cc94
-rw-r--r--gtk2_ardour/editor_audio_import.cc54
-rw-r--r--gtk2_ardour/editor_audiotrack.cc2
-rw-r--r--gtk2_ardour/editor_canvas.cc8
-rw-r--r--gtk2_ardour/editor_canvas_events.cc2
-rw-r--r--gtk2_ardour/editor_drag.cc278
-rw-r--r--gtk2_ardour/editor_drag.h30
-rw-r--r--gtk2_ardour/editor_group_tabs.cc14
-rw-r--r--gtk2_ardour/editor_locations.cc2
-rw-r--r--gtk2_ardour/editor_markers.cc42
-rw-r--r--gtk2_ardour/editor_mixer.cc4
-rw-r--r--gtk2_ardour/editor_mouse.cc54
-rw-r--r--gtk2_ardour/editor_ops.cc240
-rw-r--r--gtk2_ardour/editor_regions.cc114
-rw-r--r--gtk2_ardour/editor_regions.h38
-rw-r--r--gtk2_ardour/editor_route_groups.cc12
-rw-r--r--gtk2_ardour/editor_routes.cc48
-rw-r--r--gtk2_ardour/editor_routes.h18
-rw-r--r--gtk2_ardour/editor_selection.cc66
-rw-r--r--gtk2_ardour/editor_selection_list.cc2
-rw-r--r--gtk2_ardour/editor_summary.cc44
-rw-r--r--gtk2_ardour/editor_timefx.cc18
-rw-r--r--gtk2_ardour/engine_dialog.cc30
-rw-r--r--gtk2_ardour/export_channel_selector.cc10
-rw-r--r--gtk2_ardour/export_channel_selector.h2
-rw-r--r--gtk2_ardour/export_dialog.cc4
-rw-r--r--gtk2_ardour/export_dialog.h4
-rw-r--r--gtk2_ardour/export_filename_selector.cc4
-rw-r--r--gtk2_ardour/export_filename_selector.h2
-rw-r--r--gtk2_ardour/export_format_dialog.cc2
-rw-r--r--gtk2_ardour/export_timespan_selector.cc6
-rw-r--r--gtk2_ardour/gain_meter.cc46
-rw-r--r--gtk2_ardour/gain_meter.h2
-rw-r--r--gtk2_ardour/generic_pluginui.cc6
-rw-r--r--gtk2_ardour/ghostregion.cc6
-rw-r--r--gtk2_ardour/global_port_matrix.cc8
-rw-r--r--gtk2_ardour/group_tabs.cc28
-rw-r--r--gtk2_ardour/group_tabs.h4
-rw-r--r--gtk2_ardour/gtk_pianokeyboard.c36
-rw-r--r--gtk2_ardour/insert_time_dialog.cc2
-rw-r--r--gtk2_ardour/insert_time_dialog.h2
-rw-r--r--gtk2_ardour/interthread_progress_window.cc2
-rw-r--r--gtk2_ardour/interthread_progress_window.h4
-rw-r--r--gtk2_ardour/io_selector.cc8
-rw-r--r--gtk2_ardour/io_selector.h2
-rw-r--r--gtk2_ardour/led.cc6
-rw-r--r--gtk2_ardour/led.h2
-rw-r--r--gtk2_ardour/level_meter.h2
-rw-r--r--gtk2_ardour/lineset.cc2
-rw-r--r--gtk2_ardour/location_ui.cc28
-rw-r--r--gtk2_ardour/location_ui.h4
-rw-r--r--gtk2_ardour/lv2_plugin_ui.h2
-rw-r--r--gtk2_ardour/marker.cc18
-rw-r--r--gtk2_ardour/marker.h2
-rw-r--r--gtk2_ardour/midi_channel_selector.h2
-rw-r--r--gtk2_ardour/midi_cut_buffer.cc2
-rw-r--r--gtk2_ardour/midi_list_editor.cc18
-rw-r--r--gtk2_ardour/midi_list_editor.h2
-rw-r--r--gtk2_ardour/midi_region_view.cc250
-rw-r--r--gtk2_ardour/midi_region_view.h8
-rw-r--r--gtk2_ardour/midi_time_axis.cc146
-rw-r--r--gtk2_ardour/midi_time_axis.h6
-rw-r--r--gtk2_ardour/midi_tracer.cc52
-rw-r--r--gtk2_ardour/midi_tracer.h6
-rw-r--r--gtk2_ardour/missing_file_dialog.cc6
-rwxr-xr-xgtk2_ardour/missing_plugin_dialog.cc2
-rw-r--r--gtk2_ardour/mixer_group_tabs.cc4
-rw-r--r--gtk2_ardour/mixer_strip.cc42
-rw-r--r--gtk2_ardour/mixer_strip.h4
-rw-r--r--gtk2_ardour/mixer_ui.cc8
-rw-r--r--gtk2_ardour/monitor_section.cc90
-rw-r--r--gtk2_ardour/monitor_section.h4
-rw-r--r--gtk2_ardour/mono_panner.cc50
-rw-r--r--gtk2_ardour/mono_panner.h2
-rw-r--r--gtk2_ardour/mouse_cursors.cc8
-rw-r--r--gtk2_ardour/mouse_cursors.h2
-rw-r--r--gtk2_ardour/nag.cc2
-rw-r--r--gtk2_ardour/new_plugin_preset_dialog.cc2
-rw-r--r--gtk2_ardour/new_plugin_preset_dialog.h4
-rw-r--r--gtk2_ardour/normalize_dialog.cc4
-rw-r--r--gtk2_ardour/normalize_dialog.h2
-rw-r--r--gtk2_ardour/note_player.cc2
-rw-r--r--gtk2_ardour/option_editor.cc8
-rw-r--r--gtk2_ardour/option_editor.h6
-rw-r--r--gtk2_ardour/opts.cc2
-rw-r--r--gtk2_ardour/panner2d.cc56
-rw-r--r--gtk2_ardour/panner2d.h8
-rw-r--r--gtk2_ardour/panner_ui.cc38
-rw-r--r--gtk2_ardour/panner_ui.h2
-rw-r--r--gtk2_ardour/patch_change_dialog.cc16
-rw-r--r--gtk2_ardour/piano_roll_header.cc22
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc2
-rw-r--r--gtk2_ardour/plugin_eq_gui.h32
-rw-r--r--gtk2_ardour/plugin_selector.cc16
-rw-r--r--gtk2_ardour/plugin_ui.cc14
-rw-r--r--gtk2_ardour/plugin_ui.h6
-rw-r--r--gtk2_ardour/port_group.cc38
-rw-r--r--gtk2_ardour/port_group.h2
-rw-r--r--gtk2_ardour/port_insert_ui.cc4
-rw-r--r--gtk2_ardour/port_insert_ui.h2
-rw-r--r--gtk2_ardour/port_matrix.cc40
-rw-r--r--gtk2_ardour/port_matrix.h4
-rw-r--r--gtk2_ardour/port_matrix_body.cc20
-rw-r--r--gtk2_ardour/port_matrix_column_labels.cc24
-rw-r--r--gtk2_ardour/port_matrix_component.cc20
-rw-r--r--gtk2_ardour/port_matrix_grid.cc36
-rw-r--r--gtk2_ardour/port_matrix_row_labels.cc34
-rw-r--r--gtk2_ardour/processor_box.cc80
-rw-r--r--gtk2_ardour/processor_box.h18
-rw-r--r--gtk2_ardour/progress_reporter.cc2
-rw-r--r--gtk2_ardour/progress_reporter.h2
-rw-r--r--gtk2_ardour/public_editor.h10
-rw-r--r--gtk2_ardour/quantize_dialog.cc2
-rw-r--r--gtk2_ardour/rc_option_editor.cc42
-rw-r--r--gtk2_ardour/rc_option_editor.h2
-rwxr-xr-xgtk2_ardour/region_editor.cc14
-rw-r--r--gtk2_ardour/region_editor.h4
-rw-r--r--gtk2_ardour/region_gain_line.cc2
-rw-r--r--gtk2_ardour/region_layering_order_editor.cc14
-rw-r--r--gtk2_ardour/region_layering_order_editor.h6
-rw-r--r--gtk2_ardour/region_selection.cc6
-rw-r--r--gtk2_ardour/region_view.cc26
-rw-r--r--gtk2_ardour/region_view.h30
-rw-r--r--gtk2_ardour/return_ui.cc2
-rw-r--r--gtk2_ardour/return_ui.h2
-rw-r--r--gtk2_ardour/rhythm_ferret.cc26
-rw-r--r--gtk2_ardour/route_group_dialog.cc6
-rw-r--r--gtk2_ardour/route_group_dialog.h2
-rw-r--r--gtk2_ardour/route_group_menu.cc6
-rw-r--r--gtk2_ardour/route_params_ui.cc10
-rw-r--r--gtk2_ardour/route_time_axis.cc134
-rw-r--r--gtk2_ardour/route_time_axis.h10
-rw-r--r--gtk2_ardour/route_ui.cc134
-rw-r--r--gtk2_ardour/route_ui.h8
-rw-r--r--gtk2_ardour/search_path_option.cc10
-rw-r--r--gtk2_ardour/selection.cc26
-rw-r--r--gtk2_ardour/session_import_dialog.cc8
-rw-r--r--gtk2_ardour/session_import_dialog.h2
-rw-r--r--gtk2_ardour/session_metadata_dialog.cc6
-rw-r--r--gtk2_ardour/session_option_editor.cc10
-rw-r--r--gtk2_ardour/session_option_editor.h2
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.cc78
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.h6
-rw-r--r--gtk2_ardour/sfdb_ui.cc10
-rw-r--r--gtk2_ardour/shuttle_control.cc30
-rw-r--r--gtk2_ardour/shuttle_control.h6
-rw-r--r--gtk2_ardour/speaker_dialog.cc64
-rw-r--r--gtk2_ardour/speaker_dialog.h8
-rw-r--r--gtk2_ardour/startup.cc16
-rw-r--r--gtk2_ardour/startup.h2
-rw-r--r--gtk2_ardour/step_editor.cc48
-rw-r--r--gtk2_ardour/step_editor.h2
-rw-r--r--gtk2_ardour/step_entry.cc62
-rw-r--r--gtk2_ardour/step_entry.h8
-rw-r--r--gtk2_ardour/stereo_panner.h6
-rw-r--r--gtk2_ardour/streamview.cc12
-rw-r--r--gtk2_ardour/streamview.h4
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc20
-rw-r--r--gtk2_ardour/strip_silence_dialog.h2
-rw-r--r--gtk2_ardour/tempo_dialog.h2
-rw-r--r--gtk2_ardour/time_axis_view.cc48
-rw-r--r--gtk2_ardour/time_axis_view.h2
-rw-r--r--gtk2_ardour/time_axis_view_item.cc38
-rw-r--r--gtk2_ardour/time_axis_view_item.h50
-rw-r--r--gtk2_ardour/time_selection.h4
-rw-r--r--gtk2_ardour/track_selection.h4
-rwxr-xr-xgtk2_ardour/track_view_list.h2
-rw-r--r--gtk2_ardour/ui_config.cc2
-rw-r--r--gtk2_ardour/utils.cc8
-rw-r--r--gtk2_ardour/verbose_cursor.cc2
-rw-r--r--gtk2_ardour/verbose_cursor.h4
-rw-r--r--gtk2_ardour/volume_controller.cc2
-rw-r--r--gtk2_ardour/volume_controller.h4
-rw-r--r--gtk2_ardour/vst_pluginui.cc4
-rwxr-xr-xgtk2_ardour/window_proxy.cc10
-rwxr-xr-xgtk2_ardour/window_proxy.h14
221 files changed, 2322 insertions, 2322 deletions
diff --git a/gtk2_ardour/ambiguous_file_dialog.cc b/gtk2_ardour/ambiguous_file_dialog.cc
index fe17cde5b1..0eae3617c5 100644
--- a/gtk2_ardour/ambiguous_file_dialog.cc
+++ b/gtk2_ardour/ambiguous_file_dialog.cc
@@ -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 ();
diff --git a/gtk2_ardour/ambiguous_file_dialog.h b/gtk2_ardour/ambiguous_file_dialog.h
index ea20b42151..796f490e79 100644
--- a/gtk2_ardour/ambiguous_file_dialog.h
+++ b/gtk2_ardour/ambiguous_file_dialog.h
@@ -32,4 +32,4 @@ private:
std::vector<Gtk::RadioButton*> _radio_buttons;
};
-
+
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index d53e441fd2..1a22db660a 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -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"));
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 283bcbe915..423189c3ed 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -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 ();
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index 3e3f8a1506..2cbd70ed37 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -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) {
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc
index f7e6a89eb0..3f819829b9 100644
--- a/gtk2_ardour/ardour_ui_dependents.cc
+++ b/gtk2_ardour/ardour_ui_dependents.cc
@@ -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 ();
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index 5b53b37a92..712c3da99b 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -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);
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 9a9e2484bf..b762348f1d 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -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)));
diff --git a/gtk2_ardour/ardour_ui_mixer.cc b/gtk2_ardour/ardour_ui_mixer.cc
index c969afa33f..b6983cd8ac 100644
--- a/gtk2_ardour/ardour_ui_mixer.cc
+++ b/gtk2_ardour/ardour_ui_mixer.cc
@@ -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;
}
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index a0d106fe35..5bcecfaef5 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -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);
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 6ab075b0ec..c8d17d5e8b 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -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');
}
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index 87cb127dd6..f218154235 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -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; }
diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc
index 806659b52c..b0767604c9 100644
--- a/gtk2_ardour/audio_region_editor.cc
+++ b/gtk2_ardour/audio_region_editor.cc
@@ -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 ();
}
diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h
index 5c9e56d923..dd65a3fb31 100644
--- a/gtk2_ardour/audio_region_editor.h
+++ b/gtk2_ardour/audio_region_editor.h
@@ -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;
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 2a1b8d1e44..4729024159 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -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;
}
}
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index ec1986ca65..cfd64b16a4 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -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.
*/
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index f1dda10516..1dda45fdce 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -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 ();
}
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index 2480c87967..763c9a5575 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -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;
diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h
index 3688f49062..a13ac32f2a 100644
--- a/gtk2_ardour/audio_time_axis.h
+++ b/gtk2_ardour/audio_time_axis.h
@@ -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;
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index a7474ca65b..79aec89f9c 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -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();
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 655d958a1f..9a5a9098c7 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -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 ();
}
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index a05a7b9180..095fa14c38 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -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;
};
diff --git a/gtk2_ardour/automation_range.h b/gtk2_ardour/automation_range.h
index e13ad378a5..2baa515d8b 100644
--- a/gtk2_ardour/automation_range.h
+++ b/gtk2_ardour/automation_range.h
@@ -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) {}
};
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index 383c022bdb..18ce6cc646 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -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);
}
diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc
index 86388f527f..3e2046fd58 100644
--- a/gtk2_ardour/automation_streamview.cc
+++ b/gtk2_ardour/automation_streamview.cc
@@ -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.
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 9cf1598010..43eae4e031 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -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) {
diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc
index eb3ef23bc6..dcbaa35d37 100644
--- a/gtk2_ardour/axis_view.cc
+++ b/gtk2_ardour/axis_view.cc
@@ -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;
diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h
index 108d14c1f1..e3e90325d3 100644
--- a/gtk2_ardour/axis_view.h
+++ b/gtk2_ardour/axis_view.h
@@ -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; }
diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc
index 9916f80581..2e85b6a030 100644
--- a/gtk2_ardour/bundle_manager.cc
+++ b/gtk2_ardour/bundle_manager.cc
@@ -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 ();
diff --git a/gtk2_ardour/canvas-hit.cc b/gtk2_ardour/canvas-hit.cc
index f00e113462..d3bf1544be 100644
--- a/gtk2_ardour/canvas-hit.cc
+++ b/gtk2_ardour/canvas-hit.cc
@@ -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;
}
diff --git a/gtk2_ardour/canvas-noevent-text.h b/gtk2_ardour/canvas-noevent-text.h
index f210354404..573e0d7a34 100644
--- a/gtk2_ardour/canvas-noevent-text.h
+++ b/gtk2_ardour/canvas-noevent-text.h
@@ -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) {}
diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc
index 8ebd1239e4..8f5a9f5807 100644
--- a/gtk2_ardour/canvas-note-event.cc
+++ b/gtk2_ardour/canvas-note-event.cc
@@ -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:
diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h
index 541cacf6a9..69b3e49076 100644
--- a/gtk2_ardour/canvas-note-event.h
+++ b/gtk2_ardour/canvas-note-event.h
@@ -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*);
};
diff --git a/gtk2_ardour/canvas-note.h b/gtk2_ardour/canvas-note.h
index eb8b1eab02..46b0f1d600 100644
--- a/gtk2_ardour/canvas-note.h
+++ b/gtk2_ardour/canvas-note.h
@@ -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;
diff --git a/gtk2_ardour/canvas-simpleline.c b/gtk2_ardour/canvas-simpleline.c
index 6d58312855..83beb598e7 100644
--- a/gtk2_ardour/canvas-simpleline.c
+++ b/gtk2_ardour/canvas-simpleline.c
@@ -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);
-
+
}
}
diff --git a/gtk2_ardour/canvas-simplerect.c b/gtk2_ardour/canvas-simplerect.c
index 028753ee20..e7cb522e82 100644
--- a/gtk2_ardour/canvas-simplerect.c
+++ b/gtk2_ardour/canvas-simplerect.c
@@ -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);
}
diff --git a/gtk2_ardour/canvas_patch_change.cc b/gtk2_ardour/canvas_patch_change.cc
index 320f0c0d00..930226565d 100644
--- a/gtk2_ardour/canvas_patch_change.cc
+++ b/gtk2_ardour/canvas_patch_change.cc
@@ -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;
diff --git a/gtk2_ardour/clock_group.cc b/gtk2_ardour/clock_group.cc
index 5a03064e85..e304b4ce28 100644
--- a/gtk2_ardour/clock_group.cc
+++ b/gtk2_ardour/clock_group.cc
@@ -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;
-}
+}
diff --git a/gtk2_ardour/control_point.cc b/gtk2_ardour/control_point.cc
index 801bd5bb82..bc7301dc1c 100644
--- a/gtk2_ardour/control_point.cc
+++ b/gtk2_ardour/control_point.cc
@@ -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);
diff --git a/gtk2_ardour/control_point.h b/gtk2_ardour/control_point.h
index 2dbf225d86..40eb7b9179 100644
--- a/gtk2_ardour/control_point.h
+++ b/gtk2_ardour/control_point.h
@@ -68,7 +68,7 @@ class ControlPoint : public Selectable
double size () const {
return _size;
}
-
+
void set_size (double);
void set_visible (bool);
bool visible () const;
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc
index 0c8daafb04..c3f561944f 100644
--- a/gtk2_ardour/crossfade_edit.cc
+++ b/gtk2_ardour/crossfade_edit.cc
@@ -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);
diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc
index 0c420e74ad..d553514c81 100644
--- a/gtk2_ardour/crossfade_view.cc
+++ b/gtk2_ardour/crossfade_view.cc
@@ -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 ();
}
diff --git a/gtk2_ardour/crossfade_view.h b/gtk2_ardour/crossfade_view.h
index c283a92b62..75544f50a9 100644
--- a/gtk2_ardour/crossfade_view.h
+++ b/gtk2_ardour/crossfade_view.h
@@ -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 ();
diff --git a/gtk2_ardour/edit_note_dialog.cc b/gtk2_ardour/edit_note_dialog.cc
index 19e072cf4d..2894f95271 100644
--- a/gtk2_ardour/edit_note_dialog.cc
+++ b/gtk2_ardour/edit_note_dialog.cc
@@ -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;
}
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index a0dc2ffb09..dcf97ffaa8 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -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)
{
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index d19bfe4fa1..f2709e38ec 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -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);
-}
+}
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index 902e3fe6e6..e21d2efe3e 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -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());
}
diff --git a/gtk2_ardour/editor_audiotrack.cc b/gtk2_ardour/editor_audiotrack.cc
index df0b50cbbd..5eadac1ca5 100644
--- a/gtk2_ardour/editor_audiotrack.cc
+++ b/gtk2_ardour/editor_audiotrack.cc
@@ -74,7 +74,7 @@ Editor::toggle_meter_updating()
} else {
stop_updating_meters ();
}
-
+
track_canvas_allocate (track_canvas->get_allocation());
}
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 816f551fcf..1066023e0d 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -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*/)
{
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index 5b527d57de..5dbc94a897 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -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;
}
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 76b297a08c..ee6332e065 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -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())
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index 3277f0334c..113e54c88e 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -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;
};
diff --git a/gtk2_ardour/editor_group_tabs.cc b/gtk2_ardour/editor_group_tabs.cc
index 8839748110..d98c064bff 100644
--- a/gtk2_ardour/editor_group_tabs.cc
+++ b/gtk2_ardour/editor_group_tabs.cc
@@ -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
{
diff --git a/gtk2_ardour/editor_locations.cc b/gtk2_ardour/editor_locations.cc
index ea96f5f514..bbaf0daf75 100644
--- a/gtk2_ardour/editor_locations.cc
+++ b/gtk2_ardour/editor_locations.cc
@@ -41,7 +41,7 @@ EditorLocations::set_session (ARDOUR::Session* s)
}
Widget&
-EditorLocations::widget()
+EditorLocations::widget()
{
return _scroller;
}
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index b060b11a63..c1f06a18c1 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -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);
}
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index ae045d7a45..09e3764483 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -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;
}
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 6bf5d92f99..0d5f75f60d 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -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 ();
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index bccad1d72f..622b102de8 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -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) {
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 3edcb6bce1..7f3e8142dc 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -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>
diff --git a/gtk2_ardour/editor_regions.h b/gtk2_ardour/editor_regions.h
index c9d2f8714e..6a37595bd3 100644
--- a/gtk2_ardour/editor_regions.h
+++ b/gtk2_ardour/editor_regions.h
@@ -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;
};
diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc
index 2d77eb5bd9..a653644bdc 100644
--- a/gtk2_ardour/editor_route_groups.cc
+++ b/gtk2_ardour/editor_route_groups.cc
@@ -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;
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc
index 8368bff66a..0aae18d793 100644
--- a/gtk2_ardour/editor_routes.cc
+++ b/gtk2_ardour/editor_routes.cc
@@ -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];
diff --git a/gtk2_ardour/editor_routes.h b/gtk2_ardour/editor_routes.h
index 6297f906bb..c6105bb7be 100644
--- a/gtk2_ardour/editor_routes.h
+++ b/gtk2_ardour/editor_routes.h
@@ -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;
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index d81b8a4351..c2338347d2 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -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());
diff --git a/gtk2_ardour/editor_selection_list.cc b/gtk2_ardour/editor_selection_list.cc
index 73ceb59c37..3991dc5aae 100644
--- a/gtk2_ardour/editor_selection_list.cc
+++ b/gtk2_ardour/editor_selection_list.cc
@@ -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();
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index 4efb57ffc4..1c9ca94021 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -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;
}
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 0a1d3cb495..1c4162eda2 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -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;
};
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index d54f6100a9..a558d36fce 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -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") {
diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc
index 019bb161e7..5d45ca5fa1 100644
--- a/gtk2_ardour/export_channel_selector.cc
+++ b/gtk2_ardour/export_channel_selector.cc
@@ -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];
diff --git a/gtk2_ardour/export_channel_selector.h b/gtk2_ardour/export_channel_selector.h
index e7b2dc11ee..dda449d931 100644
--- a/gtk2_ardour/export_channel_selector.h
+++ b/gtk2_ardour/export_channel_selector.h
@@ -256,7 +256,7 @@ class TrackExportChannelSelector : public ExportChannelSelector
Gtk::TreeView track_view;
Gtk::ScrolledWindow track_scroller;
-
+
};
#endif /* __export_channel_selector_h__ */
diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc
index 83e58d3726..e51f5771d3 100644
--- a/gtk2_ardour/export_dialog.cc
+++ b/gtk2_ardour/export_dialog.cc
@@ -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
diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h
index 5c9e346f50..5928c67e9f 100644
--- a/gtk2_ardour/export_dialog.h
+++ b/gtk2_ardour/export_dialog.h
@@ -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 ();
};
diff --git a/gtk2_ardour/export_filename_selector.cc b/gtk2_ardour/export_filename_selector.cc
index 298b56e853..2912ce75e6 100644
--- a/gtk2_ardour/export_filename_selector.cc
+++ b/gtk2_ardour/export_filename_selector.cc
@@ -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"))
{
diff --git a/gtk2_ardour/export_filename_selector.h b/gtk2_ardour/export_filename_selector.h
index d2b77a16f5..4db87d943b 100644
--- a/gtk2_ardour/export_filename_selector.h
+++ b/gtk2_ardour/export_filename_selector.h
@@ -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;
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index 89762be583..0986934661 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -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());
diff --git a/gtk2_ardour/export_timespan_selector.cc b/gtk2_ardour/export_timespan_selector.cc
index cea01ff4c8..8cbe92b5e2 100644
--- a/gtk2_ardour/export_timespan_selector.cc
+++ b/gtk2_ardour/export_timespan_selector.cc
@@ -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;
}
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 3b8830b85c..f0a8ceb548 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -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);
}
}
diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h
index d05ddc15ac..e50bf9b465 100644
--- a/gtk2_ardour/gain_meter.h
+++ b/gtk2_ardour/gain_meter.h
@@ -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;
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index e7ba8d70bd..a44b54c9b0 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -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;
}
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc
index 27ab4334a9..cb4a0d95d3 100644
--- a/gtk2_ardour/ghostregion.cc
+++ b/gtk2_ardour/ghostregion.cc
@@ -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;
}
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index 318263a9cd..df22424520 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -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");
}
-
+
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc
index 297698e85c..faf5ab8edc 100644
--- a/gtk2_ardour/group_tabs.cc
+++ b/gtk2_ardour/group_tabs.cc
@@ -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)
{
diff --git a/gtk2_ardour/group_tabs.h b/gtk2_ardour/group_tabs.h
index da9523d50d..7362067251 100644
--- a/gtk2_ardour/group_tabs.h
+++ b/gtk2_ardour/group_tabs.h
@@ -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 *);
diff --git a/gtk2_ardour/gtk_pianokeyboard.c b/gtk2_ardour/gtk_pianokeyboard.c
index 361e6685e9..90405a6c31 100644
--- a/gtk2_ardour/gtk_pianokeyboard.c
+++ b/gtk2_ardour/gtk_pianokeyboard.c
@@ -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)
diff --git a/gtk2_ardour/insert_time_dialog.cc b/gtk2_ardour/insert_time_dialog.cc
index 78be9c1826..bc17a6a7c8 100644
--- a/gtk2_ardour/insert_time_dialog.cc
+++ b/gtk2_ardour/insert_time_dialog.cc
@@ -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);
diff --git a/gtk2_ardour/insert_time_dialog.h b/gtk2_ardour/insert_time_dialog.h
index 34630fa908..15ae77515c 100644
--- a/gtk2_ardour/insert_time_dialog.h
+++ b/gtk2_ardour/insert_time_dialog.h
@@ -37,7 +37,7 @@ public:
private:
void move_markers_toggled ();
-
+
PublicEditor& _editor;
Gtk::ComboBoxText _intersected_combo;
Gtk::CheckButton _move_glued;
diff --git a/gtk2_ardour/interthread_progress_window.cc b/gtk2_ardour/interthread_progress_window.cc
index 8d446830f3..e81ea26872 100644
--- a/gtk2_ardour/interthread_progress_window.cc
+++ b/gtk2_ardour/interthread_progress_window.cc
@@ -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);
diff --git a/gtk2_ardour/interthread_progress_window.h b/gtk2_ardour/interthread_progress_window.h
index 6c7f0f5bd5..653ec46420 100644
--- a/gtk2_ardour/interthread_progress_window.h
+++ b/gtk2_ardour/interthread_progress_window.h
@@ -42,11 +42,11 @@ public:
protected:
virtual bool update ();
-
+
Gtk::Button _cancel_button;
Gtk::Label _cancel_label;
Gtk::ProgressBar _bar;
-
+
private:
void cancel_clicked ();
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index 61895896d2..8b47c46f39 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -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);
diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h
index bb103d0d5d..e44fd8aa83 100644
--- a/gtk2_ardour/io_selector.h
+++ b/gtk2_ardour/io_selector.h
@@ -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;
diff --git a/gtk2_ardour/led.cc b/gtk2_ardour/led.cc
index 76d71bc35e..9a93e048d1 100644
--- a/gtk2_ardour/led.cc
+++ b/gtk2_ardour/led.cc
@@ -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 ();
}
diff --git a/gtk2_ardour/led.h b/gtk2_ardour/led.h
index 06ac7454df..e2009ce192 100644
--- a/gtk2_ardour/led.h
+++ b/gtk2_ardour/led.h
@@ -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);
diff --git a/gtk2_ardour/level_meter.h b/gtk2_ardour/level_meter.h
index 6b3c33cac5..e89266a407 100644
--- a/gtk2_ardour/level_meter.h
+++ b/gtk2_ardour/level_meter.h
@@ -69,7 +69,7 @@ class LevelMeter : public Gtk::HBox, public ARDOUR::SessionHandlePtr
private:
ARDOUR::PeakMeter* _meter;
-
+
Width _width;
struct MeterInfo {
diff --git a/gtk2_ardour/lineset.cc b/gtk2_ardour/lineset.cc
index ac7ed56714..c1761c5398 100644
--- a/gtk2_ardour/lineset.cc
+++ b/gtk2_ardour/lineset.cc
@@ -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);
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index 97f0d03a38..c0f5d1f325 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -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 ();
diff --git a/gtk2_ardour/location_ui.h b/gtk2_ardour/location_ui.h
index 325ab96bd7..9637257f49 100644
--- a/gtk2_ardour/location_ui.h
+++ b/gtk2_ardour/location_ui.h
@@ -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);
diff --git a/gtk2_ardour/lv2_plugin_ui.h b/gtk2_ardour/lv2_plugin_ui.h
index a6606c64dd..b9d644081c 100644
--- a/gtk2_ardour/lv2_plugin_ui.h
+++ b/gtk2_ardour/lv2_plugin_ui.h
@@ -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;
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index f1797c39c9..5b7ae840fd 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -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 ();
}
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index aa4888fe20..5ac3f19240 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -92,7 +92,7 @@ class Marker : public sigc::trackable
}
bool label_on_left () const;
-
+
protected:
PublicEditor& editor;
diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h
index 04854d4ad2..8bcf704ca4 100644
--- a/gtk2_ardour/midi_channel_selector.h
+++ b/gtk2_ardour/midi_channel_selector.h
@@ -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);
/**
diff --git a/gtk2_ardour/midi_cut_buffer.cc b/gtk2_ardour/midi_cut_buffer.cc
index 1bc6ab212a..21567d401f 100644
--- a/gtk2_ardour/midi_cut_buffer.cc
+++ b/gtk2_ardour/midi_cut_buffer.cc
@@ -24,7 +24,7 @@ MidiCutBuffer::MidiCutBuffer (Session* s)
: AutomatableSequence<MidiModel::TimeType> (*s)
, _origin (0)
{
-
+
}
MidiCutBuffer::~MidiCutBuffer ()
diff --git a/gtk2_ardour/midi_list_editor.cc b/gtk2_ardour/midi_list_editor.cc
index c8c016d9a8..ceb2e7ace6 100644
--- a/gtk2_ardour/midi_list_editor.cc
+++ b/gtk2_ardour/midi_list_editor.cc
@@ -182,7 +182,7 @@ MidiListEditor::edited (const std::string& path, const std::string& /* text */)
cerr << "Edited " << *note << endl;
redisplay_model ();
-
+
/* keep selected row(s), move cursor there, to allow us to continue editing */
}
@@ -193,24 +193,24 @@ MidiListEditor::redisplay_model ()
model->clear ();
if (_session) {
-
+
BeatsFramesConverter conv (_session->tempo_map(), region->position());
MidiModel::Notes notes = region->midi_source(0)->model()->notes();
TreeModel::Row row;
stringstream ss;
-
+
for (MidiModel::Notes::iterator i = notes.begin(); i != notes.end(); ++i) {
row = *(model->append());
row[columns.channel] = (*i)->channel() + 1;
row[columns.note_name] = Evoral::midi_note_name ((*i)->note());
row[columns.note] = (*i)->note();
row[columns.velocity] = (*i)->velocity();
-
+
Timecode::BBT_Time bbt;
double dur;
_session->tempo_map().bbt_time (conv.to ((*i)->time()), bbt);
-
+
ss.str ("");
ss << bbt;
row[columns.start] = ss.str();
@@ -219,19 +219,19 @@ MidiListEditor::redisplay_model ()
dur = (*i)->end_time() - (*i)->time();
bbt.beats = floor (dur);
bbt.ticks = (uint32_t) lrint (fmod (dur, 1.0) * Timecode::BBT_Time::ticks_per_beat);
-
+
_session->tempo_map().bbt_duration_at (region->position(), bbt, 0);
ss.str ("");
ss << bbt;
row[columns.length] = ss.str();
-
+
_session->tempo_map().bbt_time (conv.to ((*i)->end_time()), bbt);
-
+
ss.str ("");
ss << bbt;
row[columns.end] = ss.str();
-
+
row[columns._note] = (*i);
}
}
diff --git a/gtk2_ardour/midi_list_editor.h b/gtk2_ardour/midi_list_editor.h
index 67b2f91923..1e25d104f9 100644
--- a/gtk2_ardour/midi_list_editor.h
+++ b/gtk2_ardour/midi_list_editor.h
@@ -82,7 +82,7 @@ class MidiListEditor : public ArdourDialog
bool key_press (GdkEventKey* ev);
bool key_release (GdkEventKey* ev);
-
+
void delete_selected_note ();
};
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index d7ae77def5..c2b3462bd2 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -221,7 +221,7 @@ MidiRegionView::init (Gdk::Color const & basic_color, bool wfd)
{
PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys));
- CanvasNoteEvent::CanvasNoteEventDeleted.connect (note_delete_connection, MISSING_INVALIDATOR,
+ CanvasNoteEvent::CanvasNoteEventDeleted.connect (note_delete_connection, MISSING_INVALIDATOR,
ui_bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1),
gui_context());
@@ -296,7 +296,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
default:
break;
}
-
+
if (!trackview.editor().internal_editing()) {
return false;
}
@@ -319,7 +319,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
case GDK_BUTTON_RELEASE:
return button_release (&ev->button);
-
+
case GDK_ENTER_NOTIFY:
return enter_notify (&ev->crossing);
@@ -329,7 +329,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
case GDK_MOTION_NOTIFY:
return motion (&ev->motion);
- default:
+ default:
break;
}
@@ -364,7 +364,7 @@ bool
MidiRegionView::leave_notify (GdkEventCrossing*)
{
_mouse_mode_connection.disconnect ();
-
+
trackview.editor().verbose_cursor()->hide ();
remove_ghost_note ();
return false;
@@ -390,17 +390,17 @@ MidiRegionView::button_press (GdkEventButton* ev)
_last_x = ev->x;
_last_y = ev->y;
-
+
group->w2i (_last_x, _last_y);
-
+
if (_mouse_state != SelectTouchDragging) {
-
+
_pressed_button = ev->button;
_mouse_state = Pressed;
-
+
return true;
}
-
+
_pressed_button = ev->button;
return true;
@@ -418,36 +418,36 @@ MidiRegionView::button_release (GdkEventButton* ev)
event_x = ev->x;
event_y = ev->y;
-
+
group->w2i(event_x, event_y);
group->ungrab(ev->time);
-
+
event_frame = trackview.editor().pixel_to_frame(event_x);
switch (_mouse_state) {
- case Pressed: // Clicked
+ case Pressed: // Clicked
switch (trackview.editor().current_mouse_mode()) {
case MouseObject:
case MouseTimeFX:
{
clear_selection();
-
+
if (Keyboard::is_insert_note_event(ev)){
-
+
double event_x, event_y;
-
+
event_x = ev->x;
event_y = ev->y;
group->w2i(event_x, event_y);
bool success;
Evoral::MusicalTime beats = trackview.editor().get_grid_type_as_beats (success, trackview.editor().pixel_to_frame (event_x));
-
+
if (!success) {
beats = 1;
}
-
+
create_note_at (event_x, event_y, beats, true);
}
@@ -457,24 +457,24 @@ MidiRegionView::button_release (GdkEventButton* ev)
{
bool success;
Evoral::MusicalTime beats = trackview.editor().get_grid_type_as_beats (success, trackview.editor().pixel_to_frame (event_x));
-
+
if (!success) {
beats = 1;
}
-
+
create_note_at (event_x, event_y, beats, true);
-
+
break;
}
default:
break;
}
-
+
_mouse_state = None;
break;
-
+
case SelectRectDragging: // Select drag done
-
+
_mouse_state = None;
delete _drag_rect;
_drag_rect = 0;
@@ -483,9 +483,9 @@ MidiRegionView::button_release (GdkEventButton* ev)
case AddDragging: // Add drag done
_mouse_state = None;
-
+
if (Keyboard::is_insert_note_event(ev) || trackview.editor().current_mouse_mode() == MouseRange){
-
+
if (_drag_rect->property_x2() > _drag_rect->property_x1() + 2) {
const double x = _drag_rect->property_x1();
@@ -499,7 +499,7 @@ MidiRegionView::button_release (GdkEventButton* ev)
_drag_rect = 0;
create_ghost_note (ev->x, ev->y);
-
+
default:
break;
}
@@ -520,22 +520,22 @@ MidiRegionView::motion (GdkEventMotion* ev)
// convert event_x to global frame
event_frame = snap_pixel_to_frame (event_x);
- if (!_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
- && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())
+ if (!_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
+ && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())
&& _mouse_state != AddDragging){
-
+
create_ghost_note (ev->x, ev->y);
}
- else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
+ else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
&& Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())){
-
+
update_ghost_note (ev->x, ev->y);
}
else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange){
-
+
delete _ghost_note;
_ghost_note = 0;
-
+
trackview.editor().verbose_cursor()->hide ();
}
else if (_ghost_note && trackview.editor().current_mouse_mode() == MouseRange) {
@@ -543,26 +543,26 @@ MidiRegionView::motion (GdkEventMotion* ev)
}
/* any motion immediately hides velocity text that may have been visible */
-
+
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
(*i)->hide_velocity ();
}
switch (_mouse_state) {
case Pressed: // Maybe start a drag, if we've moved a bit
-
+
if (fabs (event_x - _last_x) < 1 && fabs (event_y - _last_y) < 1) {
/* no appreciable movement since the button was pressed */
return false;
}
// Select drag start
- if (_pressed_button == 1 && trackview.editor().current_mouse_mode() == MouseObject
+ if (_pressed_button == 1 && trackview.editor().current_mouse_mode() == MouseObject
&& !Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) {
-
+
group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
Gdk::Cursor(Gdk::FLEUR), ev->time);
-
+
_last_x = event_x;
_last_y = event_y;
_drag_start_x = event_x;
@@ -587,10 +587,10 @@ MidiRegionView::motion (GdkEventMotion* ev)
delete _ghost_note;
_ghost_note = 0;
-
+
group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
Gdk::Cursor(Gdk::FLEUR), ev->time);
-
+
_last_x = event_x;
_last_y = event_y;
_drag_start_x = event_x;
@@ -611,10 +611,10 @@ MidiRegionView::motion (GdkEventMotion* ev)
_mouse_state = AddDragging;
if (_ghost_note){
-
+
delete _ghost_note;
_ghost_note = 0;
-
+
trackview.editor().verbose_cursor()->hide ();
}
@@ -640,7 +640,7 @@ MidiRegionView::motion (GdkEventMotion* ev)
}
if (_drag_rect) {
-
+
if (event_x > _drag_start_x){
_drag_rect->property_x2() = event_x;
}
@@ -650,7 +650,7 @@ MidiRegionView::motion (GdkEventMotion* ev)
}
if (_drag_rect && _mouse_state == SelectRectDragging) {
-
+
if (event_y > _drag_start_y){
_drag_rect->property_y2() = event_y;
}
@@ -685,95 +685,95 @@ MidiRegionView::scroll (GdkEventScroll* ev)
trackview.editor().verbose_cursor()->hide ();
bool fine = !Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier);
-
+
if (ev->direction == GDK_SCROLL_UP) {
change_velocities (true, fine, false);
} else if (ev->direction == GDK_SCROLL_DOWN) {
change_velocities (false, fine, false);
- }
+ }
return true;
}
bool
MidiRegionView::key_press (GdkEventKey* ev)
-{
+{
/* since GTK bindings are generally activated on press, and since
detectable auto-repeat is the name of the game and only sends
repeated presses, carry out key actions at key press, not release.
*/
-
+
if (ev->keyval == GDK_Alt_L || ev->keyval == GDK_Alt_R){
_mouse_state = SelectTouchDragging;
return true;
-
+
} else if (ev->keyval == GDK_Escape) {
clear_selection();
_mouse_state = None;
-
+
} else if (ev->keyval == GDK_comma || ev->keyval == GDK_period) {
-
+
bool start = (ev->keyval == GDK_comma);
bool end = (ev->keyval == GDK_period);
bool shorter = Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier);
bool fine = Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier);
-
+
change_note_lengths (fine, shorter, 0.0, start, end);
-
+
return true;
-
+
} else if (ev->keyval == GDK_Delete) {
-
+
delete_selection();
return true;
-
+
} else if (ev->keyval == GDK_Tab) {
-
+
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
goto_previous_note ();
} else {
goto_next_note ();
}
return true;
-
+
} else if (ev->keyval == GDK_Up) {
-
+
bool allow_smush = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier);
bool fine = !Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier);
-
+
if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
change_velocities (true, fine, allow_smush);
} else {
transpose (true, fine, allow_smush);
}
return true;
-
+
} else if (ev->keyval == GDK_Down) {
-
+
bool allow_smush = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier);
bool fine = !Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier);
-
+
if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
change_velocities (false, fine, allow_smush);
} else {
transpose (false, fine, allow_smush);
}
return true;
-
+
} else if (ev->keyval == GDK_Left) {
-
+
nudge_notes (false);
return true;
-
+
} else if (ev->keyval == GDK_Right) {
-
+
nudge_notes (true);
return true;
-
+
} else if (ev->keyval == GDK_Control_L) {
return true;
}
-
+
return false;
}
@@ -870,7 +870,7 @@ void
MidiRegionView::display_model(boost::shared_ptr<MidiModel> model)
{
_model = model;
-
+
content_connection.disconnect ();
_model->ContentsChanged.connect (content_connection, invalidator (*this), boost::bind (&MidiRegionView::redisplay_model, this), gui_context());
@@ -952,10 +952,10 @@ MidiRegionView::apply_diff (bool as_subcommand)
} else {
_model->apply_command (*trackview.session(), _note_diff_command);
}
-
+
_note_diff_command = 0;
midi_view()->midi_track()->playlist_modified();
-
+
if (add_or_remove) {
_marked_for_selection.clear();
}
@@ -1081,7 +1081,7 @@ MidiRegionView::redisplay_model()
_patch_changes.clear();
_sys_exes.clear();
-
+
display_sysexes();
display_patch_changes ();
@@ -1117,7 +1117,7 @@ MidiRegionView::display_patch_changes_on_channel (uint8_t channel)
if ((*i)->channel() != channel) {
continue;
}
-
+
MIDI::Name::PatchPrimaryKey patch_key ((*i)->bank_msb (), (*i)->bank_lsb (), (*i)->program ());
boost::shared_ptr<MIDI::Name::Patch> patch =
@@ -1218,7 +1218,7 @@ MidiRegionView::reset_width_dependent_items (double pixel_width)
if (_enable_display) {
redisplay_model();
}
-
+
move_step_edit_cursor (_step_edit_cursor_position);
set_step_edit_cursor_width (_step_edit_cursor_width);
}
@@ -1238,7 +1238,7 @@ MidiRegionView::set_height (double height)
if (name_pixbuf) {
name_pixbuf->raise_to_top();
}
-
+
for (PatchChanges::iterator x = _patch_changes.begin(); x != _patch_changes.end(); ++x) {
(*x)->set_height (midi_stream_view()->contents_height());
}
@@ -1398,7 +1398,7 @@ MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note)
}
RouteUI* route_ui = dynamic_cast<RouteUI*> (&trackview);
-
+
if (!route_ui || !route_ui->midi_track()) {
return;
}
@@ -1416,7 +1416,7 @@ MidiRegionView::play_midi_chord (vector<boost::shared_ptr<NoteType> > notes)
}
RouteUI* route_ui = dynamic_cast<RouteUI*> (&trackview);
-
+
if (!route_ui || !route_ui->midi_track()) {
return;
}
@@ -1465,13 +1465,13 @@ MidiRegionView::update_note (CanvasNote* ev, bool update_ghost_regions)
ev->property_x1() = x;
ev->property_y1() = y1;
-
+
if (note->length() > 0) {
ev->property_x2() = note_endpixel;
} else {
ev->property_x2() = trackview.editor().frame_to_pixel(_region->length());
}
-
+
ev->property_y2() = y1 + floor(midi_stream_view()->note_height());
if (note->length() == 0) {
@@ -1573,7 +1573,7 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
if (_marked_for_velocity.find(note) != _marked_for_velocity.end()) {
event->show_velocity();
}
-
+
event->on_channel_selection_change(_last_channel_selection);
_events.push_back(event);
@@ -1583,7 +1583,7 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
event->hide ();
}
}
-
+
MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
MidiStreamView* const view = mtv->midi_view();
@@ -1604,7 +1604,7 @@ MidiRegionView::step_add_note (uint8_t channel, uint8_t number, uint8_t velocity
if (end_frame > region_end) {
_region->set_length (end_frame - _region->position());
}
-
+
MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
MidiStreamView* const view = mtv->midi_view();
@@ -1662,7 +1662,7 @@ MidiRegionView::get_patch_key_at (Evoral::MusicalTime time, uint8_t channel, MID
while (i != _model->patch_changes().end() && (*i)->channel() != channel) {
++i;
}
-
+
if (i != _model->patch_changes().end()) {
key.msb = (*i)->bank_msb ();
key.lsb = (*i)->bank_lsb ();
@@ -1670,7 +1670,7 @@ MidiRegionView::get_patch_key_at (Evoral::MusicalTime time, uint8_t channel, MID
} else {
key.msb = key.lsb = key.program_number = 0;
}
-
+
assert (key.is_sane());
}
@@ -1679,7 +1679,7 @@ void
MidiRegionView::change_patch_change (CanvasPatchChange& pc, const MIDI::Name::PatchPrimaryKey& new_patch)
{
MidiModel::PatchChangeDiffCommand* c = _model->new_patch_change_diff_command (_("alter patch change"));
-
+
if (pc.patch()->program() != new_patch.program_number) {
c->change_program (pc.patch (), new_patch.program_number);
}
@@ -1699,7 +1699,7 @@ void
MidiRegionView::change_patch_change (MidiModel::PatchChangePtr old_change, const Evoral::PatchChange<Evoral::MusicalTime> & new_change)
{
MidiModel::PatchChangeDiffCommand* c = _model->new_patch_change_diff_command (_("alter patch change"));
-
+
if (old_change->time() != new_change.time()) {
c->change_time (old_change, new_change.time());
}
@@ -1707,7 +1707,7 @@ MidiRegionView::change_patch_change (MidiModel::PatchChangePtr old_change, const
if (old_change->channel() != new_change.channel()) {
c->change_channel (old_change, new_change.channel());
}
-
+
if (old_change->program() != new_change.program()) {
c->change_program (old_change, new_change.program());
}
@@ -1731,16 +1731,16 @@ void
MidiRegionView::add_patch_change (framecnt_t t, Evoral::PatchChange<Evoral::MusicalTime> const & patch)
{
MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
-
+
MidiModel::PatchChangeDiffCommand* c = _model->new_patch_change_diff_command (_("add patch change"));
c->add (MidiModel::PatchChangePtr (
new Evoral::PatchChange<Evoral::MusicalTime> (
frames_to_beats (t + midi_region()->start()), mtv->get_channel_for_add(), patch.program(), patch.bank()
)
));
-
+
_model->apply_command (*trackview.session(), c);
-
+
_patch_changes.clear ();
display_patch_changes ();
}
@@ -1766,7 +1766,7 @@ MidiRegionView::delete_patch_change (CanvasPatchChange* pc)
_patch_changes.clear ();
display_patch_changes ();
}
-
+
void
MidiRegionView::previous_patch (CanvasPatchChange& patch)
{
@@ -1795,7 +1795,7 @@ MidiRegionView::maybe_remove_deleted_note_from_selection (CanvasNoteEvent* cne)
if (_selection.empty()) {
return;
}
-
+
if (_selection.erase (cne) > 0) {
cerr << "Erased a CNE from selection\n";
}
@@ -1936,12 +1936,12 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b
if (select) {
if ((cne = find_canvas_note (note)) != 0) {
- // extend is false because we've taken care of it,
+ // extend is false because we've taken care of it,
// since it extends by time range, not pitch.
note_selected (cne, add, false);
}
}
-
+
add = true; // we need to add all remaining matching notes, even if the passed in value was false (for "set")
}
@@ -2341,7 +2341,7 @@ MidiRegionView::begin_resizing (bool /*at_front*/)
/** Update resizing notes while user drags.
* @param primary `primary' note for the drag; ie the one that is used as the reference in non-relative mode.
* @param at_front which end of the note (true == note on, false == note off)
- * @param delta_x change in mouse position since the start of the drag
+ * @param delta_x change in mouse position since the start of the drag
* @param relative true if relative resizing is taking place, false if absolute resizing. This only makes
* a difference when multiple notes are being resized; in relative mode, each note's length is changed by the
* amount of the drag. In non-relative mode, all selected notes are set to have the same start or end point
@@ -2384,7 +2384,7 @@ MidiRegionView::update_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at
beats = snap_pixel_to_frame (current_x);
beats = frames_to_beats (beats);
-
+
double len;
if (at_front) {
@@ -2395,7 +2395,7 @@ MidiRegionView::update_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at
len = 0;
}
} else {
- if (beats >= canvas_note->note()->time()) {
+ if (beats >= canvas_note->note()->time()) {
len = beats - canvas_note->note()->time();
} else {
len = 0;
@@ -2490,8 +2490,8 @@ MidiRegionView::change_note_velocity(CanvasNoteEvent* event, int8_t velocity, bo
new_velocity = velocity;
}
- event->set_selected (event->selected()); // change color
-
+ event->set_selected (event->selected()); // change color
+
note_diff_add_change (event, MidiModel::NoteDiffCommand::Velocity, new_velocity);
}
@@ -2647,10 +2647,10 @@ MidiRegionView::change_velocities (bool up, bool fine, bool allow_smush)
}
apply_diff();
-
+
if (!_selection.empty()) {
char buf[24];
- snprintf (buf, sizeof (buf), "Vel %d",
+ snprintf (buf, sizeof (buf), "Vel %d",
(int) (*_selection.begin())->note()->velocity());
show_verbose_cursor (buf, 10, 10);
}
@@ -2757,7 +2757,7 @@ MidiRegionView::nudge_notes (bool forward)
framepos_t distance;
if (trackview.editor().snap_mode() == Editing::SnapOff) {
-
+
/* grid is off - use nudge distance */
distance = trackview.editor().get_nudge_distance (ref_point, unused);
@@ -2821,7 +2821,7 @@ void
MidiRegionView::note_entered(ArdourCanvas::CanvasNoteEvent* ev)
{
Editor* editor = dynamic_cast<Editor*>(&trackview.editor());
-
+
_pre_enter_cursor = editor->get_canvas_cursor ();
if (_mouse_state == SelectTouchDragging) {
@@ -2866,7 +2866,7 @@ void
MidiRegionView::note_mouse_position (float x_fraction, float /*y_fraction*/, bool can_set_cursor)
{
Editor* editor = dynamic_cast<Editor*>(&trackview.editor());
-
+
if (x_fraction > 0.0 && x_fraction < 0.25) {
editor->set_canvas_cursor (editor->cursors()->left_side_trim);
} else if (x_fraction >= 0.75 && x_fraction < 1.0) {
@@ -2896,7 +2896,7 @@ MidiRegionView::set_frame_color()
} else {
f = fill_color;
}
-
+
if (!rect_visible) {
f = UINT_RGBA_CHANGE_A (f, 0);
}
@@ -2957,7 +2957,7 @@ MidiRegionView::cut_copy_clear (Editing::CutCopyOp op)
if (op != Copy) {
start_note_diff_command();
-
+
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
switch (op) {
case Copy:
@@ -2968,7 +2968,7 @@ MidiRegionView::cut_copy_clear (Editing::CutCopyOp op)
break;
}
}
-
+
apply_diff();
}
}
@@ -3018,7 +3018,7 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb)
(*mcb.notes().rbegin())->end_time(),
duration, pos, _region->position(),
paste_pos_beats, beat_delta));
-
+
clear_selection ();
for (int n = 0; n < (int) times; ++n) {
@@ -3052,7 +3052,7 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb)
}
apply_diff (true);
-
+
trackview.session()->commit_reversible_command ();
}
@@ -3145,7 +3145,7 @@ MidiRegionView::selection_as_notelist (Notes& selected, bool allow_all_if_none_s
had_selected = true;
}
}
-
+
if (allow_all_if_none_selected && !had_selected) {
for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
selected.insert ((*i)->note());
@@ -3157,10 +3157,10 @@ void
MidiRegionView::update_ghost_note (double x, double y)
{
MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
-
+
_last_ghost_x = x;
_last_ghost_y = y;
-
+
_note_group->w2i (x, y);
framepos_t const f = snap_pixel_to_frame (x);
@@ -3170,9 +3170,9 @@ MidiRegionView::update_ghost_note (double x, double y)
if (!success) {
beats = 1;
}
-
+
double length = frames_to_beats (snap_frame_to_frame (f + beats_to_frames (beats)) - f);
-
+
_ghost_note->note()->set_time (frames_to_beats (f + _region->start()));
_ghost_note->note()->set_length (length);
_ghost_note->note()->set_note (midi_stream_view()->y_to_note (y));
@@ -3208,7 +3208,7 @@ MidiRegionView::snap_changed ()
if (!_ghost_note) {
return;
}
-
+
create_ghost_note (_last_ghost_x, _last_ghost_y);
}
@@ -3251,7 +3251,7 @@ MidiRegionView::maybe_select_by_position (GdkEventButton* ev, double /*x*/, doub
PublicEditor& editor (trackview.editor());
editor.get_selection().add (this);
}
-}
+}
void
MidiRegionView::color_handler ()
@@ -3332,7 +3332,7 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt
/* we aren't actively being recorded to */
return;
}
-
+
boost::shared_ptr<MidiSource> src = w.lock ();
if (!src || src != midi_region()->midi_source()) {
/* recorded data was not destined for our source */
@@ -3343,7 +3343,7 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt
BeatsFramesConverter converter (trackview.session()->tempo_map(), mtv->midi_track()->get_capture_start_frame (0));
framepos_t back = max_framepos;
-
+
for (MidiBuffer::iterator i = buf->begin(); i != buf->end(); ++i) {
Evoral::MIDIEvent<MidiBuffer::TimeType> const ev (*i, false);
assert (ev.buffer ());
@@ -3364,7 +3364,7 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt
} else if (ev.note() > _current_range_max) {
midi_stream_view()->apply_note_range (_current_range_min, ev.note(), true);
}
-
+
} else if (ev.type() == MIDI_CMD_NOTE_OFF) {
resolve_note (ev.note (), time_beats);
}
@@ -3415,12 +3415,12 @@ void
MidiRegionView::show_verbose_cursor (boost::shared_ptr<NoteType> n) const
{
char buf[24];
- snprintf (buf, sizeof (buf), "%s (%d) Chn %d\nVel %d",
- Evoral::midi_note_name (n->note()).c_str(),
+ snprintf (buf, sizeof (buf), "%s (%d) Chn %d\nVel %d",
+ Evoral::midi_note_name (n->note()).c_str(),
(int) n->note (),
(int) n->channel() + 1,
(int) n->velocity());
-
+
show_verbose_cursor (buf, 10, 20);
}
@@ -3435,7 +3435,7 @@ MidiRegionView::show_verbose_cursor (string const & text, double xoffset, double
wy += yoffset;
/* Flip the cursor above the mouse pointer if it would overlap the bottom of the canvas */
-
+
double x1, y1, x2, y2;
trackview.editor().verbose_cursor()->canvas_item()->get_bounds (x1, y1, x2, y2);
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 7b9af4fe9c..2da45a7ce3 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -104,7 +104,7 @@ public:
void set_frame_color();
void color_handler ();
-
+
void show_step_edit_cursor (Evoral::MusicalTime pos);
void move_step_edit_cursor (Evoral::MusicalTime pos);
void hide_step_edit_cursor ();
@@ -270,13 +270,13 @@ public:
void selection_as_notelist (Notes& selected, bool allow_all_if_none_selected = false);
void enable_display (bool);
-
+
void set_channel_selector_scoped_note(ArdourCanvas::CanvasNoteEvent* note){ _channel_selection_scoped_note = note; }
ArdourCanvas::CanvasNoteEvent* channel_selector_scoped_note(){ return _channel_selection_scoped_note; }
void trim_front_starting ();
void trim_front_ending ();
-
+
protected:
/** Allows derived types to specify their visibility requirements
* to the TimeAxisViewItem parent class.
@@ -370,7 +370,7 @@ private:
Evoral::MusicalTime _step_edit_cursor_width;
Evoral::MusicalTime _step_edit_cursor_position;
ArdourCanvas::CanvasNoteEvent* _channel_selection_scoped_note;
-
+
/** A group used to temporarily reparent _note_group to during start trims, so
* that the notes don't move with the parent region view.
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 28401fc6d5..9cda418557 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -123,7 +123,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess,
_view = new MidiStreamView (*this);
ignore_toggle = false;
-
+
mute_button->set_active (false);
solo_button->set_active (false);
@@ -168,7 +168,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess,
/* ask for notifications of any new RegionViews */
_view->RegionViewAdded.connect (sigc::mem_fun(*this, &MidiTimeAxisView::region_view_added));
-
+
if (!_editor.have_idled()) {
/* first idle will do what we need */
} else {
@@ -254,7 +254,7 @@ MidiTimeAxisView::enter_internal_edit_mode ()
{
if (midi_view()) {
midi_view()->enter_internal_edit_mode ();
- }
+ }
}
void
@@ -272,7 +272,7 @@ MidiTimeAxisView::check_step_edit ()
_step_editor->check_step_edit ();
}
-void
+void
MidiTimeAxisView::model_changed()
{
std::list<std::string> device_modes = MIDI::Name::MidiPatchManager::instance()
@@ -397,7 +397,7 @@ MidiTimeAxisView::build_automation_action_menu (bool for_selection)
controller_menu's gobj, meaning that it can't be reattached
below. See bug #3134.
*/
-
+
if (controller_menu) {
detach_menu (*controller_menu);
}
@@ -406,7 +406,7 @@ MidiTimeAxisView::build_automation_action_menu (bool for_selection)
RouteTimeAxisView::build_automation_action_menu (for_selection);
MenuList& automation_items = automation_action_menu->items();
-
+
uint16_t selected_channels = _channel_selector.get_selected_channels();
if (selected_channels != 0) {
@@ -423,14 +423,14 @@ MidiTimeAxisView::build_automation_action_menu (bool for_selection)
automation_items.back().set_sensitive (!for_selection || _editor.get_selection().tracks.size() == 1);
add_channel_command_menu_item (automation_items, _("Pressure"), MidiChannelPressureAutomation, 0);
automation_items.back().set_sensitive (!for_selection || _editor.get_selection().tracks.size() == 1);
-
+
/* now all MIDI controllers. Always offer the possibility that we will rebuild the controllers menu
since it might need to be updated after a channel mode change or other change. Also detach it
first in case it has been used anywhere else.
*/
-
+
build_controller_menu ();
-
+
automation_items.push_back (SeparatorElem());
automation_items.push_back (MenuElem (_("Controllers"), *controller_menu));
automation_items.back().set_sensitive (!for_selection || _editor.get_selection().tracks.size() == 1);
@@ -438,17 +438,17 @@ MidiTimeAxisView::build_automation_action_menu (bool for_selection)
automation_items.push_back (MenuElem (string_compose ("<i>%1</i>", _("No MIDI Channels selected"))));
dynamic_cast<Label*> (automation_items.back().get_child())->set_use_markup (true);
}
-
+
}
void
MidiTimeAxisView::change_all_channel_tracks_visibility (bool yn, Evoral::Parameter param)
{
uint16_t selected_channels = _channel_selector.get_selected_channels();
-
+
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
-
+
Evoral::Parameter fully_qualified_param (param.type(), chn, param.id());
Gtk::CheckMenuItem* menu = automation_child_menu_item (fully_qualified_param);
@@ -469,7 +469,7 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
uint16_t selected_channels = _channel_selector.get_selected_channels();
int chn_cnt = 0;
-
+
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
if (++chn_cnt > 1) {
@@ -477,11 +477,11 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
}
}
}
-
+
if (chn_cnt > 1) {
-
+
/* multiple channels - create a submenu, with 1 item per channel */
-
+
Menu* chn_menu = manage (new Menu);
MenuList& chn_items (chn_menu->items());
Evoral::Parameter param_without_channel (auto_type, 0, cmd);
@@ -489,25 +489,25 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
/* add a couple of items to hide/show all of them */
chn_items.push_back (MenuElem (_("Hide all channels"),
- sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
+ sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
false, param_without_channel)));
chn_items.push_back (MenuElem (_("Show all channels"),
- sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
+ sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
true, param_without_channel)));
-
+
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
-
+
/* for each selected channel, add a menu item for this controller */
-
+
Evoral::Parameter fully_qualified_param (auto_type, chn, cmd);
chn_items.push_back (CheckMenuElem (string_compose (_("Channel %1"), chn+1),
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::toggle_automation_track),
fully_qualified_param)));
-
+
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (fully_qualified_param);
bool visible = false;
-
+
if (track) {
if (track->marked_for_display()) {
visible = true;
@@ -519,36 +519,36 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
cmi->set_active (visible);
}
}
-
+
/* now create an item in the parent menu that has the per-channel list as a submenu */
-
+
items.push_back (MenuElem (label, *chn_menu));
-
+
} else {
-
+
/* just one channel - create a single menu item for this command+channel combination*/
-
+
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
-
+
Evoral::Parameter fully_qualified_param (auto_type, chn, cmd);
items.push_back (CheckMenuElem (label,
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::toggle_automation_track),
fully_qualified_param)));
-
+
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (fully_qualified_param);
bool visible = false;
-
+
if (track) {
if (track->marked_for_display()) {
visible = true;
}
}
-
+
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&items.back());
_channel_command_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
-
+
/* one channel only */
break;
}
@@ -569,7 +569,7 @@ MidiTimeAxisView::build_controller_menu ()
controller_menu = new Menu; // explicitly managed by us
MenuList& items (controller_menu->items());
- /* create several "top level" menu items for sets of controllers (16 at a time), and populate each one with a submenu
+ /* create several "top level" menu items for sets of controllers (16 at a time), and populate each one with a submenu
for each controller+channel combination covering the currently selected channels for this track
*/
@@ -579,7 +579,7 @@ MidiTimeAxisView::build_controller_menu ()
*/
int chn_cnt = 0;
-
+
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
if (++chn_cnt > 1) {
@@ -587,7 +587,7 @@ MidiTimeAxisView::build_controller_menu ()
}
}
}
-
+
/* loop over all 127 MIDI controllers, in groups of 16; except don't offer
bank select controllers, as they are handled by the `patch' code */
@@ -613,20 +613,20 @@ MidiTimeAxisView::build_controller_menu ()
MenuList& chn_items (chn_menu->items());
/* add a couple of items to hide/show this controller on all channels */
-
+
Evoral::Parameter param_without_channel (MidiCCAutomation, 0, ctl);
chn_items.push_back (MenuElem (_("Hide all channels"),
- sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
+ sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
false, param_without_channel)));
chn_items.push_back (MenuElem (_("Show all channels"),
- sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
+ sigc::bind (sigc::mem_fun (*this, &MidiTimeAxisView::change_all_channel_tracks_visibility),
true, param_without_channel)));
-
+
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
-
+
/* for each selected channel, add a menu item for this controller */
-
+
Evoral::Parameter fully_qualified_param (MidiCCAutomation, chn, ctl);
chn_items.push_back (CheckMenuElem (string_compose (_("Channel %1"), chn+1),
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::toggle_automation_track),
@@ -634,30 +634,30 @@ MidiTimeAxisView::build_controller_menu ()
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (fully_qualified_param);
bool visible = false;
-
+
if (track) {
if (track->marked_for_display()) {
visible = true;
}
}
-
+
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&chn_items.back());
_controller_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
}
}
-
+
/* add the per-channel menu to the list of controllers, with the name of the controller */
ctl_items.push_back (MenuElem (string_compose ("<b>%1</b>: %2", ctl, midi_name (ctl)), *chn_menu));
dynamic_cast<Label*> (ctl_items.back().get_child())->set_use_markup (true);
-
+
} else {
/* just one channel - create a single menu item for this ctl+channel combination*/
for (uint8_t chn = 0; chn < 16; chn++) {
if (selected_channels & (0x0001 << chn)) {
-
+
Evoral::Parameter fully_qualified_param (MidiCCAutomation, chn, ctl);
ctl_items.push_back (
CheckMenuElem (
@@ -667,27 +667,27 @@ MidiTimeAxisView::build_controller_menu ()
)
);
dynamic_cast<Label*> (ctl_items.back().get_child())->set_use_markup (true);
-
+
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (fully_qualified_param);
bool visible = false;
-
+
if (track) {
if (track->marked_for_display()) {
visible = true;
}
}
-
+
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&ctl_items.back());
_controller_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
-
+
/* one channel only */
break;
}
}
}
}
-
+
/* add the menu for this block of controllers to the overall controller menu */
items.push_back (MenuElem (string_compose (_("Controllers %1-%2"), i, i+15), *ctl_menu));
@@ -765,13 +765,13 @@ MidiTimeAxisView::set_color_mode (ColorMode mode, bool force, bool redisplay)
if (_color_mode == mode && !force) {
return;
}
-
+
if (mode == ChannelColors) {
_channel_selector.set_channel_colors(CanvasNoteEvent::midi_channel_colors);
} else {
_channel_selector.set_default_channel_color();
}
-
+
_color_mode = mode;
xml_node->add_property ("color-mode", enum_2_string(_color_mode));
if (redisplay) {
@@ -807,12 +807,12 @@ MidiTimeAxisView::show_all_automation (bool apply_to_selection)
} else {
if (midi_track()) {
const set<Evoral::Parameter> params = midi_track()->midi_playlist()->contained_automation();
-
+
for (set<Evoral::Parameter>::const_iterator i = params.begin(); i != params.end(); ++i) {
create_automation_child(*i, true);
}
}
-
+
RouteTimeAxisView::show_all_automation ();
}
}
@@ -825,12 +825,12 @@ MidiTimeAxisView::show_existing_automation (bool apply_to_selection)
} else {
if (midi_track()) {
const set<Evoral::Parameter> params = midi_track()->midi_playlist()->contained_automation();
-
+
for (set<Evoral::Parameter>::const_iterator i = params.begin(); i != params.end(); ++i) {
create_automation_child(*i, true);
}
}
-
+
RouteTimeAxisView::show_existing_automation ();
}
}
@@ -844,23 +844,23 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
cerr << "WARNING: Attempt to create NullAutomation child, ignoring" << endl;
return;
}
-
+
AutomationTracks::iterator existing = _automation_tracks.find (param);
if (existing != _automation_tracks.end()) {
return;
}
-
+
if (param.type() == GainAutomation) {
create_gain_automation_child (param, show);
} else {
-
+
/* These controllers are region "automation", so we do not create
* an AutomationList/Line for the track */
-
+
boost::shared_ptr<AutomationTimeAxisView> track (
new AutomationTimeAxisView (
_session,
- _route,
+ _route,
boost::shared_ptr<Automatable> (),
boost::shared_ptr<AutomationControl> (),
param,
@@ -875,7 +875,7 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
if (_view) {
_view->foreach_regionview (sigc::mem_fun (*track.get(), &TimeAxisView::add_ghost));
}
-
+
add_automation_child (param, track, show);
}
}
@@ -1001,9 +1001,9 @@ MidiTimeAxisView::set_channel_mode (ChannelMode, uint16_t)
if (!track) {
continue;
}
-
+
if ((selected_channels & (0x0001 << chn)) == 0) {
- /* channel not in use. hiding it will trigger RouteTimeAxisView::automation_track_hidden()
+ /* channel not in use. hiding it will trigger RouteTimeAxisView::automation_track_hidden()
which will cause a redraw. We don't want one per channel, so block that with no_redraw.
*/
changed = track->set_visibility (false) || changed;
@@ -1057,17 +1057,17 @@ MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
playlist()->clear_changes ();
real_editor->snap_to (pos, 0);
-
+
boost::shared_ptr<Source> src = _session->create_midi_source_for_session (view()->trackview().track().get(),
view()->trackview().track()->name());
- PropertyList plist;
-
+ PropertyList plist;
+
plist.add (ARDOUR::Properties::start, 0);
plist.add (ARDOUR::Properties::length, length);
plist.add (ARDOUR::Properties::name, PBD::basename_nosuffix(src->name()));
-
+
boost::shared_ptr<Region> region = (RegionFactory::create (src, plist));
-
+
playlist()->add_region (region, pos);
_session->add_command (new StatefulDiffCommand (playlist()));
@@ -1086,14 +1086,14 @@ MidiTimeAxisView::ensure_step_editor ()
}
}
-void
+void
MidiTimeAxisView::start_step_editing ()
{
ensure_step_editor ();
_step_editor->start_step_editing ();
}
-void
+void
MidiTimeAxisView::stop_step_editing ()
{
if (_step_editor) {
diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h
index 032db50b36..485425e966 100644
--- a/gtk2_ardour/midi_time_axis.h
+++ b/gtk2_ardour/midi_time_axis.h
@@ -71,7 +71,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
void enter_internal_edit_mode ();
void leave_internal_edit_mode ();
-
+
boost::shared_ptr<ARDOUR::MidiRegion> add_region (ARDOUR::framepos_t, ARDOUR::framecnt_t, bool);
void show_all_automation (bool apply_to_selection = false);
@@ -91,7 +91,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
return _midi_patch_settings_changed;
}
-
+
const MidiMultipleChannelSelector& channel_selector() { return _channel_selector; }
Gtk::CheckMenuItem* automation_child_menu_item (Evoral::Parameter);
@@ -102,7 +102,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
void first_idle ();
uint8_t get_channel_for_add () const;
-
+
protected:
void start_step_editing ();
void stop_step_editing ();
diff --git a/gtk2_ardour/midi_tracer.cc b/gtk2_ardour/midi_tracer.cc
index 51c9ae174f..f09be50231 100644
--- a/gtk2_ardour/midi_tracer.cc
+++ b/gtk2_ardour/midi_tracer.cc
@@ -54,7 +54,7 @@ MidiTracer::MidiTracer ()
get_vbox()->set_spacing (4);
Manager::instance()->PortsChanged.connect (_manager_connection, invalidator (*this), boost::bind (&MidiTracer::ports_changed, this), gui_context());
-
+
HBox* pbox = manage (new HBox);
pbox->pack_start (*manage (new Label (_("Port:"))), false, false);
@@ -62,11 +62,11 @@ MidiTracer::MidiTracer ()
pbox->pack_start (_port_combo);
pbox->show_all ();
get_vbox()->pack_start (*pbox, false, false);
-
+
scroller.add (text);
get_vbox()->set_border_width (12);
get_vbox()->pack_start (scroller, true, true);
-
+
text.show ();
text.set_name ("MidiTracerTextView");
scroller.show ();
@@ -91,7 +91,7 @@ MidiTracer::MidiTracer ()
bbox->add (collect_button);
bbox->add (autoscroll_button);
bbox->show ();
-
+
get_action_area()->add (*bbox);
base_button.signal_toggled().connect (sigc::mem_fun (*this, &MidiTracer::base_toggle));
@@ -116,7 +116,7 @@ MidiTracer::ports_changed ()
{
string const c = _port_combo.get_active_text ();
_port_combo.clear ();
-
+
Manager::PortList const & p = Manager::instance()->get_midi_ports ();
for (Manager::PortList::const_iterator i = p.begin(); i != p.end(); ++i) {
_port_combo.append_text ((*i)->name());
@@ -172,7 +172,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d %-3d\n", "NoteOff", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
}
break;
-
+
case on:
if (show_hex) {
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x %02x\n", "NoteOn", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
@@ -180,7 +180,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d %-3d\n", "NoteOn", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
}
break;
-
+
case polypress:
if (show_hex) {
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x\n", "PolyPressure", (msg[0]&0xf)+1, (int) msg[1]);
@@ -188,7 +188,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d\n", "PolyPressure", (msg[0]&0xf)+1, (int) msg[1]);
}
break;
-
+
case MIDI::controller:
if (show_hex) {
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x %02x\n", "Controller", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
@@ -196,7 +196,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %2d %-3d\n", "Controller", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
}
break;
-
+
case program:
if (show_hex) {
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x\n", "Program Change", (msg[0]&0xf)+1, (int) msg[1]);
@@ -204,7 +204,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d\n", "Program Change", (msg[0]&0xf)+1, (int) msg[1]);
}
break;
-
+
case chanpress:
if (show_hex) {
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x/%-3d\n", "Channel Pressure", (msg[0]&0xf)+1, (int) msg[1], (int) msg[1]);
@@ -212,7 +212,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x/%-3d\n", "Channel Pressure", (msg[0]&0xf)+1, (int) msg[1], (int) msg[1]);
}
break;
-
+
case MIDI::pitchbend:
if (show_hex) {
s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x\n", "Pitch Bend", (msg[0]&0xf)+1, (int) msg[1]);
@@ -220,7 +220,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d\n", "Pitch Bend", (msg[0]&0xf)+1, (int) msg[1]);
}
break;
-
+
case MIDI::sysex:
if (len == 1) {
switch (msg[0]) {
@@ -245,7 +245,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
default:
s += snprintf (&buf[s], bufsize, "%16s %02x\n", "Sysex", (int) msg[1]);
break;
- }
+ }
} else if (len > 5 && msg[0] == 0xf0 && msg[1] == 0x7f && msg[3] == 0x06) {
/* MMC */
@@ -274,7 +274,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, " MMC command %02x\n", cmd);
}
}
-
+
} else if (len == 10 && msg[0] == 0xf0 && msg[1] == 0x7f && msg[9] == 0xf7) {
/* MTC full frame */
@@ -283,12 +283,12 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
);
} else {
-
+
/* other sys-ex */
-
+
s += snprintf (&buf[s], bufsize, "%16s (%d) = [", "Sysex", (int) len);
bufsize -= s;
-
+
for (unsigned int i = 0; i < len && bufsize > 3; ++i) {
if (i > 0) {
s += snprintf (&buf[s], bufsize, " %02x", msg[i]);
@@ -300,39 +300,39 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
s += snprintf (&buf[s], bufsize, "]\n");
}
break;
-
+
case MIDI::song:
s += snprintf (&buf[s], bufsize, "%16s\n", "Song");
break;
-
+
case MIDI::tune:
s += snprintf (&buf[s], bufsize, "%16s\n", "Tune");
break;
-
+
case MIDI::eox:
s += snprintf (&buf[s], bufsize, "%16s\n", "EOX");
break;
-
+
case MIDI::timing:
s += snprintf (&buf[s], bufsize, "%16s\n", "Timing");
break;
-
+
case MIDI::start:
s += snprintf (&buf[s], bufsize, "%16s\n", "Start");
break;
-
+
case MIDI::stop:
s += snprintf (&buf[s], bufsize, "%16s\n", "Stop");
break;
-
+
case MIDI::contineu:
s += snprintf (&buf[s], bufsize, "%16s\n", "Continue");
break;
-
+
case active:
s += snprintf (&buf[s], bufsize, "%16s\n", "Active Sense");
break;
-
+
default:
s += snprintf (&buf[s], bufsize, "%16s\n", "Unknown");
break;
diff --git a/gtk2_ardour/midi_tracer.h b/gtk2_ardour/midi_tracer.h
index b37c4a2351..8383b616a0 100644
--- a/gtk2_ardour/midi_tracer.h
+++ b/gtk2_ardour/midi_tracer.h
@@ -37,20 +37,20 @@ class MidiTracer : public ArdourDialog
bool autoscroll;
bool show_hex;
bool collect;
-
+
/** Incremented when an update is requested, decremented when one is handled; hence
* equal to 0 when an update is not queued. May temporarily be negative if a
* update is handled before it was noted that it had just been queued.
*/
volatile gint _update_queued;
-
+
RingBuffer<char *> fifo;
Pool buffer_pool;
static const size_t buffer_size = 256;
void tracer (MIDI::Parser&, MIDI::byte*, size_t);
void update ();
-
+
Gtk::CheckButton autoscroll_button;
Gtk::CheckButton base_button;
Gtk::CheckButton collect_button;
diff --git a/gtk2_ardour/missing_file_dialog.cc b/gtk2_ardour/missing_file_dialog.cc
index c73fc51512..9d5712ee61 100644
--- a/gtk2_ardour/missing_file_dialog.cc
+++ b/gtk2_ardour/missing_file_dialog.cc
@@ -82,7 +82,7 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT
button_packer_box->pack_start (stop_loading_button, false, false);
button_packer_box->show_all ();
-
+
get_vbox()->set_spacing (6);
get_vbox()->set_border_width (25);
get_vbox()->set_homogeneous (false);
@@ -140,8 +140,8 @@ MissingFileDialog::add_chosen ()
if (!str.empty()) {
str += ':';
- }
-
+ }
+
str += newdir;
switch (filetype) {
diff --git a/gtk2_ardour/missing_plugin_dialog.cc b/gtk2_ardour/missing_plugin_dialog.cc
index 971343cd9d..f6a4c73294 100755
--- a/gtk2_ardour/missing_plugin_dialog.cc
+++ b/gtk2_ardour/missing_plugin_dialog.cc
@@ -44,7 +44,7 @@ MissingPluginDialog::MissingPluginDialog (Session * s, list<string> const & plug
t << "\nThose plugins and any following them on a track or buss have been disabled, and will be hidden.\n";
t << "It is recommended that you install the missing plugins and re-load the session.\n";
-
+
m->set_markup (t.str ());
get_vbox()->pack_start (*m, false, false);
diff --git a/gtk2_ardour/mixer_group_tabs.cc b/gtk2_ardour/mixer_group_tabs.cc
index a948fe1b61..6c97a8f043 100644
--- a/gtk2_ardour/mixer_group_tabs.cc
+++ b/gtk2_ardour/mixer_group_tabs.cc
@@ -100,10 +100,10 @@ MixerGroupTabs::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, tab.from + (tab.to - tab.from - f.second) / 2, _height - ext.height / 2);
cairo_save (cr);
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 71a3662f91..39f8b4580d 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -203,12 +203,12 @@ MixerStrip::init ()
_iso_label = manage (new Label (_("iso")));
_safe_label = manage (new Label (_("lock")));
-
+
_iso_label->set_name (X_("SoloLEDLabel"));
_safe_label->set_name (X_("SoloLEDLabel"));
_iso_label->show ();
- _safe_label->show ();
+ _safe_label->show ();
solo_led_table.set_spacings (0);
solo_led_table.set_border_width (1);
@@ -411,13 +411,13 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
}
if (is_track ()) {
-
+
below_panner_box.pack_start (*rec_enable_button);
rec_enable_button->set_sensitive (_session->writable());
rec_enable_button->show();
} else {
-
+
/* non-master bus */
if (!_route->is_master()) {
@@ -589,14 +589,14 @@ MixerStrip::set_width_enum (Width w, void* owner)
_iso_label->hide ();
_safe_label->hide ();
-
+
Gtkmm2ext::set_size_request_to_display_given_text (name_button, longest_label.c_str(), 2, 2);
set_size_request (max (50, gpm.get_gm_width()), -1);
break;
}
processor_box.set_width (w);
-
+
update_input_display ();
update_output_display ();
route_group_changed ();
@@ -656,7 +656,7 @@ MixerStrip::output_press (GdkEventButton *ev)
boost::shared_ptr<ARDOUR::BundleList> b = _session->bundles ();
/* give user bundles first chance at being in the menu */
-
+
for (ARDOUR::BundleList::iterator i = b->begin(); i != b->end(); ++i) {
if (boost::dynamic_pointer_cast<UserBundle> (*i)) {
maybe_add_bundle_to_output_menu (*i, current);
@@ -668,7 +668,7 @@ MixerStrip::output_press (GdkEventButton *ev)
maybe_add_bundle_to_output_menu (*i, current);
}
}
-
+
boost::shared_ptr<ARDOUR::RouteList> routes = _session->get_routes ();
RouteList copy = *routes;
copy.sort (RouteCompareByName ());
@@ -695,7 +695,7 @@ void
MixerStrip::edit_output_configuration ()
{
if (output_selector == 0) {
-
+
boost::shared_ptr<Send> send;
boost::shared_ptr<IO> output;
@@ -704,11 +704,11 @@ MixerStrip::edit_output_configuration ()
output = send->output();
} else {
output = _route->output ();
- }
+ }
} else {
output = _route->output ();
}
-
+
output_selector = new IOSelectorWindow (_session, output);
}
@@ -748,7 +748,7 @@ MixerStrip::input_press (GdkEventButton *ev)
return true;
}
- if (_session->actively_recording() && _route->record_enabled())
+ if (_session->actively_recording() && _route->record_enabled())
return true;
switch (ev->button) {
@@ -768,7 +768,7 @@ MixerStrip::input_press (GdkEventButton *ev)
boost::shared_ptr<ARDOUR::BundleList> b = _session->bundles ();
/* give user bundles first chance at being in the menu */
-
+
for (ARDOUR::BundleList::iterator i = b->begin(); i != b->end(); ++i) {
if (boost::dynamic_pointer_cast<UserBundle> (*i)) {
maybe_add_bundle_to_input_menu (*i, current);
@@ -780,7 +780,7 @@ MixerStrip::input_press (GdkEventButton *ev)
maybe_add_bundle_to_input_menu (*i, current);
}
}
-
+
boost::shared_ptr<ARDOUR::RouteList> routes = _session->get_routes ();
RouteList copy = *routes;
copy.sort (RouteCompareByName ());
@@ -887,7 +887,7 @@ MixerStrip::maybe_add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, ARDOUR
}
output_menu_bundles.push_back (b);
-
+
MenuList& citems = output_menu.items();
std::string n = b->name ();
@@ -1022,7 +1022,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
} else {
port = route->output()->nth (io_index);
}
-
+
port_connections.clear ();
port->get_connections(port_connections);
io_connection_count = 0;
@@ -1195,12 +1195,12 @@ MixerStrip::comment_editor_done_editing ()
ignore_toggle = true;
_comment_menu_item->set_active (false);
ignore_toggle = false;
-
+
string const str = comment_area->get_buffer()->get_text();
if (str == _route->comment ()) {
return;
}
-
+
_route->set_comment (str, this);
}
@@ -1210,7 +1210,7 @@ MixerStrip::toggle_comment ()
if (ignore_toggle) {
return;
}
-
+
if (comment_window == 0) {
setup_comment_editor ();
}
@@ -1511,7 +1511,7 @@ MixerStrip::reset_strip_style ()
gpm.set_fader_name ("SendStripBase");
} else {
-
+
if (is_midi_track()) {
if (_route->active()) {
set_name ("MidiTrackStripBase");
@@ -1539,7 +1539,7 @@ MixerStrip::reset_strip_style ()
gpm.set_meter_strip_name ("AudioBusMetricsInactive");
}
gpm.set_fader_name ("AudioBusFader");
-
+
/* (no MIDI busses yet) */
}
}
diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h
index ab96d9d71e..a24df01696 100644
--- a/gtk2_ardour/mixer_strip.h
+++ b/gtk2_ardour/mixer_strip.h
@@ -271,10 +271,10 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void engine_stopped();
void switch_io (boost::shared_ptr<ARDOUR::Route>);
-
+
void set_current_delivery (boost::shared_ptr<ARDOUR::Delivery>);
boost::shared_ptr<ARDOUR::Delivery> _current_delivery;
-
+
void drop_send ();
PBD::ScopedConnection send_gone_connection;
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 295e956060..23cb790e41 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -512,7 +512,7 @@ Mixer_UI::session_going_away ()
_in_group_rebuild_or_clear = true;
group_model->clear ();
_in_group_rebuild_or_clear = false;
-
+
_selection.clear ();
track_model->clear ();
@@ -1133,7 +1133,7 @@ void
Mixer_UI::new_route_group ()
{
RouteList rl;
-
+
_group_tabs->run_new_group_dialog (rl);
}
@@ -1521,7 +1521,7 @@ Mixer_UI::pane_allocation_handler (Allocation&, Gtk::Paned* which)
}
}
void
-Mixer_UI::scroll_left ()
+Mixer_UI::scroll_left ()
{
Adjustment* adj = scroller.get_hscrollbar()->get_adjustment();
/* stupid GTK: can't rely on clamping across versions */
@@ -1668,7 +1668,7 @@ Mixer_UI::setup_track_display ()
b->add (*w);
b->signal_clicked().connect (sigc::mem_fun (*this, &Mixer_UI::new_track_or_bus));
-
+
v->pack_start (*b, false, false);
track_display_frame.set_name("BaseFrame");
diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc
index f72e04ea5a..c4729a857b 100644
--- a/gtk2_ardour/monitor_section.cc
+++ b/gtk2_ardour/monitor_section.cc
@@ -43,7 +43,7 @@ MonitorSection::MonitorSection (Session* s)
, dim_control (0)
, solo_boost_adjustment (1.0, 1.0, 3.0, 0.01, 0.1) // upper and lower will be reset to match model
, solo_boost_control (0)
- , solo_cut_adjustment (0.0, 0.0, 1.0, 0.01, 0.1)
+ , solo_cut_adjustment (0.0, 0.0, 1.0, 0.01, 0.1)
, solo_cut_control (0)
, solo_in_place_button (solo_model_group, _("SiP"))
, afl_button (solo_model_group, _("AFL"))
@@ -66,7 +66,7 @@ MonitorSection::MonitorSection (Session* s)
register_actions ();
}
-
+
set_session (s);
VBox* spin_packer;
@@ -84,7 +84,7 @@ MonitorSection::MonitorSection (Session* s)
spin_packer->show ();
spin_packer->set_spacing (6);
spin_packer->pack_start (*dim_control, false, false);
- spin_packer->pack_start (*spin_label, false, false);
+ spin_packer->pack_start (*spin_label, false, false);
dim_packer->set_spacing (12);
dim_packer->pack_start (*spin_packer, true, true);
@@ -124,17 +124,17 @@ MonitorSection::MonitorSection (Session* s)
act = ActionManager::get_action (X_("Solo"), X_("solo-use-in-place"));
if (act) {
act->connect_proxy (solo_in_place_button);
- }
+ }
act = ActionManager::get_action (X_("Solo"), X_("solo-use-afl"));
if (act) {
act->connect_proxy (afl_button);
- }
+ }
act = ActionManager::get_action (X_("Solo"), X_("solo-use-pfl"));
if (act) {
act->connect_proxy (pfl_button);
- }
+ }
/* Solo Boost */
@@ -149,7 +149,7 @@ MonitorSection::MonitorSection (Session* s)
spin_packer->show ();
spin_packer->set_spacing (6);
spin_packer->pack_start (*solo_boost_control, false, false);
- spin_packer->pack_start (*spin_label, false, false);
+ spin_packer->pack_start (*spin_label, false, false);
solo_packer->pack_start (*spin_packer, true, true);
@@ -162,7 +162,7 @@ MonitorSection::MonitorSection (Session* s)
spin_packer->show ();
spin_packer->set_spacing (6);
spin_packer->pack_start (*solo_cut_control, false, false);
- spin_packer->pack_start (*spin_label, false, false);
+ spin_packer->pack_start (*spin_label, false, false);
solo_packer->pack_start (*spin_packer, true, true);
@@ -172,15 +172,15 @@ MonitorSection::MonitorSection (Session* s)
act = ActionManager::get_action (X_("Monitor"), X_("toggle-exclusive-solo"));
if (act) {
act->connect_proxy (exclusive_solo_button);
- }
+ }
solo_mute_override_button.set_name (X_("MonitorOptButton"));
ARDOUR_UI::instance()->set_tip (&solo_mute_override_button, _("If enabled, solo will override mute\n(a soloed & muted track or bus will be audible)"));
-
+
act = ActionManager::get_action (X_("Monitor"), X_("toggle-mute-overrides-solo"));
if (act) {
act->connect_proxy (solo_mute_override_button);
- }
+ }
HBox* solo_opt_box = manage (new HBox);
solo_opt_box->set_spacing (12);
@@ -188,7 +188,7 @@ MonitorSection::MonitorSection (Session* s)
solo_opt_box->pack_start (exclusive_solo_button);
solo_opt_box->pack_start (solo_mute_override_button);
solo_opt_box->show ();
-
+
upper_packer.set_spacing (12);
Gtk::HBox* rude_box = manage (new HBox);
@@ -204,17 +204,17 @@ MonitorSection::MonitorSection (Session* s)
act = ActionManager::get_action (X_("Monitor"), X_("monitor-cut-all"));
if (act) {
act->connect_proxy (cut_all_button);
- }
+ }
act = ActionManager::get_action (X_("Monitor"), X_("monitor-dim-all"));
if (act) {
act->connect_proxy (dim_all_button);
- }
+ }
act = ActionManager::get_action (X_("Monitor"), X_("monitor-mono"));
if (act) {
act->connect_proxy (mono_button);
- }
+ }
cut_all_button.set_name (X_("MonitorMuteButton"));
cut_all_button.unset_flags (Gtk::CAN_FOCUS);
@@ -313,12 +313,12 @@ MonitorSection::set_session (Session* s)
/* session with monitor section */
_monitor = _route->monitor_control ();
assign_controllables ();
- } else {
+ } else {
/* session with no monitor section */
_monitor.reset ();
_route.reset ();
}
-
+
} else {
/* no session */
@@ -363,7 +363,7 @@ MonitorSection::populate_buttons ()
Glib::RefPtr<Action> act;
uint32_t nchans = _monitor->output_streams().n_audio();
-
+
main_table.resize (nchans+1, 5);
main_table.set_col_spacings (6);
main_table.set_row_spacings (6);
@@ -383,7 +383,7 @@ MonitorSection::populate_buttons ()
const uint32_t row_offset = 1;
for (uint32_t i = 0; i < nchans; ++i) {
-
+
string l;
char buf[64];
@@ -407,15 +407,15 @@ MonitorSection::populate_buttons ()
_channel_buttons.push_back (cbs);
main_table.attach (cbs->cut, 1, 2, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
- main_table.attach (cbs->dim, 2, 3, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
+ main_table.attach (cbs->dim, 2, 3, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
main_table.attach (cbs->solo, 3, 4, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
main_table.attach (cbs->invert, 4, 5, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
-
+
snprintf (buf, sizeof (buf), "monitor-cut-%u", i+1);
act = ActionManager::get_action (X_("Monitor"), buf);
if (act) {
act->connect_proxy (cbs->cut);
- }
+ }
snprintf (buf, sizeof (buf), "monitor-dim-%u", i+1);
act = ActionManager::get_action (X_("Monitor"), buf);
@@ -439,7 +439,7 @@ MonitorSection::populate_buttons ()
main_table.show_all ();
}
-void
+void
MonitorSection::set_button_names ()
{
rec_enable_button_label.set_text ("rec");
@@ -595,7 +595,7 @@ MonitorSection::invert_channel (uint32_t chn)
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
_monitor->set_polarity (chn, tact->get_active());
- }
+ }
}
void
@@ -608,24 +608,24 @@ MonitorSection::register_actions ()
monitor_actions = ActionGroup::create (X_("Monitor"));
ActionManager::add_action_group (monitor_actions);
- ActionManager::register_toggle_action (monitor_actions, "monitor-mono", "", "Switch monitor to mono",
+ ActionManager::register_toggle_action (monitor_actions, "monitor-mono", "", "Switch monitor to mono",
sigc::mem_fun (*this, &MonitorSection::mono));
- ActionManager::register_toggle_action (monitor_actions, "monitor-cut-all", "", "Cut monitor",
+ ActionManager::register_toggle_action (monitor_actions, "monitor-cut-all", "", "Cut monitor",
sigc::mem_fun (*this, &MonitorSection::cut_all));
- ActionManager::register_toggle_action (monitor_actions, "monitor-dim-all", "", "Dim monitor",
+ ActionManager::register_toggle_action (monitor_actions, "monitor-dim-all", "", "Dim monitor",
sigc::mem_fun (*this, &MonitorSection::dim_all));
- act = ActionManager::register_toggle_action (monitor_actions, "toggle-exclusive-solo", "", "Toggle exclusive solo mode",
+ act = ActionManager::register_toggle_action (monitor_actions, "toggle-exclusive-solo", "", "Toggle exclusive solo mode",
sigc::mem_fun (*this, &MonitorSection::toggle_exclusive_solo));
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
tact->set_active (Config->get_exclusive_solo());
- act = ActionManager::register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", "", "Toggle mute overrides solo mode",
+ act = ActionManager::register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", "", "Toggle mute overrides solo mode",
sigc::mem_fun (*this, &MonitorSection::toggle_mute_overrides_solo));
-
+
tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
tact->set_active (Config->get_solo_mute_override());
@@ -636,22 +636,22 @@ MonitorSection::register_actions ()
action_name = string_compose (X_("monitor-cut-%1"), chn);
action_descr = string_compose (_("Cut monitor channel %1"), chn);
- ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
+ ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
sigc::bind (sigc::mem_fun (*this, &MonitorSection::cut_channel), chn));
action_name = string_compose (X_("monitor-dim-%1"), chn);
action_descr = string_compose (_("Dim monitor channel %1"), chn+1);
- ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
+ ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
sigc::bind (sigc::mem_fun (*this, &MonitorSection::dim_channel), chn));
action_name = string_compose (X_("monitor-solo-%1"), chn);
action_descr = string_compose (_("Solo monitor channel %1"), chn+1);
- ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
+ ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
sigc::bind (sigc::mem_fun (*this, &MonitorSection::solo_channel), chn));
action_name = string_compose (X_("monitor-invert-%1"), chn);
action_descr = string_compose (_("Invert monitor channel %1"), chn+1);
- ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
+ ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(),
sigc::bind (sigc::mem_fun (*this, &MonitorSection::invert_channel), chn));
}
@@ -695,7 +695,7 @@ MonitorSection::solo_use_afl ()
once for the item that became inactive and once for the one that became
active.
*/
-
+
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Solo"), X_("solo-use-afl"));
if (act) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
@@ -732,11 +732,11 @@ void
MonitorSection::setup_knob_images ()
{
try {
-
- big_knob_pixbuf = MotionFeedback::render_pixbuf (80);
+
+ big_knob_pixbuf = MotionFeedback::render_pixbuf (80);
} catch (...) {
-
+
error << "No usable large knob image" << endmsg;
throw failed_constructor ();
}
@@ -745,13 +745,13 @@ MonitorSection::setup_knob_images ()
error << "No usable large knob image" << endmsg;
throw failed_constructor ();
}
-
+
try {
little_knob_pixbuf = MotionFeedback::render_pixbuf (30);
-
+
} catch (...) {
-
+
error << "No usable small knob image" << endmsg;
throw failed_constructor ();
}
@@ -760,7 +760,7 @@ MonitorSection::setup_knob_images ()
error << "No usable small knob image" << endmsg;
throw failed_constructor ();
}
-
+
}
bool
@@ -825,7 +825,7 @@ MonitorSection::map_state ()
Glib::RefPtr<Action> act;
update_solo_model ();
-
+
act = ActionManager::get_action (X_("Monitor"), "monitor-cut-all");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
@@ -841,7 +841,7 @@ MonitorSection::map_state ()
tact->set_active (_monitor->dim_all());
}
}
-
+
act = ActionManager::get_action (X_("Monitor"), "monitor-mono");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
@@ -1030,7 +1030,7 @@ MonitorSection::assign_controllables ()
dim_control->set_controllable (c);
dim_adjustment.set_lower (c->lower());
dim_adjustment.set_upper (c->upper());
-
+
c = _monitor->solo_boost_control ();
solo_boost_control->set_controllable (c);
solo_boost_adjustment.set_lower (c->lower());
diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h
index c2a4002226..6a8f25c7e3 100644
--- a/gtk2_ardour/monitor_section.h
+++ b/gtk2_ardour/monitor_section.h
@@ -52,7 +52,7 @@ class MonitorSection : public RouteUI
Gtk::VBox lower_packer;
Gtkmm2ext::TearOff* _tearoff;
- struct ChannelButtonSet {
+ struct ChannelButtonSet {
BindableToggleButton cut;
BindableToggleButton dim;
BindableToggleButton solo;
@@ -133,6 +133,6 @@ class MonitorSection : public RouteUI
PBD::ScopedConnection config_connection;
PBD::ScopedConnectionList control_connections;
-
+
void assign_controllables ();
};
diff --git a/gtk2_ardour/mono_panner.cc b/gtk2_ardour/mono_panner.cc
index 9f21039250..78fec4e679 100644
--- a/gtk2_ardour/mono_panner.cc
+++ b/gtk2_ardour/mono_panner.cc
@@ -97,9 +97,9 @@ MonoPanner::set_drag_data ()
}
double pos = position_control->get_value(); // 0..1
-
+
/* We show the position of the center of the image relative to the left & right.
- This is expressed as a pair of percentage values that ranges from (100,0)
+ This is expressed as a pair of percentage values that ranges from (100,0)
(hard left) through (50,50) (hard center) to (0,100) (hard right).
This is pretty wierd, but its the way audio engineers expect it. Just remember that
@@ -126,7 +126,7 @@ MonoPanner::on_expose_event (GdkEventExpose* ev)
Glib::RefPtr<Gdk::Window> win (get_window());
Glib::RefPtr<Gdk::GC> gc (get_style()->get_base_gc (get_state()));
Cairo::RefPtr<Cairo::Context> context = get_window()->create_cairo_context();
-
+
int width, height;
double pos = position_control->get_value (); /* 0..1 */
uint32_t o, f, t, b, pf, po;
@@ -154,7 +154,7 @@ MonoPanner::on_expose_event (GdkEventExpose* ev)
if (fmod (usable_width,2.0) == 0) {
/* even width, but we need odd, so that there is an exact center.
- So, offset cairo by 1, and reduce effective width by 1
+ So, offset cairo by 1, and reduce effective width by 1
*/
usable_width -= 1.0;
context->translate (1.0, 0.0);
@@ -173,18 +173,18 @@ MonoPanner::on_expose_event (GdkEventExpose* ev)
context->move_to ((pos_box_size/2.0) + (usable_width/2.0), 0);
context->line_to ((pos_box_size/2.0) + (usable_width/2.0), height);
context->stroke ();
-
+
/* left box */
- rounded_rectangle (context,
+ rounded_rectangle (context,
left - half_lr_box,
- half_lr_box+step_down,
+ half_lr_box+step_down,
lr_box_size, lr_box_size, corner_radius);
context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
context->stroke_preserve ();
context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
context->fill ();
-
+
/* add text */
context->move_to (
@@ -198,7 +198,7 @@ MonoPanner::on_expose_event (GdkEventExpose* ev)
rounded_rectangle (context,
right - half_lr_box,
- half_lr_box+step_down,
+ half_lr_box+step_down,
lr_box_size, lr_box_size, corner_radius);
context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
context->stroke_preserve ();
@@ -265,7 +265,7 @@ MonoPanner::on_button_press_event (GdkEventButton* ev)
{
drag_start_x = ev->x;
last_drag_x = ev->x;
-
+
dragging = false;
accumulated_delta = 0;
detented = false;
@@ -278,7 +278,7 @@ MonoPanner::on_button_press_event (GdkEventButton* ev)
return true;
}
}
-
+
if (ev->button != 1) {
return false;
}
@@ -291,7 +291,7 @@ MonoPanner::on_button_press_event (GdkEventButton* ev)
return true;
}
-
+
if (ev->x <= width/3) {
/* left side dbl click */
position_control->set_value (0);
@@ -308,7 +308,7 @@ MonoPanner::on_button_press_event (GdkEventButton* ev)
if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
/* handled by button release */
return true;
- }
+ }
dragging = true;
StartGesture ();
@@ -327,11 +327,11 @@ MonoPanner::on_button_release_event (GdkEventButton* ev)
dragging = false;
accumulated_delta = 0;
detented = false;
-
+
if (drag_data_window) {
drag_data_window->hide ();
}
-
+
if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
/* reset to default */
position_control->set_value (0.5);
@@ -348,7 +348,7 @@ MonoPanner::on_scroll_event (GdkEventScroll* ev)
double one_degree = 1.0/180.0; // one degree as a number from 0..1, since 180 degrees is the full L/R axis
double pv = position_control->get_value(); // 0..1.0 ; 0 = left
double step;
-
+
if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
step = one_degree;
} else {
@@ -383,14 +383,14 @@ MonoPanner::on_motion_notify_event (GdkEventMotion* ev)
drag_data_window->set_name (X_("ContrastingPopup"));
drag_data_window->set_position (WIN_POS_MOUSE);
drag_data_window->set_decorated (false);
-
+
drag_data_label = manage (new Label);
drag_data_label->set_use_markup (true);
drag_data_window->set_border_width (6);
drag_data_window->add (*drag_data_label);
drag_data_label->show ();
-
+
Window* toplevel = dynamic_cast<Window*> (get_toplevel());
if (toplevel) {
drag_data_window->set_transient_for (*toplevel);
@@ -407,20 +407,20 @@ MonoPanner::on_motion_notify_event (GdkEventMotion* ev)
int w = get_width();
double delta = (ev->x - last_drag_x) / (double) w;
-
+
/* create a detent close to the center */
-
+
if (!detented && ARDOUR::Panner::equivalent (position_control->get_value(), 0.5)) {
detented = true;
/* snap to center */
position_control->set_value (0.5);
}
-
+
if (detented) {
accumulated_delta += delta;
-
+
/* have we pulled far enough to escape ? */
-
+
if (fabs (accumulated_delta) >= 0.025) {
position_control->set_value (position_control->get_value() + accumulated_delta);
detented = false;
@@ -461,10 +461,10 @@ MonoPanner::on_key_press_event (GdkEventKey* ev)
pv += step;
position_control->set_value (pv);
break;
- default:
+ default:
return false;
}
-
+
return true;
}
diff --git a/gtk2_ardour/mono_panner.h b/gtk2_ardour/mono_panner.h
index 411fadc688..f583140af9 100644
--- a/gtk2_ardour/mono_panner.h
+++ b/gtk2_ardour/mono_panner.h
@@ -70,7 +70,7 @@ class MonoPanner : public Gtk::DrawingArea
void value_change ();
void set_drag_data ();
- struct ColorScheme {
+ struct ColorScheme {
uint32_t outline;
uint32_t fill;
uint32_t text;
diff --git a/gtk2_ardour/mouse_cursors.cc b/gtk2_ardour/mouse_cursors.cc
index 5c06b55803..46beb8b47c 100644
--- a/gtk2_ardour/mouse_cursors.cc
+++ b/gtk2_ardour/mouse_cursors.cc
@@ -26,7 +26,7 @@ MouseCursors::MouseCursors ()
{
using namespace Glib;
using namespace Gdk;
-
+
{
RefPtr<Pixbuf> p (::get_icon ("zoom_in_cursor"));
zoom_in = new Cursor (Display::get_default(), p, 5, 5);
@@ -36,7 +36,7 @@ MouseCursors::MouseCursors ()
RefPtr<Pixbuf> p (::get_icon ("zoom_out_cursor"));
zoom_out = new Cursor (Display::get_default(), p, 5, 5);
}
-
+
Color fbg ("#ffffff");
Color ffg ("#000000");
@@ -103,7 +103,7 @@ MouseCursors::MouseCursors ()
RefPtr<Pixbuf> p (::get_icon ("trim_right_cursor_left_only"));
right_side_trim_left_only = new Cursor (Display::get_default(), p, 23, 11);
}
-
+
{
RefPtr<Pixbuf> p (::get_icon ("fade_in_cursor"));
fade_in = new Cursor (Display::get_default(), p, 0, 0);
@@ -168,7 +168,7 @@ MouseCursors::MouseCursors ()
RefPtr<Pixbuf> p (::get_icon ("expand_up_down_cursor"));
expand_up_down = new Cursor (Display::get_default(), p, 4, 11);
}
-
+
selector = new Cursor (XTERM);
time_fx = new Cursor (SIZING);
wait = new Cursor (WATCH);
diff --git a/gtk2_ardour/mouse_cursors.h b/gtk2_ardour/mouse_cursors.h
index 26fa9472a5..55d5fd0c9d 100644
--- a/gtk2_ardour/mouse_cursors.h
+++ b/gtk2_ardour/mouse_cursors.h
@@ -26,7 +26,7 @@ class MouseCursors
{
public:
MouseCursors ();
-
+
Gdk::Cursor* cross_hair;
Gdk::Cursor* trimmer;
Gdk::Cursor* right_side_trim;
diff --git a/gtk2_ardour/nag.cc b/gtk2_ardour/nag.cc
index d82d986837..8d9d75538f 100644
--- a/gtk2_ardour/nag.cc
+++ b/gtk2_ardour/nag.cc
@@ -185,7 +185,7 @@ void
NagScreen::offer_to_subscribe ()
{
const char* uri = "http://ardour.org/subscribe";
-
+
if (PBD::open_uri (uri)) {
mark_subscriber ();
}
diff --git a/gtk2_ardour/new_plugin_preset_dialog.cc b/gtk2_ardour/new_plugin_preset_dialog.cc
index e21ad9d18b..2016e8046d 100644
--- a/gtk2_ardour/new_plugin_preset_dialog.cc
+++ b/gtk2_ardour/new_plugin_preset_dialog.cc
@@ -60,7 +60,7 @@ NewPluginPresetDialog::setup_sensitivity ()
_add->set_sensitive (false);
return;
}
-
+
vector<ARDOUR::Plugin::PresetRecord>::const_iterator i = _presets.begin ();
while (i != _presets.end() && i->label != _name.get_text()) {
++i;
diff --git a/gtk2_ardour/new_plugin_preset_dialog.h b/gtk2_ardour/new_plugin_preset_dialog.h
index 1f0c9cfbbb..8dddf6c6e5 100644
--- a/gtk2_ardour/new_plugin_preset_dialog.h
+++ b/gtk2_ardour/new_plugin_preset_dialog.h
@@ -33,9 +33,9 @@ public:
private:
void setup_sensitivity ();
-
+
Gtk::Entry _name;
Gtk::CheckButton _replace;
Gtk::Button* _add;
- std::vector<ARDOUR::Plugin::PresetRecord> _presets;
+ std::vector<ARDOUR::Plugin::PresetRecord> _presets;
};
diff --git a/gtk2_ardour/normalize_dialog.cc b/gtk2_ardour/normalize_dialog.cc
index a12732e99a..9872bcbc35 100644
--- a/gtk2_ardour/normalize_dialog.cc
+++ b/gtk2_ardour/normalize_dialog.cc
@@ -35,7 +35,7 @@ NormalizeDialog::NormalizeDialog (bool more_than_one)
, _normalize_individually (0)
{
get_vbox()->set_spacing (12);
-
+
HBox* hbox = manage (new HBox);
hbox->set_spacing (6);
hbox->set_border_width (6);
@@ -68,7 +68,7 @@ NormalizeDialog::NormalizeDialog (bool more_than_one)
get_vbox()->pack_start (*_progress_bar);
show_all ();
-
+
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (_("Normalize"), RESPONSE_ACCEPT);
set_default_response (RESPONSE_ACCEPT);
diff --git a/gtk2_ardour/normalize_dialog.h b/gtk2_ardour/normalize_dialog.h
index 38ae912b76..71ca030416 100644
--- a/gtk2_ardour/normalize_dialog.h
+++ b/gtk2_ardour/normalize_dialog.h
@@ -38,7 +38,7 @@ public:
private:
void update_progress_gui (float);
void button_clicked (int);
-
+
Gtk::RadioButton* _normalize_individually;
Gtk::SpinButton* _spin;
Gtk::ProgressBar* _progress_bar;
diff --git a/gtk2_ardour/note_player.cc b/gtk2_ardour/note_player.cc
index 3c577633b1..fa8f69be62 100644
--- a/gtk2_ardour/note_player.cc
+++ b/gtk2_ardour/note_player.cc
@@ -35,7 +35,7 @@ NotePlayer::play ()
}
}
- uint32_t note_length_ms = 350;
+ uint32_t note_length_ms = 350;
/* beats_to_frames (longest_duration_beats)
* (1000 / (double)track->session().nominal_frame_rate()); */
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index 040146876b..ffdbdc4e95 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -156,7 +156,7 @@ FaderOption::FaderOption (string const & i, string const & n, sigc::slot<gain_t>
_box.pack_start (*_db_slider, false, false);
_box.pack_start (_db_display, false, false);
_box.show_all ();
-
+
set_size_request_to_display_given_text (_db_display, "-99.0", 12, 12);
_db_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &FaderOption::db_changed));
@@ -175,7 +175,7 @@ FaderOption::set_state_from_config ()
} else {
snprintf (buf, sizeof (buf), "%.2f", accurate_coefficient_to_dB (val));
}
-
+
_db_display.set_text (buf);
}
@@ -219,7 +219,7 @@ ClockOption::set_session (Session* s)
{
_clock.set_session (s);
}
-
+
OptionEditorPage::OptionEditorPage (Gtk::Notebook& n, std::string const & t)
: table (1, 3)
{
@@ -318,4 +318,4 @@ OptionEditor::set_current_page (string const & p)
}
-
+
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h
index b81672e094..f43f71342b 100644
--- a/gtk2_ardour/option_editor.h
+++ b/gtk2_ardour/option_editor.h
@@ -155,7 +155,7 @@ public:
void set_sensitive (bool yn) {
_button->set_sensitive (yn);
}
-
+
private:
void toggled ();
@@ -351,7 +351,7 @@ public:
private:
void db_changed ();
-
+
Gtk::Adjustment _db_adjustment;
Gtkmm2ext::HSliderController* _db_slider;
Glib::RefPtr<Gdk::Pixbuf> _pix;
@@ -405,7 +405,7 @@ public:
protected:
virtual void parameter_changed (std::string const &);
-
+
ARDOUR::Configuration* _config;
private:
diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc
index ca48e1cc3c..a0bf287d7a 100644
--- a/gtk2_ardour/opts.cc
+++ b/gtk2_ardour/opts.cc
@@ -149,7 +149,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
exit (0);
}
break;
-
+
case 'm':
menus_file = optarg;
break;
diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc
index a4801f905d..bbceb9bc46 100644
--- a/gtk2_ardour/panner2d.cc
+++ b/gtk2_ardour/panner2d.cc
@@ -110,7 +110,7 @@ Panner2d::reset (uint32_t n_inputs)
signals.resize (n_inputs);
}
-
+
label_signals ();
for (uint32_t i = 0; i < n_inputs; ++i) {
@@ -134,7 +134,7 @@ Panner2d::reset (uint32_t n_inputs)
for (Targets::iterator x = speakers.begin(); x != speakers.end(); ++x) {
(*x)->visible = false;
}
-
+
vector<Speaker>& the_speakers (panner->get_speakers()->speakers());
for (uint32_t n = 0; n < nouts; ++n) {
@@ -273,7 +273,7 @@ Panner2d::move_signal (int which, const AngularVector& a)
if (which >= int (speakers.size())) {
return;
}
-
+
speakers[which]->position = a;
queue_draw ();
}
@@ -295,7 +295,7 @@ Panner2d::find_closest_object (gdouble x, gdouble y, bool& is_signal)
best_distance = sqrt ((c.x - x) * (c.x - x) +
(c.y - y) * (c.y - y));
closest = &position;
-
+
for (Targets::const_iterator i = signals.begin(); i != signals.end(); ++i) {
candidate = *i;
@@ -315,12 +315,12 @@ Panner2d::find_closest_object (gdouble x, gdouble y, bool& is_signal)
if (height > large_size_threshold) {
/* "big" */
- if (best_distance > 30) { // arbitrary
+ if (best_distance > 30) { // arbitrary
closest = 0;
}
} else {
/* "small" */
- if (best_distance > 10) { // arbitrary
+ if (best_distance > 10) { // arbitrary
closest = 0;
}
}
@@ -330,29 +330,29 @@ Panner2d::find_closest_object (gdouble x, gdouble y, bool& is_signal)
if (!closest) {
for (Targets::const_iterator i = speakers.begin(); i != speakers.end(); ++i) {
candidate = *i;
-
+
candidate->position.cartesian (c);
cart_to_gtk (c);
-
+
distance = sqrt ((c.x - x) * (c.x - x) +
(c.y - y) * (c.y - y));
-
+
if (distance < best_distance) {
closest = candidate;
best_distance = distance;
}
}
-
+
if (height > large_size_threshold) {
/* "big" */
- if (best_distance < 30) { // arbitrary
+ if (best_distance < 30) { // arbitrary
is_signal = false;
} else {
closest = 0;
}
} else {
/* "small" */
- if (best_distance < 10) { // arbitrary
+ if (best_distance < 10) { // arbitrary
is_signal = false;
} else {
closest = 0;
@@ -419,7 +419,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_stroke (cr);
/* vertical line of "crosshairs" */
-
+
cairo_move_to (cr, radius, 0);
cairo_line_to (cr, radius, diameter);
cairo_stroke (cr);
@@ -471,7 +471,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
double arc_radius;
cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
-
+
if (small) {
arc_radius = 4.0;
} else {
@@ -484,19 +484,19 @@ Panner2d::on_expose_event (GdkEventExpose *event)
if (signals.size() > 1) {
for (Targets::iterator i = signals.begin(); i != signals.end(); ++i) {
Target* signal = *i;
-
+
if (signal->visible) {
signal->position.cartesian (c);
cart_to_gtk (c);
-
+
cairo_new_path (cr);
cairo_arc (cr, c.x, c.y, arc_radius, 0, 2.0 * M_PI);
cairo_set_source_rgba (cr, 0.282, 0.517, 0.662, 0.85);
cairo_fill_preserve (cr);
cairo_set_source_rgba (cr, 0.517, 0.772, 0.882, 1.0);
cairo_stroke (cr);
-
+
if (!small && !signal->text.empty()) {
cairo_set_source_rgb (cr, 0.517, 0.772, 0.882);
/* the +/- adjustments are a hack to try to center the text in the circle */
@@ -523,14 +523,14 @@ Panner2d::on_expose_event (GdkEventExpose *event)
if (speaker->visible) {
CartesianVector c;
-
+
speaker->position.cartesian (c);
cart_to_gtk (c);
snprintf (buf, sizeof (buf), "%d", n);
/* stroke out a speaker shape */
-
+
cairo_move_to (cr, c.x, c.y);
cairo_save (cr);
cairo_rotate (cr, -(speaker->position.azi/360.0) * (2.0 * M_PI));
@@ -556,7 +556,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_set_font_size (cr, 16);
/* move the text in just a bit */
-
+
AngularVector textpos (speaker->position.azi, speaker->position.ele, 0.85);
textpos.cartesian (c);
cart_to_gtk (c);
@@ -568,7 +568,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
}
/* draw position */
-
+
position.position.cartesian (c);
cart_to_gtk (c);
@@ -604,7 +604,7 @@ Panner2d::on_button_press_event (GdkEventButton *ev)
case 2:
x = ev->x - border;
y = ev->y - border;
-
+
if ((drag_target = find_closest_object (x, y, is_signal)) != 0) {
if (!is_signal) {
panner->set_position (drag_target->position.azi/360.0);
@@ -614,7 +614,7 @@ Panner2d::on_button_press_event (GdkEventButton *ev)
}
}
- drag_x = ev->x;
+ drag_x = ev->x;
drag_y = ev->y;
state = (GdkModifierType) ev->state;
@@ -677,12 +677,12 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
if ((state & (GDK_BUTTON1_MASK|GDK_BUTTON2_MASK)) == 0) {
return false;
}
-
+
if (state & GDK_BUTTON1_MASK && !(state & GDK_BUTTON2_MASK)) {
CartesianVector c;
bool need_move = false;
-
+
drag_target->position.cartesian (c);
cart_to_gtk (c);
@@ -702,13 +702,13 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
/* generate an angular representation of the current mouse position */
cp.angular (av);
-
+
if (drag_target == &position) {
double degree_fract = av.azi / 360.0;
panner->set_position (degree_fract);
}
}
- }
+ }
return true;
}
@@ -839,7 +839,7 @@ Panner2dWindow::bypass_toggled ()
{
bool view = bypass_button.get_active ();
bool model = widget.get_panner()->bypassed ();
-
+
if (model != view) {
widget.get_panner()->set_bypassed (view);
}
diff --git a/gtk2_ardour/panner2d.h b/gtk2_ardour/panner2d.h
index 718677557f..6726d5f7cf 100644
--- a/gtk2_ardour/panner2d.h
+++ b/gtk2_ardour/panner2d.h
@@ -86,18 +86,18 @@ class Panner2d : public Gtk::DrawingArea
PBD::AngularVector position;
bool visible;
std::string text;
-
+
Target (const PBD::AngularVector&, const char* txt = 0);
~Target ();
-
+
void set_text (const char*);
void set_selected (bool yn) {
_selected = yn;
}
- bool selected() const {
+ bool selected() const {
return _selected;
}
-
+
private:
bool _selected;
};
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index c783283d99..b10bb19c13 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -227,7 +227,7 @@ PannerUI::setup_pan ()
{
if (!_panner) {
return;
- }
+ }
uint32_t const nouts = _panner->out().n_audio();
uint32_t const nins = _panner->in().n_audio();
@@ -271,36 +271,36 @@ PannerUI::setup_pan ()
boost::shared_ptr<AutomationControl> ac;
ac = pannable->pan_azimuth_control;
- _stereo_panner->StartPositionGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
+ _stereo_panner->StartPositionGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
boost::weak_ptr<AutomationControl> (ac)));
- _stereo_panner->StopPositionGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
+ _stereo_panner->StopPositionGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
boost::weak_ptr<AutomationControl>(ac)));
-
+
ac = pannable->pan_width_control;
- _stereo_panner->StartWidthGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
+ _stereo_panner->StartWidthGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
boost::weak_ptr<AutomationControl> (ac)));
- _stereo_panner->StopWidthGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
+ _stereo_panner->StopWidthGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
boost::weak_ptr<AutomationControl>(ac)));
_stereo_panner->signal_button_release_event().connect (sigc::mem_fun(*this, &PannerUI::pan_button_event));
-
+
} else if (nins == 1) {
/* 1-in/2out */
-
+
MonoPanner* mp;
boost::shared_ptr<Pannable> pannable = _panner->pannable();
boost::shared_ptr<AutomationControl> ac = pannable->pan_azimuth_control;
-
+
mp = new MonoPanner (ac);
-
- mp->StartGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
+
+ mp->StartGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
boost::weak_ptr<AutomationControl> (ac)));
- mp->StopGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
+ mp->StopGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
boost::weak_ptr<AutomationControl>(ac)));
-
+
mp->signal_button_release_event().connect (sigc::mem_fun(*this, &PannerUI::pan_button_event));
-
+
mp->set_size_request (-1, pan_bar_height);
-
+
update_pan_sensitive ();
pan_vbox.pack_start (*mp, false, false);
@@ -516,7 +516,7 @@ PannerUI::pan_automation_state_changed ()
}
bool x = (pannable->automation_state() != Off);
-
+
if (pan_automation_state_button.get_active() != x) {
ignore_toggle = true;
pan_automation_state_button.set_active (x);
@@ -524,11 +524,11 @@ PannerUI::pan_automation_state_changed ()
}
update_pan_sensitive ();
-
+
/* start watching automation so that things move */
-
+
pan_watching.disconnect();
-
+
if (x) {
pan_watching = ARDOUR_UI::RapidScreenUpdate.connect (sigc::mem_fun (*this, &PannerUI::effective_pan_display));
}
diff --git a/gtk2_ardour/panner_ui.h b/gtk2_ardour/panner_ui.h
index a18e22ec56..59474ef3cf 100644
--- a/gtk2_ardour/panner_ui.h
+++ b/gtk2_ardour/panner_ui.h
@@ -80,7 +80,7 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
boost::shared_ptr<PBD::Controllable> get_controllable();
void on_size_allocate (Gtk::Allocation &);
-
+
static void setup_slider_pix ();
private:
diff --git a/gtk2_ardour/patch_change_dialog.cc b/gtk2_ardour/patch_change_dialog.cc
index d2c23e7365..85f34eedbe 100644
--- a/gtk2_ardour/patch_change_dialog.cc
+++ b/gtk2_ardour/patch_change_dialog.cc
@@ -51,26 +51,26 @@ PatchChangeDialog::PatchChangeDialog (
t->attach (*l, 0, 1, r, r + 1);
t->attach (_time, 1, 2, r, r + 1);
++r;
-
+
_time.set_session (session);
_time.set_mode (AudioClock::BBT);
_time.set (_time_converter->to (patch.time ()), true);
-
+
l = manage (new Label (_("Channel")));
l->set_alignment (0, 0.5);
t->attach (*l, 0, 1, r, r + 1);
t->attach (_channel, 1, 2, r, r + 1);
++r;
-
+
_channel.set_value (patch.channel() + 1);
}
-
+
Label* l = manage (new Label (_("Program")));
l->set_alignment (0, 0.5);
t->attach (*l, 0, 1, r, r + 1);
t->attach (_program, 1, 2, r, r + 1);
++r;
-
+
_program.set_value (patch.program () + 1);
l = manage (new Label (_("Bank")));
@@ -78,9 +78,9 @@ PatchChangeDialog::PatchChangeDialog (
t->attach (*l, 0, 1, r, r + 1);
t->attach (_bank, 1, 2, r, r + 1);
++r;
-
+
_bank.set_value (patch.bank() + 1);
-
+
get_vbox()->add (*t);
add_button (Stock::CANCEL, RESPONSE_CANCEL);
@@ -97,7 +97,7 @@ PatchChangeDialog::patch () const
if (_time_converter) {
t = _time_converter->from (_time.current_time ());
}
-
+
return Evoral::PatchChange<Evoral::MusicalTime> (
t,
_channel.get_value_as_int() - 1,
diff --git a/gtk2_ardour/piano_roll_header.cc b/gtk2_ardour/piano_roll_header.cc
index 6fb92d9be2..b041bb3a89 100644
--- a/gtk2_ardour/piano_roll_header.cc
+++ b/gtk2_ardour/piano_roll_header.cc
@@ -471,17 +471,17 @@ PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev)
} else {
invalidate_note_range(note, _highlighted_note);
}
-
+
_highlighted_note = note;
}
-
+
/* redraw already taken care of above */
if (_clicked_note != no_note && _clicked_note != note) {
_active_notes[_clicked_note] = false;
send_note_off(_clicked_note);
_clicked_note = note;
-
+
if (!_active_notes[note]) {
_active_notes[note] = true;
send_note_on(note);
@@ -503,17 +503,17 @@ PianoRollHeader::on_button_press_event (GdkEventButton* ev)
send_note_on (note);
/* relax till release */
} else {
-
+
if (ev->type == GDK_BUTTON_PRESS && note >= 0 && note < 128) {
-
+
add_modal_grab();
_dragging = true;
-
+
if (!_active_notes[note]) {
_active_notes[note] = true;
_clicked_note = note;
send_note_on(note);
-
+
invalidate_note_range(note, note);
} else {
reset_clicked_note(note);
@@ -534,22 +534,22 @@ PianoRollHeader::on_button_release_event (GdkEventButton* ev)
if (Keyboard::no_modifiers_active (ev->state)) {
AddNoteSelection (note); // EMIT SIGNAL
- } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
ToggleNoteSelection (note); // EMIT SIGNAL
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::RangeSelectModifier)) {
ExtendNoteSelection (note); // EMIT SIGNAL
}
-
+
} else {
if (_dragging) {
remove_modal_grab();
_dragging = false;
-
+
if (note == _clicked_note) {
reset_clicked_note(note);
}
- }
+ }
}
return true;
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc
index 013edd6197..254f57a243 100644
--- a/gtk2_ardour/plugin_eq_gui.cc
+++ b/gtk2_ardour/plugin_eq_gui.cc
@@ -186,7 +186,7 @@ PluginEqGui::on_show()
if (!_window_unmap_connection.connected()) {
_window_unmap_connection = toplevel->signal_unmap().connect( sigc::mem_fun(this, &PluginEqGui::stop_updating));
}
-
+
if (!_window_map_connection.connected()) {
_window_map_connection = toplevel->signal_map().connect( sigc::mem_fun(this, &PluginEqGui::start_updating));
}
diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h
index ebe54cb320..145edb760e 100644
--- a/gtk2_ardour/plugin_eq_gui.h
+++ b/gtk2_ardour/plugin_eq_gui.h
@@ -79,65 +79,65 @@ private:
void redraw_scales ();
// Fields:
-
+
// analysis parameters
float _samplerate;
-
+
float _min_dB;
float _max_dB;
float _step_dB;
-
+
float _log_coeff;
float _log_max;
-
+
ARDOUR::framecnt_t _buffer_size;
ARDOUR::framecnt_t _signal_buffer_size;
-
+
// buffers
ARDOUR::BufferSet _bufferset;
ARDOUR::BufferSet _collect_bufferset;
-
-
+
+
// dimensions
float _analysis_width;
float _analysis_height;
-
+
// My objects
GTKArdour::FFT *_impulse_fft;
GTKArdour::FFT *_signal_input_fft;
GTKArdour::FFT *_signal_output_fft;
boost::shared_ptr<ARDOUR::Plugin> _plugin;
boost::shared_ptr<ARDOUR::PluginInsert> _plugin_insert;
-
+
// gui objects
Gtk::DrawingArea *_analysis_area;
cairo_surface_t *_analysis_scale_surface;
-
+
// dB scale selection:
class dBSelectionColumns : public Gtk::TreeModel::ColumnRecord
{
public:
dBSelectionColumns()
{ add(dBMin); add(dBMax); add(dBStep); add(name); }
-
+
Gtk::TreeModelColumn<float> dBMin;
Gtk::TreeModelColumn<float> dBMax;
Gtk::TreeModelColumn<float> dBStep;
Gtk::TreeModelColumn<std::string> name;
};
-
+
dBSelectionColumns dBColumns;
-
+
Gtk::ComboBox *dBScaleCombo;
Glib::RefPtr<Gtk::ListStore> dBScaleModel;
-
+
Gtk::CheckButton *_phase_button;
-
+
// signals and connections
sigc::connection _update_connection;
sigc::connection _window_unmap_connection;
sigc::connection _window_map_connection;
-
+
PBD::ScopedConnection analysis_connection;
};
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index 7b04d55298..07ab3fd9f5 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -444,12 +444,12 @@ PluginSelector::run ()
TreeModel::Children::iterator i;
bool finish = false;
-
+
while (!finish) {
SelectedPlugins plugins;
r = (ResponseType) Dialog::run ();
-
+
switch (r) {
case RESPONSE_APPLY:
for (i = amodel->children().begin(); i != amodel->children().end(); ++i) {
@@ -465,16 +465,16 @@ PluginSelector::run ()
if (interested_object && !plugins.empty()) {
finish = !interested_object->use_plugins (plugins);
}
-
+
break;
-
+
default:
finish = true;
break;
}
}
-
-
+
+
hide();
amodel->clear();
interested_object = 0;
@@ -595,10 +595,10 @@ PluginSelector::build_plugin_menu ()
using namespace Menu_Helpers;
delete _plugin_menu;
-
+
_plugin_menu = manage (new Menu);
_plugin_menu->set_name("ArdourContextMenu");
-
+
MenuList& items = _plugin_menu->items();
items.clear ();
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 1e54344a83..beb070c150 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -353,7 +353,7 @@ PluginUIWindow::on_key_press_event (GdkEventKey* event)
if (_keyboard_focused) {
if (_pluginui) {
if (_pluginui->non_gtk_gui()) {
- _pluginui->forward_key_event (event);
+ _pluginui->forward_key_event (event);
} else {
return relay_key_press (event, this);
}
@@ -388,7 +388,7 @@ PluginUIWindow::on_key_release_event (GdkEventKey *event)
if (_pluginui) {
if (_pluginui->non_gtk_gui()) {
_pluginui->forward_key_event (event);
- }
+ }
return true;
}
return false;
@@ -433,7 +433,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
update_preset_list ();
update_preset ();
-
+
add_button.set_name ("PluginAddButton");
add_button.signal_clicked().connect (sigc::mem_fun (*this, &PlugUIBase::add_plugin_setting));
@@ -466,11 +466,11 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
plugin_analysis_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &PlugUIBase::toggle_plugin_analysis));
plugin_analysis_expander.set_expanded(false);
-
+
insert->DropReferences.connect (death_connection, invalidator (*this), boost::bind (&PlugUIBase::plugin_going_away, this), gui_context());
plugin->PresetAdded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
- plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
+ plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset, this), gui_context ());
plugin->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::parameter_changed, this, _1, _2), gui_context ());
}
@@ -674,7 +674,7 @@ PlugUIBase::update_preset_list ()
}
set_popdown_strings (_preset_combo, preset_labels);
-
+
--_no_load_preset;
}
@@ -700,7 +700,7 @@ PlugUIBase::update_preset_modified ()
_preset_modified.set_text ("");
return;
}
-
+
bool const c = plugin->parameter_changed_since_last_preset ();
if (_preset_modified.get_text().empty() == c) {
_preset_modified.set_text (c ? "*" : "");
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 743234f16a..4ce7faf376 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -210,7 +210,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
Evoral::Parameter parameter() { return control->parameter(); }
/* input */
-
+
Gtk::ComboBoxText* combo;
std::map<std::string, float>* combo_map;
Gtk::ToggleButton* button;
@@ -220,9 +220,9 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
bool update_pending;
char ignore_change;
Gtk::Button automate_button;
-
+
/* output */
-
+
Gtk::EventBox* display;
Gtk::Label* display_label;
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index 4d936af903..d164c17782 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -109,14 +109,14 @@ PortGroup::add_bundle_internal (boost::shared_ptr<Bundle> b, boost::shared_ptr<I
assert (b.get());
if (!allow_dups) {
-
+
/* don't add this bundle if we already have one with the same ports */
-
+
BundleList::iterator i = _bundles.begin ();
while (i != _bundles.end() && b->has_same_ports ((*i)->bundle) == false) {
++i;
}
-
+
if (i != _bundles.end ()) {
return;
}
@@ -126,7 +126,7 @@ PortGroup::add_bundle_internal (boost::shared_ptr<Bundle> b, boost::shared_ptr<I
b->Changed.connect (br->changed_connection, invalidator (*this), ui_bind (&PortGroup::bundle_changed, this, _1), gui_context());
_bundles.push_back (br);
- Changed ();
+ Changed ();
}
void
@@ -254,11 +254,11 @@ PortGroup::remove_duplicates ()
}
}
}
-
+
if (remove) {
_bundles.erase (i);
}
-
+
i = tmp;
}
}
@@ -272,7 +272,7 @@ PortGroupList::PortGroupList ()
}
-PortGroupList::~PortGroupList()
+PortGroupList::~PortGroupList()
{
/* XXX need to clean up bundles, but ownership shared with PortGroups */
}
@@ -306,7 +306,7 @@ struct RouteIOs {
route = r;
ios.push_back (i);
}
-
+
boost::shared_ptr<Route> route;
/* it's ok to use a shared_ptr here as RouteIOs structs are only used during ::gather () */
std::list<boost::shared_ptr<IO> > ios;
@@ -355,7 +355,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
/* keep track of IOs that we have taken bundles from,
so that we can avoid taking the same IO from both
- Route::output() and the main_outs Delivery
+ Route::output() and the main_outs Delivery
*/
set<boost::shared_ptr<IO> > used_io;
@@ -375,7 +375,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
Note that if the RouteIO's bundles are multi-type, we may make new Bundles
with only the ports of one type.
*/
-
+
for (list<RouteIOs>::iterator i = route_ios.begin(); i != route_ios.end(); ++i) {
TimeAxisView* tv = PublicEditor::instance().axis_view_from_route (i->route);
@@ -422,7 +422,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
}
}
}
-
+
/* Ardour stuff */
if (!inputs) {
@@ -485,7 +485,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
_("MMC out"), DataType::MIDI, ae.make_port_name_non_relative (mmc->output_port()->name())
);
}
-
+
ardour->add_bundle (sync);
}
@@ -505,7 +505,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
} else {
ports = session->engine().get_ports ("", type.to_jack_type(), inputs ? JackPortIsInput : JackPortIsOutput);
}
-
+
if (ports) {
int n = 0;
@@ -519,7 +519,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
!track->has_port(p) &&
!ardour->has_port(p) &&
!other->has_port(p)) {
-
+
/* special hack: ignore MIDI ports labelled Midi-Through. these
are basically useless and mess things up for default
connections.
@@ -530,14 +530,14 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
continue;
}
- /* special hack: ignore our monitor inputs (which show up here because
+ /* special hack: ignore our monitor inputs (which show up here because
we excluded them earlier.
*/
-
+
string lp = p;
boost::to_lower (lp);
- if ((lp.find (N_(":monitor")) != string::npos) &&
+ if ((lp.find (N_(":monitor")) != string::npos) &&
(lp.find (lpn) != string::npos)) {
++n;
continue;
@@ -549,8 +549,8 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
if (jp) {
DataType t (jack_port_type (jp));
if (t != DataType::NIL) {
- if (port_has_prefix (p, N_("system:")) ||
- port_has_prefix (p, N_("alsa_pcm")) ||
+ if (port_has_prefix (p, N_("system:")) ||
+ port_has_prefix (p, N_("alsa_pcm")) ||
port_has_prefix (p, lpnc)) {
extra_system[t].push_back (p);
} else {
diff --git a/gtk2_ardour/port_group.h b/gtk2_ardour/port_group.h
index f0bb1c4c58..1deff38432 100644
--- a/gtk2_ardour/port_group.h
+++ b/gtk2_ardour/port_group.h
@@ -75,7 +75,7 @@ public:
boost::shared_ptr<ARDOUR::Bundle> bundle;
/** IO whose ports are in the bundle, or 0. This is so that we can do things like adding
ports to the IO from matrix editor menus. */
- boost::weak_ptr<ARDOUR::IO> io;
+ boost::weak_ptr<ARDOUR::IO> io;
Gdk::Color colour;
bool has_colour;
PBD::ScopedConnection changed_connection;
diff --git a/gtk2_ardour/port_insert_ui.cc b/gtk2_ardour/port_insert_ui.cc
index 5546fd533b..24b94f9bdd 100644
--- a/gtk2_ardour/port_insert_ui.cc
+++ b/gtk2_ardour/port_insert_ui.cc
@@ -58,7 +58,7 @@ PortInsertUI::PortInsertUI (Gtk::Window* parent, ARDOUR::Session* sess, boost::s
notebook.append_page (input_selector, _("Return/Input"));
notebook.set_current_page (0);
-
+
set_spacing (12);
pack_start (notebook, true, true);
pack_start (latency_hbox, false, false);
@@ -76,7 +76,7 @@ PortInsertUI::update_latency_display ()
latency_display.set_text (_("Disconnected from audio engine"));
} else {
char buf[64];
- snprintf (buf, sizeof (buf), "%10.3lf frames %10.3lf ms",
+ snprintf (buf, sizeof (buf), "%10.3lf frames %10.3lf ms",
(float)_pi->latency(), (float)_pi->latency() * 1000.0f/sample_rate);
latency_display.set_text(buf);
}
diff --git a/gtk2_ardour/port_insert_ui.h b/gtk2_ardour/port_insert_ui.h
index 297621beec..820fd75629 100644
--- a/gtk2_ardour/port_insert_ui.h
+++ b/gtk2_ardour/port_insert_ui.h
@@ -37,7 +37,7 @@ class PortInsertUI : public Gtk::VBox
private:
boost::shared_ptr<ARDOUR::PortInsert> _pi;
-
+
Gtk::Notebook notebook;
Gtk::ToggleButton latency_button;
IOSelector input_selector;
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 696c625da0..d537dd18a1 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -145,7 +145,7 @@ PortMatrix::init ()
}
/* Part 2: notice when things have changed that require our subclass to clear and refill _ports[] */
-
+
/* watch for routes being added or removed */
_session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::routes_changed, this), gui_context());
@@ -159,14 +159,14 @@ PortMatrix::init ()
_session->RouteOrderKeyChanged.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports_proxy, this), gui_context());
/* Part 3: other stuff */
-
+
_session->engine().PortConnectedOrDisconnected.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::port_connected_or_disconnected, this), gui_context ());
_hscroll.signal_value_changed().connect (sigc::mem_fun (*this, &PortMatrix::hscroll_changed));
_vscroll.signal_value_changed().connect (sigc::mem_fun (*this, &PortMatrix::vscroll_changed));
reconnect_to_routes ();
-
+
setup ();
}
@@ -209,7 +209,7 @@ PortMatrix::setup ()
notebook state to decide which ports are being shown */
setup_notebooks ();
-
+
_body->setup ();
setup_scrollbars ();
queue_draw ();
@@ -331,7 +331,7 @@ PortMatrix::select_arrangement ()
attach (_hscroll, 2, 3, 3, 4, FILL | EXPAND, SHRINK);
attach (_vbox, 1, 2, 1, 2, SHRINK);
attach (_hbox, 2, 3, 2, 3, FILL | EXPAND, SHRINK);
-
+
} else {
_row_index = 1;
@@ -426,7 +426,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
can_add_or_rename = true;
}
}
-
+
if (can_rename_channels (bc[dim].bundle)) {
snprintf (
buf, sizeof (buf), _("Rename '%s'..."),
@@ -454,7 +454,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
sub.push_back (
MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::remove_all_channels), w))
);
-
+
if (bc[dim].bundle->nchannels().n_total() > 1) {
for (uint32_t i = 0; i < bc[dim].bundle->nchannels().n_total(); ++i) {
if (should_show (bc[dim].bundle->channel_type(i))) {
@@ -470,9 +470,9 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
sub.push_back (
MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::disassociate_all_on_channel), w, bc[dim].channel, dim))
);
-
+
} else {
-
+
if (bc[dim].channel != -1) {
add_disassociate_option (sub, w, dim, bc[dim].channel);
} else {
@@ -480,7 +480,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
sub.push_back (
MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::disassociate_all_on_bundle), w, dim))
);
-
+
for (uint32_t i = 0; i < bc[dim].bundle->nchannels().n_total(); ++i) {
if (should_show (bc[dim].bundle->channel_type(i))) {
add_disassociate_option (sub, w, dim, i);
@@ -620,7 +620,7 @@ PortMatrix::toggle_show_only_bundles ()
}
_show_only_bundles = !_show_only_bundles;
-
+
setup ();
}
@@ -745,12 +745,12 @@ PortMatrix::setup_notebooks ()
{
int const h_current_page = _hnotebook.get_current_page ();
int const v_current_page = _vnotebook.get_current_page ();
-
+
/* for some reason best known to GTK, erroneous switch_page signals seem to be generated
when adding or removing pages to or from notebooks, so ignore them */
-
+
_ignore_notebook_page_selected = true;
-
+
remove_notebook_pages (_hnotebook);
remove_notebook_pages (_vnotebook);
@@ -808,7 +808,7 @@ void
PortMatrix::remove_notebook_pages (Notebook& n)
{
int const N = n.get_n_pages ();
-
+
for (int i = 0; i < N; ++i) {
n.remove_page ();
}
@@ -852,7 +852,7 @@ PortMatrix::body_dimensions_changed ()
/* Don't shrink the window */
m.first = max (int (m.first), curr_width);
m.second = max (int (m.second), curr_height);
-
+
resize_window_to_proportion_of_monitor (_parent, m.first, m.second);
}
@@ -875,7 +875,7 @@ PortMatrix::visible_ports (int d) const
++i;
++j;
}
-
+
if (j == p.end()) {
return boost::shared_ptr<const PortGroup> ();
}
@@ -892,7 +892,7 @@ PortMatrix::add_remove_option (Menu_Helpers::MenuList& m, boost::weak_ptr<Bundle
if (!b) {
return;
}
-
+
char buf [64];
snprintf (buf, sizeof (buf), _("Remove '%s'"), escape_underscores (b->channel_name (c)).c_str());
m.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::remove_channel_proxy), w, c)));
@@ -907,7 +907,7 @@ PortMatrix::add_disassociate_option (Menu_Helpers::MenuList& m, boost::weak_ptr<
if (!b) {
return;
}
-
+
char buf [64];
snprintf (buf, sizeof (buf), _("%s all from '%s'"), disassociation_verb().c_str(), escape_underscores (b->channel_name (c)).c_str());
m.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::disassociate_all_on_channel), w, c, d)));
@@ -931,7 +931,7 @@ PortMatrix::should_show (DataType t) const
{
return (_type == DataType::NIL || t == _type);
}
-
+
uint32_t
PortMatrix::count_of_our_type (ChanCount c) const
{
diff --git a/gtk2_ardour/port_matrix.h b/gtk2_ardour/port_matrix.h
index d7776ca0cd..01fb67c0ae 100644
--- a/gtk2_ardour/port_matrix.h
+++ b/gtk2_ardour/port_matrix.h
@@ -85,7 +85,7 @@ public:
LEFT_TO_BOTTOM ///< row labels to the left, column labels on the bottom
};
-
+
/** @return Arrangement in use */
Arrangement arrangement () const {
return _arrangement;
@@ -116,7 +116,7 @@ public:
}
boost::shared_ptr<const PortGroup> visible_ports (int d) const;
-
+
void init ();
void setup ();
virtual void setup_ports (int) = 0;
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index 3d564319f8..2b12ed092a 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -112,7 +112,7 @@ PortMatrixBody::on_expose_event (GdkEventExpose* event)
r.intersect ((*i)->parent_rectangle(), intersects);
if (intersects) {
-
+
gdk_draw_drawable (
get_window()->gobj(),
get_style()->get_fg_gc (Gtk::STATE_NORMAL)->gobj(),
@@ -261,25 +261,25 @@ PortMatrixBody::setup ()
if (_matrix->visible_rows()) {
PortGroup::BundleList r = _matrix->visible_rows()->bundles ();
for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) {
-
+
(*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&PortMatrixBody::rebuild_and_draw_row_labels, this), gui_context());
-
+
}
}
-
+
if (_matrix->visible_columns()) {
PortGroup::BundleList c = _matrix->visible_columns()->bundles ();
for (PortGroup::BundleList::iterator i = c.begin(); i != c.end(); ++i) {
(*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&PortMatrixBody::rebuild_and_draw_column_labels, this), gui_context());
}
}
-
+
for (list<PortMatrixComponent*>::iterator i = _components.begin(); i != _components.end(); ++i) {
(*i)->setup ();
}
set_mouseover (PortMatrixNode ());
-
+
_ignore_component_size_changed = true;
compute_rectangles ();
_ignore_component_size_changed = false;
@@ -398,7 +398,7 @@ bool
PortMatrixBody::on_motion_notify_event (GdkEventMotion* ev)
{
bool done = false;
-
+
for (list<PortMatrixComponent*>::iterator i = _components.begin(); i != _components.end(); ++i) {
if (Gdk::Region ((*i)->parent_rectangle()).point_in (ev->x, ev->y)) {
(*i)->motion (
@@ -409,7 +409,7 @@ PortMatrixBody::on_motion_notify_event (GdkEventMotion* ev)
done = true;
}
}
-
+
if (!done) {
set_mouseover (PortMatrixNode ());
@@ -446,7 +446,7 @@ PortMatrixBody::set_mouseover (list<PortMatrixNode> const & n)
list<PortMatrixNode> old = _mouseover;
_mouseover = n;
-
+
for (list<PortMatrixComponent*>::iterator i = _components.begin(); i != _components.end(); ++i) {
(*i)->mouseover_changed (old);
}
@@ -507,7 +507,7 @@ PortMatrixBody::component_size_changed ()
if (_ignore_component_size_changed) {
return;
}
-
+
compute_rectangles ();
_matrix->setup_scrollbars ();
}
diff --git a/gtk2_ardour/port_matrix_column_labels.cc b/gtk2_ardour/port_matrix_column_labels.cc
index ac4e1fef45..f9b5b6aef8 100644
--- a/gtk2_ardour/port_matrix_column_labels.cc
+++ b/gtk2_ardour/port_matrix_column_labels.cc
@@ -151,7 +151,7 @@ PortMatrixColumnLabels::render (cairo_t* cr)
} else {
x += _matrix->count_of_our_type ((*i)->bundle->nchannels()) * grid_spacing();
}
-
+
++N;
}
@@ -168,12 +168,12 @@ PortMatrixColumnLabels::render (cairo_t* cr)
if (!_matrix->should_show ((*i)->bundle->channel_type(j))) {
continue;
}
-
+
Gdk::Color c = (*i)->has_colour ? (*i)->colour : get_a_bundle_colour (N);
render_channel_name (cr, background_colour (), c, x, 0, ARDOUR::BundleChannel ((*i)->bundle, j));
x += grid_spacing();
}
-
+
++N;
}
}
@@ -213,7 +213,7 @@ PortMatrixColumnLabels::mouseover_changed (list<PortMatrixNode> const &)
ARDOUR::BundleChannel c = i->column;
ARDOUR::BundleChannel r = i->row;
-
+
if (c.bundle && r.bundle) {
add_channel_highlight (c);
} else if (c.bundle) {
@@ -359,7 +359,7 @@ PortMatrixColumnLabels::render_channel_name (
xoff + grid_spacing() - q * sin (angle ()),
yoff + _height - q * cos (angle ())
);
-
+
} else {
@@ -375,15 +375,15 @@ PortMatrixColumnLabels::render_channel_name (
/* only plot the name if the bundle has more than one channel;
the name of a single channel is assumed to be redundant */
-
+
cairo_save (cr);
cairo_rotate (cr, -angle());
-
+
cairo_show_text (
cr,
bc.bundle->channel_name(bc.channel).c_str()
);
-
+
cairo_restore (cr);
}
}
@@ -494,7 +494,7 @@ PortMatrixColumnLabels::motion (double x, double y)
) {
/* if the mouse is over a bundle name, highlight all channels in the bundle */
-
+
list<PortMatrixNode> n;
for (uint32_t i = 0; i < w.bundle->nchannels().n_total(); ++i) {
@@ -502,7 +502,7 @@ PortMatrixColumnLabels::motion (double x, double y)
if (!_matrix->should_show (w.bundle->channel_type(i))) {
continue;
}
-
+
ARDOUR::BundleChannel const bc (w.bundle, i);
n.push_back (PortMatrixNode (ARDOUR::BundleChannel (), bc));
}
@@ -510,7 +510,7 @@ PortMatrixColumnLabels::motion (double x, double y)
_body->set_mouseover (n);
} else {
-
+
_body->set_mouseover (PortMatrixNode (ARDOUR::BundleChannel (), w));
}
-}
+}
diff --git a/gtk2_ardour/port_matrix_component.cc b/gtk2_ardour/port_matrix_component.cc
index b2425dcef4..38a07479b0 100644
--- a/gtk2_ardour/port_matrix_component.cc
+++ b/gtk2_ardour/port_matrix_component.cc
@@ -155,17 +155,17 @@ PortMatrixComponent::channel_to_position (ARDOUR::BundleChannel bc, boost::share
if ((*i)->bundle == bc.bundle) {
/* found the bundle */
-
+
if (_matrix->show_only_bundles()) {
return p;
} else {
return p + bc.channel;
}
-
+
}
/* move past this bundle */
-
+
if (_matrix->show_only_bundles()) {
p += 1;
} else {
@@ -181,30 +181,30 @@ ARDOUR::BundleChannel
PortMatrixComponent::position_to_channel (double p, double, boost::shared_ptr<const PortGroup> group) const
{
p /= grid_spacing ();
-
+
PortGroup::BundleList const & bundles = group->bundles ();
for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {
if (_matrix->show_only_bundles()) {
-
+
if (p < 1) {
return ARDOUR::BundleChannel ((*j)->bundle, -1);
} else {
p -= 1;
}
-
+
} else {
-
+
uint32_t const s = _matrix->count_of_our_type ((*j)->bundle->nchannels());
if (p < s) {
return ARDOUR::BundleChannel ((*j)->bundle, p);
} else {
p -= s;
}
-
+
}
-
+
}
-
+
return ARDOUR::BundleChannel (boost::shared_ptr<ARDOUR::Bundle> (), -1);
}
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc
index 96e9cb949c..4a2f569d5c 100644
--- a/gtk2_ardour/port_matrix_grid.cc
+++ b/gtk2_ardour/port_matrix_grid.cc
@@ -192,15 +192,15 @@ PortMatrixGrid::render (cairo_t* cr)
} else {
/* these two channels might be associated */
PortMatrixNode::State const s = _matrix->get_state (c);
-
+
switch (s) {
case PortMatrixNode::ASSOCIATED:
draw_association_indicator (cr, x, y);
break;
-
+
case PortMatrixNode::NOT_ASSOCIATED:
break;
-
+
default:
break;
}
@@ -284,10 +284,10 @@ PortMatrixGrid::button_press (double x, double y, int b, uint32_t t, guint)
ARDOUR::BundleChannel const py = position_to_channel (y, x, _matrix->visible_rows());
if (b == 1) {
-
+
_dragging = true;
_drag_valid = (px.bundle && py.bundle);
-
+
_moved = false;
_drag_start_x = x / grid_spacing ();
_drag_start_y = y / grid_spacing ();
@@ -310,7 +310,7 @@ PortMatrixGrid::set_association (PortMatrixNode node, bool s)
if (!_matrix->should_show (node.column.bundle->channel_type(i)) || !_matrix->should_show (node.row.bundle->channel_type(j))) {
continue;
}
-
+
ARDOUR::BundleChannel c[2];
c[_matrix->column_index()] = ARDOUR::BundleChannel (node.column.bundle, i);
c[_matrix->row_index()] = ARDOUR::BundleChannel (node.row.bundle, j);
@@ -336,12 +336,12 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/, guint
if (b == 1) {
if (x != -1) {
-
+
if (_dragging && _moved) {
-
+
if (_drag_valid) {
list<PortMatrixNode> const p = nodes_on_line (_drag_start_x, _drag_start_y, _drag_x, _drag_y);
-
+
if (!p.empty()) {
PortMatrixNode::State const s = _matrix->get_association (p.front());
for (list<PortMatrixNode>::const_iterator i = p.begin(); i != p.end(); ++i) {
@@ -349,9 +349,9 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/, guint
}
}
}
-
+
} else {
-
+
if (Keyboard::modifier_state_equals (s, Keyboard::PrimaryModifier)) {
/* associate/disassociate things diagonally down and right until we run out */
PortMatrixNode::State s = (PortMatrixNode::State) 0;
@@ -368,9 +368,9 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/, guint
x += grid_spacing ();
y += grid_spacing ();
}
-
+
} else {
-
+
PortMatrixNode const n = position_to_node (x, y);
if (n.row.bundle && n.column.bundle) {
PortMatrixNode::State const s = _matrix->get_association (n);
@@ -381,7 +381,7 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/, guint
require_render ();
}
-
+
_body->queue_draw ();
}
@@ -398,7 +398,7 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
list<PortMatrixNode> const m = _body->mouseover ();
for (list<PortMatrixNode>::const_iterator i = m.begin(); i != m.end(); ++i) {
-
+
double const x = component_to_parent_x (channel_to_position (i->column, _matrix->visible_columns()) * grid_spacing()) + grid_spacing() / 2;
double const y = component_to_parent_y (channel_to_position (i->row, _matrix->visible_rows()) * grid_spacing()) + grid_spacing() / 2;
@@ -411,7 +411,7 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
cairo_line_to (cr, _parent_rectangle.get_x() + _parent_rectangle.get_width(), y);
}
cairo_stroke (cr);
-
+
cairo_move_to (cr, x, y);
if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
cairo_line_to (cr, x, _parent_rectangle.get_y() + _parent_rectangle.get_height());
@@ -496,7 +496,7 @@ void
PortMatrixGrid::queue_draw_for (list<PortMatrixNode> const &n)
{
for (list<PortMatrixNode>::const_iterator i = n.begin(); i != n.end(); ++i) {
-
+
if (i->row.bundle) {
double const y = channel_to_position (i->row, _matrix->visible_rows()) * grid_spacing ();
@@ -511,7 +511,7 @@ PortMatrixGrid::queue_draw_for (list<PortMatrixNode> const &n)
if (i->column.bundle) {
double const x = channel_to_position (i->column, _matrix->visible_columns()) * grid_spacing ();
-
+
_body->queue_draw_area (
component_to_parent_x (x),
_parent_rectangle.get_y(),
diff --git a/gtk2_ardour/port_matrix_row_labels.cc b/gtk2_ardour/port_matrix_row_labels.cc
index 9468744837..bc6e2a2fa1 100644
--- a/gtk2_ardour/port_matrix_row_labels.cc
+++ b/gtk2_ardour/port_matrix_row_labels.cc
@@ -59,7 +59,7 @@ PortMatrixRowLabels::compute_dimensions ()
if (!_matrix->should_show ((*j)->bundle->channel_type(k))) {
continue;
}
-
+
cairo_text_extents_t ext;
cairo_text_extents (cr, (*j)->bundle->channel_name(k).c_str(), &ext);
if (ext.width > _longest_port_name) {
@@ -109,7 +109,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
double y = 0;
int N = 0;
int M = 0;
-
+
PortGroup::BundleList const & bundles = _matrix->visible_rows()->bundles ();
for (PortGroup::BundleList::const_iterator i = bundles.begin(); i != bundles.end(); ++i) {
render_bundle_name (cr, background_colour (), (*i)->has_colour ? (*i)->colour : get_a_bundle_colour (N), 0, y, (*i)->bundle);
@@ -120,7 +120,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
if (!_matrix->should_show ((*i)->bundle->channel_type(j))) {
continue;
}
-
+
Gdk::Color c = (*i)->has_colour ? (*i)->colour : get_a_bundle_colour (M);
render_channel_name (cr, background_colour (), c, 0, y, ARDOUR::BundleChannel ((*i)->bundle, j));
y += grid_spacing();
@@ -129,7 +129,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
} else {
y += grid_spacing();
}
-
+
++N;
}
}
@@ -142,7 +142,7 @@ PortMatrixRowLabels::button_press (double x, double y, int b, uint32_t t, guint)
if (
(_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT && x > (_longest_port_name + name_pad() * 2)) ||
(_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM && x < (_longest_bundle_name + name_pad() * 2))
-
+
) {
w.channel = -1;
}
@@ -252,7 +252,7 @@ PortMatrixRowLabels::render_channel_name (
/* only plot the name if the bundle has more than one channel;
the name of a single channel is assumed to be redundant */
-
+
set_source_rgb (cr, text_colour());
cairo_move_to (cr, port_name_x() + xoff + name_pad(), yoff + name_pad() + off);
cairo_show_text (cr, bc.bundle->channel_name(bc.channel).c_str());
@@ -300,10 +300,10 @@ PortMatrixRowLabels::mouseover_changed (list<PortMatrixNode> const &)
{
list<PortMatrixNode> const m = _body->mouseover ();
for (list<PortMatrixNode>::const_iterator i = m.begin(); i != m.end(); ++i) {
-
+
ARDOUR::BundleChannel c = i->column;
ARDOUR::BundleChannel r = i->row;
-
+
if (c.bundle && r.bundle) {
add_channel_highlight (r);
} else if (r.bundle) {
@@ -322,35 +322,35 @@ PortMatrixRowLabels::motion (double x, double y)
bool done = false;
if (w.bundle) {
-
+
if (
(_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM && x < bw) ||
(_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT && x > (_width - bw) && x < _width)
-
+
) {
/* if the mouse is over a bundle name, highlight all channels in the bundle */
-
+
list<PortMatrixNode> n;
-
+
for (uint32_t i = 0; i < w.bundle->nchannels().n_total(); ++i) {
if (!_matrix->should_show (w.bundle->channel_type(i))) {
continue;
}
-
+
ARDOUR::BundleChannel const bc (w.bundle, i);
n.push_back (PortMatrixNode (bc, ARDOUR::BundleChannel ()));
}
-
+
_body->set_mouseover (n);
done = true;
-
+
} else if (x < _width) {
-
+
_body->set_mouseover (PortMatrixNode (w, ARDOUR::BundleChannel ()));
done = true;
-
+
}
}
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 02905c2189..be3547e451 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -130,7 +130,7 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> p, Width w)
_event_box.show ();
_name.show ();
_active.show ();
-
+
_processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context());
_processor->PropertyChanged.connect (name_connection, invalidator (*this), ui_bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context());
}
@@ -211,7 +211,7 @@ ProcessorEntry::setup_visuals ()
break;
}
}
-
+
boost::shared_ptr<Processor>
ProcessorEntry::processor () const
@@ -260,18 +260,18 @@ ProcessorEntry::name () const
{
boost::shared_ptr<Send> send;
string name_display;
-
+
if ((send = boost::dynamic_pointer_cast<Send> (_processor)) != 0 &&
!boost::dynamic_pointer_cast<InternalSend>(_processor)) {
-
+
name_display += '>';
-
+
/* grab the send name out of its overall name */
-
+
string::size_type lbracket, rbracket;
lbracket = send->name().find ('[');
rbracket = send->name().find (']');
-
+
switch (_width) {
case Wide:
name_display += send->name().substr (lbracket+1, lbracket-rbracket-1);
@@ -280,9 +280,9 @@ ProcessorEntry::name () const
name_display += PBD::short_version (send->name().substr (lbracket+1, lbracket-rbracket-1), 4);
break;
}
-
+
} else {
-
+
switch (_width) {
case Wide:
name_display += _processor->display_name();
@@ -291,9 +291,9 @@ ProcessorEntry::name () const
name_display += PBD::short_version (_processor->display_name(), 5);
break;
}
-
+
}
-
+
return name_display;
}
@@ -327,7 +327,7 @@ void
SendProcessorEntry::show_gain ()
{
ENSURE_GUI_THREAD (*this, &SendProcessorEntry::show_gain)
-
+
float const value = gain_to_slider_position (_send->amp()->gain ());
if (_adjustment.get_value() != value) {
@@ -423,7 +423,7 @@ PluginInsertProcessorEntry::SplittingIcon::on_expose_event (GdkEventExpose* ev)
Gdk::Color const bg = get_style()->get_bg (STATE_NORMAL);
cairo_set_source_rgb (cr, bg.get_red_p (), bg.get_green_p (), bg.get_blue_p ());
-
+
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
@@ -500,7 +500,7 @@ ProcessorBox::set_route (boost::shared_ptr<Route> r)
if (_route == r) {
return;
}
-
+
_route_connections.drop_connections();
/* new route: any existing block on processor redisplay must be meaningless */
@@ -510,11 +510,11 @@ ProcessorBox::set_route (boost::shared_ptr<Route> r)
_route->processors_changed.connect (
_route_connections, invalidator (*this), ui_bind (&ProcessorBox::route_processors_changed, this, _1), gui_context()
);
-
+
_route->DropReferences.connect (
_route_connections, invalidator (*this), boost::bind (&ProcessorBox::route_going_away, this), gui_context()
);
-
+
_route->PropertyChanged.connect (
_route_connections, invalidator (*this), ui_bind (&ProcessorBox::route_property_changed, this, _1), gui_context()
);
@@ -577,7 +577,7 @@ ProcessorBox::set_width (Width w)
if (_width == w) {
return;
}
-
+
_width = w;
list<ProcessorEntry*> children = processor_display.children ();
@@ -722,7 +722,7 @@ ProcessorBox::processor_key_release_event (GdkEventKey *ev)
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
processor_display.select_all ();
ret = true;
- }
+ }
break;
case GDK_c:
@@ -792,7 +792,7 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry*
if (child) {
processor = child->processor ();
}
-
+
int ret = false;
bool selected = processor_display.selected (child);
@@ -825,7 +825,7 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev, ProcessorEntry
if (child) {
processor = child->processor ();
}
-
+
int ret = false;
if (processor && Keyboard::is_delete_event (ev)) {
@@ -1144,7 +1144,7 @@ ProcessorBox::redisplay_processors ()
for (list<ProcessorWindowProxy*>::iterator i = _processor_window_proxies.begin(); i != _processor_window_proxies.end(); ++i) {
(*i)->marked = false;
}
-
+
_route->foreach_processor (sigc::mem_fun (*this, &ProcessorBox::maybe_add_processor_to_ui_list));
/* trim dead wood from the processor window proxy list */
@@ -1181,7 +1181,7 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
while (i != _processor_window_proxies.end()) {
boost::shared_ptr<Processor> t = (*i)->processor().lock ();
-
+
if (p == t) {
/* this processor is already on the list; done */
(*i)->marked = true;
@@ -1203,19 +1203,19 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
} else {
loc = X_("P");
}
-
+
ProcessorWindowProxy* wp = new ProcessorWindowProxy (
string_compose ("%1-%2-%3", loc, _route->id(), p->id()),
_session->extra_xml (X_("UI")),
this,
w);
-
+
wp->marked = true;
- /* if the processor already has an existing UI,
+ /* if the processor already has an existing UI,
note that so that we don't recreate it
*/
-
+
void* existing_ui = p->get_ui ();
if (existing_ui) {
@@ -1245,7 +1245,7 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
} else {
e = new ProcessorEntry (processor, _width);
}
-
+
e->set_pixel_width (get_allocation().get_width());
processor_display.add_child (e);
}
@@ -1261,7 +1261,7 @@ ProcessorBox::build_processor_tooltip (EventBox& box, string start)
tip += '\n';
tip += (*i)->processor()->name();
}
-
+
ARDOUR_UI::instance()->set_tip (box, tip);
}
@@ -1277,7 +1277,7 @@ ProcessorBox::setup_entry_positions ()
{
list<ProcessorEntry*> children = processor_display.children ();
bool pre_fader = true;
-
+
for (list<ProcessorEntry*>::iterator i = children.begin(); i != children.end(); ++i) {
if (boost::dynamic_pointer_cast<Amp>((*i)->processor())) {
pre_fader = false;
@@ -1316,14 +1316,14 @@ void
ProcessorBox::report_failed_reorder ()
{
/* reorder failed, so redisplay */
-
+
redisplay_processors ();
-
+
/* now tell them about the problem */
-
+
ArdourDialog dialog (_("Plugin Incompatibility"));
Label label;
-
+
label.set_text (_("\
You cannot reorder these plugins/sends/inserts\n\
in that way because the inputs and\n\
@@ -1332,12 +1332,12 @@ outputs will not work correctly."));
dialog.get_vbox()->set_border_width (12);
dialog.get_vbox()->pack_start (label);
dialog.add_button (Stock::OK, RESPONSE_ACCEPT);
-
+
dialog.set_name (X_("PluginIODialog"));
dialog.set_position (Gtk::WIN_POS_MOUSE);
dialog.set_modal (true);
dialog.show_all ();
-
+
dialog.run ();
}
@@ -1363,18 +1363,18 @@ ProcessorBox::can_cut () const
vector<boost::shared_ptr<Processor> > sel;
get_selected_processors (sel);
-
+
/* cut_processors () does not cut inserts */
for (vector<boost::shared_ptr<Processor> >::const_iterator i = sel.begin (); i != sel.end (); ++i) {
-
+
if (boost::dynamic_pointer_cast<PluginInsert>((*i)) != 0 ||
(boost::dynamic_pointer_cast<Send>((*i)) != 0) ||
(boost::dynamic_pointer_cast<Return>((*i)) != 0)) {
return true;
}
}
-
+
return false;
}
@@ -1629,7 +1629,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
}
p.reset (s);
-
+
} else if (type->value() == "return") {
@@ -1824,7 +1824,7 @@ ProcessorBox::toggle_edit_processor (boost::shared_ptr<Processor> processor)
if (boost::dynamic_pointer_cast<Amp> (processor)) {
_parent_strip->revert_to_default_display ();
-
+
} else if ((internal_send = boost::dynamic_pointer_cast<InternalSend> (processor)) != 0) {
if (!_session->engine().connected()) {
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h
index 559945e0fe..c595ded4bb 100644
--- a/gtk2_ardour/processor_box.h
+++ b/gtk2_ardour/processor_box.h
@@ -113,7 +113,7 @@ public:
Fader,
PostFader
};
-
+
void set_position (Position);
boost::shared_ptr<ARDOUR::Processor> processor () const;
void set_enum_width (Width);
@@ -123,12 +123,12 @@ public:
virtual void hide_things () {}
protected:
-
+
virtual void setup_visuals ();
-
+
Gtk::VBox _vbox;
Position _position;
-
+
private:
void active_toggled ();
@@ -161,7 +161,7 @@ public:
private:
void show_gain ();
void gain_adjusted ();
-
+
boost::shared_ptr<ARDOUR::Send> _send;
Gtk::Adjustment _adjustment;
Gtkmm2ext::HSliderController _fader;
@@ -177,7 +177,7 @@ public:
PluginInsertProcessorEntry (boost::shared_ptr<ARDOUR::PluginInsert>, Width);
void hide_things ();
-
+
private:
void setup_visuals ();
void plugin_insert_splitting_changed ();
@@ -216,7 +216,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;
void toggle_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
void toggle_processor_controls (boost::shared_ptr<ARDOUR::Processor>);
-
+
sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorSelected;
sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorUnselected;
@@ -226,7 +226,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
/* prevent copy construction */
ProcessorBox (ProcessorBox const &);
-
+
boost::shared_ptr<ARDOUR::Route> _route;
MixerStrip* _parent_strip; // null if in RouteParamsUI
bool _owner_is_mixer;
@@ -334,7 +334,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
void on_size_allocate (Gtk::Allocation &);
void setup_entry_positions ();
-
+
static ProcessorBox* _current_processor_box;
static void rb_choose_aux (boost::weak_ptr<ARDOUR::Route>);
diff --git a/gtk2_ardour/progress_reporter.cc b/gtk2_ardour/progress_reporter.cc
index 30093ddc99..c6b6709869 100644
--- a/gtk2_ardour/progress_reporter.cc
+++ b/gtk2_ardour/progress_reporter.cc
@@ -23,7 +23,7 @@
ProgressReporter::ProgressReporter ()
{
-
+
}
ProgressReporter::~ProgressReporter ()
diff --git a/gtk2_ardour/progress_reporter.h b/gtk2_ardour/progress_reporter.h
index 0fbabf5d23..2afa4ade56 100644
--- a/gtk2_ardour/progress_reporter.h
+++ b/gtk2_ardour/progress_reporter.h
@@ -28,7 +28,7 @@ class ProgressReporter : public ARDOUR::Progress
public:
ProgressReporter ();
virtual ~ProgressReporter ();
-
+
private:
void set_overall_progress (float);
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index 84194f2b35..6e2524ae62 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -58,7 +58,7 @@ namespace Gtk {
class Menu;
}
-namespace Gtkmm2ext {
+namespace Gtkmm2ext {
class TearOff;
}
@@ -211,7 +211,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
/** Open main export dialog */
virtual void export_audio () = 0;
-
+
/** Open stem export dialog */
virtual void stem_export () = 0;
@@ -296,7 +296,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
sigc::signal<void,framepos_t> UpdateAllTransportClocks;
static sigc::signal<void> DropDownKeys;
-
+
Glib::RefPtr<Gtk::ActionGroup> editor_actions;
Glib::RefPtr<Gtk::ActionGroup> _region_actions;
@@ -370,7 +370,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const = 0;
virtual TrackViewList const & get_track_views () = 0;
-
+
virtual Gtkmm2ext::TearOff* mouse_mode_tearoff () const = 0;
virtual Gtkmm2ext::TearOff* tools_tearoff () const = 0;
@@ -382,7 +382,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual VerboseCursor * verbose_cursor () const = 0;
virtual void get_pointer_position (double &, double &) const = 0;
-
+
/// Singleton instance, set up by Editor::Editor()
static PublicEditor* _instance;
diff --git a/gtk2_ardour/quantize_dialog.cc b/gtk2_ardour/quantize_dialog.cc
index 88d1f54969..397eb23145 100644
--- a/gtk2_ardour/quantize_dialog.cc
+++ b/gtk2_ardour/quantize_dialog.cc
@@ -175,7 +175,7 @@ QuantizeDialog::grid_size_to_musical_time (const string& txt) const
} else if (txt == _("Beats")) {
return 1.0;
}
-
+
return 1.0;
}
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 9427eca6d6..3858ebaff0 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -349,7 +349,7 @@ public:
_delete_button_adjustment.set_value (Keyboard::delete_button());
_delete_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed));
-
+
set_popdown_strings (_insert_note_modifier_combo, dumb);
_insert_note_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen));
@@ -359,7 +359,7 @@ public:
break;
}
}
-
+
l = manage (new Label (_("Insert note using:")));
l->set_name ("OptionsLabel");
l->set_alignment (0, 0.5);
@@ -376,8 +376,8 @@ public:
_insert_note_button_spin.set_name ("OptionsEntry");
_insert_note_button_adjustment.set_value (Keyboard::insert_note_button());
_insert_note_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed));
-
-
+
+
set_popdown_strings (_snap_modifier_combo, dumb);
_snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen));
@@ -572,7 +572,7 @@ private:
class BufferingOptions : public OptionEditorBox
{
public:
- BufferingOptions (RCConfiguration* c)
+ BufferingOptions (RCConfiguration* c)
: _rc_config (c)
, _playback_adjustment (5, 1, 60, 1, 4)
, _capture_adjustment (5, 1, 60, 1, 4)
@@ -591,7 +591,7 @@ public:
h->pack_start (_playback_slider, true, true);
_box->pack_start (*h, false, false);
-
+
_capture_adjustment.set_value (_rc_config->get_audio_capture_buffer_seconds());
l = manage (new Label (_("Recording (seconds of buffering):")));
@@ -604,7 +604,7 @@ public:
h->pack_start (_capture_slider, true, true);
_box->pack_start (*h, false, false);
-
+
_capture_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::capture_changed));
_playback_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::playback_changed));
}
@@ -664,7 +664,7 @@ public:
_box->pack_start (*label, false, false);
label->show ();
-
+
_store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::model_changed));
_view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked));
}
@@ -730,15 +730,15 @@ private:
std::string name;
ControlProtocolInfo* cpi;
TreeModel::Row row;
-
+
row = *(_view.get_selection()->get_selected());
Window* win = row[_model.editor];
if (win && !win->is_visible()) {
- win->present ();
+ win->present ();
} else {
cpi = row[_model.protocol_info];
-
+
if (cpi && cpi->protocol && cpi->protocol->has_editor ()) {
Box* box = (Box*) cpi->protocol->get_gui ();
if (box) {
@@ -790,21 +790,21 @@ RCOptionEditor::RCOptionEditor ()
if (hwcpus > 1) {
add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization")));
-
+
ComboOption<int32_t>* procs = new ComboOption<int32_t> (
"processor-usage",
_("Signal processing uses"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_processor_usage),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_processor_usage)
);
-
+
procs->add (-1, _("all but one processor"));
procs->add (0, _("all available processors"));
-
+
for (uint32_t i = 1; i <= hwcpus; ++i) {
procs->add (i, string_compose (_("%1 processors"), i));
}
-
+
add_option (_("Misc"), procs);
}
@@ -901,7 +901,7 @@ RCOptionEditor::RCOptionEditor ()
));
add_option (_("Misc"), new OptionEditorHeading (_("Click")));
-
+
add_option (_("Misc"), new ClickOptions (_rc_config, this));
/* TRANSPORT */
@@ -1109,7 +1109,7 @@ RCOptionEditor::RCOptionEditor ()
mm->add (ExternalMonitoring, _("audio hardware"));
add_option (_("Audio"), mm);
-
+
ComboOption<PFLPosition>* pp = new ComboOption<PFLPosition> (
"pfl-position",
_("PFL signals come from"),
@@ -1312,7 +1312,7 @@ RCOptionEditor::RCOptionEditor ()
));
add_option (_("Solo / mute"), new OptionEditorHeading (_("Default track / bus muting options")));
-
+
add_option (_("Solo / mute"),
new BoolOption (
"mute-affects-pre-fader",
@@ -1328,7 +1328,7 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_post_fader),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_post_fader)
));
-
+
add_option (_("Solo / mute"),
new BoolOption (
"mute-affects-control-outs",
@@ -1336,7 +1336,7 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_control_outs),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_control_outs)
));
-
+
add_option (_("Solo / mute"),
new BoolOption (
"mute-affects-main-outs",
@@ -1447,7 +1447,7 @@ void
RCOptionEditor::parameter_changed (string const & p)
{
OptionEditor::parameter_changed (p);
-
+
if (p == "use-monitor-bus") {
bool const s = Config->get_use_monitor_bus ();
if (!s) {
diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h
index ed1cfa6fe0..4d26dc527d 100644
--- a/gtk2_ardour/rc_option_editor.h
+++ b/gtk2_ardour/rc_option_editor.h
@@ -35,7 +35,7 @@ public:
private:
void parameter_changed (std::string const &);
-
+
ARDOUR::RCConfiguration* _rc_config;
BoolOption* _solo_control_is_listen_control;
ComboOption<ARDOUR::ListenPosition>* _listen_position;
diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc
index 1118ac977f..b80698e6ed 100755
--- a/gtk2_ardour/region_editor.cc
+++ b/gtk2_ardour/region_editor.cc
@@ -69,7 +69,7 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
_clock_group->add (sync_offset_relative_clock);
_clock_group->add (sync_offset_absolute_clock);
_clock_group->add (start_clock);
-
+
position_clock.set_session (_session);
end_clock.set_session (_session);
length_clock.set_session (_session);
@@ -134,15 +134,15 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
_table.attach (end_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (end_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
-
+
_table.attach (length_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (length_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
-
+
_table.attach (sync_relative_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (sync_offset_relative_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
-
+
_table.attach (sync_absolute_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (sync_offset_absolute_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
@@ -154,7 +154,7 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
_table.attach (_sources_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (_sources, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
-
+
get_vbox()->pack_start (_table, true, true);
add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_ACCEPT);
@@ -407,7 +407,7 @@ RegionEditor::sync_offset_absolute_clock_changed ()
_region->clear_changes ();
_region->set_sync_position (sync_offset_absolute_clock.current_time());
_session->add_command (new StatefulDiffCommand (_region));
-
+
_session->commit_reversible_command ();
}
@@ -419,7 +419,7 @@ RegionEditor::sync_offset_relative_clock_changed ()
_region->clear_changes ();
_region->set_sync_position (sync_offset_relative_clock.current_time() + _region->position ());
_session->add_command (new StatefulDiffCommand (_region));
-
+
_session->commit_reversible_command ();
}
diff --git a/gtk2_ardour/region_editor.h b/gtk2_ardour/region_editor.h
index 9417ddfdd7..6579182282 100644
--- a/gtk2_ardour/region_editor.h
+++ b/gtk2_ardour/region_editor.h
@@ -56,9 +56,9 @@ class RegionEditor : public ArdourDialog
RegionEditor (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Region>);
virtual ~RegionEditor ();
- protected:
+ protected:
virtual void region_changed (const PBD::PropertyChange&);
-
+
Gtk::Table _table;
int _table_row;
diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc
index 2ad1ee2c7d..40b2773b6d 100644
--- a/gtk2_ardour/region_gain_line.cc
+++ b/gtk2_ardour/region_gain_line.cc
@@ -56,7 +56,7 @@ AudioRegionGainLine::start_drag_single (ControlPoint* cp, double x, float fracti
AutomationLine::start_drag_single (cp, x, fraction);
// XXX Stateful need to capture automation curve data
-
+
if (!rv.audio_region()->envelope_active()) {
trackview.session()->add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), &rv.audio_region()->get_state(), 0));
rv.audio_region()->set_envelope_active(false);
diff --git a/gtk2_ardour/region_layering_order_editor.cc b/gtk2_ardour/region_layering_order_editor.cc
index 6640d6d14a..41528fead6 100644
--- a/gtk2_ardour/region_layering_order_editor.cc
+++ b/gtk2_ardour/region_layering_order_editor.cc
@@ -46,7 +46,7 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
scroller_table->attach (scroller, 0, 1, 0, 1);
scroller_table->set_col_spacings (5);
scroller_table->set_row_spacings (5);
-
+
track_label.set_name ("RegionLayeringOrderEditorLabel");
track_label.set_text (_("Track:"));
track_label.set_alignment (0, 0.5);
@@ -56,7 +56,7 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
track_name_label.set_name ("RegionLayeringOrderEditorNameLabel");
track_name_label.set_alignment (0, 0.5);
clock.set_mode (AudioClock::BBT);
-
+
Gtk::Table* info_table = manage (new Gtk::Table (2, 2));
info_table->set_col_spacings (5);
info_table->set_row_spacings (5);
@@ -64,11 +64,11 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
info_table->attach (track_name_label, 1, 2, 0, 1, FILL, FILL);
info_table->attach (clock_label, 0, 1, 1, 2, FILL, FILL);
info_table->attach (clock, 1, 2, 1, 2, FILL, FILL);
-
+
get_vbox()->set_spacing (12);
get_vbox()->pack_start (*info_table, false, false);
get_vbox()->pack_start (*scroller_table, true, true);
-
+
info_table->set_name ("RegionLayeringOrderTable");
scroller_table->set_name ("RegionLayeringOrderTable");
@@ -187,7 +187,7 @@ RegionLayeringOrderEditor::on_key_press_event (GdkEventKey* ev)
if (ev->keyval == GDK_Return) {
handled = ArdourDialog::on_key_press_event (ev);
}
-
+
if (!handled) {
handled = key_press_focus_accelerator_handler (editor, ev);
}
@@ -195,10 +195,10 @@ RegionLayeringOrderEditor::on_key_press_event (GdkEventKey* ev)
if (!handled) {
handled = ArdourDialog::on_key_press_event (ev);
}
-
+
return handled;
}
-
+
void
RegionLayeringOrderEditor::maybe_present ()
{
diff --git a/gtk2_ardour/region_layering_order_editor.h b/gtk2_ardour/region_layering_order_editor.h
index 8c63994678..783d05804c 100644
--- a/gtk2_ardour/region_layering_order_editor.h
+++ b/gtk2_ardour/region_layering_order_editor.h
@@ -23,10 +23,10 @@ class RegionLayeringOrderEditor : public ArdourDialog
public:
RegionLayeringOrderEditor (PublicEditor&);
virtual ~RegionLayeringOrderEditor ();
-
+
void set_context(const std::string& name, ARDOUR::Session* s, const boost::shared_ptr<ARDOUR::Playlist> & pl, ARDOUR::framepos_t position);
void maybe_present ();
-
+
protected:
virtual bool on_key_press_event (GdkEventKey* event);
@@ -35,7 +35,7 @@ class RegionLayeringOrderEditor : public ArdourDialog
framepos_t position;
bool in_row_change;
uint32_t regions_at_position;
-
+
PBD::ScopedConnection playlist_modified_connection;
struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord {
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 8ad7502414..333e2104ad 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -87,7 +87,7 @@ bool RegionSelection::contains (RegionView* rv) const
/** Add a region to the selection.
* @param rv Region to add.
- * @return false if we already had the region or if it cannot be added,
+ * @return false if we already had the region or if it cannot be added,
* otherwise true.
*/
bool
@@ -137,7 +137,7 @@ RegionSelection::remove (RegionView* rv)
// remove from layer sorted list
_bylayer.remove (rv);
-
+
erase (r);
return true;
}
@@ -260,7 +260,7 @@ RegionSelection::start () const
if (s == max_framepos) {
return 0;
}
-
+
return s;
}
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index f9f99c5da5..093848c84d 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -192,7 +192,7 @@ RegionView::init (Gdk::Color const & basic_color, bool wfd)
set_height (trackview.current_height());
_region->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&RegionView::region_changed, this, _1), gui_context());
-
+
group->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_event), group, this));
set_colors ();
@@ -239,7 +239,7 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres
_silent_frames.push_back (cr);
/* coordinates for the rect are relative to the regionview origin */
-
+
cr->property_x1() = trackview.editor().frame_to_pixel (i->first - _region->start());
cr->property_x2() = trackview.editor().frame_to_pixel (i->second - _region->start());
cr->property_y1() = 1;
@@ -252,7 +252,7 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres
/* Find shortest audible segment */
framecnt_t shortest_audible = max_framecnt;
-
+
framecnt_t s = _region->start();
for (AudioIntervalResult::const_iterator i = silences.begin(); i != silences.end(); ++i) {
framecnt_t const dur = i->first - s;
@@ -270,20 +270,20 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres
_silence_text = new ArdourCanvas::NoEventText (*group);
_silence_text->property_font_desc() = *(get_font_for_style (N_("SilenceText")));
- _silence_text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SilenceText.get();
+ _silence_text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SilenceText.get();
_silence_text->property_anchor() = ANCHOR_NW;
-
+
/* both positions are relative to the region start offset in source */
-
+
_silence_text->property_x() = trackview.editor().frame_to_pixel (silences.front().first - _region->start()) + 10.0;
_silence_text->property_y() = 20.0;
-
+
double ms = (float) shortest/_region->session().frame_rate();
-
+
/* ms are now in seconds */
char const * sunits;
-
+
if (ms >= 60.0) {
sunits = _("minutes");
ms /= 60.0;
@@ -302,7 +302,7 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres
/* ms are now in seconds */
double ma = (float) shortest_audible / _region->session().frame_rate();
char const * aunits;
-
+
if (ma >= 60.0) {
aunits = _("minutes");
ma /= 60.0;
@@ -317,7 +317,7 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres
}
_silence_text->property_text() = text.c_str ();
-}
+}
void
RegionView::hide_silent_frames ()
@@ -618,7 +618,7 @@ RegionView::region_sync_changed ()
sync_mark->property_fill_color_rgba() = RGBA_TO_UINT(0,255,0,255); // fill_color; // FIXME make a themeable colour
sync_line = new ArdourCanvas::Line (*group);
- sync_line->property_fill_color_rgba() = RGBA_TO_UINT(0,255,0,255); // fill_color; // FIXME make a themeable colour
+ sync_line->property_fill_color_rgba() = RGBA_TO_UINT(0,255,0,255); // fill_color; // FIXME make a themeable colour
sync_line->property_width_pixels() = 1;
}
@@ -894,7 +894,7 @@ RegionView::trim_end (framepos_t new_bound, bool no_overlap)
}
region_changed (ARDOUR::bounds_change);
-
+
} else {
region_changed (PropertyChange (ARDOUR::Properties::length));
}
diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h
index a96862f08a..135c573ac2 100644
--- a/gtk2_ardour/region_view.h
+++ b/gtk2_ardour/region_view.h
@@ -107,7 +107,7 @@ class RegionView : public TimeAxisViewItem
/** Called when a start trim has finished */
virtual void trim_front_ending () {}
-
+
void trim_end (framepos_t, bool);
void trim_contents (framepos_t, bool, bool);
virtual void thaw_after_trim ();
@@ -128,32 +128,32 @@ class RegionView : public TimeAxisViewItem
Gdk::Color const & basic_color,
bool recording,
TimeAxisViewItem::Visibility);
-
+
virtual void region_resized (const PBD::PropertyChange&);
virtual void region_muted ();
void region_locked ();
void region_opacity ();
virtual void region_renamed ();
void region_sync_changed ();
-
+
std::string make_name () const;
-
+
static gint _lock_toggle (ArdourCanvas::Item*, GdkEvent*, void*);
void lock_toggle ();
-
+
virtual void set_colors ();
virtual void set_frame_color ();
virtual void reset_width_dependent_items (double pixel_width);
-
+
virtual void color_handler () {}
-
+
boost::shared_ptr<ARDOUR::Region> _region;
-
+
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
ArdourCanvas::Line* sync_line; ///< polgyon for sync position
-
+
RegionEditor* editor;
-
+
std::vector<ControlPoint *> control_points;
double current_visible_sync_position;
@@ -161,18 +161,18 @@ class RegionView : public TimeAxisViewItem
bool _enable_display; ///< see StreamView::redisplay_diskstream()
double _pixel_width;
bool in_destructor;
-
+
bool wait_for_data;
-
+
std::vector<GhostRegion*> ghosts;
-
+
/** a list of rectangles which are used in stacked display mode to colour
different bits of regions according to whether or not they are the one
that will be played at any given time.
*/
std::list<ArdourCanvas::SimpleRect*> _coverage_frames;
- /** a list of rectangles used to show silent segments
+ /** a list of rectangles used to show silent segments
*/
std::list<ArdourCanvas::SimpleRect*> _silent_frames;
/** a list of rectangles used to show the current silence threshold
@@ -181,7 +181,7 @@ class RegionView : public TimeAxisViewItem
/** a text item to display strip silence statistics
*/
ArdourCanvas::NoEventText* _silence_text;
-
+
ARDOUR::BeatsFramesConverter _time_converter;
};
diff --git a/gtk2_ardour/return_ui.cc b/gtk2_ardour/return_ui.cc
index d279aa55f4..4ac3ab8ad1 100644
--- a/gtk2_ardour/return_ui.cc
+++ b/gtk2_ardour/return_ui.cc
@@ -125,7 +125,7 @@ void
ReturnUIWindow::return_going_away ()
{
ENSURE_GUI_THREAD (*this, &ReturnUIWindow::return_going_away)
- going_away_connection.disconnect ();
+ going_away_connection.disconnect ();
delete_when_idle (this);
}
diff --git a/gtk2_ardour/return_ui.h b/gtk2_ardour/return_ui.h
index 8c9e87074c..be7cb28056 100644
--- a/gtk2_ardour/return_ui.h
+++ b/gtk2_ardour/return_ui.h
@@ -31,7 +31,7 @@ namespace ARDOUR {
class IOSelector;
-class ReturnUI : public Gtk::HBox
+class ReturnUI : public Gtk::HBox
{
public:
ReturnUI (Gtk::Window *,boost::shared_ptr<ARDOUR::Return>, ARDOUR::Session*);
diff --git a/gtk2_ardour/rhythm_ferret.cc b/gtk2_ardour/rhythm_ferret.cc
index 8845a29313..7d7250d055 100644
--- a/gtk2_ardour/rhythm_ferret.cc
+++ b/gtk2_ardour/rhythm_ferret.cc
@@ -113,7 +113,7 @@ RhythmFerret::RhythmFerret (Editor& e)
t->attach (peak_picker_threshold_scale, 1, 2, n, n + 1, FILL);
t->attach (*manage (new Label (_("dB"))), 2, 3, n, n + 1, FILL);
++n;
-
+
t->attach (*manage (new Label (_("Silence threshold"), 1, 0.5)), 0, 1, n, n + 1, FILL);
t->attach (silence_threshold_scale, 1, 2, n, n + 1, FILL);
t->attach (*manage (new Label (_("dB"))), 2, 3, n, n + 1, FILL);
@@ -145,7 +145,7 @@ void
RhythmFerret::analysis_mode_changed ()
{
bool const perc = get_analysis_mode() == PercussionOnset;
-
+
trigger_gap_spinner.set_sensitive (!perc);
detection_threshold_scale.set_sensitive (perc);
sensitivity_scale.set_sensitive (perc);
@@ -209,7 +209,7 @@ RhythmFerret::run_analysis ()
default:
break;
}
-
+
(*i)->region()->set_transients (current_results);
current_results.clear();
}
@@ -236,7 +236,7 @@ RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readabl
results.insert (results.end(), these_results.begin(), these_results.end());
these_results.clear ();
-
+
t.update_positions (readable.get(), i, results);
}
@@ -254,10 +254,10 @@ RhythmFerret::get_note_onset_function ()
return n;
}
}
-
+
fatal << string_compose (_("programming error: %1 (%2)"), X_("illegal note onset function string"), txt)
<< endmsg;
-
+
/*NOTREACHED*/
return -1;
}
@@ -330,18 +330,18 @@ RhythmFerret::do_split_action ()
being considered)
*/
RegionSelection regions = editor.get_regions_from_selection();
-
+
if (regions.empty()) {
return;
}
-
+
editor.EditorFreeze(); /* Emit signal */
_session->begin_reversible_command (_("split regions (rhythm ferret)"));
-
+
/* Merge the transient positions for regions in consideration */
AnalysisFeatureList merged_features;
-
+
for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
AnalysisFeatureList features;
@@ -367,7 +367,7 @@ RhythmFerret::do_split_action ()
}
_session->commit_reversible_command ();
-
+
editor.EditorThaw(); /* Emit signal */
}
@@ -390,11 +390,11 @@ void
RhythmFerret::clear_transients ()
{
current_results.clear ();
-
+
for (RegionSelection::iterator i = regions_with_transients.begin(); i != regions_with_transients.end(); ++i) {
(*i)->region()->set_transients (current_results);
}
-
+
regions_with_transients.clear ();
}
diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc
index 9f50d7a3f6..94a36d1605 100644
--- a/gtk2_ardour/route_group_dialog.cc
+++ b/gtk2_ardour/route_group_dialog.cc
@@ -139,7 +139,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
add_button (Stock::CLOSE, RESPONSE_CLOSE);
set_default_response (RESPONSE_CLOSE);
}
-
+
show_all_children ();
}
@@ -158,7 +158,7 @@ RouteGroupDialog::do_run ()
/* not cancelled and the name is ok, so all is well */
return false;
}
-
+
_group->set_name (_initial_name);
MessageDialog msg (
_("A route group of this name already exists. Please use a different name."),
@@ -167,7 +167,7 @@ RouteGroupDialog::do_run ()
Gtk::BUTTONS_OK,
true
);
-
+
msg.run ();
}
diff --git a/gtk2_ardour/route_group_dialog.h b/gtk2_ardour/route_group_dialog.h
index 90a25fad40..712f463a87 100644
--- a/gtk2_ardour/route_group_dialog.h
+++ b/gtk2_ardour/route_group_dialog.h
@@ -32,7 +32,7 @@ public:
RouteGroupDialog (ARDOUR::RouteGroup *, bool);
bool do_run ();
-
+
private:
ARDOUR::RouteGroup* _group;
std::string _initial_name;
diff --git a/gtk2_ardour/route_group_menu.cc b/gtk2_ardour/route_group_menu.cc
index 0aeb0915f8..c50a18e3cf 100644
--- a/gtk2_ardour/route_group_menu.cc
+++ b/gtk2_ardour/route_group_menu.cc
@@ -51,7 +51,7 @@ void
RouteGroupMenu::build (WeakRouteList const & s)
{
assert (!s.empty ());
-
+
using namespace Menu_Helpers;
_subject = s;
@@ -68,7 +68,7 @@ RouteGroupMenu::build (WeakRouteList const & s)
_inhibit_group_selected = true;
delete _menu;
-
+
/* Note: don't use manage() here, otherwise if our _menu object is attached as a submenu
and its parent is then destroyed, our _menu object will be deleted and we'll have no
way of knowing about it. Without manage(), when the above happens our _menu's gobject
@@ -77,7 +77,7 @@ RouteGroupMenu::build (WeakRouteList const & s)
_menu = new Menu;
MenuList& items = _menu->items ();
-
+
items.push_back (MenuElem (_("New Group..."), sigc::mem_fun (*this, &RouteGroupMenu::new_group)));
items.push_back (SeparatorElem ());
diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc
index 1cba72ebda..9e11dcd022 100644
--- a/gtk2_ardour/route_params_ui.cc
+++ b/gtk2_ardour/route_params_ui.cc
@@ -195,7 +195,7 @@ RouteParams_UI::route_property_changed (const PropertyChange& what_changed, boos
boost::shared_ptr<Route> route (wr.lock());
- if (!route) {
+ if (!route) {
return;
}
@@ -278,7 +278,7 @@ RouteParams_UI::cleanup_latency_frame ()
delete latency_widget;
latency_widget = 0;
-
+
}
}
@@ -362,7 +362,7 @@ RouteParams_UI::route_removed (boost::weak_ptr<Route> wr)
{
boost::shared_ptr<Route> route (wr.lock());
- if (!route) {
+ if (!route) {
return;
}
@@ -395,7 +395,7 @@ void
RouteParams_UI::set_session (Session *sess)
{
ArdourDialog::set_session (sess);
-
+
route_display_model->clear();
_plugin_selector->set_session (_session);
@@ -462,7 +462,7 @@ RouteParams_UI::route_selected()
setup_latency_frame ();
route->processors_changed.connect (_route_processors_connection, invalidator (*this), ui_bind (&RouteParams_UI::processors_changed, this, _1), gui_context());
-
+
track_input_label.set_text (_route->name());
update_title();
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 1c9b02ba95..e86074bac7 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -226,11 +226,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh
ColorsChanged.connect (sigc::mem_fun (*this, &RouteTimeAxisView::color_handler));
PropertyList* plist = new PropertyList();
-
+
plist->add (ARDOUR::Properties::edit, true);
plist->add (ARDOUR::Properties::mute, true);
plist->add (ARDOUR::Properties::solo, true);
-
+
route_group_menu = new RouteGroupMenu (_session, plist);
gm.get_gain_slider().signal_scroll_event().connect(sigc::mem_fun(*this, &RouteTimeAxisView::controls_ebox_scroll), false);
@@ -285,7 +285,7 @@ RouteTimeAxisView::route_group_click (GdkEventButton *ev)
WeakRouteList r;
r.push_back (route ());
-
+
route_group_menu->build (r);
route_group_menu->menu()->popup (ev->button, ev->time);
@@ -393,18 +393,18 @@ RouteTimeAxisView::build_automation_action_menu (bool for_selection)
MenuList& items = automation_action_menu->items();
automation_action_menu->set_name ("ArdourContextMenu");
-
+
items.push_back (MenuElem (_("Show All Automation"),
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::show_all_automation), for_selection)));
-
+
items.push_back (MenuElem (_("Show Existing Automation"),
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::show_existing_automation), for_selection)));
-
+
items.push_back (MenuElem (_("Hide All Automation"),
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::hide_all_automation), for_selection)));
items.push_back (SeparatorElem ());
-
+
/* Attach the plugin submenu. It may have previously been used elsewhere,
so it was detached above */
@@ -479,7 +479,7 @@ RouteTimeAxisView::build_display_menu ()
as well as inconsistent (presumably due to the RadioMenuItem::Group). Then when you
select the active one, no toggled signal is emitted so nothing happens.
*/
-
+
layers_items.push_back (RadioMenuElem (layers_group, _("Overlaid")));
RadioMenuItem* i = dynamic_cast<RadioMenuItem*> (&layers_items.back ());
i->set_active (overlaid != 0 && stacked == 0);
@@ -495,7 +495,7 @@ RouteTimeAxisView::build_display_menu ()
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true));
i->set_active (overlaid == 0 && stacked != 0);
i->set_inconsistent (overlaid != 0 && stacked != 0);
-
+
items.push_back (MenuElem (_("Layers"), *layers_menu));
if (!Profile->get_sae()) {
@@ -503,7 +503,7 @@ RouteTimeAxisView::build_display_menu ()
Menu* alignment_menu = manage (new Menu);
MenuList& alignment_items = alignment_menu->items();
alignment_menu->set_name ("ArdourContextMenu");
-
+
RadioMenuItem::Group align_group;
/* Same verbose hacks as for the layering options above */
@@ -567,12 +567,12 @@ RouteTimeAxisView::build_display_menu ()
alignment_items.push_back (RadioMenuElem (align_group, _("Automatic (based on I/O connections)")));
i = dynamic_cast<RadioMenuItem*> (&alignment_items.back());
- i->set_active (automatic != 0 && existing == 0 && capture == 0);
+ i->set_active (automatic != 0 && existing == 0 && capture == 0);
i->signal_activate().connect (sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::set_align_choice), i, Automatic, true));
switch (first_track->alignment_choice()) {
case Automatic:
- switch (first_track->alignment_style()) {
+ switch (first_track->alignment_style()) {
case ExistingMaterial:
alignment_items.push_back (MenuElem (_("(Currently: Existing Material)")));
break;
@@ -584,12 +584,12 @@ RouteTimeAxisView::build_display_menu ()
default:
break;
}
-
+
alignment_items.push_back (RadioMenuElem (align_group, _("Align With Existing Material")));
i = dynamic_cast<RadioMenuItem*> (&alignment_items.back());
i->set_active (existing != 0 && capture == 0 && automatic == 0);
i->signal_activate().connect (sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::set_align_choice), i, UseExistingMaterial, true));
-
+
alignment_items.push_back (RadioMenuElem (align_group, _("Align With Capture Time")));
i = dynamic_cast<RadioMenuItem*> (&alignment_items.back());
i->set_active (existing == 0 && capture != 0 && automatic == 0);
@@ -616,7 +616,7 @@ RouteTimeAxisView::build_display_menu ()
if (!r || !r->is_track ()) {
continue;
}
-
+
switch (r->track()->mode()) {
case Normal:
++normal;
@@ -675,7 +675,7 @@ RouteTimeAxisView::build_display_menu ()
if (r.empty ()) {
r.push_back (route ());
}
-
+
route_group_menu->build (r);
items.push_back (MenuElem (_("Route Group"), *route_group_menu->menu ()));
@@ -732,7 +732,7 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
bool needs_bounce;
if (!track()->can_use_mode (mode, needs_bounce)) {
-
+
if (!needs_bounce) {
/* cannot be done */
return;
@@ -741,11 +741,11 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
return;
}
}
-
+
track()->set_mode (mode);
-
+
rec_enable_button->remove ();
-
+
switch (mode) {
case ARDOUR::NonLayered:
case ARDOUR::Normal:
@@ -755,7 +755,7 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_tape_red"))))));
break;
}
-
+
rec_enable_button->show_all ();
}
}
@@ -866,9 +866,9 @@ RouteTimeAxisView::set_height (uint32_t h)
xml_node->add_property ("height", buf);
if (height >= preset_height (HeightNormal)) {
-
+
_controls_padding_table.set_row_spacings (2);
-
+
reset_meter();
gm.get_gain_slider().show();
@@ -914,7 +914,7 @@ RouteTimeAxisView::set_height (uint32_t h)
} else {
_controls_padding_table.set_row_spacings (0);
-
+
}
if (height_changed && !no_redraw) {
@@ -927,7 +927,7 @@ void
RouteTimeAxisView::set_color (Gdk::Color const & c)
{
RouteUI::set_color (c);
-
+
if (_view) {
_view->apply_color (_color, StreamView::RegionColor);
}
@@ -1397,7 +1397,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);
-
+
_session->add_command (new StatefulDiffCommand (playlist));
}
break;
@@ -1490,19 +1490,19 @@ RouteTimeAxisView::build_playlist_menu ()
/* sort the playlists */
PlaylistSorter cmp;
sort (playlists_tr.begin(), playlists_tr.end(), cmp);
-
+
/* add the playlists to the menu */
for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists_tr.begin(); i != playlists_tr.end(); ++i) {
playlist_items.push_back (RadioMenuElem (playlist_group, (*i)->name()));
RadioMenuItem *item = static_cast<RadioMenuItem*>(&playlist_items.back());
item->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::use_playlist), item, boost::weak_ptr<Playlist> (*i)));
-
+
if (tr->playlist()->id() == (*i)->id()) {
item->set_active();
-
+
}
}
-
+
playlist_items.push_back (SeparatorElem());
playlist_items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &RouteTimeAxisView::rename_current_playlist)));
playlist_items.push_back (SeparatorElem());
@@ -1641,7 +1641,7 @@ RouteTimeAxisView::toggle_automation_track (const Evoral::Parameter& param)
{
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (param);
Gtk::CheckMenuItem* menu = automation_child_menu_item (param);
-
+
if (!track) {
/* it doesn't exist yet, so we don't care about the button state: just add it */
create_automation_child (param, true);
@@ -1649,14 +1649,14 @@ RouteTimeAxisView::toggle_automation_track (const Evoral::Parameter& param)
assert (menu);
bool yn = menu->get_active();
if (track->set_visibility (menu->get_active()) && yn) {
-
+
/* we made it visible, now trigger a redisplay. if it was hidden, then automation_track_hidden()
will have done that for us.
*/
-
+
if (!no_redraw) {
_route->gui_changed (X_("track_height"), (void *) 0); /* EMIT_SIGNAL */
- }
+ }
}
}
}
@@ -1694,42 +1694,42 @@ RouteTimeAxisView::show_all_automation (bool apply_to_selection)
_editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::show_all_automation, _1, false));
} else {
no_redraw = true;
-
+
/* Show our automation */
-
+
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
i->second->set_marked_for_display (true);
i->second->canvas_display()->show();
i->second->get_state_node()->add_property ("shown", X_("yes"));
-
+
Gtk::CheckMenuItem* menu = automation_child_menu_item (i->first);
-
+
if (menu) {
menu->set_active(true);
}
}
-
-
+
+
/* Show processor automation */
-
+
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<ProcessorAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
if ((*ii)->view == 0) {
add_processor_automation_curve ((*i)->processor, (*ii)->what);
}
-
+
(*ii)->menu_item->set_active (true);
}
}
-
+
no_redraw = false;
-
+
/* Redraw */
-
+
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
}
-
+
void
RouteTimeAxisView::show_existing_automation (bool apply_to_selection)
{
@@ -1737,25 +1737,25 @@ RouteTimeAxisView::show_existing_automation (bool apply_to_selection)
_editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::show_existing_automation, _1, false));
} else {
no_redraw = true;
-
+
/* Show our automation */
-
+
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
if (i->second->has_automation()) {
i->second->set_marked_for_display (true);
i->second->canvas_display()->show();
i->second->get_state_node()->add_property ("shown", X_("yes"));
-
+
Gtk::CheckMenuItem* menu = automation_child_menu_item (i->first);
if (menu) {
menu->set_active(true);
}
}
}
-
-
+
+
/* Show processor automation */
-
+
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<ProcessorAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
if ((*ii)->view != 0 && (*i)->processor->control((*ii)->what)->list()->size() > 0) {
@@ -1763,9 +1763,9 @@ RouteTimeAxisView::show_existing_automation (bool apply_to_selection)
}
}
}
-
+
no_redraw = false;
-
+
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
}
@@ -1779,27 +1779,27 @@ RouteTimeAxisView::hide_all_automation (bool apply_to_selection)
no_redraw = true;
/* Hide our automation */
-
+
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
i->second->set_marked_for_display (false);
i->second->hide ();
i->second->get_state_node()->add_property ("shown", X_("no"));
-
+
Gtk::CheckMenuItem* menu = automation_child_menu_item (i->first);
-
+
if (menu) {
menu->set_active (false);
}
}
-
+
/* Hide processor automation */
-
+
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<ProcessorAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
(*ii)->menu_item->set_active (false);
}
}
-
+
no_redraw = false;
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
@@ -1812,7 +1812,7 @@ RouteTimeAxisView::region_view_added (RegionView* rv)
/* XXX need to find out if automation children have automationstreamviews. If yes, no ghosts */
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
boost::shared_ptr<AutomationTimeAxisView> atv;
-
+
if ((atv = boost::dynamic_pointer_cast<AutomationTimeAxisView> (*i)) != 0) {
atv->add_ghost(rv);
}
@@ -2218,11 +2218,11 @@ RouteTimeAxisView::set_layer_display (LayerDisplay d, bool apply_to_selection)
if (apply_to_selection) {
_editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, d, false));
} else {
-
+
if (_view) {
_view->set_layer_display (d);
}
-
+
ensure_xml_node ();
xml_node->add_property (N_("layer-display"), enum_2_string (d));
}
@@ -2446,7 +2446,7 @@ RouteTimeAxisView::automation_child_menu_item (Evoral::Parameter param)
if (i != _main_automation_menu_map.end()) {
return i->second;
}
-
+
i = _subplugin_menu_map.find (param);
if (i != _subplugin_menu_map.end()) {
return i->second;
@@ -2475,7 +2475,7 @@ RouteTimeAxisView::create_gain_automation_child (const Evoral::Parameter& param,
if (_view) {
_view->foreach_regionview (sigc::mem_fun (*gain_track.get(), &TimeAxisView::add_ghost));
}
-
+
add_automation_child (Evoral::Parameter(GainAutomation), gain_track, show);
}
@@ -2507,13 +2507,13 @@ RouteTimeAxisView::combine_regions ()
if (selected_regions.size() < 2) {
return 0;
}
-
+
playlist->clear_changes ();
boost::shared_ptr<Region> compound_region = playlist->combine (selected_regions);
_session->add_command (new StatefulDiffCommand (playlist));
/* make the new region be selected */
-
+
return _view->find_view (compound_region);
}
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index 2e79294568..9f7fbff54d 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -112,9 +112,9 @@ public:
void add_underlay (StreamView*, bool update_xml = true);
void remove_underlay (StreamView*);
void build_underlay_menu(Gtk::Menu*);
-
+
int set_state (const XMLNode&, int version);
-
+
virtual void create_automation_child (const Evoral::Parameter& param, bool show) = 0;
/* make sure we get the right version of this */
@@ -126,7 +126,7 @@ public:
boost::shared_ptr<AutomationTimeAxisView> automation_child(Evoral::Parameter param);
virtual Gtk::CheckMenuItem* automation_child_menu_item (Evoral::Parameter);
-
+
std::string name() const;
StreamView* view() const { return _view; }
ARDOUR::RouteGroup* route_group() const;
@@ -187,7 +187,7 @@ protected:
boost::shared_ptr<ARDOUR::Processor>);
void automation_track_hidden (Evoral::Parameter param);
-
+
ProcessorAutomationNode*
find_processor_automation_node (boost::shared_ptr<ARDOUR::Processor> i, Evoral::Parameter);
@@ -245,7 +245,7 @@ protected:
void create_gain_automation_child (const Evoral::Parameter &, bool);
boost::shared_ptr<AutomationTimeAxisView> gain_track;
-
+
StreamView* _view;
ArdourCanvas::Canvas& parent_canvas;
bool no_redraw;
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 6c9d5a6ef3..7750f6c399 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -203,7 +203,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
if (self_destruct) {
rp->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::self_delete, this), gui_context());
}
-
+
mute_button->set_controllable (_route->mute_control());
solo_button->set_controllable (_route->solo_control());
@@ -317,14 +317,14 @@ RouteUI::mute_press (GdkEventButton* ev)
if (_mute_release) {
_mute_release->routes = _session->get_routes ();
}
-
+
_session->set_mute (_session->get_routes(), !_route->muted(), Session::rt_cleanup, true);
}
} else {
/* plain click applies change to this route */
-
+
boost::shared_ptr<RouteList> rl (new RouteList);
rl->push_back (_route);
@@ -365,54 +365,54 @@ RouteUI::solo_press(GdkEventButton* ev)
if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS ) {
return true;
}
-
+
multiple_solo_change = false;
if (!_i_am_the_modifier) {
-
+
if (Keyboard::is_context_menu_event (ev)) {
-
+
if (!solo_isolated_led) {
if (solo_menu == 0) {
build_solo_menu ();
}
-
+
solo_menu->popup (1, ev->time);
}
-
+
} else {
-
+
if (Keyboard::is_button2_event (ev)) {
-
+
// Primary-button2 click is the midi binding click
// button2-click is "momentary"
-
+
if (solo_button->on_button_press_event (ev)) {
return true;
}
_solo_release = new SoloMuteRelease (_route->self_soloed());
}
-
+
if (ev->button == 1 || Keyboard::is_button2_event (ev)) {
-
+
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
-
+
/* Primary-Tertiary-click applies change to all routes */
if (_solo_release) {
_solo_release->routes = _session->get_routes ();
}
-
+
if (Config->get_solo_control_is_listen_control()) {
_session->set_listen (_session->get_routes(), !_route->listening_via_monitor(), Session::rt_cleanup, true);
} else {
_session->set_solo (_session->get_routes(), !_route->self_soloed(), Session::rt_cleanup, true);
}
-
+
} else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
-
+
// Primary-Secondary-click: exclusively solo this track
if (_solo_release) {
@@ -428,7 +428,7 @@ RouteUI::solo_press(GdkEventButton* ev)
}
}
}
-
+
if (Config->get_solo_control_is_listen_control()) {
/* ??? we need a just_one_listen() method */
} else {
@@ -436,36 +436,36 @@ RouteUI::solo_press(GdkEventButton* ev)
}
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
-
+
// shift-click: toggle solo isolated status
-
+
_route->set_solo_isolated (!_route->solo_isolated(), this);
delete _solo_release;
_solo_release = 0;
-
+
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
-
+
/* Primary-button1: solo mix group.
NOTE: Primary-button2 is MIDI learn.
*/
-
+
if (ev->button == 1 && _route->route_group()) {
if (_solo_release) {
_solo_release->routes = _route->route_group()->route_list();
}
-
+
if (Config->get_solo_control_is_listen_control()) {
_session->set_listen (_route->route_group()->route_list(), !_route->listening_via_monitor(), Session::rt_cleanup, true);
} else {
_session->set_solo (_route->route_group()->route_list(), !_route->self_soloed(), Session::rt_cleanup, true);
}
}
-
+
} else {
-
+
/* click: solo this route */
-
+
boost::shared_ptr<RouteList> rl (new RouteList);
rl->push_back (route());
@@ -490,7 +490,7 @@ bool
RouteUI::solo_release (GdkEventButton*)
{
if (!_i_am_the_modifier) {
-
+
if (_solo_release) {
if (_solo_release->exclusive) {
@@ -530,7 +530,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
if (midi_track()->step_editing()) {
return true;
- }
+ }
}
if (!_i_am_the_modifier && is_track() && rec_enable_button) {
@@ -575,16 +575,16 @@ RouteUI::build_record_menu ()
return;
}
- /* no rec-button context menu for non-MIDI tracks
+ /* no rec-button context menu for non-MIDI tracks
*/
if (is_midi_track()) {
record_menu = new Menu;
record_menu->set_name ("ArdourContextMenu");
-
+
using namespace Menu_Helpers;
MenuList& items = record_menu->items();
-
+
items.push_back (CheckMenuElem (_("Step Entry"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
step_edit_item = dynamic_cast<CheckMenuItem*> (&items.back());
@@ -612,7 +612,7 @@ RouteUI::step_edit_changed (bool yn)
if (yn) {
if (rec_enable_button) {
rec_enable_button->set_visual_state (3);
- }
+ }
start_step_editing ();
@@ -624,7 +624,7 @@ RouteUI::step_edit_changed (bool yn)
if (rec_enable_button) {
rec_enable_button->set_visual_state (0);
- }
+ }
stop_step_editing ();
@@ -660,15 +660,15 @@ RouteUI::build_sends_menu ()
items.push_back (
MenuElem(_("Assign all tracks (prefader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_sends), PreFader, false))
);
-
+
items.push_back (
MenuElem(_("Assign all tracks and buses (prefader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_sends), PreFader, true))
);
-
+
items.push_back (
MenuElem(_("Assign all tracks (postfader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_sends), PostFader, false))
);
-
+
items.push_back (
MenuElem(_("Assign all tracks and buses (postfader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_sends), PostFader, true))
);
@@ -679,7 +679,7 @@ RouteUI::build_sends_menu ()
items.push_back (
MenuElem(_("Assign selected tracks and buses (prefader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_selected_sends), PreFader, true)));
-
+
items.push_back (
MenuElem(_("Assign selected tracks (postfader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_selected_sends), PostFader, false))
);
@@ -687,7 +687,7 @@ RouteUI::build_sends_menu ()
items.push_back (
MenuElem(_("Assign selected tracks and buses (postfader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_selected_sends), PostFader, true))
);
-
+
items.push_back (MenuElem(_("Copy track/bus gains to sends"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
items.push_back (MenuElem(_("Set sends gain to -inf"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
items.push_back (MenuElem(_("Set sends gain to 0dB"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_unity)));
@@ -717,7 +717,7 @@ RouteUI::create_selected_sends (Placement p, bool include_buses)
}
}
}
-
+
_session->add_internal_sends (_route, p, rlist);
}
@@ -811,7 +811,7 @@ RouteUI::solo_visual_state (boost::shared_ptr<Route> r)
if (r->is_master() || r->is_monitor()) {
return 0;
}
-
+
if (Config->get_solo_control_is_listen_control()) {
if (r->listening_via_monitor()) {
@@ -820,8 +820,8 @@ RouteUI::solo_visual_state (boost::shared_ptr<Route> r)
return 0;
}
- }
-
+ }
+
if (r->soloed()) {
if (!r->self_soloed()) {
return 3;
@@ -839,7 +839,7 @@ RouteUI::solo_visual_state_with_isolate (boost::shared_ptr<Route> r)
if (r->is_master() || r->is_monitor()) {
return 0;
}
-
+
if (Config->get_solo_control_is_listen_control()) {
if (r->listening_via_monitor()) {
@@ -848,8 +848,8 @@ RouteUI::solo_visual_state_with_isolate (boost::shared_ptr<Route> r)
return 0;
}
- }
-
+ }
+
if (r->solo_isolated()) {
return 2;
} else if (r->soloed()) {
@@ -869,7 +869,7 @@ RouteUI::solo_isolate_visual_state (boost::shared_ptr<Route> r)
if (r->is_master() || r->is_monitor()) {
return 0;
}
-
+
if (r->solo_isolated()) {
return 1;
} else {
@@ -883,7 +883,7 @@ RouteUI::solo_safe_visual_state (boost::shared_ptr<Route> r)
if (r->is_master() || r->is_monitor()) {
return 0;
}
-
+
if (r->solo_safe()) {
return 1;
} else {
@@ -937,8 +937,8 @@ RouteUI::update_solo_display ()
}
solo_button->set_visual_state (solo_visual_state (_route));
-
- /* some changes to solo status can affect mute display, so catch up
+
+ /* some changes to solo status can affect mute display, so catch up
*/
update_mute_display ();
@@ -963,7 +963,7 @@ RouteUI::mute_visual_state (Session* s, boost::shared_ptr<Route> r)
return 0;
}
-
+
if (Config->get_show_solo_mutes() && !Config->get_solo_control_is_listen_control ()) {
if (r->muted ()) {
@@ -1031,7 +1031,7 @@ RouteUI::update_rec_display ()
if (!rec_enable_button || !_route) {
return;
}
-
+
bool model = _route->record_enabled();
bool view = rec_enable_button->get_active();
@@ -1052,12 +1052,12 @@ RouteUI::update_rec_display ()
case Session::Recording:
rec_enable_button->set_visual_state (1);
break;
-
+
case Session::Disabled:
case Session::Enabled:
rec_enable_button->set_visual_state (2);
break;
-
+
}
if (step_edit_item) {
@@ -1071,7 +1071,7 @@ RouteUI::update_rec_display ()
step_edit_item->set_sensitive (true);
}
}
-
+
check_rec_enable_sensitivity ();
}
@@ -1396,28 +1396,28 @@ edit your ardour.rc file to set the\n\
msg.run ();
return;
}
-
+
vector<string> choices;
string prompt;
-
+
if (is_track()) {
prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
} else {
prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
}
-
+
choices.push_back (_("No, do nothing."));
choices.push_back (_("Yes, remove it."));
-
+
string title;
if (is_track()) {
title = _("Remove track");
} else {
title = _("Remove bus");
}
-
+
Choice prompter (title, prompt, choices);
-
+
if (prompter.run () == 1) {
Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
}
@@ -1718,7 +1718,7 @@ RouteUI::setup_invert_buttons ()
BindableToggleButton* b = manage (new BindableToggleButton);
b->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_toggled), i, b));
b->signal_button_press_event().connect (sigc::mem_fun (*this, &RouteUI::invert_press));
-
+
b->set_name (X_("MixerInvertButton"));
if (to_add == 1) {
b->add (*manage (new Label (X_("Ø"))));
@@ -1731,11 +1731,11 @@ RouteUI::setup_invert_buttons ()
} else {
UI::instance()->set_tip (*b, string_compose (_("Left-click to invert (phase reverse) all channels of this track. Right-click to show menu."), i + 1));
}
-
+
_invert_buttons.push_back (b);
_invert_button_box.pack_start (*b);
}
-
+
_invert_button_box.show_all ();
}
@@ -1743,7 +1743,7 @@ void
RouteUI::set_invert_button_state ()
{
++_i_am_the_modifier;
-
+
uint32_t const N = _route->input()->n_ports().n_audio();
if (N > _max_invert_buttons) {
_invert_buttons.front()->set_active (_route->phase_invert().any());
@@ -1765,7 +1765,7 @@ RouteUI::invert_toggled (uint32_t i, BindableToggleButton* b)
if (_i_am_the_modifier) {
return;
}
-
+
uint32_t const N = _route->input()->n_ports().n_audio();
if (N <= _max_invert_buttons) {
_route->set_phase_invert (i, b->get_active ());
@@ -1812,7 +1812,7 @@ RouteUI::invert_menu_toggled (uint32_t c)
if (_i_am_the_modifier) {
return;
}
-
+
_route->set_phase_invert (c, !_route->phase_invert (c));
}
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index 2f515f8c6d..9435b036e5 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -184,7 +184,7 @@ class RouteUI : public virtual AxisView
Gtk::CheckMenuItem *step_edit_item;
void toggle_step_edit ();
virtual void step_edit_changed (bool);
-
+
virtual void polarity_changed ();
Gtk::CheckMenuItem *denormal_menu_item;
@@ -230,10 +230,10 @@ class RouteUI : public virtual AxisView
void relabel_solo_button ();
struct SoloMuteRelease {
- SoloMuteRelease (bool was_active)
+ SoloMuteRelease (bool was_active)
: active (was_active)
, exclusive (false) {}
-
+
boost::shared_ptr<ARDOUR::RouteList> routes;
boost::shared_ptr<ARDOUR::RouteList> routes_on;
boost::shared_ptr<ARDOUR::RouteList> routes_off;
@@ -250,7 +250,7 @@ class RouteUI : public virtual AxisView
void invert_toggled (uint32_t, BindableToggleButton *);
void invert_menu_toggled (uint32_t);
bool invert_press (GdkEventButton *);
-
+
int _i_am_the_modifier;
std::list<BindableToggleButton*> _invert_buttons;
Gtk::Menu* _invert_menu;
diff --git a/gtk2_ardour/search_path_option.cc b/gtk2_ardour/search_path_option.cc
index 6716607383..92b7938edd 100644
--- a/gtk2_ardour/search_path_option.cc
+++ b/gtk2_ardour/search_path_option.cc
@@ -40,7 +40,7 @@ SearchPathOption::SearchPathOption (const string& pathname, const string& label,
hbox->pack_end (add_chooser, true, true);
hbox->pack_end (*manage (new Label (_("Click to add a new location"))), false, false);
hbox->show_all ();
-
+
vbox.pack_start (path_box);
vbox.pack_end (*hbox);
@@ -54,7 +54,7 @@ SearchPathOption::SearchPathOption (const string& pathname, const string& label,
SearchPathOption::~SearchPathOption()
{
-
+
}
@@ -101,7 +101,7 @@ SearchPathOption::set_state_from_config ()
path_box.pack_start (session_label);
split (str, dirs, ':');
-
+
for (vector<string>::iterator d = dirs.begin(); d != dirs.end(); ++d) {
add_path (*d);
}
@@ -111,7 +111,7 @@ void
SearchPathOption::changed ()
{
string str;
-
+
for (list<PathEntry*>::iterator p = paths.begin(); p != paths.end(); ++p) {
if (!str.empty()) {
@@ -150,7 +150,7 @@ SearchPathOption::PathEntry::PathEntry (const std::string& path, bool removable)
box.set_spacing (6);
box.set_homogeneous (false);
box.pack_start (entry, true, true);
-
+
if (removable) {
box.pack_start (remove_button, false, false);
remove_button.show ();
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 82cdad5f33..35998a2a1d 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -50,7 +50,7 @@ struct AudioRangeComparator {
Selection::Selection (const PublicEditor* e)
: tracks (e)
, editor (e)
- , next_time_id (0)
+ , next_time_id (0)
{
clear ();
@@ -61,7 +61,7 @@ Selection::Selection (const PublicEditor* e)
void (Selection::*marker_remove)(Marker*) = &Selection::remove;
Marker::CatchDeletion.connect (*this, MISSING_INVALIDATOR, ui_bind (marker_remove, this, _1), gui_context());
-}
+}
#if 0
Selection&
@@ -793,7 +793,7 @@ Selection::set_preserving_all_ranges (framepos_t start, framepos_t end)
}
time.consolidate ();
-
+
TimeChanged ();
}
@@ -903,7 +903,7 @@ Selection::set (list<Selectable*> const & selectables)
if (Config->get_link_region_and_track_selection ()) {
clear_tracks ();
}
-
+
add (selectables);
}
@@ -1067,7 +1067,7 @@ void
Selection::set_point_selection_from_line (AutomationLine const & line)
{
points.clear ();
-
+
AutomationRange current (DBL_MAX, 0, 1, 0, &line.trackview);
for (uint32_t i = 0; i < line.npoints(); ++i) {
@@ -1087,7 +1087,7 @@ Selection::set_point_selection_from_line (AutomationLine const & line)
double const size = cp->size ();
double const x_size = line.time_converter().from (line.trackview.editor().pixel_to_frame (size));
double const y_size = size / line.trackview.current_height ();
-
+
double const x1 = max (0.0, x - x_size / 2);
double const x2 = x + x_size / 2;
double const y1 = max (0.0, y - y_size / 2);
@@ -1125,7 +1125,7 @@ Selection::get_state () const
/* XXX: not complete; just sufficient to get track selection state
so that re-opening plugin windows for editor mixer strips works
*/
-
+
XMLNode* node = new XMLNode (X_("Selection"));
for (TrackSelection::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
@@ -1150,11 +1150,11 @@ Selection::set_state (XMLNode const & node, int)
if (node.name() != X_("Selection")) {
return -1;
}
-
+
XMLNodeList children = node.children ();
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == X_("RouteView")) {
-
+
XMLProperty* prop_id = (*i)->property (X_("id"));
assert (prop_id);
PBD::ID id (prop_id->value ());
@@ -1162,9 +1162,9 @@ Selection::set_state (XMLNode const & node, int)
if (rtv) {
add (rtv);
}
-
+
} else if ((*i)->name() == X_("AutomationView")) {
-
+
XMLProperty* prop_id = (*i)->property (X_("id"));
XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
@@ -1176,12 +1176,12 @@ Selection::set_state (XMLNode const & node, int)
if (rtv) {
boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
-
+
/* the automation could be for an entity that was never saved
in the session file. Don't freak out if we can't find
it.
*/
-
+
if (atv) {
add (atv.get());
}
diff --git a/gtk2_ardour/session_import_dialog.cc b/gtk2_ardour/session_import_dialog.cc
index e5824bd67b..cb75b72f94 100644
--- a/gtk2_ardour/session_import_dialog.cc
+++ b/gtk2_ardour/session_import_dialog.cc
@@ -97,7 +97,7 @@ SessionImportDialog::SessionImportDialog (ARDOUR::Session* target) :
// prompt signals XXX: problem - handlers to be in the same thread since they return values
ElementImporter::Rename.connect_same_thread (connections, boost::bind (&SessionImportDialog::open_rename_dialog, this, _1, _2));
ElementImporter::Prompt.connect_same_thread (connections, boost::bind (&SessionImportDialog::open_prompt_dialog, this, _1));
-
+
// Finalize
show_all();
}
@@ -112,16 +112,16 @@ SessionImportDialog::load_session (const string& filename)
}
boost::shared_ptr<AudioRegionImportHandler> region_handler (new AudioRegionImportHandler (tree, *_session));
boost::shared_ptr<AudioPlaylistImportHandler> pl_handler (new AudioPlaylistImportHandler (tree, *_session, *region_handler));
-
+
handlers.push_back (boost::static_pointer_cast<ElementImportHandler> (region_handler));
handlers.push_back (boost::static_pointer_cast<ElementImportHandler> (pl_handler));
handlers.push_back (HandlerPtr(new UnusedAudioPlaylistImportHandler (tree, *_session, *region_handler)));
handlers.push_back (HandlerPtr(new AudioTrackImportHandler (tree, *_session, *pl_handler)));
handlers.push_back (HandlerPtr(new LocationImportHandler (tree, *_session)));
handlers.push_back (HandlerPtr(new TempoMapImportHandler (tree, *_session)));
-
+
fill_list();
-
+
if (ElementImportHandler::dirty()) {
// Warn user
string txt = _("Some elements had errors in them. Please see the log for details");
diff --git a/gtk2_ardour/session_import_dialog.h b/gtk2_ardour/session_import_dialog.h
index ebfd49f8c9..f4ba9cadf7 100644
--- a/gtk2_ardour/session_import_dialog.h
+++ b/gtk2_ardour/session_import_dialog.h
@@ -93,7 +93,7 @@ class SessionImportDialog : public ArdourDialog
Gtk::Button* ok_button;
Gtk::Button* cancel_button;
-
+
PBD::ScopedConnectionList connections;
};
diff --git a/gtk2_ardour/session_metadata_dialog.cc b/gtk2_ardour/session_metadata_dialog.cc
index e437625480..1bc776122b 100644
--- a/gtk2_ardour/session_metadata_dialog.cc
+++ b/gtk2_ardour/session_metadata_dialog.cc
@@ -213,7 +213,7 @@ NumberMetadataField::str_to_uint (string const & str) const
/* SessionMetadataSet */
-SessionMetadataSet::SessionMetadataSet (string const & name)
+SessionMetadataSet::SessionMetadataSet (string const & name)
: name (name)
{
}
@@ -226,7 +226,7 @@ SessionMetadataSet::add_data_field (MetadataPtr field)
/* SessionMetadataSetEditable */
-SessionMetadataSetEditable::SessionMetadataSetEditable (string const & name)
+SessionMetadataSetEditable::SessionMetadataSetEditable (string const & name)
: SessionMetadataSet (name)
{
table.set_row_spacings (6);
@@ -277,7 +277,7 @@ SessionMetadataSetEditable::save_data ()
/* SessionMetadataSetImportable */
-SessionMetadataSetImportable::SessionMetadataSetImportable (string const & name)
+SessionMetadataSetImportable::SessionMetadataSetImportable (string const & name)
: SessionMetadataSet (name)
, session_list (list)
{
diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc
index dbc8bbf233..73663ebe22 100644
--- a/gtk2_ardour/session_option_editor.cc
+++ b/gtk2_ardour/session_option_editor.cc
@@ -36,7 +36,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
, _session_config (&(s->config))
{
set_session (s);
-
+
set_name ("SessionProperties");
/* TIMECODE*/
@@ -47,7 +47,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
sigc::mem_fun (*_session_config, &SessionConfiguration::get_sync_source),
sigc::mem_fun (*_session_config, &SessionConfiguration::set_sync_source)
);
-
+
populate_sync_options ();
parameter_changed (string ("external-sync"));
@@ -122,7 +122,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
);
co->set_session (_session);
-
+
add_option (_("Timecode"), co);
add_option (_("Timecode"), new BoolOption (
@@ -229,7 +229,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
hf->add (CAF, _("CAF"));
add_option (_("Media"), hf);
-
+
add_option (_("Media"), new OptionEditorHeading (_("File locations")));
SearchPathOption* spo = new SearchPathOption ("audio-search-path", _("Search for audio files in:"),
@@ -311,7 +311,7 @@ void
SessionOptionEditor::parameter_changed (std::string const & p)
{
OptionEditor::parameter_changed (p);
-
+
if (p == "external-sync") {
_sync_source->set_sensitive (!_session->config.get_external_sync ());
}
diff --git a/gtk2_ardour/session_option_editor.h b/gtk2_ardour/session_option_editor.h
index 135ef7c816..2563f4153d 100644
--- a/gtk2_ardour/session_option_editor.h
+++ b/gtk2_ardour/session_option_editor.h
@@ -32,7 +32,7 @@ public:
private:
void parameter_changed (std::string const &);
void populate_sync_options ();
-
+
ARDOUR::SessionConfiguration* _session_config;
ComboOption<ARDOUR::SyncSource>* _sync_source;
};
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc
index 5f1711d3c8..bcd6c9f830 100644
--- a/gtk2_ardour/sfdb_freesound_mootcher.cc
+++ b/gtk2_ardour/sfdb_freesound_mootcher.cc
@@ -1,7 +1,7 @@
/* sfdb_freesound_mootcher.cpp **********************************************************************
-
+
Adapted for Ardour by Ben Loftis, March 2008
-
+
Mootcher 23-8-2005
Mootcher Online Access to thefreesoundproject website
@@ -72,15 +72,15 @@ const char* Mootcher::changeWorkingDir(const char *saveLocation)
pos = (int)basePath.find("\\");
}
#endif
- //
+ //
int pos2 = basePath.find_last_of("/");
if(basePath.length() != (pos2+1)) basePath += "/";
-
+
// create Freesound directory and sound dir
std::string sndLocation = basePath;
- mkdir(sndLocation.c_str(), 0777);
+ mkdir(sndLocation.c_str(), 0777);
sndLocation += "snd";
- mkdir(sndLocation.c_str(), 0777);
+ mkdir(sndLocation.c_str(), 0777);
return basePath.c_str();
}
@@ -91,7 +91,7 @@ size_t Mootcher::WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void
register int realsize = (int)(size * nmemb);
struct MemoryStruct *mem = (struct MemoryStruct *)data;
- // There might be a realloc() out there that doesn't like
+ // There might be a realloc() out there that doesn't like
// reallocing NULL pointers, so we take care of it here
if(mem->memory) mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1);
else mem->memory = (char *)malloc(mem->size + realsize + 1);
@@ -132,7 +132,7 @@ int Mootcher::doLogin(std::string login, std::string password)
{
if(connection==1)
return 1;
-
+
struct MemoryStruct xml_page;
xml_page.memory = NULL;
xml_page.size = 0;
@@ -154,7 +154,7 @@ int Mootcher::doLogin(std::string login, std::string password)
if(curl)
{
setcUrlOptions();
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&xml_page);
// save the sessoin id that is given back by the server in a cookie
curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookiejar.txt");
@@ -175,7 +175,7 @@ int Mootcher::doLogin(std::string login, std::string password)
toLog(curl_easy_strerror(res));
connection = 0;
}
-
+
if (connection == 1){
std::string check_page = xml_page.memory;
int test = (int)check_page.find("login"); //logged
@@ -188,7 +188,7 @@ int Mootcher::doLogin(std::string login, std::string password)
}
// free the memory
- if(xml_page.memory){
+ if(xml_page.memory){
free( xml_page.memory );
xml_page.memory = NULL;
xml_page.size = 0;
@@ -205,7 +205,7 @@ std::string Mootcher::searchText(std::string word)
struct MemoryStruct xml_page;
xml_page.memory = NULL;
xml_page.size = 0;
-
+
std::string result;
if(connection != 0)
@@ -243,23 +243,23 @@ std::string Mootcher::searchText(std::string word)
// The limit of 10 samples is arbitrary, but seems
// reasonable in light of the fact that all of the returned
// samples get downloaded, and downloads are s-l-o-w.
-
+
if(curl)
{
- // basic init for curl
- setcUrlOptions();
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+ // basic init for curl
+ setcUrlOptions();
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&xml_page);
// setup the post message
curl_easy_setopt(curl, CURLOPT_POST, TRUE);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postMessage.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, -1);
-
+
// the url to get
std::string search_url = "http://www.freesound.org/searchTextXML.php";
curl_easy_setopt(curl, CURLOPT_URL, search_url.c_str());
- // perform the online search
+ // perform the online search
connection = 1;
CURLcode res = curl_easy_perform(curl);
if( res != 0 ) {
@@ -267,7 +267,7 @@ std::string Mootcher::searchText(std::string word)
toLog(curl_easy_strerror(res));
connection = 0;
}
-
+
result = xml_page.memory;
toLog( result.c_str() );
@@ -298,17 +298,17 @@ std::string Mootcher::changeExtension(std::string filename)
int pos = 0;
pos = (int)filename.find(aiff);
- if(pos != std::string::npos) filename.replace(pos, aiff.size(), replace);
+ if(pos != std::string::npos) filename.replace(pos, aiff.size(), replace);
pos = (int)filename.find(aif);
- if(pos != std::string::npos) filename.replace(pos, aif.size(), replace);
+ if(pos != std::string::npos) filename.replace(pos, aif.size(), replace);
pos = (int)filename.find(wav);
- if(pos != std::string::npos) filename.replace(pos, wav.size(), replace);
+ if(pos != std::string::npos) filename.replace(pos, wav.size(), replace);
pos = (int)filename.find(mp3);
- if(pos != std::string::npos) filename.replace(pos, mp3.size(), replace);
+ if(pos != std::string::npos) filename.replace(pos, mp3.size(), replace);
pos = (int)filename.find(ogg);
- if(pos != std::string::npos) filename.replace(pos, ogg.size(), replace);
+ if(pos != std::string::npos) filename.replace(pos, ogg.size(), replace);
pos = (int)filename.find(flac);
- if(pos != std::string::npos) filename.replace(pos, flac.size(), replace);
+ if(pos != std::string::npos) filename.replace(pos, flac.size(), replace);
return filename;
}
@@ -318,7 +318,7 @@ void Mootcher::GetXml(std::string ID, struct MemoryStruct &xml_page)
if(curl) {
setcUrlOptions();
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&xml_page);
// URL to get
@@ -326,7 +326,7 @@ void Mootcher::GetXml(std::string ID, struct MemoryStruct &xml_page)
getxml_url += ID;
curl_easy_setopt(curl, CURLOPT_URL, getxml_url.c_str() );
-
+
// get it!
connection = 1;
CURLcode res = curl_easy_perform(curl);
@@ -347,7 +347,7 @@ std::string Mootcher::getXmlFile(std::string ID, int &length)
std::string xmlFileName;
std::string audioFileName;
std::string filename;
-
+
if(connection != 0) {
// download the xmlfile into xml_page
GetXml(ID, xml_page);
@@ -362,7 +362,7 @@ std::string Mootcher::getXmlFile(std::string ID, int &length)
XMLTree doc;
doc.read_buffer( xml_page.memory );
XMLNode *freesound = doc.root();
-
+
// if the page is not a valid xml document with a 'freesound' root
if( freesound == NULL){
sprintf(message, "getXmlFile: There is no valid root in the xml file");
@@ -375,10 +375,10 @@ std::string Mootcher::getXmlFile(std::string ID, int &length)
name = sample->child("originalFilename");
filesize = sample->child("filesize");
}
-
+
// get the file name and size from xml file
if (sample && name && filesize) {
-
+
audioFileName = name->child("text")->content();
sprintf( message, "getXmlFile: %s needs to be downloaded\n", audioFileName.c_str() );
toLog(message);
@@ -396,7 +396,7 @@ std::string Mootcher::getXmlFile(std::string ID, int &length)
sprintf(message, "getXmlFile: saving XML: %s\n", xmlFileName.c_str() );
toLog(message);
-
+
// save the xml file to disk
doc.write(xmlFileName.c_str());
@@ -417,7 +417,7 @@ std::string Mootcher::getXmlFile(std::string ID, int &length)
ARDOUR::Library->save_changes ();
}
}
-
+
// clear the memory
if(xml_page.memory){
free( xml_page.memory );
@@ -456,9 +456,9 @@ std::string Mootcher::getFile(std::string ID)
audioFileName += basePath;
audioFileName += "snd/";
audioFileName += ID;
- audioFileName += "-";
+ audioFileName += "-";
audioFileName += name;
-
+
//check to see if audio file already exists
FILE *testFile = fopen(audioFileName.c_str(), "r");
if (testFile) { //TODO: should also check length to see if file is complete
@@ -470,9 +470,9 @@ std::string Mootcher::getFile(std::string ID)
return audioFileName;
} else {
remove( audioFileName.c_str() ); //file was not correct length, delete it and try again
- }
+ }
}
-
+
//now download the actual file
if (curl) {
@@ -500,14 +500,14 @@ std::string Mootcher::getFile(std::string ID)
fclose(theFile);
}
-
+
/*
bar.dlnowMoo = 0;
bar.dltotalMoo = 0;
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the process bar thingy
curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, &bar);
-*/
+*/
}
}
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.h b/gtk2_ardour/sfdb_freesound_mootcher.h
index 3cfbd414d4..4c4d66ce2d 100644
--- a/gtk2_ardour/sfdb_freesound_mootcher.h
+++ b/gtk2_ardour/sfdb_freesound_mootcher.h
@@ -1,5 +1,5 @@
/*sfdb_freesound_mootcher.h****************************************************************************
-
+
Adapted for Ardour by Ben Loftis, March 2008
Mootcher Online Access to thefreesoundproject website
@@ -27,7 +27,7 @@
// mootcher version
#define ___VERSION___ 1.3
-//--- struct to store XML file
+//--- struct to store XML file
struct MemoryStruct {
char *memory;
size_t size;
@@ -51,7 +51,7 @@ public:
struct dlprocess bar;
-
+
private:
const char* changeWorkingDir(const char *saveLocation);
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index bd19db31f0..39c8c2510d 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -359,14 +359,14 @@ SoundFileBox::audition ()
afs = boost::dynamic_pointer_cast<AudioFileSource> (srclist[0]);
string rname = region_name_from_path (afs->path(), false);
-
- PropertyList plist;
-
+
+ PropertyList plist;
+
plist.add (ARDOUR::Properties::start, 0);
plist.add (ARDOUR::Properties::length, srclist[0]->length(srclist[0]->timeline_position()));
plist.add (ARDOUR::Properties::name, rname);
plist.add (ARDOUR::Properties::layer, 0);
-
+
r = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (srclist, plist, false));
_session->audition_region(r);
@@ -434,7 +434,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
chooser.add_shortcut_folder_uri("file:///Library/GarageBand/Apple Loops");
chooser.add_shortcut_folder_uri("file:///Library/Audio/Apple Loops");
chooser.add_shortcut_folder_uri("file:///Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files");
-
+
chooser.add_shortcut_folder_uri("file:///Volumes");
#endif
diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc
index c4c1da6aeb..24f7090498 100644
--- a/gtk2_ardour/shuttle_control.cc
+++ b/gtk2_ardour/shuttle_control.cc
@@ -101,7 +101,7 @@ ShuttleControl::on_size_allocate (Gtk::Allocation& alloc)
}
pattern = cairo_pattern_create_linear (0, 0, alloc.get_width(), alloc.get_height());
-
+
/* add 3 color stops */
uint32_t col = ARDOUR_UI::config()->canvasvar_Shuttle.get();
@@ -150,7 +150,7 @@ ShuttleControl::build_shuttle_context_menu ()
Menu* units_menu = manage (new Menu);
MenuList& units_items = units_menu->items();
RadioMenuItem::Group units_group;
-
+
units_items.push_back (RadioMenuElem (units_group, _("Percent"), sigc::bind (sigc::mem_fun (*this, &ShuttleControl::set_shuttle_units), Percentage)));
if (Config->get_shuttle_units() == Percentage) {
static_cast<RadioMenuItem*>(&units_items.back())->set_active();
@@ -160,7 +160,7 @@ ShuttleControl::build_shuttle_context_menu ()
static_cast<RadioMenuItem*>(&units_items.back())->set_active();
}
items.push_back (MenuElem (_("Units"), *units_menu));
-
+
Menu* style_menu = manage (new Menu);
MenuList& style_items = style_menu->items();
RadioMenuItem::Group style_group;
@@ -173,7 +173,7 @@ ShuttleControl::build_shuttle_context_menu ()
if (Config->get_shuttle_behaviour() == Wheel) {
static_cast<RadioMenuItem*>(&style_items.back())->set_active();
}
-
+
items.push_back (MenuElem (_("Mode"), *style_menu));
RadioMenuItem::Group speed_group;
@@ -204,7 +204,7 @@ ShuttleControl::build_shuttle_context_menu ()
}
items.push_back (MenuElem (_("Maximum speed"), *speed_menu));
-
+
}
void
@@ -279,7 +279,7 @@ ShuttleControl::on_button_release_event (GdkEventButton* ev)
case 2:
if (_session->transport_rolling()) {
_session->request_transport_speed (1.0);
- }
+ }
return true;
case 3:
@@ -316,7 +316,7 @@ ShuttleControl::on_scroll_event (GdkEventScroll* ev)
default:
return false;
}
-
+
if (Config->get_shuttle_units() == Semitones) {
float lower_side_of_dead_zone = semitones_as_fract (-24, true);
@@ -371,7 +371,7 @@ ShuttleControl::mouse_shuttle (double x, bool force)
}
/* compute shuttle fract as expressing how far between the center
- and the edge we are. positive values indicate we are right of
+ and the edge we are. positive values indicate we are right of
center, negative values indicate left of center
*/
@@ -399,7 +399,7 @@ ShuttleControl::speed_as_semitones (float speed, bool& reverse)
reverse = false;
return (int) round (12.0 * fast_log2 (speed));
}
-}
+}
float
ShuttleControl::semitones_as_speed (int semi, bool reverse)
@@ -467,7 +467,7 @@ ShuttleControl::on_expose_event (GdkEventExpose* event)
Glib::RefPtr<Gdk::Window> win (get_window());
Glib::RefPtr<Gtk::Style> style (get_style());
- cairo_t* cr = gdk_cairo_create (win->gobj());
+ cairo_t* cr = gdk_cairo_create (win->gobj());
cairo_set_source (cr, pattern);
cairo_rectangle (cr, 0.0, 0.0, get_width(), get_height());
@@ -582,9 +582,9 @@ ShuttleControl::update_speed_display ()
queue_draw ();
}
}
-
+
ShuttleControl::ShuttleControllable::ShuttleControllable (ShuttleControl& s)
- : PBD::Controllable (X_("Shuttle"))
+ : PBD::Controllable (X_("Shuttle"))
, sc (s)
{
}
@@ -599,7 +599,7 @@ void
ShuttleControl::ShuttleControllable::set_value (double val)
{
double fract;
-
+
if (val == 0.5) {
fract = 0.0;
} else {
@@ -613,7 +613,7 @@ ShuttleControl::ShuttleControllable::set_value (double val)
sc.set_shuttle_fract (fract);
}
-double
+double
ShuttleControl::ShuttleControllable::get_value () const
{
return sc.get_shuttle_fract ();
@@ -645,7 +645,7 @@ ShuttleControl::parameter_changed (std::string p)
queue_draw ();
break;
}
-
+
} else if (p == "shuttle-units") {
queue_draw ();
}
diff --git a/gtk2_ardour/shuttle_control.h b/gtk2_ardour/shuttle_control.h
index 836ac535ed..03ec005958 100644
--- a/gtk2_ardour/shuttle_control.h
+++ b/gtk2_ardour/shuttle_control.h
@@ -32,7 +32,7 @@ namespace Gtk {
#include "ardour/types.h"
-class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr
+class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr
{
public:
ShuttleControl ();
@@ -48,9 +48,9 @@ class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr
ShuttleControllable (ShuttleControl&);
void set_value (double);
double get_value (void) const;
-
+
void set_id (const std::string&);
-
+
ShuttleControl& sc;
};
diff --git a/gtk2_ardour/speaker_dialog.cc b/gtk2_ardour/speaker_dialog.cc
index e265b2ed1b..3d0c348df4 100644
--- a/gtk2_ardour/speaker_dialog.cc
+++ b/gtk2_ardour/speaker_dialog.cc
@@ -89,7 +89,7 @@ SpeakerDialog::SpeakerDialog ()
}
void
-SpeakerDialog::set_speakers (boost::shared_ptr<Speakers> s)
+SpeakerDialog::set_speakers (boost::shared_ptr<Speakers> s)
{
_speakers = s;
}
@@ -130,7 +130,7 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
cairo_stroke (cr);
/* vertical line of "crosshairs" */
-
+
cairo_move_to (cr, width/2+0.5, 0.5);
cairo_line_to (cr, width/2+0.5, height+0.5);
cairo_stroke (cr);
@@ -141,9 +141,9 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
cairo_stroke (cr);
float arc_radius;
-
+
cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
-
+
if (height < 100) {
cairo_set_font_size (cr, 10);
arc_radius = 2.0;
@@ -154,17 +154,17 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
int n = 0;
for (vector<Speaker>::iterator i = speakers->speakers().begin(); i != speakers->speakers().end(); ++i) {
-
+
Speaker& s (*i);
CartesianVector c (s.coords());
-
+
cart_to_gtk (c);
-
+
x = (gint) floor (c.x);
y = (gint) floor (c.y);
-
+
/* XXX need to shift circles so that they are centered on the circle */
-
+
cairo_arc (cr, x, y, arc_radius, 0, 2.0 * M_PI);
if (selected_index == n) {
cairo_set_source_rgb (cr, 0.8, 0.8, 0.2);
@@ -173,9 +173,9 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
}
cairo_close_path (cr);
cairo_fill (cr);
-
+
cairo_move_to (cr, x + 6, y + 6);
-
+
char buf[256];
snprintf (buf, sizeof (buf), "%d:%d", n+1, (int) lrint (s.angles().azi));
cairo_show_text (cr, buf);
@@ -185,14 +185,14 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
cairo_destroy (cr);
return true;
-
+
}
void
SpeakerDialog::cart_to_gtk (CartesianVector& c) const
{
/* "c" uses a coordinate space that is:
-
+
center = 0.0
dimension = 2.0 * 2.0
so max values along each axis are -1..+1
@@ -253,7 +253,7 @@ SpeakerDialog::darea_button_press_event (GdkEventButton *ev)
if (!speakers) {
return false;
}
-
+
GdkModifierType state;
if (ev->type == GDK_2BUTTON_PRESS && ev->button == 1) {
@@ -300,7 +300,7 @@ SpeakerDialog::darea_button_release_event (GdkEventButton *ev)
if (!speakers) {
return false;
}
-
+
gint x, y;
GdkModifierType state;
bool ret = false;
@@ -312,7 +312,7 @@ SpeakerDialog::darea_button_release_event (GdkEventButton *ev)
state = (GdkModifierType) ev->state;
if (Keyboard::modifier_state_contains (state, Keyboard::TertiaryModifier)) {
-
+
for (vector<Speaker>::iterator i = speakers->speakers().begin(); i != speakers->speakers().end(); ++i) {
/* XXX DO SOMETHING TO SET SPEAKER BACK TO "normal" */
}
@@ -338,14 +338,14 @@ SpeakerDialog::darea_button_release_event (GdkEventButton *ev)
break;
}
-
+
drag_index = -1;
return ret;
}
int
-SpeakerDialog::find_closest_object (gdouble x, gdouble y)
+SpeakerDialog::find_closest_object (gdouble x, gdouble y)
{
boost::shared_ptr<Speakers> speakers = _speakers.lock ();
if (!speakers) {
@@ -361,7 +361,7 @@ SpeakerDialog::find_closest_object (gdouble x, gdouble y)
Speaker& candidate (*i);
CartesianVector c;
-
+
candidate.angles().cartesian (c);
cart_to_gtk (c);
@@ -375,7 +375,7 @@ SpeakerDialog::find_closest_object (gdouble x, gdouble y)
}
}
- if (best_distance > 20) { // arbitrary
+ if (best_distance > 20) { // arbitrary
return -1;
}
@@ -449,7 +449,7 @@ SpeakerDialog::handle_motion (gint evx, gint evy, GdkModifierType state)
/* position actual signal on circle */
clamp_to_circle (cp.x, cp.y);
-
+
/* generate an angular representation and set drag target (GUI) position */
AngularVector a;
@@ -460,7 +460,7 @@ SpeakerDialog::handle_motion (gint evx, gint evy, GdkModifierType state)
queue_draw ();
}
- }
+ }
return true;
}
@@ -472,7 +472,7 @@ SpeakerDialog::add_speaker ()
if (!speakers) {
return;
}
-
+
speakers->add_speaker (PBD::AngularVector (0, 0, 0));
queue_draw ();
}
@@ -484,7 +484,7 @@ SpeakerDialog::set_selected (int i)
if (!speakers) {
return;
}
-
+
if (i == selected_index) {
return;
}
@@ -493,10 +493,10 @@ SpeakerDialog::set_selected (int i)
queue_draw ();
selected_speaker_connection.disconnect ();
-
+
azimuth_spinner.set_sensitive (selected_index != -1);
remove_speaker_button.set_sensitive (selected_index != -1);
-
+
if (selected_index != -1) {
azimuth_adjustment.set_value (speakers->speakers()[selected_index].angles().azi);
speakers->speakers()[selected_index].PositionChanged.connect (
@@ -520,7 +520,7 @@ SpeakerDialog::azimuth_changed ()
if (ignore_azimuth_change) {
return;
}
-
+
ignore_speaker_position_change = true;
speakers->move_speaker (speakers->speakers()[selected_index].id, PBD::AngularVector (azimuth_adjustment.get_value (), 0, 0));
ignore_speaker_position_change = false;
@@ -535,20 +535,20 @@ SpeakerDialog::speaker_position_changed ()
if (!speakers) {
return;
}
-
+
assert (selected_index != -1);
if (ignore_speaker_position_change) {
return;
}
-
+
ignore_azimuth_change = true;
azimuth_adjustment.set_value (speakers->speakers()[selected_index].angles().azi);
ignore_azimuth_change = false;
queue_draw ();
}
-
+
void
SpeakerDialog::remove_speaker ()
{
@@ -556,11 +556,11 @@ SpeakerDialog::remove_speaker ()
if (!speakers) {
return;
}
-
+
assert (selected_index != -1);
speakers->remove_speaker (speakers->speakers()[selected_index].id);
set_selected (-1);
-
+
queue_draw ();
}
diff --git a/gtk2_ardour/speaker_dialog.h b/gtk2_ardour/speaker_dialog.h
index 62bcc277f2..eefdd11afa 100644
--- a/gtk2_ardour/speaker_dialog.h
+++ b/gtk2_ardour/speaker_dialog.h
@@ -34,10 +34,10 @@ class SpeakerDialog : public ArdourDialog
{
public:
SpeakerDialog ();
-
+
boost::shared_ptr<ARDOUR::Speakers> get_speakers() const;
void set_speakers (boost::shared_ptr<ARDOUR::Speakers>);
-
+
private:
boost::weak_ptr<ARDOUR::Speakers> _speakers;
Gtk::HBox hbox;
@@ -63,14 +63,14 @@ private:
PBD::ScopedConnection selected_speaker_connection;
bool ignore_speaker_position_change;
bool ignore_azimuth_change;
-
+
bool darea_expose_event (GdkEventExpose*);
void darea_size_allocate (Gtk::Allocation& alloc);
bool darea_motion_notify_event (GdkEventMotion *ev);
bool handle_motion (gint evx, gint evy, GdkModifierType state);
bool darea_button_press_event (GdkEventButton *ev);
bool darea_button_release_event (GdkEventButton *ev);
-
+
void clamp_to_circle (double& x, double& y);
void gtk_to_cart (PBD::CartesianVector& c) const;
void cart_to_gtk (PBD::CartesianVector& c) const;
diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc
index 35021eea03..1714364fd3 100644
--- a/gtk2_ardour/startup.cc
+++ b/gtk2_ardour/startup.cc
@@ -946,19 +946,19 @@ ArdourStartup::setup_existing_session_page ()
recent_session_display.append_column (_("Recent Sessions"), recent_session_columns.visible_name);
recent_session_display.set_headers_visible (false);
recent_session_display.get_selection()->set_mode (SELECTION_BROWSE);
-
+
recent_session_display.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &ArdourStartup::recent_session_row_selected));
-
+
recent_scroller.add (recent_session_display);
recent_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
recent_scroller.set_shadow_type (Gtk::SHADOW_IN);
-
+
recent_session_display.show();
-
+
recent_scroller.show();
int cnt = redisplay_recent_sessions ();
recent_session_display.signal_row_activated().connect (sigc::mem_fun (*this, &ArdourStartup::recent_row_activated));
-
+
if (cnt > 4) {
recent_scroller.set_size_request (-1, 300);
}
@@ -968,11 +968,11 @@ ArdourStartup::setup_existing_session_page ()
existing_session_chooser.set_title (_("Select session file"));
existing_session_chooser.signal_file_set().connect (sigc::mem_fun (*this, &ArdourStartup::existing_session_selected));
-
+
#ifdef GTKOSX
existing_session_chooser.add_shortcut_folder ("/Volumes");
#endif
-
+
HBox* hbox = manage (new HBox);
hbox->set_spacing (4);
hbox->pack_start (*manage (new Label (_("Browse:"))), PACK_SHRINK);
@@ -980,7 +980,7 @@ ArdourStartup::setup_existing_session_page ()
session_existing_vbox.pack_start (*hbox, false, false);
hbox->show_all ();
}
-
+
session_existing_vbox.show_all ();
session_hbox.pack_start (session_existing_vbox, true, true);
diff --git a/gtk2_ardour/startup.h b/gtk2_ardour/startup.h
index edbecd77c9..76183b5b5a 100644
--- a/gtk2_ardour/startup.h
+++ b/gtk2_ardour/startup.h
@@ -75,7 +75,7 @@ class ArdourStartup : public Gtk::Assistant {
bool connect_outs_to_master() const;
bool connect_outs_to_physical() const;
- gint response () const {
+ gint response () const {
return _response;
}
diff --git a/gtk2_ardour/step_editor.cc b/gtk2_ardour/step_editor.cc
index 079644eabc..868787c890 100644
--- a/gtk2_ardour/step_editor.cc
+++ b/gtk2_ardour/step_editor.cc
@@ -14,7 +14,7 @@ using namespace Gtk;
using namespace std;
StepEditor::StepEditor (PublicEditor& e, boost::shared_ptr<MidiTrack> t, MidiTimeAxisView& mtv)
- : _editor (e)
+ : _editor (e)
, _track (t)
, step_editor (0)
, _mtv (mtv)
@@ -24,7 +24,7 @@ StepEditor::StepEditor (PublicEditor& e, boost::shared_ptr<MidiTrack> t, MidiTim
_step_edit_within_chord = 0;
_step_edit_chord_duration = 0.0;
step_edit_region_view = 0;
-
+
_track->PlaylistChanged.connect (*this, invalidator (*this),
boost::bind (&StepEditor::playlist_changed, this),
gui_context());
@@ -99,9 +99,9 @@ StepEditor::prepare_step_edit_region ()
const Meter& m = _mtv.session()->tempo_map().meter_at (step_edit_insert_position);
const Tempo& t = _mtv.session()->tempo_map().tempo_at (step_edit_insert_position);
-
+
step_edit_region = _mtv.add_region (step_edit_insert_position, floor (m.frames_per_bar (t, _mtv.session()->frame_rate())), true);
-
+
RegionView* rv = _mtv.midi_view()->find_view (step_edit_region);
step_edit_region_view = dynamic_cast<MidiRegionView*>(rv);
}
@@ -115,14 +115,14 @@ StepEditor::reset_step_edit_beat_pos ()
assert (step_edit_region_view);
framecnt_t frames_from_start = _editor.get_preferred_edit_position() - step_edit_region->position();
-
+
if (frames_from_start < 0) {
/* this can happen with snap enabled, and the edit point == Playhead. we snap the
position of the new region, and it can end up after the edit point.
*/
frames_from_start = 0;
}
-
+
step_edit_beat_pos = step_edit_region_view->frames_to_beats (frames_from_start);
step_edit_region_view->move_step_edit_cursor (step_edit_beat_pos);
}
@@ -209,7 +209,7 @@ void
StepEditor::move_step_edit_beat_pos (Evoral::MusicalTime beats)
{
if (beats > 0.0) {
- step_edit_beat_pos = min (step_edit_beat_pos + beats,
+ step_edit_beat_pos = min (step_edit_beat_pos + beats,
step_edit_region_view->frames_to_beats (step_edit_region->length()));
} else if (beats < 0.0) {
if (beats < step_edit_beat_pos) {
@@ -236,30 +236,30 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
assert (step_edit_region);
assert (step_edit_region_view);
-
+
if (beat_duration == 0.0) {
bool success;
beat_duration = _editor.get_grid_type_as_beats (success, step_edit_insert_position);
-
+
if (!success) {
return -1;
}
}
-
+
MidiStreamView* msv = _mtv.midi_view();
-
+
/* make sure its visible on the vertical axis */
-
+
if (pitch < msv->lowest_note() || pitch > msv->highest_note()) {
msv->update_note_range (pitch);
msv->set_note_range (MidiStreamView::ContentsRange);
}
-
+
/* make sure its visible on the horizontal axis */
-
- framepos_t fpos = step_edit_region->position() +
+
+ framepos_t fpos = step_edit_region->position() +
step_edit_region_view->beats_to_frames (step_edit_beat_pos + beat_duration);
-
+
if (fpos >= (_editor.leftmost_position() + _editor.current_page_frames())) {
_editor.reset_x_origin (fpos - (_editor.current_page_frames()/4));
}
@@ -272,7 +272,7 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
/* avoid any apparent note overlap - move the start of this note
up by 1 tick from where the last note ended
*/
-
+
at += 1.0/Timecode::BBT_Time::ticks_per_beat;
len -= 1.0/Timecode::BBT_Time::ticks_per_beat;
}
@@ -284,12 +284,12 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
if (_step_edit_triplet_countdown > 0) {
_step_edit_triplet_countdown--;
-
+
if (_step_edit_triplet_countdown == 0) {
_step_edit_triplet_countdown = 3;
}
}
-
+
if (!_step_edit_within_chord) {
step_edit_beat_pos += beat_duration;
step_edit_region_view->move_step_edit_cursor (step_edit_beat_pos);
@@ -362,14 +362,14 @@ StepEditor::step_edit_rest (Evoral::MusicalTime beats)
}
}
-void
+void
StepEditor::step_edit_beat_sync ()
{
step_edit_beat_pos = ceil (step_edit_beat_pos);
step_edit_region_view->move_step_edit_cursor (step_edit_beat_pos);
}
-void
+void
StepEditor::step_edit_bar_sync ()
{
Session* _session = _mtv.session ();
@@ -378,7 +378,7 @@ StepEditor::step_edit_bar_sync ()
return;
}
- framepos_t fpos = step_edit_region->position() +
+ framepos_t fpos = step_edit_region->position() +
step_edit_region_view->beats_to_frames (step_edit_beat_pos);
fpos = _session->tempo_map().round_to_bar (fpos, 1);
step_edit_beat_pos = ceil (step_edit_region_view->frames_to_beats (fpos - step_edit_region->position()));
@@ -398,7 +398,7 @@ void
StepEditor::region_removed (boost::weak_ptr<Region> wr)
{
boost::shared_ptr<Region> r (wr.lock());
-
+
if (!r) {
return;
}
@@ -412,7 +412,7 @@ StepEditor::region_removed (boost::weak_ptr<Region> wr)
}
string
-StepEditor::name() const
+StepEditor::name() const
{
return _track->name();
}
diff --git a/gtk2_ardour/step_editor.h b/gtk2_ardour/step_editor.h
index 566292150c..fb1ac8d9c7 100644
--- a/gtk2_ardour/step_editor.h
+++ b/gtk2_ardour/step_editor.h
@@ -31,7 +31,7 @@ class StepEditor : public PBD::ScopedConnectionList, public sigc::trackable
void step_edit_bar_sync ();
int step_add_bank_change (uint8_t channel, uint8_t bank);
int step_add_program_change (uint8_t channel, uint8_t program);
- int step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity,
+ int step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity,
Evoral::MusicalTime beat_duration);
void step_edit_sustain (Evoral::MusicalTime beats);
bool step_edit_within_triplet () const;
diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc
index f71bd56305..8c26e1d20e 100644
--- a/gtk2_ardour/step_entry.cc
+++ b/gtk2_ardour/step_entry.cc
@@ -69,7 +69,7 @@ StepEntry::StepEntry (StepEditor& seditor)
, rest_button (_("rest"))
, grid_rest_button (_("g-rest"))
, back_button (_("back"))
- , channel_adjustment (1, 1, 16, 1, 4)
+ , channel_adjustment (1, 1, 16, 1, 4)
, channel_spinner (channel_adjustment)
, octave_adjustment (4, 0, 10, 1, 4) // start in octave 4
, octave_spinner (octave_adjustment)
@@ -97,7 +97,7 @@ StepEntry::StepEntry (StepEditor& seditor)
*/
uint16_t chn_mask = se->channel_selector().get_selected_channels();
-
+
for (uint32_t i = 0; i < 16; ++i) {
if (chn_mask & (1<<i)) {
channel_adjustment.set_value (i+1);
@@ -376,7 +376,7 @@ StepEntry::StepEntry (StepEditor& seditor)
act = myactions.find_action ("StepEditing/sustain");
gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (sustain_button.gobj()), false);
gtk_activatable_set_related_action (GTK_ACTIVATABLE (sustain_button.gobj()), act->gobj());
-
+
upper_box.set_spacing (6);
upper_box.pack_start (chord_button, false, false);
upper_box.pack_start (note_length_box, false, false, 12);
@@ -445,7 +445,7 @@ StepEntry::StepEntry (StepEditor& seditor)
g_signal_connect(G_OBJECT(_piano), "note-off", G_CALLBACK(_note_off_event_handler), this);
g_signal_connect(G_OBJECT(_piano), "rest", G_CALLBACK(_rest_event_handler), this);
-
+
program_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::program_click));
bank_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::bank_click));
beat_resync_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::beat_resync_click));
@@ -461,7 +461,7 @@ StepEntry::StepEntry (StepEditor& seditor)
get_vbox()->add (packer);
/* initial settings: quarter note and mezzo forte */
-
+
act = myactions.find_action ("StepEditing/note-length-quarter");
RefPtr<RadioAction> r = RefPtr<RadioAction>::cast_dynamic (act);
assert (r);
@@ -495,7 +495,7 @@ StepEntry::on_key_press_event (GdkEventKey* ev)
/* focus widget gets first shot, then bindings, otherwise
forward to main window
*/
-
+
if (!gtk_window_propagate_key_event (GTK_WINDOW(gobj()), ev)) {
KeyboardKey k (ev->state, ev->keyval);
@@ -517,7 +517,7 @@ StepEntry::on_key_release_event (GdkEventKey* ev)
return true;
}
}
-
+
/* don't forward releases */
return true;
@@ -533,7 +533,7 @@ Evoral::MusicalTime
StepEntry::note_length ()
{
Evoral::MusicalTime base_time = 4.0 / (Evoral::MusicalTime) length_divisor_adjustment.get_value();
-
+
RefPtr<Action> act = myactions.find_action ("StepEditing/toggle-triplet");
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
bool triplets = tact->get_active ();
@@ -558,7 +558,7 @@ StepEntry::note_velocity () const
return (Evoral::MusicalTime) velocity_adjustment.get_value();
}
-uint8_t
+uint8_t
StepEntry::note_channel() const
{
return channel_adjustment.get_value() - 1;
@@ -640,11 +640,11 @@ StepEntry::register_actions ()
RadioAction::Group note_length_group;
- myactions.register_radio_action ("StepEditing", note_length_group, "note-length-whole",
+ myactions.register_radio_action ("StepEditing", note_length_group, "note-length-whole",
_("Set Note Length to Whole"), sigc::mem_fun (*this, &StepEntry::note_length_change), 1);
- myactions.register_radio_action ("StepEditing", note_length_group, "note-length-half",
+ myactions.register_radio_action ("StepEditing", note_length_group, "note-length-half",
_("Set Note Length to 1/2"), sigc::mem_fun (*this, &StepEntry::note_length_change), 2);
- myactions.register_radio_action ("StepEditing", note_length_group, "note-length-third",
+ myactions.register_radio_action ("StepEditing", note_length_group, "note-length-third",
_("Set Note Length to 1/3"), sigc::mem_fun (*this, &StepEntry::note_length_change), 3);
myactions.register_radio_action ("StepEditing", note_length_group, "note-length-quarter",
_("Set Note Length to 1/4"), sigc::mem_fun (*this, &StepEntry::note_length_change), 4);
@@ -681,13 +681,13 @@ StepEntry::register_actions ()
RadioAction::Group dot_group;
- myactions.register_radio_action ("StepEditing", dot_group, "no-dotted", _("No Dotted Notes"),
+ myactions.register_radio_action ("StepEditing", dot_group, "no-dotted", _("No Dotted Notes"),
sigc::mem_fun (*this, &StepEntry::dot_change), 0);
- myactions.register_radio_action ("StepEditing", dot_group, "toggle-dotted", _("Toggled Dotted Notes"),
+ myactions.register_radio_action ("StepEditing", dot_group, "toggle-dotted", _("Toggled Dotted Notes"),
sigc::mem_fun (*this, &StepEntry::dot_change), 1);
- myactions.register_radio_action ("StepEditing", dot_group, "toggle-double-dotted", _("Toggled Double-Dotted Notes"),
+ myactions.register_radio_action ("StepEditing", dot_group, "toggle-double-dotted", _("Toggled Double-Dotted Notes"),
sigc::mem_fun (*this, &StepEntry::dot_change), 2);
- myactions.register_radio_action ("StepEditing", dot_group, "toggle-triple-dotted", _("Toggled Triple-Dotted Notes"),
+ myactions.register_radio_action ("StepEditing", dot_group, "toggle-triple-dotted", _("Toggled Triple-Dotted Notes"),
sigc::mem_fun (*this, &StepEntry::dot_change), 3);
myactions.register_toggle_action ("StepEditing", "toggle-chord", _("Toggle Chord Entry"),
@@ -754,11 +754,11 @@ StepEntry::dot_value_change ()
for (vector<const char*>::iterator i = dot_actions.begin(); i != dot_actions.end(); ++i) {
act = myactions.find_action (*i);
-
+
if (act) {
ract = RefPtr<RadioAction>::cast_dynamic (act);
- if (ract) {
+ if (ract) {
if (ract->property_value() == val) {
ract->set_active (true);
inconsistent = false;
@@ -767,7 +767,7 @@ StepEntry::dot_value_change ()
}
}
}
-
+
dot1_button.set_inconsistent (inconsistent);
dot2_button.set_inconsistent (inconsistent);
dot3_button.set_inconsistent (inconsistent);
@@ -881,7 +881,7 @@ StepEntry::note_length_change (GtkAction* act)
becaome "active". so ... only bother to actually change the value when this
is called for the "active" action.
*/
-
+
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
length_divisor_adjustment.set_value (v);
@@ -898,7 +898,7 @@ StepEntry::note_velocity_change (GtkAction* act)
becaome "active". so ... only bother to actually change the value when this
is called for the "active" action.
*/
-
+
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
velocity_adjustment.set_value (v);
@@ -926,11 +926,11 @@ StepEntry::velocity_value_change ()
for (vector<const char*>::iterator i = velocity_actions.begin(); i != velocity_actions.end(); ++i) {
act = myactions.find_action (*i);
-
+
if (act) {
ract = RefPtr<RadioAction>::cast_dynamic (act);
- if (ract) {
+ if (ract) {
if (ract->property_value() == val) {
ract->set_active (true);
inconsistent = false;
@@ -970,11 +970,11 @@ StepEntry::length_value_change ()
for (vector<const char*>::iterator i = length_actions.begin(); i != length_actions.end(); ++i) {
act = myactions.find_action (*i);
-
+
if (act) {
ract = RefPtr<RadioAction>::cast_dynamic (act);
- if (ract) {
+ if (ract) {
if (ract->property_value() == val) {
ract->set_active (true);
inconsistent = false;
@@ -1000,7 +1000,7 @@ StepEntry::radio_button_press (GdkEventButton* ev)
{
if (ev->button == 1) {
return true;
- }
+ }
return false;
}
@@ -1010,13 +1010,13 @@ StepEntry::radio_button_release (GdkEventButton* ev, RadioButton* btn, int v)
{
if (ev->button == 1) {
GtkAction* act = gtk_activatable_get_related_action (GTK_ACTIVATABLE (btn->gobj()));
-
+
if (act) {
gtk_radio_action_set_current_value (GTK_RADIO_ACTION(act), v);
}
-
+
return true;
- }
+ }
return false;
}
@@ -1113,7 +1113,7 @@ StepEntry::next_note_velocity ()
} else if (l < 127) {
l = 127;
}
-
+
velocity_adjustment.set_value (l);
}
@@ -1139,7 +1139,7 @@ StepEntry::prev_note_velocity ()
} else {
l = 1;
}
-
+
velocity_adjustment.set_value (l);
}
diff --git a/gtk2_ardour/step_entry.h b/gtk2_ardour/step_entry.h
index e534c83e01..c916c143bd 100644
--- a/gtk2_ardour/step_entry.h
+++ b/gtk2_ardour/step_entry.h
@@ -44,9 +44,9 @@ class StepEntry : public ArdourDialog
Evoral::MusicalTime note_length();
uint8_t note_velocity() const;
uint8_t note_channel() const;
-
+
int current_octave () const { return (int) floor (octave_adjustment.get_value()); }
-
+
private:
Evoral::MusicalTime _current_note_length;
uint8_t _current_note_velocity;
@@ -158,7 +158,7 @@ class StepEntry : public ArdourDialog
void insert_fsharp ();
void insert_g ();
void insert_gsharp ();
-
+
void note_length_change (GtkAction*);
void note_velocity_change (GtkAction*);
@@ -199,7 +199,7 @@ class StepEntry : public ArdourDialog
void toggle_triplet();
void toggle_chord();
-
+
void do_sustain ();
void back();
void sync_to_edit_point ();
diff --git a/gtk2_ardour/stereo_panner.h b/gtk2_ardour/stereo_panner.h
index 294f86babb..f2b04f1af7 100644
--- a/gtk2_ardour/stereo_panner.h
+++ b/gtk2_ardour/stereo_panner.h
@@ -31,7 +31,7 @@ namespace PBD {
class Controllable;
}
-namespace ARDOUR {
+namespace ARDOUR {
class Panner;
}
@@ -80,7 +80,7 @@ class StereoPanner : public Gtk::DrawingArea
void value_change ();
void set_drag_data ();
- struct ColorScheme {
+ struct ColorScheme {
uint32_t outline;
uint32_t fill;
uint32_t text;
@@ -88,7 +88,7 @@ class StereoPanner : public Gtk::DrawingArea
uint32_t rule;
};
- enum State {
+ enum State {
Normal,
Mono,
Inverted
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc
index 17c261200f..b0c8cd93a4 100644
--- a/gtk2_ardour/streamview.cc
+++ b/gtk2_ardour/streamview.cc
@@ -101,7 +101,7 @@ StreamView::~StreamView ()
if (owns_background_group) {
delete _background_group;
}
-
+
if (owns_canvas_group) {
delete _canvas_group;
}
@@ -308,7 +308,7 @@ StreamView::playlist_layered (boost::weak_ptr<Track> wtr)
} else {
/* layering has probably been modified. reflect this in the canvas. */
layer_regions();
- }
+ }
}
void
@@ -348,7 +348,7 @@ void
StreamView::diskstream_changed ()
{
boost::shared_ptr<Track> t;
-
+
if ((t = _trackview.track()) != 0) {
Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&StreamView::display_track, this, t));
} else {
@@ -624,13 +624,13 @@ StreamView::check_record_layers (boost::shared_ptr<Region> region, framepos_t to
/* Stop this happening again */
_new_rec_layer_time = max_framepos;
-
+
/* Make space in the view for the new layer */
++_layers;
-
+
/* Set the temporary region to the correct layer so that it gets drawn correctly */
region->set_layer (_layers - 1);
-
+
/* and reset the view */
update_contents_height ();
}
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index 24ab1182d9..6e0c39ebc8 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -117,7 +117,7 @@ public:
}
void check_record_layers (boost::shared_ptr<ARDOUR::Region>, ARDOUR::framepos_t);
-
+
sigc::signal<void, RegionView*> RegionViewAdded;
sigc::signal<void> RegionViewRemoved;
@@ -182,7 +182,7 @@ protected:
*/
framepos_t _new_rec_layer_time;
void setup_new_rec_layer_time (boost::shared_ptr<ARDOUR::Region>);
-
+
private:
void update_coverage_frames ();
};
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index 6a591c08b9..5863d7cde5 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -60,7 +60,7 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v)
}
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox);
-
+
Gtk::Table* table = Gtk::manage (new Gtk::Table (3, 3));
table->set_spacings (6);
@@ -70,7 +70,7 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v)
table->attach (_threshold, 1, 2, n, n + 1, Gtk::FILL);
table->attach (*Gtk::manage (new Gtk::Label (_("dbFS"))), 2, 3, n, n + 1, Gtk::FILL);
++n;
-
+
_threshold.set_digits (1);
_threshold.set_increments (1, 10);
_threshold.set_range (-120, 0);
@@ -79,7 +79,7 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v)
table->attach (*Gtk::manage (new Gtk::Label (_("Minimum length"), 1, 0.5)), 0, 1, n, n + 1, Gtk::FILL);
table->attach (_minimum_length, 1, 2, n, n + 1, Gtk::FILL);
++n;
-
+
_minimum_length.set_session (s);
_minimum_length.set_mode (AudioClock::Frames);
_minimum_length.set (1000, true);
@@ -119,9 +119,9 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v)
StripSilenceDialog::~StripSilenceDialog ()
{
_destroying = true;
-
+
/* Terminate our thread */
-
+
_lock.lock ();
_interthread_info.cancel = true;
_thread_should_finish = true;
@@ -129,7 +129,7 @@ StripSilenceDialog::~StripSilenceDialog ()
_run_cond.signal ();
pthread_join (_thread, 0);
-
+
delete _peaks_ready_connection;
}
@@ -161,7 +161,7 @@ StripSilenceDialog::update_threshold_line ()
for (list<Wave*>::iterator i = _waves.begin(); i != _waves.end(); ++i) {
(*i)->threshold_line->property_x1() = 0;
(*i)->threshold_line->property_x2() = _wave_width;
-
+
double const y = alt_log_meter (_threshold.get_value());
(*i)->threshold_line->property_y1() = (n + 1 - y) * _wave_height;
@@ -206,7 +206,7 @@ StripSilenceDialog::detection_thread_work ()
/* Hold this lock when we are doing work */
_lock.lock ();
-
+
while (1) {
for (list<ViewInterval>::iterator i = views.begin(); i != views.end(); ++i) {
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> ((*i).view->region());
@@ -249,7 +249,7 @@ StripSilenceDialog::restart_thread ()
*/
return;
}
-
+
/* Cancel any current run */
_interthread_info.cancel = true;
@@ -281,7 +281,7 @@ StripSilenceDialog::fade_length () const
{
return _fade_length.current_duration (views.front().view->region()->position());
}
-
+
void
StripSilenceDialog::update_progress_gui (float p)
{
diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h
index 886017ca8a..1264525ff2 100644
--- a/gtk2_ardour/strip_silence_dialog.h
+++ b/gtk2_ardour/strip_silence_dialog.h
@@ -45,7 +45,7 @@ public:
void drop_rects ();
void silences (ARDOUR::AudioIntervalMap&);
-
+
ARDOUR::framecnt_t minimum_length () const;
ARDOUR::framecnt_t fade_length () const;
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index 7e2f83de7c..b22ef7bc26 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -69,7 +69,7 @@ private:
class MeterDialog : public ArdourDialog
{
public:
-
+
MeterDialog (ARDOUR::TempoMap&, framepos_t, const std::string & action);
MeterDialog (ARDOUR::MeterSection&, const std::string & action);
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index c2774d5e4f..0d51ec1d6b 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -84,10 +84,10 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
if (extra_height == 0) {
compute_heights ();
}
-
+
_canvas_background = new Group (*ed.get_background_group (), 0.0, 0.0);
_canvas_display = new Group (*ed.get_trackview_group (), 0.0, 0.0);
- _canvas_display->hide(); // reveal as needed
+ _canvas_display->hide(); // reveal as needed
selection_group = new Group (*_canvas_display);
selection_group->set_data (X_("timeselection"), (void *) 1);
@@ -169,7 +169,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
_controls_padding_table.set_col_spacings (0);
_controls_padding_table.attach (controls_table, 1, 2, 1, 2);
_controls_padding_table.show ();
-
+
controls_vbox.pack_start (_controls_padding_table, false, false);
controls_vbox.pack_end (resizer_box, false, false);
controls_vbox.show ();
@@ -279,7 +279,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
if (canvas_item_visible ((*i)->_canvas_display)) {
++nth;
_effective_height += (*i)->show_at (y + _effective_height, nth, parent);
- }
+ }
}
return _effective_height;
@@ -400,11 +400,11 @@ TimeAxisView::step_height (bool coarser)
static const uint32_t step = 25;
if (coarser) {
-
+
if (height == preset_height (HeightSmall)) {
return;
}
-
+
if (height <= preset_height (HeightSmaller) && height > preset_height (HeightSmall)) {
set_height_enum (HeightSmall);
} else if (height <= preset_height (HeightNormal) && height > preset_height (HeightSmaller)) {
@@ -412,9 +412,9 @@ TimeAxisView::step_height (bool coarser)
} else {
set_height (height - step);
}
-
+
} else {
-
+
if (height == preset_height(HeightSmall)) {
set_height_enum (HeightSmaller);
} else if (height == preset_height(HeightSmaller)) {
@@ -422,7 +422,7 @@ TimeAxisView::step_height (bool coarser)
} else {
set_height (height + step);
}
-
+
}
}
@@ -452,7 +452,7 @@ TimeAxisView::set_height (uint32_t h)
if (h < preset_height (HeightSmall)) {
h = preset_height (HeightSmall);
}
-
+
time_axis_vbox.property_height_request () = h;
height = h;
@@ -506,18 +506,18 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev)
} while ((*i)->hidden());
}
}
-
-
+
+
/* resize to show editable name display */
-
+
if ((*i)->current_height() <= preset_height (HeightSmaller)) {
(*i)->set_height_enum (HeightSmaller);
}
-
+
(*i)->name_entry.grab_focus();
}
return true;
-
+
case GDK_Up:
case GDK_Down:
name_entry_changed ();
@@ -867,7 +867,7 @@ TimeAxisView::get_selection_rect (uint32_t id)
rect->start_trim->property_outline_what() = 0x0;
rect->start_trim->property_x1() = 0.0;
rect->start_trim->property_x2() = 0.0;
-
+
rect->end_trim = new SimpleRect (*selection_group);
rect->end_trim->property_outline_what() = 0x0;
rect->end_trim->property_x1() = 0.0;
@@ -940,18 +940,18 @@ TimeAxisView::add_ghost (RegionView* rv)
}
void
-TimeAxisView::remove_ghost (RegionView* rv)
+TimeAxisView::remove_ghost (RegionView* rv)
{
rv->remove_ghost_in (*this);
}
void
-TimeAxisView::erase_ghost (GhostRegion* gr)
+TimeAxisView::erase_ghost (GhostRegion* gr)
{
if (in_destructor) {
return;
}
-
+
for (list<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
if ((*i) == gr) {
ghosts.erase (i);
@@ -1005,7 +1005,7 @@ XMLNode&
TimeAxisView::get_state ()
{
/* XXX: is this method used? */
-
+
XMLNode* node = new XMLNode ("TAV-" + name());
char buf[32];
@@ -1319,7 +1319,7 @@ TimeAxisView::set_visibility (bool yn)
}
return true; // things changed
}
-
+
return false;
}
@@ -1356,7 +1356,7 @@ TimeAxisView::get_child_list ()
c.push_back(*i);
}
}
-
+
return c;
}
@@ -1368,13 +1368,13 @@ TimeAxisView::build_size_menu ()
}
delete _size_menu;
-
+
using namespace Menu_Helpers;
_size_menu = new Menu;
_size_menu->set_name ("ArdourContextMenu");
MenuList& items = _size_menu->items();
-
+
items.push_back (MenuElem (_("Largest"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightLargest, true)));
items.push_back (MenuElem (_("Larger"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightLarger, true)));
items.push_back (MenuElem (_("Large"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightLarge, true)));
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 92835fb59e..f9745e8456 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -214,7 +214,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
SelectionRect* get_selection_rect(uint32_t id);
static uint32_t preset_height (Height);
-
+
protected:
/* The Standard LHS Controls */
Gtk::HBox controls_hbox;
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 5cd88e8a97..9ddfb30fd4 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -63,18 +63,18 @@ void
TimeAxisViewItem::set_constant_heights ()
{
NAME_FONT = get_font_for_style (X_("TimeAxisViewItemName"));
-
+
Gtk::Window win;
Gtk::Label foo;
win.add (foo);
-
+
Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */
int width = 0;
int height = 0;
-
+
layout->set_font_description (*NAME_FONT);
Gtkmm2ext::get_ink_pixel_size (layout, width, height);
-
+
NAME_HEIGHT = height;
NAME_Y_OFFSET = height + 3;
NAME_HIGHLIGHT_SIZE = height + 2;
@@ -170,16 +170,16 @@ TimeAxisViewItem::init (
if (visibility & ShowFrame) {
frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, trackview.editor().frame_to_pixel(duration), trackview.current_height());
-
+
frame->property_outline_pixels() = 1;
frame->property_outline_what() = 0xF;
-
+
if (_recregion) {
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
} else {
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
}
-
+
frame->property_outline_what() = 0x1|0x2|0x4|0x8;
} else {
@@ -187,13 +187,13 @@ TimeAxisViewItem::init (
}
if (visibility & ShowNameHighlight) {
-
+
if (visibility & FullWidthNameHighlight) {
name_highlight = new ArdourCanvas::SimpleRect (*group, 0.0, trackview.editor().frame_to_pixel(item_duration), trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height());
} else {
name_highlight = new ArdourCanvas::SimpleRect (*group, 1.0, trackview.editor().frame_to_pixel(item_duration) - 1, trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height());
}
-
+
name_highlight->set_data ("timeaxisviewitem", this);
name_highlight->property_outline_what() = 0x4;
/* we should really use a canvas color property here */
@@ -712,14 +712,14 @@ TimeAxisViewItem::set_frame_color()
if (!frame) {
return;
}
-
+
if (_selected) {
f = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get();
if (fill_opacity) {
f = UINT_RGBA_CHANGE_A (f, fill_opacity);
- }
+ }
if (!rect_visible) {
f = UINT_RGBA_CHANGE_A (f, 0);
@@ -730,7 +730,7 @@ TimeAxisViewItem::set_frame_color()
if (_recregion) {
f = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
} else {
-
+
if (high_enough_for_name && !Config->get_color_regions_using_track_color()) {
f = ARDOUR_UI::config()->canvasvar_FrameBase.get();
} else {
@@ -755,11 +755,11 @@ TimeAxisViewItem::set_frame_color()
} else {
f = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
}
-
+
if (!rect_visible) {
f = UINT_RGBA_CHANGE_A (f, 64);
}
-
+
frame->property_outline_color_rgba() = f;
}
}
@@ -851,7 +851,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
}
high_enough_for_name = true;
}
-
+
name_highlight->property_x2() = pixel_width;
}
@@ -896,16 +896,16 @@ TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
if (pixbuf_holds_full_name && (it_width >= pb_width + NAME_X_OFFSET)) {
/*
- we've previously had the full name length showing
+ we've previously had the full name length showing
and its still showing.
*/
return;
}
-
+
if (pb_width > it_width - NAME_X_OFFSET) {
pb_width = it_width - NAME_X_OFFSET;
}
-
+
if (it_width <= NAME_X_OFFSET) {
wide_enough_for_name = false;
} else {
@@ -950,7 +950,7 @@ TimeAxisViewItem::update_name_pixbuf_visibility ()
if (!name_pixbuf) {
return;
}
-
+
if (wide_enough_for_name && high_enough_for_name) {
name_pixbuf->show ();
} else {
diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h
index dedc4a0485..e7384a8f85 100644
--- a/gtk2_ardour/time_axis_view_item.h
+++ b/gtk2_ardour/time_axis_view_item.h
@@ -85,7 +85,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
virtual void hide_rect ();
virtual void show_rect ();
-
+
/** @return true if the name area should respond to events */
bool name_active() const { return name_connected; }
@@ -94,7 +94,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
static void set_constant_heights ();
static const double NAME_X_OFFSET;
static const double GRAB_HANDLE_LENGTH;
-
+
/* these are not constant, but vary with the pixel size
of the font used to display the item name.
*/
@@ -115,22 +115,22 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
/** Emitted when the name of this item is changed */
sigc::signal<void,std::string,std::string,void*> NameChanged;
-
+
/** Emiited when the position of this item changes */
sigc::signal<void,framepos_t,void*> PositionChanged;
-
+
/** Emitted when the position lock of this item is changed */
sigc::signal<void,bool,void*> PositionLockChanged;
-
+
/** Emitted when the duration of this item changes */
sigc::signal<void,framecnt_t,void*> DurationChanged;
-
+
/** Emitted when the maximum item duration is changed */
sigc::signal<void,framecnt_t,void*> MaxDurationChanged;
-
+
/** Emitted when the mionimum item duration is changed */
sigc::signal<void,framecnt_t,void*> MinDurationChanged;
-
+
enum Visibility {
ShowFrame = 0x1,
ShowNameHighlight = 0x2,
@@ -141,13 +141,13 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
HideFrameTB = 0x40,
FullWidthNameHighlight = 0x80
};
-
+
protected:
TimeAxisViewItem(const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, Gdk::Color const &,
framepos_t, framepos_t, bool recording = false, bool automation = false, Visibility v = Visibility (0));
-
+
TimeAxisViewItem (const TimeAxisViewItem&);
-
+
void init (const std::string&, double, Gdk::Color const &, framepos_t, framepos_t, Visibility, bool, bool);
virtual void compute_colors (Gdk::Color const &);
@@ -158,39 +158,39 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
virtual void reset_width_dependent_items (double);
void reset_name_width (double);
void update_name_pixbuf_visibility ();
-
+
static gint idle_remove_this_item(TimeAxisViewItem*, void*);
-
+
/** time axis that this item is on */
TimeAxisView& trackview;
-
+
/** indicates whether this item is locked to its current position */
bool position_locked;
-
+
/** position of this item on the timeline */
framepos_t frame_position;
/** duration of this item upon the timeline */
framecnt_t item_duration;
-
+
/** maximum duration that this item can have */
framecnt_t max_item_duration;
-
+
/** minimum duration that this item can have */
framecnt_t min_item_duration;
-
+
/** indicates whether the max duration constraint is active */
bool max_duration_active;
-
+
/** indicates whether the min duration constraint is active */
bool min_duration_active;
-
+
/** samples per canvas unit */
double samples_per_unit;
/** should the item respond to events */
bool _sensitive;
-
+
/**
* The unique item name of this Item.
* Each item upon a time axis must have a unique id.
@@ -212,7 +212,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
uint32_t selected_frame_color_g;
uint32_t selected_frame_color_b;
uint32_t label_color;
-
+
uint32_t handle_color_r;
uint32_t handle_color_g;
uint32_t handle_color_b;
@@ -234,16 +234,16 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
/* with these two values, if frame_handle_start == 0 then frame_handle_end will also be 0 */
ArdourCanvas::SimpleRect* frame_handle_start; ///< `frame' (fade) handle for the start of the item, or 0
ArdourCanvas::SimpleRect* frame_handle_end; ///< `frame' (fade) handle for the end of the item, or 0
-
+
double _height;
Visibility visibility;
bool _recregion;
bool _automation; ///< true if this is an automation region view
private:
-
+
void parameter_changed (std::string);
-
+
}; /* class TimeAxisViewItem */
#endif /* __gtk_ardour_time_axis_view_item_h__ */
diff --git a/gtk2_ardour/time_selection.h b/gtk2_ardour/time_selection.h
index 61e635e8be..413cb75de6 100644
--- a/gtk2_ardour/time_selection.h
+++ b/gtk2_ardour/time_selection.h
@@ -31,11 +31,11 @@ class TimeSelection : public std::list<ARDOUR::AudioRange>
{
public:
ARDOUR::AudioRange& operator[](uint32_t);
-
+
ARDOUR::framepos_t start();
ARDOUR::framepos_t end_frame();
ARDOUR::framepos_t length();
-
+
bool consolidate ();
};
diff --git a/gtk2_ardour/track_selection.h b/gtk2_ardour/track_selection.h
index 5f85bcfd58..d94ec3c8c1 100644
--- a/gtk2_ardour/track_selection.h
+++ b/gtk2_ardour/track_selection.h
@@ -34,7 +34,7 @@ public:
TrackSelection (PublicEditor const *, TrackViewList const &);
virtual ~TrackSelection ();
-
+
TrackViewList add (TrackViewList const &);
template <typename Function>
@@ -83,7 +83,7 @@ public:
}
}
}
-
+
private:
PublicEditor const * _editor;
};
diff --git a/gtk2_ardour/track_view_list.h b/gtk2_ardour/track_view_list.h
index 0feddec903..d7b5433edc 100755
--- a/gtk2_ardour/track_view_list.h
+++ b/gtk2_ardour/track_view_list.h
@@ -37,4 +37,4 @@ public:
};
#endif
-
+
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc
index b61ef1b551..8e89884b22 100644
--- a/gtk2_ardour/ui_config.cc
+++ b/gtk2_ardour/ui_config.cc
@@ -92,7 +92,7 @@ UIConfiguration::load_defaults ()
return -1;
}
}
-
+
return found;
}
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index 8cdf5e0b58..179f341470 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -613,7 +613,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
}
#endif
-
+
DEBUG_TRACE (DEBUG::Accelerators, string_compose ("Win = %1 Key event: code = %2 state = %3 special handling ? %4 magic widget focus ? %5 allow_activation ? %6\n",
win,
ev->keyval,
@@ -621,7 +621,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
special_handling_of_unmodified_accelerators,
Keyboard::some_magic_widget_has_focus(),
allow_activating));
-
+
/* This exists to allow us to override the way GTK handles
key events. The normal sequence is:
@@ -656,7 +656,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
#ifdef GTKOSX
if (!special_handling_of_unmodified_accelerators) {
if (ev->state & GDK_MOD1_MASK) {
- /* we're not in a text entry or "magic focus" widget so we don't want OS X "special-character"
+ /* we're not in a text entry or "magic focus" widget so we don't want OS X "special-character"
text-style handling of alt-<key>. change the keyval back to what it would be without
the alt key. this way, we see <alt>-v rather than <alt>-radical and so on.
*/
@@ -920,4 +920,4 @@ escape_underscores (string const & s)
return o;
}
-
+
diff --git a/gtk2_ardour/verbose_cursor.cc b/gtk2_ardour/verbose_cursor.cc
index f63e518332..b51898929d 100644
--- a/gtk2_ardour/verbose_cursor.cc
+++ b/gtk2_ardour/verbose_cursor.cc
@@ -79,7 +79,7 @@ VerboseCursor::show (double xoffset, double yoffset)
if (_visible) {
return;
}
-
+
_canvas_item->raise_to_top ();
_canvas_item->show ();
_visible = true;
diff --git a/gtk2_ardour/verbose_cursor.h b/gtk2_ardour/verbose_cursor.h
index 8c53120005..20207b1e6e 100644
--- a/gtk2_ardour/verbose_cursor.h
+++ b/gtk2_ardour/verbose_cursor.h
@@ -28,12 +28,12 @@ class VerboseCursor
{
public:
VerboseCursor (Editor *);
-
+
ArdourCanvas::Item* canvas_item () const;
bool visible () const;
void set_color (uint32_t);
-
+
void set (std::string const &, double, double);
void set_text (std::string const &);
void set_position (double, double);
diff --git a/gtk2_ardour/volume_controller.cc b/gtk2_ardour/volume_controller.cc
index dfb517ebdd..bb6a5f1db3 100644
--- a/gtk2_ardour/volume_controller.cc
+++ b/gtk2_ardour/volume_controller.cc
@@ -35,7 +35,7 @@ VolumeController::VolumeController (Glib::RefPtr<Gdk::Pixbuf> p,
int subw, int subh)
: MotionFeedback (p, MotionFeedback::Rotary, "", adj, with_numeric, subw, subh)
-{
+{
get_adjustment()->signal_value_changed().connect (mem_fun (*this,&VolumeController::adjustment_value_changed));
}
diff --git a/gtk2_ardour/volume_controller.h b/gtk2_ardour/volume_controller.h
index 3f910ed094..d55e654930 100644
--- a/gtk2_ardour/volume_controller.h
+++ b/gtk2_ardour/volume_controller.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1998-2007 Paul Davis
+ Copyright (C) 1998-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -47,6 +47,6 @@ class VolumeController : public Gtkmm2ext::MotionFeedback
void controllable_value_changed ();
};
-#endif // __gtk_ardour_vol_controller_h__
+#endif // __gtk_ardour_vol_controller_h__
diff --git a/gtk2_ardour/vst_pluginui.cc b/gtk2_ardour/vst_pluginui.cc
index b3942235fd..8548c535d7 100644
--- a/gtk2_ardour/vst_pluginui.cc
+++ b/gtk2_ardour/vst_pluginui.cc
@@ -150,7 +150,7 @@ VSTPluginUI::forward_key_event (GdkEventKey* ev)
int special_windows_key = 0;
int character_windows_key = 0;
-
+
switch (ev->keyval) {
case GDK_Left:
special_windows_key = 0x25;
@@ -176,7 +176,7 @@ VSTPluginUI::forward_key_event (GdkEventKey* ev)
fst->pending_keys[fst->n_pending_keys].special = special_windows_key;
fst->pending_keys[fst->n_pending_keys].character = character_windows_key;
fst->n_pending_keys++;
-
+
pthread_mutex_unlock (&fst->lock);
}
}
diff --git a/gtk2_ardour/window_proxy.cc b/gtk2_ardour/window_proxy.cc
index 5731d3509d..ff525eb392 100755
--- a/gtk2_ardour/window_proxy.cc
+++ b/gtk2_ardour/window_proxy.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2010 Paul Davis
+ Copyright (C) 2010 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ WindowProxyBase::WindowProxyBase (string const & name, XMLNode const * node)
if (!node) {
return;
}
-
+
XMLNodeList children = node->children ();
XMLNodeList::const_iterator i = children.begin ();
@@ -48,7 +48,7 @@ WindowProxyBase::WindowProxyBase (string const & name, XMLNode const * node)
if ((*i)->name() == X_("Window") && prop && prop->value() == _name) {
break;
}
-
+
++i;
}
@@ -59,7 +59,7 @@ WindowProxyBase::WindowProxyBase (string const & name, XMLNode const * node)
if ((prop = (*i)->property (X_("visible"))) != 0) {
_visible = string_is_affirmative (prop->value ());
}
-
+
if ((prop = (*i)->property (X_("x-off"))) != 0) {
_x_off = atoi (prop->value().c_str());
}
@@ -116,7 +116,7 @@ WindowProxyBase::get_state () const
/* If the window has been created, get its current state; otherwise use
the state that we started off with.
*/
-
+
Gtk::Window* gtk_window = get_gtk_window ();
if (gtk_window) {
v = gtk_window->is_visible ();
diff --git a/gtk2_ardour/window_proxy.h b/gtk2_ardour/window_proxy.h
index 58a67eb391..10ff25ced6 100755
--- a/gtk2_ardour/window_proxy.h
+++ b/gtk2_ardour/window_proxy.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2010 Paul Davis
+ Copyright (C) 2010 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ class XMLNode;
* Subclasses of WindowProxy handle windows that are created in different
* ways.
*/
-
+
class WindowProxyBase
{
public:
@@ -43,7 +43,7 @@ public:
std::string name () const {
return _name;
}
-
+
void maybe_show ();
XMLNode* get_state () const;
void setup ();
@@ -61,11 +61,11 @@ public:
private:
XMLNode* state_node (bool, int, int, int, int) const;
-
+
std::string _name; ///< internal unique name for this window
bool _visible; ///< true if the window should be visible on startup
int _x_off; ///< x position
- int _y_off; ///< y position
+ int _y_off; ///< y position
int _width; ///< width
int _height; ///< height
};
@@ -79,7 +79,7 @@ public:
: WindowProxyBase (name, node)
, _window (0)
{
-
+
}
Gtk::Window* get_gtk_window () const {
@@ -119,7 +119,7 @@ public:
: WindowProxy<T> (name, node)
, _action (action)
{
-
+
}
void show () {