summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Brand <tom@trellis.ch>2017-07-01 18:42:24 +0200
committerRobin Gareus <robin@gareus.org>2017-07-01 19:28:26 +0200
commit63ea7b6516dbd7554d1eff6c98de50cf61fc9a72 (patch)
tree82fa339e009bc082dd8023916990800bea437081
parentf413b83cb9fa50954969a3d849999e1890ce6690 (diff)
NO-OP whitespace (updated GH PR #357)
-rw-r--r--gtk2_ardour/add_route_dialog.cc2
-rw-r--r--gtk2_ardour/ambiguous_file_dialog.h2
-rw-r--r--gtk2_ardour/analysis_window.cc10
-rw-r--r--gtk2_ardour/ardour_ui.cc122
-rw-r--r--gtk2_ardour/ardour_ui.h34
-rw-r--r--gtk2_ardour/ardour_ui_dependents.cc8
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc12
-rw-r--r--gtk2_ardour/ardour_window.cc28
-rw-r--r--gtk2_ardour/au_pluginui.h4
-rw-r--r--gtk2_ardour/audio_clock.cc19
-rw-r--r--gtk2_ardour/audio_region_view.cc18
-rw-r--r--gtk2_ardour/audio_region_view.h8
-rw-r--r--gtk2_ardour/audio_streamview.cc6
-rw-r--r--gtk2_ardour/audio_time_axis.cc6
-rw-r--r--gtk2_ardour/automation_line.h8
-rw-r--r--gtk2_ardour/automation_streamview.cc2
-rw-r--r--gtk2_ardour/bundle_env_cocoa.cc38
-rw-r--r--gtk2_ardour/canvas-simpleline.c146
-rw-r--r--gtk2_ardour/canvas-simplerect.c132
-rw-r--r--gtk2_ardour/canvas-waveview.c344
-rw-r--r--gtk2_ardour/canvas-waveview.h128
-rw-r--r--gtk2_ardour/clock_group.cc32
-rw-r--r--gtk2_ardour/clock_group.h20
-rw-r--r--gtk2_ardour/crossfade_edit.h50
-rw-r--r--gtk2_ardour/crossfade_view.h12
-rw-r--r--gtk2_ardour/edit_note_dialog.cc2
-rw-r--r--gtk2_ardour/editor.cc20
-rw-r--r--gtk2_ardour/editor.h14
-rw-r--r--gtk2_ardour/editor_actions.cc4
-rw-r--r--gtk2_ardour/editor_audio_import.cc58
-rw-r--r--gtk2_ardour/editor_canvas.cc32
-rw-r--r--gtk2_ardour/editor_canvas_events.cc26
-rw-r--r--gtk2_ardour/editor_cursors.h6
-rw-r--r--gtk2_ardour/editor_drag.cc6
-rw-r--r--gtk2_ardour/editor_drag.h38
-rw-r--r--gtk2_ardour/editor_markers.cc24
-rw-r--r--gtk2_ardour/editor_mouse.cc48
-rw-r--r--gtk2_ardour/editor_ops.cc50
-rw-r--r--gtk2_ardour/editor_regions.cc22
-rw-r--r--gtk2_ardour/editor_regions.h44
-rw-r--r--gtk2_ardour/editor_route_groups.cc6
-rw-r--r--gtk2_ardour/editor_route_groups.h14
-rw-r--r--gtk2_ardour/editor_rulers.cc394
-rw-r--r--gtk2_ardour/editor_snapshots.cc2
-rw-r--r--gtk2_ardour/editor_summary.cc4
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc4
-rw-r--r--gtk2_ardour/editor_timefx.cc14
-rw-r--r--gtk2_ardour/engine_dialog.cc4
-rw-r--r--gtk2_ardour/engine_dialog.h400
-rw-r--r--gtk2_ardour/enums.cc4
-rw-r--r--gtk2_ardour/export_channel_selector.cc20
-rw-r--r--gtk2_ardour/export_dialog.h4
-rw-r--r--gtk2_ardour/export_file_notebook.cc18
-rw-r--r--gtk2_ardour/gprofhelper.c102
-rw-r--r--gtk2_ardour/group_tabs.h4
-rw-r--r--gtk2_ardour/gtk_pianokeyboard.c12
-rw-r--r--gtk2_ardour/io_selector.cc6
-rw-r--r--gtk2_ardour/io_selector.h2
-rw-r--r--gtk2_ardour/level_meter.h24
-rw-r--r--gtk2_ardour/luadialog.cc2
-rw-r--r--gtk2_ardour/marker.cc2
-rw-r--r--gtk2_ardour/marker.h6
-rw-r--r--gtk2_ardour/midi_channel_selector.cc40
-rw-r--r--gtk2_ardour/midi_channel_selector.h194
-rw-r--r--gtk2_ardour/midi_region_view.h2
-rw-r--r--gtk2_ardour/midi_velocity_dialog.h8
-rw-r--r--gtk2_ardour/missing_file_dialog.h2
-rw-r--r--gtk2_ardour/missing_plugin_dialog.cc10
-rw-r--r--gtk2_ardour/missing_plugin_dialog.h4
-rw-r--r--gtk2_ardour/mixer_strip.cc8
-rw-r--r--gtk2_ardour/mixer_ui.cc22
-rw-r--r--gtk2_ardour/mixer_ui.h4
-rw-r--r--gtk2_ardour/monitor_selector.cc6
-rw-r--r--gtk2_ardour/mono_panner.cc12
-rw-r--r--gtk2_ardour/mono_panner.h48
-rw-r--r--gtk2_ardour/nag.cc2
-rw-r--r--gtk2_ardour/note_base.cc2
-rw-r--r--gtk2_ardour/nsm.cc22
-rw-r--r--gtk2_ardour/nsm.h18
-rw-r--r--gtk2_ardour/nsmclient.cc455
-rw-r--r--gtk2_ardour/nsmclient.h126
-rw-r--r--gtk2_ardour/panner2d.cc114
-rw-r--r--gtk2_ardour/panner_interface.cc12
-rw-r--r--gtk2_ardour/panner_ui.cc102
-rw-r--r--gtk2_ardour/panner_ui.h20
-rw-r--r--gtk2_ardour/patch_change_dialog.h4
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc2
-rw-r--r--gtk2_ardour/plugin_eq_gui.h8
-rw-r--r--gtk2_ardour/plugin_selector.cc100
-rw-r--r--gtk2_ardour/plugin_ui.cc20
-rw-r--r--gtk2_ardour/plugin_ui.h6
-rw-r--r--gtk2_ardour/port_group.cc48
-rw-r--r--gtk2_ardour/port_insert_ui.cc130
-rw-r--r--gtk2_ardour/port_insert_ui.h16
-rw-r--r--gtk2_ardour/port_matrix.cc12
-rw-r--r--gtk2_ardour/port_matrix_body.cc2
-rw-r--r--gtk2_ardour/processor_box.cc74
-rw-r--r--gtk2_ardour/processor_box.h24
-rw-r--r--gtk2_ardour/region_editor.cc50
-rw-r--r--gtk2_ardour/region_editor.h2
-rw-r--r--gtk2_ardour/region_gain_line.cc4
-rw-r--r--gtk2_ardour/region_gain_line.h4
-rw-r--r--gtk2_ardour/region_layering_order_editor.cc52
-rw-r--r--gtk2_ardour/region_layering_order_editor.h4
-rw-r--r--gtk2_ardour/region_selection.cc34
-rw-r--r--gtk2_ardour/region_view.cc90
-rw-r--r--gtk2_ardour/region_view.h16
-rw-r--r--gtk2_ardour/route_time_axis.h16
-rw-r--r--gtk2_ardour/route_ui.cc2
-rw-r--r--gtk2_ardour/route_ui.h20
-rw-r--r--gtk2_ardour/search_path_option.cc130
-rw-r--r--gtk2_ardour/search_path_option.h44
-rw-r--r--gtk2_ardour/selection.h2
-rw-r--r--gtk2_ardour/session_dialog.h34
-rw-r--r--gtk2_ardour/session_import_dialog.cc6
-rw-r--r--gtk2_ardour/session_metadata_dialog.h10
-rw-r--r--gtk2_ardour/speaker_dialog.cc124
-rw-r--r--gtk2_ardour/startup.h6
-rw-r--r--gtk2_ardour/step_entry.cc792
-rw-r--r--gtk2_ardour/streamview.h2
-rw-r--r--gtk2_ardour/tempo_curve.cc2
-rw-r--r--gtk2_ardour/tempo_curve.h4
-rw-r--r--gtk2_ardour/tempo_dialog.cc4
-rw-r--r--gtk2_ardour/time_axis_view.cc8
-rw-r--r--gtk2_ardour/time_axis_view_item.cc32
-rw-r--r--gtk2_ardour/time_axis_view_item.h2
-rw-r--r--gtk2_ardour/time_info_box.h2
-rw-r--r--gtk2_ardour/time_selection.h6
-rw-r--r--gtk2_ardour/ui_config.cc2
-rw-r--r--gtk2_ardour/utils.h6
-rw-r--r--gtk2_ardour/verbose_cursor.h2
-rw-r--r--gtk2_ardour/window_manager.h20
132 files changed, 2929 insertions, 2917 deletions
diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc
index 7381485cde..8f29044447 100644
--- a/gtk2_ardour/add_route_dialog.cc
+++ b/gtk2_ardour/add_route_dialog.cc
@@ -287,7 +287,7 @@ AddRouteDialog::track_type_chosen ()
true, MESSAGE_INFO, BUTTONS_OK, true);
msg.set_position (WIN_POS_MOUSE);
msg.run ();
- }
+ }
channel_combo.set_sensitive (true);
mode_combo.set_sensitive (true);
instrument_combo.set_sensitive (true);
diff --git a/gtk2_ardour/ambiguous_file_dialog.h b/gtk2_ardour/ambiguous_file_dialog.h
index e49f7850c3..52307b9aaf 100644
--- a/gtk2_ardour/ambiguous_file_dialog.h
+++ b/gtk2_ardour/ambiguous_file_dialog.h
@@ -33,7 +33,7 @@ public:
private:
Gtk::RadioButtonGroup _group;
std::vector<Gtk::RadioButton*> _radio_buttons;
- bool rb_button_press (GdkEventButton*);
+ bool rb_button_press (GdkEventButton*);
};
#endif // __gtk_ardour_ambiguous_file_dialog_h__
diff --git a/gtk2_ardour/analysis_window.cc b/gtk2_ardour/analysis_window.cc
index a1a98a8b3c..e078a7ee2b 100644
--- a/gtk2_ardour/analysis_window.cc
+++ b/gtk2_ardour/analysis_window.cc
@@ -45,12 +45,12 @@ AnalysisWindow::AnalysisWindow()
: source_selection_label (_("Signal source"))
, source_selection_ranges_rb (_("Selected ranges"))
, source_selection_regions_rb (_("Selected regions"))
- , show_minmax_button (_("Show frequency power range"))
- , show_normalized_button (_("Fit dB range"))
- , show_proportional_button (_("Proportional Spectrum, -18dB"))
- , fft_graph (16384)
+ , show_minmax_button (_("Show frequency power range"))
+ , show_normalized_button (_("Fit dB range"))
+ , show_proportional_button (_("Proportional Spectrum, -18dB"))
+ , fft_graph (16384)
{
- set_name(_("FFT analysis window"));
+ set_name (_("FFT analysis window"));
set_title (_("Spectral Analysis"));
track_list_ready = false;
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 6076cb71c6..58b5d5131c 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -199,7 +199,7 @@ using namespace Editing;
ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
-sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
+sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
static bool
ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version)
@@ -212,7 +212,7 @@ ask_about_configuration_copy (string const & old_dir, string const & new_dir, in
Gtk::MESSAGE_INFO,
Gtk::BUTTONS_YES_NO,
true /* modal, though it hardly matters since it is the only window */
- );
+ );
msg.set_default_response (Gtk::RESPONSE_YES);
msg.show_all ();
@@ -222,8 +222,8 @@ ask_about_configuration_copy (string const & old_dir, string const & new_dir, in
static void
libxml_generic_error_func (void* /* parsing_context*/,
- const char* msg,
- ...)
+ const char* msg,
+ ...)
{
va_list ap;
char buf[2048];
@@ -463,7 +463,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
TimeAxisViewItem::set_constant_heights ();
- /* Set this up so that our window proxies can register actions */
+ /* Set this up so that our window proxies can register actions */
ActionManager::init ();
@@ -529,8 +529,8 @@ ARDOUR_UI::pre_release_dialog ()
ArdourDialog d (_("Pre-Release Warning"), true, false);
d.add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
- Label* label = manage (new Label);
- label->set_markup (string_compose (_("<b>Welcome to this pre-release build of %1 %2</b>\n\n\
+ Label* label = manage (new Label);
+ label->set_markup (string_compose (_("<b>Welcome to this pre-release build of %1 %2</b>\n\n\
There are still several issues and bugs to be worked on,\n\
as well as general workflow improvements, before this can be considered\n\
release software. So, a few guidelines:\n\
@@ -550,11 +550,11 @@ Full information on all the above can be found on the support page at\n\
http://ardour.org/support\n\
"), PROGRAM_NAME, VERSIONSTRING));
- d.get_vbox()->set_border_width (12);
- d.get_vbox()->pack_start (*label, false, false, 12);
- d.get_vbox()->show_all ();
+ d.get_vbox()->set_border_width (12);
+ d.get_vbox()->pack_start (*label, false, false, 12);
+ d.get_vbox()->show_all ();
- d.run ();
+ d.run ();
}
GlobalPortMatrixWindow*
@@ -1940,9 +1940,9 @@ ARDOUR_UI::check_audioengine (Gtk::Window& parent)
{
if (!AudioEngine::instance()->connected()) {
MessageDialog msg (parent, string_compose (
- _("%1 is not connected to any audio backend.\n"
- "You cannot open or close sessions in this condition"),
- PROGRAM_NAME));
+ _("%1 is not connected to any audio backend.\n"
+ "You cannot open or close sessions in this condition"),
+ PROGRAM_NAME));
pop_back_splash (msg);
msg.run ();
return false;
@@ -2906,7 +2906,7 @@ ARDOUR_UI::process_snapshot_session_prompter (ArdourPrompter& prompter, bool swi
char illegal = Session::session_name_is_legal(snapname);
if (illegal) {
MessageDialog msg (string_compose (_("To ensure compatibility with various systems\n"
- "snapshot names may not contain a '%1' character"), illegal));
+ "snapshot names may not contain a '%1' character"), illegal));
msg.run ();
return false;
}
@@ -3006,7 +3006,7 @@ ARDOUR_UI::rename_session ()
if (illegal) {
MessageDialog msg (string_compose (_("To ensure compatibility with various systems\n"
- "session names may not contain a '%1' character"), illegal));
+ "session names may not contain a '%1' character"), illegal));
msg.run ();
goto again;
}
@@ -3449,7 +3449,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
session_path = session_dialog.session_folder ();
if (nsm) {
- likely_new = true;
+ likely_new = true;
}
if (!likely_new) {
@@ -3486,12 +3486,12 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
if (session_name[0] == G_DIR_SEPARATOR ||
#ifdef PLATFORM_WINDOWS
- (session_name.length() > 3 && session_name[1] == ':' && session_name[2] == G_DIR_SEPARATOR)
+ (session_name.length() > 3 && session_name[1] == ':' && session_name[2] == G_DIR_SEPARATOR)
#else
- (session_name.length() > 2 && session_name[0] == '.' && session_name[1] == G_DIR_SEPARATOR) ||
- (session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == G_DIR_SEPARATOR)
+ (session_name.length() > 2 && session_name[0] == '.' && session_name[1] == G_DIR_SEPARATOR) ||
+ (session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == G_DIR_SEPARATOR)
#endif
- )
+ )
{
/* absolute path or cwd-relative path specified for session name: infer session folder
@@ -3509,9 +3509,9 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
if (illegal) {
MessageDialog msg (session_dialog,
- string_compose (_("To ensure compatibility with various systems\n"
- "session names may not contain a '%1' character"),
- illegal));
+ string_compose (_("To ensure compatibility with various systems\n"
+ "session names may not contain a '%1' character"),
+ illegal));
msg.run ();
ARDOUR_COMMAND_LINE::session_name = ""; // cancel that
continue;
@@ -3548,7 +3548,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
if (illegal) {
pop_back_splash (session_dialog);
MessageDialog msg (session_dialog, string_compose(_("To ensure compatibility with various systems\n"
- "session names may not contain a '%1' character"), illegal));
+ "session names may not contain a '%1' character"), illegal));
msg.run ();
ARDOUR_COMMAND_LINE::session_name = ""; // cancel that
continue;
@@ -3701,8 +3701,8 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
catch (...) {
MessageDialog msg (string_compose(
- _("Session \"%1 (snapshot %2)\" did not load successfully"),
- path, snap_name),
+ _("Session \"%1 (snapshot %2)\" did not load successfully"),
+ path, snap_name),
true,
Gtk::MESSAGE_INFO,
BUTTONS_OK);
@@ -3968,8 +3968,8 @@ ARDOUR_UI::show_splash ()
void
ARDOUR_UI::hide_splash ()
{
- delete splash;
- splash = 0;
+ delete splash;
+ splash = 0;
}
void
@@ -3981,10 +3981,10 @@ ARDOUR_UI::display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* lis
if (removed == 0) {
MessageDialog msgd (_main_window,
- _("No files were ready for clean-up"),
- true,
- Gtk::MESSAGE_INFO,
- Gtk::BUTTONS_OK);
+ _("No files were ready for clean-up"),
+ true,
+ Gtk::MESSAGE_INFO,
+ Gtk::BUTTONS_OK);
msgd.set_title (_("Clean-up"));
msgd.set_secondary_text (_("If this seems suprising, \n\
check for any existing snapshots.\n\
@@ -3998,12 +3998,12 @@ require some unused files to continue to exist."));
ArdourDialog results (_("Clean-up"), true, false);
struct CleanupResultsModelColumns : public Gtk::TreeModel::ColumnRecord {
- CleanupResultsModelColumns() {
- add (visible_name);
- add (fullpath);
- }
- Gtk::TreeModelColumn<std::string> visible_name;
- Gtk::TreeModelColumn<std::string> fullpath;
+ CleanupResultsModelColumns() {
+ add (visible_name);
+ add (fullpath);
+ }
+ Gtk::TreeModelColumn<std::string> visible_name;
+ Gtk::TreeModelColumn<std::string> fullpath;
};
@@ -4847,8 +4847,8 @@ ARDOUR_UI::create_xrun_marker (framepos_t where)
void
ARDOUR_UI::halt_on_xrun_message ()
{
- cerr << "HALT on xrun\n";
- MessageDialog msg (_main_window, _("Recording was stopped because your system could not keep up."));
+ cerr << "HALT on xrun\n";
+ MessageDialog msg (_main_window, _("Recording was stopped because your system could not keep up."));
msg.run ();
}
@@ -5103,10 +5103,10 @@ audio may be played at the wrong sample rate.\n"), desired, PROGRAM_NAME, actual
case RESPONSE_ACCEPT:
return 0;
default:
- break;
+ break;
}
- return 1;
+ return 1;
}
void
@@ -5400,11 +5400,11 @@ ARDOUR_UI::session_format_mismatch (std::string xml_path, std::string backup_pat
const char* end_mono = "</tt>";
MessageDialog msg (string_compose (_("%4This is a session from an older version of %3%5\n\n"
- "%3 has copied the old session file\n\n%6%1%7\n\nto\n\n%6%2%7\n\n"
- "From now on, use the backup copy with older versions of %3"),
- xml_path, backup_path, PROGRAM_NAME,
- start_big, end_big,
- start_mono, end_mono), true);
+ "%3 has copied the old session file\n\n%6%1%7\n\nto\n\n%6%2%7\n\n"
+ "From now on, use the backup copy with older versions of %3"),
+ xml_path, backup_path, PROGRAM_NAME,
+ start_big, end_big,
+ start_mono, end_mono), true);
msg.run ();
}
@@ -5632,7 +5632,7 @@ ARDOUR_UI::audioengine_became_silent ()
void
ARDOUR_UI::hide_application ()
{
- Application::instance ()-> hide ();
+ Application::instance ()-> hide ();
}
void
@@ -5758,7 +5758,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
bool special_handling_of_unmodified_accelerators = false;
const guint mask = (Keyboard::RelevantModifierKeyMask & ~(Gdk::SHIFT_MASK|Gdk::LOCK_MASK));
- if (focus) {
+ if (focus) {
/* some widget has keyboard focus */
@@ -5781,13 +5781,13 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
}
}
- DEBUG_TRACE (DEBUG::Accelerators, string_compose ("Win = %1 [title = %9] focus = %7 (%8) Key event: code = %2 state = %3 special handling ? %4 magic widget focus ? %5 focus widget %6 named %7 mods ? %8\n",
- win,
- ev->keyval,
- Gtkmm2ext::show_gdk_event_state (ev->state),
+ DEBUG_TRACE (DEBUG::Accelerators, string_compose ("Win = %1 [title = %9] focus = %7 (%8) Key event: code = %2 state = %3 special handling ? %4 magic widget focus ? %5 focus widget %6 named %7 mods ? %8\n",
+ win,
+ ev->keyval,
+ Gtkmm2ext::show_gdk_event_state (ev->state),
special_handling_of_unmodified_accelerators,
Keyboard::some_magic_widget_has_focus(),
- focus,
+ focus,
(focus ? gtk_widget_get_name (focus) : "no focus widget"),
((ev->state & mask) ? "yes" : "no"),
window.get_title()));
@@ -5828,7 +5828,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
/* no special handling or there are modifiers in effect: accelerate first */
- DEBUG_TRACE (DEBUG::Accelerators, "\tactivate, then propagate\n");
+ DEBUG_TRACE (DEBUG::Accelerators, "\tactivate, then propagate\n");
DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tevent send-event:%1 time:%2 length:%3 name %7 string:%4 hardware_keycode:%5 group:%6\n",
ev->send_event, ev->time, ev->length, ev->string, ev->hardware_keycode, ev->group, gdk_keyval_name (ev->keyval)));
@@ -5863,12 +5863,12 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
return true;
}
- DEBUG_TRACE (DEBUG::Accelerators, "\tnot accelerated, now propagate\n");
+ DEBUG_TRACE (DEBUG::Accelerators, "\tnot accelerated, now propagate\n");
- if (gtk_window_propagate_key_event (win, ev)) {
- DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate handled\n");
- return true;
- }
+ if (gtk_window_propagate_key_event (win, ev)) {
+ DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate handled\n");
+ return true;
+ }
} else {
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 6fe52ead7b..be47e0941b 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -462,7 +462,7 @@ private:
void about_signal_response(int response);
- Gtk::VBox top_packer;
+ Gtk::VBox top_packer;
sigc::connection clock_signal_connection;
void update_clocks ();
@@ -485,22 +485,22 @@ private:
void update_clock_visibility ();
struct TransportControllable : public PBD::Controllable {
- enum ToggleType {
- Roll = 0,
- Stop,
- RecordEnable,
- GotoStart,
- GotoEnd,
- AutoLoop,
- PlaySelection,
- };
-
- TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
- void set_value (double, PBD::Controllable::GroupControlDisposition group_override);
- double get_value (void) const;
-
- ARDOUR_UI& ui;
- ToggleType type;
+ enum ToggleType {
+ Roll = 0,
+ Stop,
+ RecordEnable,
+ GotoStart,
+ GotoEnd,
+ AutoLoop,
+ PlaySelection,
+ };
+
+ TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
+ void set_value (double, PBD::Controllable::GroupControlDisposition group_override);
+ double get_value (void) const;
+
+ ARDOUR_UI& ui;
+ ToggleType type;
};
boost::shared_ptr<TransportControllable> roll_controllable;
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc
index a4603b4888..84f1145adb 100644
--- a/gtk2_ardour/ardour_ui_dependents.cc
+++ b/gtk2_ardour/ardour_ui_dependents.cc
@@ -219,10 +219,10 @@ ARDOUR_UI::main_window_delete_event (GdkEventAny* ev)
static GtkNotebook*
tab_window_root_drop (GtkNotebook* src,
- GtkWidget* w,
- gint x,
- gint y,
- gpointer user_data)
+ GtkWidget* w,
+ gint x,
+ gint y,
+ gpointer user_data)
{
return ARDOUR_UI::instance()->tab_window_root_drop (src, w, x, y, user_data);
}
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 1e3b306076..b0e0bc1006 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -187,10 +187,10 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
act = global_actions.register_action (main_actions, X_("OpenVideo"), _("Open Video..."),
- sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
+ sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
ActionManager::session_sensitive_actions.push_back (act);
act = global_actions.register_action (main_actions, X_("CloseVideo"), _("Remove Video"),
- sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
+ sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
act->set_sensitive (false);
act = global_actions.register_action (main_actions, X_("ExportVideo"), _("Export to Video File..."),
hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::export_video), false)));
@@ -730,8 +730,8 @@ ARDOUR_UI::use_menubar_as_top_menubar ()
Gtk::Widget* widget;
Application* app = Application::instance ();
- /* the addresses ("/ui/Main...") used below are based on the menu definitions in the menus file
- */
+ /* the addresses ("/ui/Main...") used below are based on the menu definitions in the menus file
+ */
/* Quit will be taken care of separately */
@@ -747,11 +747,11 @@ ARDOUR_UI::use_menubar_as_top_menubar ()
if ((widget = ActionManager::get_widget ("/ui/Main/Session/toggle-about"))) {
app->add_app_menu_item (group, dynamic_cast<MenuItem*>(widget));
- }
+ }
if ((widget = ActionManager::get_widget ("/ui/Main/Edit/menu-show-preferences"))) {
app->add_app_menu_item (group, dynamic_cast<MenuItem*>(widget));
- }
+ }
app->set_menu_bar (*menu_bar);
}
diff --git a/gtk2_ardour/ardour_window.cc b/gtk2_ardour/ardour_window.cc
index 628999124f..ea89944d11 100644
--- a/gtk2_ardour/ardour_window.cc
+++ b/gtk2_ardour/ardour_window.cc
@@ -106,26 +106,26 @@ ArdourWindow::init ()
set_border_width (10);
add_events (Gdk::FOCUS_CHANGE_MASK);
- /* ArdourWindows are not dialogs (they have no "OK" or "Close" button) but
- they should be considered part of the same "window level" as a dialog. This
- works on X11 in that:
+ /* ArdourWindows are not dialogs (they have no "OK" or "Close" button) but
+ they should be considered part of the same "window level" as a dialog. This
+ works on X11 in that:
- (a) there are no window "levels"
- (b) they will float above normal windows without any particular effort
+ (a) there are no window "levels"
+ (b) they will float above normal windows without any particular effort
(c) present()-ing them will make a utility float over a dialog or
- vice versa.
+ vice versa.
- Some X11 Window managers (e.g. KDE) get this wrong, and so we allow the user
- to select what type of window hint is used.
+ Some X11 Window managers (e.g. KDE) get this wrong, and so we allow the user
+ to select what type of window hint is used.
- GTK+ on OS X uses different levels for DIALOG and UTILITY, and Cocoa has a bug/design
- issue that it will not transfer keyboard focus across levels when hiding a window.
- So on OS X, we use DIALOG for all ArdourWindows to ensure that keyboard focus
- will return to the main window(s) when this window is hidden.
- */
+ GTK+ on OS X uses different levels for DIALOG and UTILITY, and Cocoa has a bug/design
+ issue that it will not transfer keyboard focus across levels when hiding a window.
+ So on OS X, we use DIALOG for all ArdourWindows to ensure that keyboard focus
+ will return to the main window(s) when this window is hidden.
+ */
#ifdef __APPLE__
- set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
+ set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
#else
if (UIConfiguration::instance().get_all_floating_windows_are_dialogs()) {
set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
diff --git a/gtk2_ardour/au_pluginui.h b/gtk2_ardour/au_pluginui.h
index 5e43bcbdce..a8582cd955 100644
--- a/gtk2_ardour/au_pluginui.h
+++ b/gtk2_ardour/au_pluginui.h
@@ -62,7 +62,7 @@ class AUPluginUI;
@interface NotificationObject : NSObject {
@private
AUPluginUI* plugin_ui;
- NSWindow* cocoa_parent;
+ NSWindow* cocoa_parent;
NSWindow* top_level_parent;
}
@end
@@ -87,7 +87,7 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
void activate ();
void deactivate ();
- bool non_gtk_gui() const { return true; }
+ bool non_gtk_gui() const { return true; }
void lower_box_realized ();
bool lower_box_visibility_notify (GdkEventVisibility*);
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 532e4f8867..809a6637fe 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -327,10 +327,10 @@ AudioClock::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t*
cairo_set_source_rgba (cr, cursor_r, cursor_g, cursor_b, cursor_a);
cairo_rectangle (cr,
- min (get_width() - 2.0,
- (double) xcenter + cursor.get_x()/PANGO_SCALE + em_width),
- (get_height() - layout_height)/2.0,
- 2.0, cursor.get_height()/PANGO_SCALE);
+ min (get_width() - 2.0,
+ (double) xcenter + cursor.get_x()/PANGO_SCALE + em_width),
+ (get_height() - layout_height)/2.0,
+ 2.0, cursor.get_height()/PANGO_SCALE);
cairo_fill (cr);
} else {
/* we've entered all possible digits, no cursor */
@@ -1722,8 +1722,7 @@ AudioClock::on_motion_notify_event (GdkEventMotion *ev)
if (Keyboard::modifier_state_contains (ev->state,
- Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) {
-
+ Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) {
pixel_frame_scale_factor = 0.025f;
}
@@ -1881,7 +1880,7 @@ AudioClock::timecode_validate_edit (const string&)
char ignored[2];
if (sscanf (_layout->get_text().c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32,
- ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) {
+ ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) {
return false;
}
@@ -1996,10 +1995,10 @@ AudioClock::frames_from_bbt_string (framepos_t pos, const string& str) const
if (is_duration) {
any.bbt.bars++;
any.bbt.beats++;
- return _session->any_duration_to_frames (pos, any);
+ return _session->any_duration_to_frames (pos, any);
} else {
- return _session->convert_to_frames (any);
- }
+ return _session->convert_to_frames (any);
+ }
}
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 8799913c70..0ad6ed778f 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -888,7 +888,7 @@ AudioRegionView::redraw_end_xfade ()
void
AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecnt_t width, Points& points, double effective_height,
- double rect_edge, double rect_width)
+ double rect_edge, double rect_width)
{
if (points.size() < 2) {
return;
@@ -1578,7 +1578,7 @@ AudioRegionView::set_some_waveform_colors (vector<ArdourCanvas::WaveView*>& wave
}
}
- for (vector<ArdourCanvas::WaveView*>::iterator w = waves_to_color.begin(); w != waves_to_color.end(); ++w) {
+ for (vector<ArdourCanvas::WaveView*>::iterator w = waves_to_color.begin(); w != waves_to_color.end(); ++w) {
(*w)->set_fill_color (fill);
(*w)->set_outline_color (outline);
(*w)->set_clip_color (clip);
@@ -1720,11 +1720,11 @@ AudioRegionView::update_transient(float /*old_pos*/, float new_pos)
float* pos = (float*) (*l).second->get_data ("position");
if (rint(new_pos) == rint(*pos)) {
- framepos_t position = _region->position();
- framepos_t old_frame = (*l).first;
- framepos_t new_frame = trackview.editor().pixel_to_sample (new_pos) + position;
- _region->update_transient (old_frame, new_frame);
- break;
+ framepos_t position = _region->position();
+ framepos_t old_frame = (*l).first;
+ framepos_t new_frame = trackview.editor().pixel_to_sample (new_pos) + position;
+ _region->update_transient (old_frame, new_frame);
+ break;
}
}
}
@@ -1742,8 +1742,8 @@ AudioRegionView::remove_transient (float pos)
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
float *line_pos = (float*) (*l).second->get_data ("position");
if (rint(pos) == rint(*line_pos)) {
- _region->remove_transient ((*l).first);
- break;
+ _region->remove_transient ((*l).first);
+ break;
}
}
}
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index 646d044c07..ed160301ac 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -86,7 +86,7 @@ class AudioRegionView : public RegionView
void update_envelope_visibility ();
- void add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event, bool with_guard_points);
+ void add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event, bool with_guard_points);
void remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event);
boost::shared_ptr<AudioRegionGainLine> get_gain_line() const { return gain_line; }
@@ -118,8 +118,8 @@ class AudioRegionView : public RegionView
void drag_start ();
void drag_end ();
- void redraw_start_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double);
- void redraw_end_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double, double);
+ void redraw_start_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double);
+ void redraw_end_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double, double);
void redraw_start_xfade ();
void redraw_end_xfade ();
@@ -194,7 +194,7 @@ class AudioRegionView : public RegionView
void peaks_ready_handler (uint32_t);
void set_colors ();
- void set_waveform_colors ();
+ void set_waveform_colors ();
void reset_width_dependent_items (double pixel_width);
void set_frame_color ();
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 8a37a66cac..95f2c6888b 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -111,7 +111,7 @@ AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_
break;
case Destructive:
region_view = new TapeAudioRegionView (_canvas_group, _trackview, region,
- _samples_per_pixel, region_color);
+ _samples_per_pixel, region_color);
break;
default:
fatal << string_compose (_("programming error: %1"), "illegal track mode in ::create_region_view()") << endmsg;
@@ -240,8 +240,8 @@ AudioStreamView::setup_rec_box ()
create_rec_box(frame_pos, width);
} else if (rec_active &&
- (_trackview.session()->record_status() != Session::Recording ||
- !_trackview.track()->rec_enable_control()->get_value())) {
+ (_trackview.session()->record_status() != Session::Recording ||
+ !_trackview.track()->rec_enable_control()->get_value())) {
screen_update_connection.disconnect();
rec_active = false;
rec_updating = false;
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index 4459afa799..d06a4c53e3 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -116,7 +116,7 @@ AudioTimeAxisView::set_route (boost::shared_ptr<Route> rt)
if (_route->panner_shell()) {
_route->panner_shell()->Changed.connect (*this, invalidator (*this),
- boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context());
+ boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context());
}
/* map current state of the route */
@@ -207,8 +207,8 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
create_trim_automation_child (param, show);
} else if (param.type() == PanWidthAutomation ||
- param.type() == PanElevationAutomation ||
- param.type() == PanAzimuthAutomation) {
+ param.type() == PanElevationAutomation ||
+ param.type() == PanAzimuthAutomation) {
ensure_pan_views (show);
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index 07b8df5148..315f7daf12 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -165,8 +165,8 @@ public:
protected:
std::string _name;
- guint32 _height;
- uint32_t _line_color;
+ guint32 _height;
+ uint32_t _line_color;
boost::shared_ptr<ARDOUR::AutomationList> alist;
Evoral::TimeConverter<double, ARDOUR::framepos_t>* _time_converter;
@@ -183,8 +183,8 @@ protected:
/** true if we did a push at any point during the current drag */
bool did_push;
- ArdourCanvas::Item& _parent_group;
- ArdourCanvas::Container* group;
+ ArdourCanvas::Item& _parent_group;
+ ArdourCanvas::Container* group;
ArdourCanvas::PolyLine* line; /* line */
ArdourCanvas::Points line_points; /* coordinates for canvas line */
std::vector<ControlPoint*> control_points; /* visible control points */
diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc
index 8cb19c2e39..933a4bf55d 100644
--- a/gtk2_ardour/automation_streamview.cc
+++ b/gtk2_ardour/automation_streamview.cc
@@ -51,7 +51,7 @@ using namespace Editing;
AutomationStreamView::AutomationStreamView (AutomationTimeAxisView& tv)
: StreamView (*dynamic_cast<RouteTimeAxisView*>(tv.get_parent()),
- tv.canvas_display())
+ tv.canvas_display())
, _automation_view(tv)
, _pending_automation_state (Off)
{
diff --git a/gtk2_ardour/bundle_env_cocoa.cc b/gtk2_ardour/bundle_env_cocoa.cc
index 12d7aae2d6..a1bf3a311a 100644
--- a/gtk2_ardour/bundle_env_cocoa.cc
+++ b/gtk2_ardour/bundle_env_cocoa.cc
@@ -55,25 +55,25 @@ extern void no_app_nap (); // cocoacarbon.mm
static void
setup_logging(void)
{
- /* The ASL API has evolved since it was introduced in 10.4. If ASL_LOG_DESCRIPTOR_WRITE is not available,
- then we're not interested in doing any of this, since its only purpose is to get stderr/stdout to
- appear in the Console.
- */
+ /* The ASL API has evolved since it was introduced in 10.4. If ASL_LOG_DESCRIPTOR_WRITE is not available,
+ then we're not interested in doing any of this, since its only purpose is to get stderr/stdout to
+ appear in the Console.
+ */
#ifdef ASL_LOG_DESCRIPTOR_WRITE
- aslmsg msg;
- aslclient c = asl_open (PROGRAM_NAME, "com.apple.console", 0);
-
- msg = asl_new(ASL_TYPE_MSG);
- asl_set(msg, ASL_KEY_FACILITY, "com.apple.console");
- asl_set(msg, ASL_KEY_LEVEL, ASL_STRING_NOTICE);
- asl_set(msg, ASL_KEY_READ_UID, "-1");
-
- int fd = dup(2);
- //asl_set_filter(c, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG));
- asl_add_log_file(c, fd);
- asl_log(c, NULL, ASL_LEVEL_INFO, string_compose ("Hello world from %1", PROGRAM_NAME).c_str());
- asl_log_descriptor(c, msg, ASL_LEVEL_INFO, 1, ASL_LOG_DESCRIPTOR_WRITE);
- asl_log_descriptor(c, msg, ASL_LEVEL_INFO, 2, ASL_LOG_DESCRIPTOR_WRITE);
+ aslmsg msg;
+ aslclient c = asl_open (PROGRAM_NAME, "com.apple.console", 0);
+
+ msg = asl_new(ASL_TYPE_MSG);
+ asl_set(msg, ASL_KEY_FACILITY, "com.apple.console");
+ asl_set(msg, ASL_KEY_LEVEL, ASL_STRING_NOTICE);
+ asl_set(msg, ASL_KEY_READ_UID, "-1");
+
+ int fd = dup(2);
+ //asl_set_filter(c, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG));
+ asl_add_log_file(c, fd);
+ asl_log(c, NULL, ASL_LEVEL_INFO, string_compose ("Hello world from %1", PROGRAM_NAME).c_str());
+ asl_log_descriptor(c, msg, ASL_LEVEL_INFO, 1, ASL_LOG_DESCRIPTOR_WRITE);
+ asl_log_descriptor(c, msg, ASL_LEVEL_INFO, 2, ASL_LOG_DESCRIPTOR_WRITE);
#else
#warning This build host has an older ASL API, so no console logging in this build.
#endif
@@ -94,7 +94,7 @@ fixup_bundle_environment (int argc, char* argv[], string & localedir)
set_language_preference ();
- setup_logging ();
+ setup_logging ();
char execpath[MAXPATHLEN+1];
uint32_t pathsz = sizeof (execpath);
diff --git a/gtk2_ardour/canvas-simpleline.c b/gtk2_ardour/canvas-simpleline.c
index efff5034f9..aa6cf715ad 100644
--- a/gtk2_ardour/canvas-simpleline.c
+++ b/gtk2_ardour/canvas-simpleline.c
@@ -92,7 +92,7 @@ gnome_canvas_simpleline_get_type (void)
static void
gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
{
- GObjectClass *gobject_class;
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
@@ -200,7 +200,7 @@ gnome_canvas_simpleline_set_property (GObject *object,
GnomeCanvasSimpleLine *simpleline;
int update = FALSE;
int bounds_changed = FALSE;
- double d;
+ double d;
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_SIMPLELINE (object));
@@ -209,42 +209,42 @@ gnome_canvas_simpleline_set_property (GObject *object,
switch (prop_id) {
case PROP_X1:
- d = g_value_get_double (value);
- if (simpleline->x1 != d) {
- simpleline->x1 = d;
+ d = g_value_get_double (value);
+ if (simpleline->x1 != d) {
+ simpleline->x1 = d;
bounds_changed = TRUE;
}
break;
case PROP_Y1:
- d = g_value_get_double (value);
- if (simpleline->y1 != d) {
- simpleline->y1 = d;
+ d = g_value_get_double (value);
+ if (simpleline->y1 != d) {
+ simpleline->y1 = d;
bounds_changed = TRUE;
}
break;
case PROP_X2:
- d = g_value_get_double (value);
- if (simpleline->x2 != d) {
- simpleline->x2 = d;
+ d = g_value_get_double (value);
+ if (simpleline->x2 != d) {
+ simpleline->x2 = d;
bounds_changed = TRUE;
}
break;
case PROP_Y2:
- d = g_value_get_double (value);
- if (simpleline->y2 != d) {
- simpleline->y2 = d;
+ d = g_value_get_double (value);
+ if (simpleline->y2 != d) {
+ simpleline->y2 = d;
bounds_changed = TRUE;
}
break;
case PROP_COLOR_RGBA:
if (simpleline->color != g_value_get_uint(value)) {
- simpleline->color = g_value_get_uint(value);
+ simpleline->color = g_value_get_uint(value);
UINT_TO_RGBA (simpleline->color, &simpleline->r, &simpleline->g, &simpleline->b, &simpleline->a);
- update = TRUE;
+ update = TRUE;
}
break;
default:
@@ -262,8 +262,8 @@ gnome_canvas_simpleline_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- g_return_if_fail (object != NULL);
- g_return_if_fail (GNOME_IS_CANVAS_SIMPLELINE (object));
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GNOME_IS_CANVAS_SIMPLELINE (object));
GnomeCanvasSimpleLine *line = GNOME_CANVAS_SIMPLELINE (object);
@@ -293,69 +293,69 @@ static void
gnome_canvas_simpleline_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
{
GnomeCanvasSimpleLine *simpleline;
- double x1, x2, y1, y2;
+ double x1, x2, y1, y2;
simpleline = GNOME_CANVAS_SIMPLELINE (item);
if (parent_class->update)
(* parent_class->update) (item, affine, clip_path, flags);
- /* redraw old location */
+ /* redraw old location */
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+ gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
- /* get current bounding box in parent-relative world coordinates */
+ /* 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 */
+ /* convert parent-relative item coordinates to world coordinates */
- gnome_canvas_item_i2w (item, &x1, &y1);
- gnome_canvas_item_i2w (item, &x2, &y2);
+ gnome_canvas_item_i2w (item, &x1, &y1);
+ gnome_canvas_item_i2w (item, &x2, &y2);
- /* don't suffer from rounding errors */
+ /* don't suffer from rounding errors */
- x1 = floor (x1);
- y1 = floor (y1);
- x2 = ceil (x2);
- y2 = ceil (y2);
+ x1 = floor (x1);
+ y1 = floor (y1);
+ x2 = ceil (x2);
+ y2 = ceil (y2);
- /* force non-zero dimensionality for both axes */
+ /* force non-zero dimensionality for both axes */
- if (x1 == x2) {
- x2 += 1.0;
- }
+ if (x1 == x2) {
+ x2 += 1.0;
+ }
- if (y1 == y2) {
- y2 += 1.0;
- }
+ if (y1 == y2) {
+ y2 += 1.0;
+ }
- /* reset item bounding box (canvas coordinates, so integral. but stored in doubles) */
+ /* reset item bounding box (canvas coordinates, so integral. but stored in doubles) */
- gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x1, y1, &item->x1, &item->y1);
- gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x2, y2, &item->x2, &item->y2);
+ gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x1, y1, &item->x1, &item->y1);
+ gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x2, y2, &item->x2, &item->y2);
- /* redraw new location */
+ /* redraw new location */
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+ gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
- /* store actual line coords as canvas coordinates for use in render() */
+ /* store actual line coords as canvas coordinates for use in render() */
- x1 = simpleline->x1;
- y1 = simpleline->y1;
- x2 = simpleline->x2;
- y2 = simpleline->y2;
- /* convert to world */
- gnome_canvas_item_i2w (item, &x1, &y1);
- gnome_canvas_item_i2w (item, &x2, &y2);
- /* avoid rounding errors */
- x1 = (int) floor (item->x1);
- y1 = (int) floor (item->y1);
- x2 = (int) ceil (item->x2);
- y2 = (int) ceil (item->y2);
- /* convert to canvas coordinates, integral, stored in integers */
- gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x1, y1, &simpleline->cx1, &simpleline->cy1);
- gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x2, y2, &simpleline->cx2, &simpleline->cy2);
+ x1 = simpleline->x1;
+ y1 = simpleline->y1;
+ x2 = simpleline->x2;
+ y2 = simpleline->y2;
+ /* convert to world */
+ gnome_canvas_item_i2w (item, &x1, &y1);
+ gnome_canvas_item_i2w (item, &x2, &y2);
+ /* avoid rounding errors */
+ x1 = (int) floor (item->x1);
+ y1 = (int) floor (item->y1);
+ x2 = (int) ceil (item->x2);
+ y2 = (int) ceil (item->y2);
+ /* convert to canvas coordinates, integral, stored in integers */
+ gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x1, y1, &simpleline->cx1, &simpleline->cy1);
+ gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x2, y2, &simpleline->cx2, &simpleline->cy2);
}
static void
@@ -364,28 +364,28 @@ gnome_canvas_simpleline_render (GnomeCanvasItem *item,
{
GnomeCanvasSimpleLine *simpleline;
int x1, x2;
- int y1, y2;
+ int y1, y2;
simpleline = GNOME_CANVAS_SIMPLELINE (item);
x1 = simpleline->cx1;
x2 = simpleline->cx2;
- y1 = simpleline->cy1;
+ 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);
- } else {
- y2 = simpleline->cy2;
- PAINT_VERTA (buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
- x1, y1, y2);
+ if (simpleline->x1 != simpleline->x2) {
+ PAINT_HORIZA(buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
+ x1, x2, y1);
+ } else {
+ y2 = simpleline->cy2;
+ PAINT_VERTA (buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
+ x1, y1, y2);
- }
+ }
}
static void
@@ -402,10 +402,10 @@ gnome_canvas_simpleline_bounds (GnomeCanvasItem *item, double *x1, double *y1, d
{
GnomeCanvasSimpleLine *simpleline = GNOME_CANVAS_SIMPLELINE (item);
- *x1 = simpleline->x1;
- *y1 = simpleline->y1;
- *x2 = simpleline->x1;
- *y2 = simpleline->y2;
+ *x1 = simpleline->x1;
+ *y1 = simpleline->y1;
+ *x2 = simpleline->x1;
+ *y2 = simpleline->y2;
}
static double
diff --git a/gtk2_ardour/canvas-simplerect.c b/gtk2_ardour/canvas-simplerect.c
index fe6e1855be..0d26a42a5e 100644
--- a/gtk2_ardour/canvas-simplerect.c
+++ b/gtk2_ardour/canvas-simplerect.c
@@ -87,7 +87,7 @@ gnome_canvas_simplerect_get_type (void)
static void
gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
{
- GObjectClass *gobject_class;
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
@@ -282,7 +282,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x1, y1, &simplerect->bbox_ulx, &simplerect->bbox_uly);
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x2, y2, &simplerect->bbox_lrx, &simplerect->bbox_lry);
- /* now queue redraws for changed areas */
+ /* now queue redraws for changed areas */
if (item->x1 == old_x1 && item->x2 == old_x2) {
@@ -376,44 +376,44 @@ gnome_canvas_simplerect_set_property (GObject *object,
switch (prop_id) {
case PROP_X1:
- if (simplerect->x1 != g_value_get_double (value)) {
- simplerect->x1 = g_value_get_double (value);
+ if (simplerect->x1 != g_value_get_double (value)) {
+ simplerect->x1 = g_value_get_double (value);
bounds_changed = TRUE;
}
break;
case PROP_Y1:
- if (simplerect->y1 != g_value_get_double (value)) {
- simplerect->y1 = g_value_get_double (value);
+ if (simplerect->y1 != g_value_get_double (value)) {
+ simplerect->y1 = g_value_get_double (value);
bounds_changed = TRUE;
}
break;
case PROP_X2:
- if (simplerect->x2 != g_value_get_double (value)) {
- simplerect->x2 = g_value_get_double (value);
+ if (simplerect->x2 != g_value_get_double (value)) {
+ simplerect->x2 = g_value_get_double (value);
bounds_changed = TRUE;
}
break;
case PROP_Y2:
- if (simplerect->y2 != g_value_get_double (value)) {
- simplerect->y2 = g_value_get_double (value);
+ if (simplerect->y2 != g_value_get_double (value)) {
+ simplerect->y2 = g_value_get_double (value);
bounds_changed = TRUE;
}
break;
case PROP_DRAW:
- if (simplerect->draw != g_value_get_boolean (value)) {
- simplerect->draw = g_value_get_boolean (value);
+ if (simplerect->draw != g_value_get_boolean (value)) {
+ simplerect->draw = g_value_get_boolean (value);
update = TRUE;
}
break;
case PROP_FILL:
- if (simplerect->fill != g_value_get_boolean (value)) {
- simplerect->fill = g_value_get_boolean (value);
+ if (simplerect->fill != g_value_get_boolean (value)) {
+ simplerect->fill = g_value_get_boolean (value);
update = TRUE;
}
break;
@@ -537,10 +537,10 @@ gnome_canvas_simplerect_update (GnomeCanvasItem *item, double *affine, ArtSVP *c
if (simplerect->full_draw_on_update) {
gnome_canvas_request_redraw (item->canvas,
- simplerect->bbox_ulx,
- simplerect->bbox_uly,
- simplerect->bbox_lrx+0.5,
- simplerect->bbox_lry+0.5);
+ simplerect->bbox_ulx,
+ simplerect->bbox_uly,
+ simplerect->bbox_lrx+0.5,
+ simplerect->bbox_lry+0.5);
simplerect->full_draw_on_update = FALSE;
}
@@ -622,30 +622,30 @@ 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);
- }
- }
- }
+ 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);
+ }
+ }
+ }
}
#else /* SIMPLERECT_FAST_RENDERER */
@@ -701,30 +701,30 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
#endif
}
- 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);
- }
- }
- }
+ 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);
+ }
+ }
+ }
}
#endif /* SIMPLERECT_FAST_RENDERER */
diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c
index bf7dad0429..f5fc9e827f 100644
--- a/gtk2_ardour/canvas-waveview.c
+++ b/gtk2_ardour/canvas-waveview.c
@@ -129,206 +129,206 @@ static GnomeCanvasItemClass *parent_class;
GType
gnome_canvas_waveview_get_type (void)
{
- static GType waveview_type;
-
- if (!waveview_type) {
- static const GTypeInfo object_info = {
- sizeof (GnomeCanvasWaveViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gnome_canvas_waveview_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GnomeCanvasWaveView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gnome_canvas_waveview_init,
- NULL /* value_table */
- };
-
- waveview_type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, "GnomeCanvasWaveView",
- &object_info, 0);
- }
-
- return waveview_type;
+ static GType waveview_type;
+
+ if (!waveview_type) {
+ static const GTypeInfo object_info = {
+ sizeof (GnomeCanvasWaveViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) gnome_canvas_waveview_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (GnomeCanvasWaveView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gnome_canvas_waveview_init,
+ NULL /* value_table */
+ };
+
+ waveview_type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, "GnomeCanvasWaveView",
+ &object_info, 0);
+ }
+
+ return waveview_type;
}
static void
gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
+ GObjectClass *gobject_class;
+ GtkObjectClass *object_class;
+ GnomeCanvasItemClass *item_class;
- gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
- item_class = (GnomeCanvasItemClass *) class;
+ gobject_class = (GObjectClass *) class;
+ object_class = (GtkObjectClass *) class;
+ item_class = (GnomeCanvasItemClass *) class;
- parent_class = g_type_class_peek_parent (class);
+ parent_class = g_type_class_peek_parent (class);
- gobject_class->set_property = gnome_canvas_waveview_set_property;
- gobject_class->get_property = gnome_canvas_waveview_get_property;
+ gobject_class->set_property = gnome_canvas_waveview_set_property;
+ gobject_class->get_property = gnome_canvas_waveview_get_property;
- g_object_class_install_property
- (gobject_class,
- PROP_DATA_SRC,
- g_param_spec_pointer ("data_src", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_DATA_SRC,
+ g_param_spec_pointer ("data_src", NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_CHANNEL,
- g_param_spec_uint ("channel", NULL, NULL,
- 0, G_MAXUINT, 0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_LENGTH_FUNCTION,
- g_param_spec_pointer ("length_function", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_CHANNEL,
+ g_param_spec_uint ("channel", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_LENGTH_FUNCTION,
+ g_param_spec_pointer ("length_function", NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
+ g_object_class_install_property
(gobject_class,
PROP_SOURCEFILE_LENGTH_FUNCTION,
g_param_spec_pointer ("sourcefile_length_function", NULL, NULL,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_PEAK_FUNCTION,
- g_param_spec_pointer ("peak_function", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_PEAK_FUNCTION,
+ g_param_spec_pointer ("peak_function", NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_GAIN_FUNCTION,
- g_param_spec_pointer ("gain_function", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_GAIN_FUNCTION,
+ g_param_spec_pointer ("gain_function", NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
+ g_object_class_install_property
+ (gobject_class,
PROP_GAIN_SRC,
g_param_spec_pointer ("gain_src", NULL, NULL,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_CACHE,
- g_param_spec_pointer ("cache", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_CACHE,
+ g_param_spec_pointer ("cache", NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_CACHE_UPDATER,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_CACHE_UPDATER,
g_param_spec_boolean ("cache_updater", NULL, NULL,
- FALSE,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_SAMPLES_PER_UNIT,
- g_param_spec_double ("samples_per_unit", NULL, NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_AMPLITUDE_ABOVE_AXIS,
- g_param_spec_double ("amplitude_above_axis", NULL, NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_X,
- g_param_spec_double ("x", NULL, NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_Y,
- g_param_spec_double ("y", NULL, NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_HEIGHT,
- g_param_spec_double ("height", NULL, NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_WAVE_COLOR,
- g_param_spec_uint ("wave_color", NULL, NULL,
- 0, G_MAXUINT, 0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_CLIP_COLOR,
- g_param_spec_uint ("clip_color", NULL, NULL,
- 0, G_MAXUINT, 0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_ZERO_COLOR,
- g_param_spec_uint ("zero_color", NULL, NULL,
- 0, G_MAXUINT, 0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_FILL_COLOR,
- g_param_spec_uint ("fill_color", NULL, NULL,
- 0, G_MAXUINT, 0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- g_object_class_install_property
- (gobject_class,
- PROP_FILLED,
- g_param_spec_boolean ("filled", NULL, NULL,
+ FALSE,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_SAMPLES_PER_UNIT,
+ g_param_spec_double ("samples_per_unit", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_AMPLITUDE_ABOVE_AXIS,
+ g_param_spec_double ("amplitude_above_axis", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_X,
+ g_param_spec_double ("x", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_Y,
+ g_param_spec_double ("y", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_HEIGHT,
+ g_param_spec_double ("height", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_WAVE_COLOR,
+ g_param_spec_uint ("wave_color", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_CLIP_COLOR,
+ g_param_spec_uint ("clip_color", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_ZERO_COLOR,
+ g_param_spec_uint ("zero_color", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_FILL_COLOR,
+ g_param_spec_uint ("fill_color", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+
+ g_object_class_install_property
+ (gobject_class,
+ PROP_FILLED,
+ g_param_spec_boolean ("filled", NULL, NULL,
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_RECTIFIED,
- g_param_spec_boolean ("rectified", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_RECTIFIED,
+ g_param_spec_boolean ("rectified", NULL, NULL,
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_ZERO_LINE,
- g_param_spec_boolean ("zero_line", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_ZERO_LINE,
+ g_param_spec_boolean ("zero_line", NULL, NULL,
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_LOGSCALED,
- g_param_spec_boolean ("logscaled", NULL, NULL,
+ g_object_class_install_property
+ (gobject_class,
+ PROP_LOGSCALED,
+ g_param_spec_boolean ("logscaled", NULL, NULL,
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- g_object_class_install_property
- (gobject_class,
- PROP_REGION_START,
- g_param_spec_uint ("region_start", NULL, NULL,
- 0, G_MAXUINT, 0,
- (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_REGION_START,
+ g_param_spec_uint ("region_start", NULL, NULL,
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_waveview_destroy;
+ object_class->destroy = gnome_canvas_waveview_destroy;
- item_class->update = gnome_canvas_waveview_update;
- item_class->bounds = gnome_canvas_waveview_bounds;
- item_class->point = gnome_canvas_waveview_point;
- item_class->render = gnome_canvas_waveview_render;
- item_class->draw = gnome_canvas_waveview_draw;
+ item_class->update = gnome_canvas_waveview_update;
+ item_class->bounds = gnome_canvas_waveview_bounds;
+ item_class->point = gnome_canvas_waveview_point;
+ item_class->render = gnome_canvas_waveview_render;
+ item_class->draw = gnome_canvas_waveview_draw;
}
void
@@ -838,50 +838,50 @@ gnome_canvas_waveview_set_property (GObject *object,
break;
case PROP_X:
- if (waveview->x != g_value_get_double (value)) {
- waveview->x = g_value_get_double (value);
+ if (waveview->x != g_value_get_double (value)) {
+ waveview->x = g_value_get_double (value);
calc_bounds = TRUE;
}
break;
case PROP_Y:
- if (waveview->y != g_value_get_double (value)) {
- waveview->y = g_value_get_double (value);
+ if (waveview->y != g_value_get_double (value)) {
+ waveview->y = g_value_get_double (value);
calc_bounds = TRUE;
}
break;
case PROP_HEIGHT:
- if (waveview->height != fabs (g_value_get_double (value))) {
- waveview->height = fabs (g_value_get_double (value));
+ if (waveview->height != fabs (g_value_get_double (value))) {
+ waveview->height = fabs (g_value_get_double (value));
redraw = TRUE;
}
break;
case PROP_WAVE_COLOR:
if (waveview->wave_color != g_value_get_uint(value)) {
- waveview->wave_color = g_value_get_uint(value);
+ waveview->wave_color = g_value_get_uint(value);
redraw = TRUE;
}
break;
case PROP_CLIP_COLOR:
if (waveview->clip_color != g_value_get_uint(value)) {
- waveview->clip_color = g_value_get_uint(value);
+ waveview->clip_color = g_value_get_uint(value);
redraw = TRUE;
}
break;
case PROP_ZERO_COLOR:
if (waveview->zero_color != g_value_get_uint(value)) {
- waveview->zero_color = g_value_get_uint(value);
+ waveview->zero_color = g_value_get_uint(value);
redraw = TRUE;
}
break;
case PROP_FILL_COLOR:
if (waveview->fill_color != g_value_get_uint(value)) {
- waveview->fill_color = g_value_get_uint(value);
+ waveview->fill_color = g_value_get_uint(value);
redraw = TRUE;
}
break;
@@ -1047,7 +1047,7 @@ gnome_canvas_waveview_get_property (
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
@@ -1133,7 +1133,7 @@ gnome_canvas_waveview_gradient_render (GnomeCanvasItem *item,
/* begin: render start x (units) */
int const begin = MAX (waveview->bbox_ulx, buf->rect.x0);
- /* zbegin: start x for zero line (units) */
+ /* zbegin: start x for zero line (units) */
int const zbegin = (begin == waveview->bbox_ulx) ? (begin + 1) : begin;
/* end: render end x (units) */
@@ -1681,7 +1681,7 @@ gnome_canvas_waveview_flat_render (GnomeCanvasItem *item,
/* begin: render start x (units) */
int const begin = MAX (waveview->bbox_ulx, buf->rect.x0);
- /* zbegin: start x for zero line (units) */
+ /* zbegin: start x for zero line (units) */
int const zbegin = (begin == waveview->bbox_ulx) ? (begin + 1) : begin;
/* end: render end x (units) */
diff --git a/gtk2_ardour/canvas-waveview.h b/gtk2_ardour/canvas-waveview.h
index daa907e110..cd640bcb9d 100644
--- a/gtk2_ardour/canvas-waveview.h
+++ b/gtk2_ardour/canvas-waveview.h
@@ -48,17 +48,17 @@ typedef struct _GnomeCanvasWaveViewCache GnomeCanvasWaveViewCache;
struct _GnomeCanvasWaveViewCacheEntry
{
- float min;
- float max;
+ float min;
+ float max;
};
struct _GnomeCanvasWaveViewCache
{
- GnomeCanvasWaveViewCacheEntry* data;
- guint32 allocated;
- guint64 data_size;
- gulong start;
- gulong end;
+ GnomeCanvasWaveViewCacheEntry* data;
+ guint32 allocated;
+ guint64 data_size;
+ gulong start;
+ gulong end;
};
GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new (void);
@@ -73,63 +73,63 @@ typedef void (*waveview_peak_function_t)(void*,gulong,gulong,gulong,gpointer,gu
struct _GnomeCanvasWaveView
{
- GnomeCanvasItem item;
-
- GnomeCanvasWaveViewCache *cache;
- gboolean cache_updater;
- gint screen_width;
-
- void *data_src;
- guint32 channel;
- waveview_peak_function_t peak_function;
- waveview_length_function_t length_function;
- waveview_sourcefile_length_function_t sourcefile_length_function;
- waveview_gain_curve_function_t gain_curve_function;
- void *gain_src;
-
- /** x-axis: samples per canvas unit. */
- double samples_per_unit;
-
- /** y-axis: amplitude_above_axis.
- *
- * the default is that an (scaled, normalized -1.0 ... +1.0) amplitude of 1.0
- * corresponds to the top of the area assigned to the waveview.
- *
- * larger values will expand the vertical scale, cutting off the peaks/troughs.
- * smaller values will decrease the vertical scale, moving peaks/troughs toward
- * the middle of the area assigned to the waveview.
- */
- double amplitude_above_axis;
-
- double x;
- double y;
- double height;
- double half_height;
- uint32_t wave_color;
- uint32_t clip_color;
- uint32_t zero_color;
- uint32_t fill_color;
-
- char filled;
- char rectified;
- char zero_line;
- char logscaled;
-
- /* These are updated by the update() routine
- to optimize the render() routine, which may
- be called several times after a single update().
- */
-
- int32_t bbox_ulx;
- int32_t bbox_uly;
- int32_t bbox_lrx;
- int32_t bbox_lry;
- unsigned char wave_r, wave_g, wave_b, wave_a;
- unsigned char clip_r, clip_g, clip_b, clip_a;
- unsigned char fill_r, fill_g, fill_b, fill_a;
- uint32_t samples;
- uint32_t region_start;
- int32_t reload_cache_in_render;
+ GnomeCanvasItem item;
+
+ GnomeCanvasWaveViewCache *cache;
+ gboolean cache_updater;
+ gint screen_width;
+
+ void *data_src;
+ guint32 channel;
+ waveview_peak_function_t peak_function;
+ waveview_length_function_t length_function;
+ waveview_sourcefile_length_function_t sourcefile_length_function;
+ waveview_gain_curve_function_t gain_curve_function;
+ void *gain_src;
+
+ /** x-axis: samples per canvas unit. */
+ double samples_per_unit;
+
+ /** y-axis: amplitude_above_axis.
+ *
+ * the default is that an (scaled, normalized -1.0 ... +1.0) amplitude of 1.0
+ * corresponds to the top of the area assigned to the waveview.
+ *
+ * larger values will expand the vertical scale, cutting off the peaks/troughs.
+ * smaller values will decrease the vertical scale, moving peaks/troughs toward
+ * the middle of the area assigned to the waveview.
+ */
+ double amplitude_above_axis;
+
+ double x;
+ double y;
+ double height;
+ double half_height;
+ uint32_t wave_color;
+ uint32_t clip_color;
+ uint32_t zero_color;
+ uint32_t fill_color;
+
+ char filled;
+ char rectified;
+ char zero_line;
+ char logscaled;
+
+ /* These are updated by the update() routine
+ to optimize the render() routine, which may
+ be called several times after a single update().
+ */
+
+ int32_t bbox_ulx;
+ int32_t bbox_uly;
+ int32_t bbox_lrx;
+ int32_t bbox_lry;
+ unsigned char wave_r, wave_g, wave_b, wave_a;
+ unsigned char clip_r, clip_g, clip_b, clip_a;
+ unsigned char fill_r, fill_g, fill_b, fill_a;
+ uint32_t samples;
+ uint32_t region_start;
+ int32_t reload_cache_in_render;
};
struct _GnomeCanvasWaveViewClass {
diff --git a/gtk2_ardour/clock_group.cc b/gtk2_ardour/clock_group.cc
index e304b4ce28..f439004aad 100644
--- a/gtk2_ardour/clock_group.cc
+++ b/gtk2_ardour/clock_group.cc
@@ -20,8 +20,8 @@
#include "clock_group.h"
ClockGroup::ClockGroup ()
- : ignore_changes (false)
- , _clock_mode (AudioClock::Frames)
+ : ignore_changes (false)
+ , _clock_mode (AudioClock::Frames)
{
}
@@ -32,35 +32,35 @@ ClockGroup::~ClockGroup()
void
ClockGroup::add (AudioClock& clock)
{
- if (clocks.insert (&clock).second) {
- clock.mode_changed.connect (sigc::bind (sigc::mem_fun (*this, &ClockGroup::one_clock_changed), &clock));
- clock.set_mode (_clock_mode);
- }
+ if (clocks.insert (&clock).second) {
+ clock.mode_changed.connect (sigc::bind (sigc::mem_fun (*this, &ClockGroup::one_clock_changed), &clock));
+ clock.set_mode (_clock_mode);
+ }
}
void
ClockGroup::remove (AudioClock& clock)
{
- clocks.erase (&clock);
+ clocks.erase (&clock);
}
void
ClockGroup::one_clock_changed (AudioClock* clock)
{
- if (!ignore_changes) {
- set_clock_mode (clock->mode());
- }
+ if (!ignore_changes) {
+ set_clock_mode (clock->mode());
+ }
}
void
ClockGroup::set_clock_mode (AudioClock::Mode mode)
{
- _clock_mode = mode;
+ _clock_mode = mode;
- ignore_changes = true;
- for (std::set<AudioClock*>::iterator c = clocks.begin(); c != clocks.end(); ++c) {
- (*c)->set_mode (mode);
- }
- ignore_changes = false;
+ ignore_changes = true;
+ for (std::set<AudioClock*>::iterator c = clocks.begin(); c != clocks.end(); ++c) {
+ (*c)->set_mode (mode);
+ }
+ ignore_changes = false;
}
diff --git a/gtk2_ardour/clock_group.h b/gtk2_ardour/clock_group.h
index db8b8f7196..2a32ef122d 100644
--- a/gtk2_ardour/clock_group.h
+++ b/gtk2_ardour/clock_group.h
@@ -27,21 +27,21 @@
class ClockGroup : public sigc::trackable {
public:
- ClockGroup ();
- ~ClockGroup ();
+ ClockGroup ();
+ ~ClockGroup ();
- void set_clock_mode (AudioClock::Mode);
- AudioClock::Mode clock_mode() const { return _clock_mode; }
+ void set_clock_mode (AudioClock::Mode);
+ AudioClock::Mode clock_mode() const { return _clock_mode; }
- void add (AudioClock&);
- void remove (AudioClock&);
+ void add (AudioClock&);
+ void remove (AudioClock&);
private:
- std::set<AudioClock*> clocks;
- bool ignore_changes;
- AudioClock::Mode _clock_mode;
+ std::set<AudioClock*> clocks;
+ bool ignore_changes;
+ AudioClock::Mode _clock_mode;
- void one_clock_changed (AudioClock*);
+ void one_clock_changed (AudioClock*);
};
#endif /* __gtk_ardour_clock_group_h__ */
diff --git a/gtk2_ardour/crossfade_edit.h b/gtk2_ardour/crossfade_edit.h
index 5d9e665ba0..8e582baa52 100644
--- a/gtk2_ardour/crossfade_edit.h
+++ b/gtk2_ardour/crossfade_edit.h
@@ -64,18 +64,18 @@ class CrossfadeEditor : public ArdourDialog
Gtk::Button* ok_button;
struct PresetPoint {
- double x;
- double y;
+ double x;
+ double y;
- PresetPoint (double a, double b)
- : x (a), y (b) {}
+ PresetPoint (double a, double b)
+ : x (a), y (b) {}
};
struct Preset : public std::list<PresetPoint> {
- const char* name;
- const char* image_name;
+ const char* name;
+ const char* image_name;
- Preset (const char* n, const char* x) : name (n), image_name (x) {}
+ Preset (const char* n, const char* x) : name (n), image_name (x) {}
};
typedef std::list<Preset*> Presets;
@@ -93,36 +93,36 @@ class CrossfadeEditor : public ArdourDialog
Gtk::VBox vpacker;
struct Point {
- ~Point();
+ ~Point();
- ArdourCanvas::Rectangle* box;
- ArdourCanvas::PolyLine* curve;
- double x;
- double y;
+ ArdourCanvas::Rectangle* box;
+ ArdourCanvas::PolyLine* curve;
+ double x;
+ double y;
- static const int32_t size;
+ static const int32_t size;
- void move_to (double x, double y, double xfract, double yfract);
+ void move_to (double x, double y, double xfract, double yfract);
};
struct PointSorter {
- bool operator() (const CrossfadeEditor::Point* a, const CrossfadeEditor::Point *b) {
- return a->x < b->x;
- }
+ bool operator() (const CrossfadeEditor::Point* a, const CrossfadeEditor::Point *b) {
+ return a->x < b->x;
+ }
};
ArdourCanvas::Rectangle* toplevel;
ArdourCanvas::GtkCanvas* canvas;
struct Half {
- ArdourCanvas::PolyLine* line;
- ArdourCanvas::Polygon* shading;
- std::list<Point*> points;
- ARDOUR::AutomationList normative_curve; /* 0 - 1.0, linear */
- ARDOUR::AutomationList gain_curve; /* 0 - 2.0, gain mapping */
- std::vector<ArdourCanvas::WaveView*> waves;
-
- Half();
+ ArdourCanvas::PolyLine* line;
+ ArdourCanvas::Polygon* shading;
+ std::list<Point*> points;
+ ARDOUR::AutomationList normative_curve; /* 0 - 1.0, linear */
+ ARDOUR::AutomationList gain_curve; /* 0 - 2.0, gain mapping */
+ std::vector<ArdourCanvas::WaveView*> waves;
+
+ Half();
};
enum WhichFade {
diff --git a/gtk2_ardour/crossfade_view.h b/gtk2_ardour/crossfade_view.h
index a042611cc9..f593560f29 100644
--- a/gtk2_ardour/crossfade_view.h
+++ b/gtk2_ardour/crossfade_view.h
@@ -37,12 +37,12 @@ class CrossfadeView : public TimeAxisViewItem
{
public:
CrossfadeView (ArdourCanvas::Container*,
- RouteTimeAxisView&,
- boost::shared_ptr<ARDOUR::Crossfade>,
- double initial_samples_per_pixel,
- Gdk::Color& basic_color,
- AudioRegionView& leftview,
- AudioRegionView& rightview);
+ RouteTimeAxisView&,
+ boost::shared_ptr<ARDOUR::Crossfade>,
+ double initial_samples_per_pixel,
+ Gdk::Color& basic_color,
+ AudioRegionView& leftview,
+ AudioRegionView& rightview);
~CrossfadeView ();
diff --git a/gtk2_ardour/edit_note_dialog.cc b/gtk2_ardour/edit_note_dialog.cc
index 924b75d3b1..08829d093e 100644
--- a/gtk2_ardour/edit_note_dialog.cc
+++ b/gtk2_ardour/edit_note_dialog.cc
@@ -153,7 +153,7 @@ void
EditNoteDialog::done (int r)
{
if (r != RESPONSE_ACCEPT) {
- return;
+ return;
}
/* These calls mean that if a value is entered using the keyboard
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 41cad5b64c..36b1d9e633 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -845,16 +845,16 @@ Editor::Editor ()
_show_marker_lines = false;
- /* Button bindings */
+ /* Button bindings */
button_bindings = new Bindings ("editor-mouse");
XMLNode* node = button_settings();
- if (node) {
- for (XMLNodeList::const_iterator i = node->children().begin(); i != node->children().end(); ++i) {
- button_bindings->load_operation (**i);
- }
- }
+ if (node) {
+ for (XMLNodeList::const_iterator i = node->children().begin(); i != node->children().end(); ++i) {
+ button_bindings->load_operation (**i);
+ }
+ }
constructed = true;
@@ -4716,7 +4716,7 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
}
if (entered_marker) {
- DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use entered marker @ %1\n", entered_marker->position()));
+ DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use entered marker @ %1\n", entered_marker->position()));
return entered_marker->position();
}
@@ -4737,7 +4737,7 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
} else {
where = _session->audible_frame();
}
- DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use playhead @ %1\n", where));
+ DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use playhead @ %1\n", where));
break;
case EditAtSelectedMarker:
@@ -4750,7 +4750,7 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
} else {
where = loc->end();
}
- DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use selected marker @ %1\n", where));
+ DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use selected marker @ %1\n", where));
break;
}
}
@@ -4765,7 +4765,7 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
snap_mf.frame = where;
snap_to (snap_mf);
where = snap_mf.frame;
- DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use mouse @ %1\n", where));
+ DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use mouse @ %1\n", where));
break;
}
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 6e1ae4528d..c78c85ffc6 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -583,13 +583,13 @@ private:
typedef std::pair<TimeAxisView*,XMLNode*> TAVState;
struct VisualState {
- VisualState (bool with_tracks);
- ~VisualState ();
- double y_position;
- framecnt_t samples_per_pixel;
- framepos_t leftmost_frame;
- Editing::ZoomFocus zoom_focus;
- GUIObjectState* gui_state;
+ VisualState (bool with_tracks);
+ ~VisualState ();
+ double y_position;
+ framecnt_t samples_per_pixel;
+ framepos_t leftmost_frame;
+ Editing::ZoomFocus zoom_focus;
+ GUIObjectState* gui_state;
};
std::list<VisualState*> undo_visual_stack;
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index b6bdd4a8b5..17ee8e17a1 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -732,7 +732,7 @@ Editor::register_actions ()
myactions.register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measure Lines"), sigc::mem_fun (*this, &Editor::toggle_measure_visibility));
myactions.register_action (editor_actions, X_("toggle-midi-input-active"), _("Toggle MIDI Input Active for Editor-Selected Tracks/Busses"),
- sigc::bind (sigc::mem_fun (*this, &Editor::toggle_midi_input_active), false));
+ sigc::bind (sigc::mem_fun (*this, &Editor::toggle_midi_input_active), false));
/* MIDI stuff */
@@ -1694,7 +1694,7 @@ Editor::parameter_changed (std::string p)
_group_tabs->hide ();
}
- reset_controls_layout_width ();
+ reset_controls_layout_width ();
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleGroupTabs"));
if (act) {
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index b7dabed698..1e8d157f14 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -629,7 +629,7 @@ Editor::embed_sndfiles (vector<string> paths,
SoundFileInfo finfo;
CursorContext::Handle cursor_ctx = CursorContext::create(*this, _cursors->wait);
- gdk_flush ();
+ gdk_flush ();
for (vector<string>::iterator p = paths.begin(); p != paths.end(); ++p) {
@@ -913,33 +913,33 @@ Editor::add_sources (vector<string> paths,
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) {
- /* hmm, no timestamp available, put it after the previous region
- */
- if (n == 0) {
- pos = get_preferred_edit_position ();
- } else {
- pos += rlen;
- }
- } else {
- pos = get_preferred_edit_position ();
- }
- } else {
- /* should really get first position in MIDI file, but for now, use edit position*/
- pos = get_preferred_edit_position ();
- }
- }
+ 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) {
+ /* hmm, no timestamp available, put it after the previous region
+ */
+ if (n == 0) {
+ pos = get_preferred_edit_position ();
+ } else {
+ pos += rlen;
+ }
+ } else {
+ pos = get_preferred_edit_position ();
+ }
+ } else {
+ /* should really get first position in MIDI file, but for now, use edit position*/
+ pos = get_preferred_edit_position ();
+ }
+ }
finish_bringing_in_material (*r, input_chan, output_chan, pos, mode, track, track_names[n], instrument);
@@ -1029,7 +1029,7 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region,
} else if (mr) {
list<boost::shared_ptr<MidiTrack> > mt (
_session->new_midi_track (ChanCount (DataType::MIDI, 1),
- ChanCount (DataType::MIDI, 1),
+ ChanCount (DataType::MIDI, 1),
Config->get_strict_io () || Profile->get_mixbus (),
instrument, (Plugin::PresetRecord*) 0,
(RouteGroup*) 0,
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index abba58ee8a..fdcbb47fbb 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -127,7 +127,7 @@ Editor::initialize_canvas ()
* uppermost (last) group with hv_scroll_group as a parent
*/
_drag_motion_group = new ArdourCanvas::Container (hv_scroll_group);
- CANVAS_DEBUG_NAME (_drag_motion_group, "Canvas Drag Motion");
+ CANVAS_DEBUG_NAME (_drag_motion_group, "Canvas Drag Motion");
/* TIME BAR CANVAS */
@@ -317,17 +317,17 @@ Editor::reset_controls_layout_width ()
edit_controls_vbox.size_request (req);
w = req.width;
- if (_group_tabs->is_visible()) {
+ if (_group_tabs->is_visible()) {
_group_tabs->size_request (req);
- w += req.width;
- }
+ w += req.width;
+ }
- /* the controls layout has no horizontal scrolling, its visible
- width is always equal to the total width of its contents.
- */
+ /* the controls layout has no horizontal scrolling, its visible
+ width is always equal to the total width of its contents.
+ */
- controls_layout.property_width() = w;
- controls_layout.property_width_request() = w;
+ controls_layout.property_width() = w;
+ controls_layout.property_width_request() = w;
}
void
@@ -345,11 +345,11 @@ Editor::reset_controls_layout_height (int32_t h)
h += _canvas_drop_zone->height ();
- /* set the height of the scrollable area (i.e. the sum of all contained widgets)
+ /* set the height of the scrollable area (i.e. the sum of all contained widgets)
* for the controls layout. The size request is set elsewhere.
- */
+ */
- controls_layout.property_height() = h;
+ controls_layout.property_height() = h;
}
@@ -432,11 +432,11 @@ Editor::drop_paths_part_two (const vector<string>& paths, framepos_t frame, doub
selection->set (tv);
do_import (midi_paths, Editing::ImportSerializeFiles, ImportToTrack,
- SrcBest, SMFTrackName, SMFTempoIgnore, frame);
+ SrcBest, SMFTrackName, SMFTempoIgnore, frame);
if (UIConfiguration::instance().get_only_copy_imported_files() || copy) {
do_import (audio_paths, Editing::ImportSerializeFiles, Editing::ImportToTrack,
- SrcBest, SMFTrackName, SMFTempoIgnore, frame);
+ SrcBest, SMFTrackName, SMFTempoIgnore, frame);
} else {
do_embed (audio_paths, Editing::ImportSerializeFiles, ImportToTrack, frame);
}
@@ -520,7 +520,7 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
controls_layout.get_parent()->translate_coordinates (*toplevel,
alloc.get_x(), alloc.get_y(),
- wx, wy);
+ wx, wy);
scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
@@ -559,7 +559,7 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
_track_canvas_viewport->get_parent()->translate_coordinates (*toplevel,
alloc.get_x(), alloc.get_y(),
- wx, wy);
+ wx, wy);
scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
}
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index ad1cb8def8..0505888501 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -171,7 +171,7 @@ Editor::track_canvas_button_press_event (GdkEventButton *event)
begin_reversible_selection_op (X_("Clear Selection Click (track canvas)"));
selection->clear ();
commit_reversible_selection_op();
- }
+ }
return false;
}
@@ -179,10 +179,10 @@ bool
Editor::track_canvas_button_release_event (GdkEventButton *event)
{
if (!Keyboard::is_context_menu_event (event)) {
- if (_drags->active ()) {
- _drags->end_grab ((GdkEvent*) event);
- }
- }
+ if (_drags->active ()) {
+ _drags->end_grab ((GdkEvent*) event);
+ }
+ }
return false;
}
@@ -641,9 +641,9 @@ Editor::canvas_fade_out_handle_event (GdkEvent *event, ArdourCanvas::Item* item,
}
struct DescendingRegionLayerSorter {
- bool operator()(boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
- return a->layer() > b->layer();
- }
+ bool operator()(boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
+ return a->layer() > b->layer();
+ }
};
bool
@@ -1214,8 +1214,8 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
if (tv.first == 0
&& (
- boost::dynamic_pointer_cast<AudioRegion> (region) != 0 ||
- boost::dynamic_pointer_cast<MidiRegion> (region) != 0
+ boost::dynamic_pointer_cast<AudioRegion> (region) != 0 ||
+ boost::dynamic_pointer_cast<MidiRegion> (region) != 0
)
)
{
@@ -1263,9 +1263,9 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
void
Editor::drop_regions (const Glib::RefPtr<Gdk::DragContext>& /*context*/,
- int x, int y,
- const SelectionData& /*data*/,
- guint /*info*/, guint /*time*/)
+ int x, int y,
+ const SelectionData& /*data*/,
+ guint /*info*/, guint /*time*/)
{
GdkEvent event;
double px;
diff --git a/gtk2_ardour/editor_cursors.h b/gtk2_ardour/editor_cursors.h
index 7b739e5a53..b8ad2e51ac 100644
--- a/gtk2_ardour/editor_cursors.h
+++ b/gtk2_ardour/editor_cursors.h
@@ -31,9 +31,9 @@ class Editor;
class EditorCursor {
public:
- EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
- EditorCursor (Editor&);
- ~EditorCursor ();
+ EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
+ EditorCursor (Editor&);
+ ~EditorCursor ();
void set_position (framepos_t);
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index b0fe4d4dd1..11079fe75b 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -4683,7 +4683,7 @@ MarkerDrag::aborted (bool movement_occurred)
void
MarkerDrag::update_item (Location*)
{
- /* noop */
+ /* noop */
}
ControlPointDrag::ControlPointDrag (Editor* e, ArdourCanvas::Item* i)
@@ -5846,7 +5846,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
case CreateSkipMarker:
case CreateRangeMarker:
case CreateCDMarker:
- {
+ {
XMLNode &before = _editor->session()->locations()->get_state();
if (_operation == CreateSkipMarker) {
_editor->begin_reversible_command (_("new skip marker"));
@@ -5873,7 +5873,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
_editor->session()->add_command(new MementoCommand<Locations>(*(_editor->session()->locations()), &before, &after));
_editor->commit_reversible_command ();
break;
- }
+ }
case CreateTransportMarker:
// popup menu to pick loop or punch
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index 84356f4636..f3fc99d53f 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -88,7 +88,7 @@ public:
bool end_grab (GdkEvent *);
bool have_item (ArdourCanvas::Item *) const;
- void mark_double_click ();
+ void mark_double_click ();
/** @return true if an end drag or abort is in progress */
bool ending () const {
@@ -128,7 +128,7 @@ private:
class Drag
{
public:
- Drag (Editor *, ArdourCanvas::Item *, bool trackview_only = true);
+ Drag (Editor *, ArdourCanvas::Item *, bool trackview_only = true);
virtual ~Drag () {}
void set_manager (DragManager* m) {
@@ -147,8 +147,8 @@ public:
ARDOUR::MusicFrame adjusted_frame (ARDOUR::framepos_t, GdkEvent const *, bool snap = true) const;
ARDOUR::framepos_t adjusted_current_frame (GdkEvent const *, bool snap = true) const;
- bool was_double_click() const { return _was_double_click; }
- void set_double_click (bool yn) { _was_double_click = yn; }
+ bool was_double_click() const { return _was_double_click; }
+ void set_double_click (bool yn) { _was_double_click = yn; }
/** Called to start a grab of an item.
* @param e Event that caused the grab to start.
@@ -270,7 +270,7 @@ private:
bool _move_threshold_passed; ///< true if the move threshold has been passed, otherwise false
bool _starting_point_passed; ///< true if we called move () with first_move flag, otherwise false
bool _initially_vertical; ///< true if after move threshold is passed we appear to be moving vertically; undefined before that
- bool _was_double_click; ///< true if drag initiated by a double click event
+ bool _was_double_click; ///< true if drag initiated by a double click event
double _grab_x; ///< trackview x of the grab start position
double _grab_y; ///< y of the grab start position, possibly adjusted if _trackview_only is true
double _last_pointer_x; ///< trackview x of the pointer last time a motion occurred
@@ -904,7 +904,7 @@ public:
private:
void fake_locate (framepos_t);
- EditorCursor& _cursor;
+ EditorCursor& _cursor;
bool _stop; ///< true to stop the transport on starting the drag, otherwise false
double _grab_zoom; ///< editor frames per unit when our grab started
};
@@ -949,7 +949,7 @@ public:
class MarkerDrag : public Drag
{
public:
- MarkerDrag (Editor *, ArdourCanvas::Item *);
+ MarkerDrag (Editor *, ArdourCanvas::Item *);
~MarkerDrag ();
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
@@ -972,16 +972,16 @@ private:
ArdourMarker* _marker; ///< marker being dragged
bool _selection_changed;
- struct CopiedLocationMarkerInfo {
- ARDOUR::Location* location;
- std::vector<ArdourMarker*> markers;
- bool move_both;
- CopiedLocationMarkerInfo (ARDOUR::Location* l, ArdourMarker* m);
+ struct CopiedLocationMarkerInfo {
+ ARDOUR::Location* location;
+ std::vector<ArdourMarker*> markers;
+ bool move_both;
+ CopiedLocationMarkerInfo (ARDOUR::Location* l, ArdourMarker* m);
};
- typedef std::list<CopiedLocationMarkerInfo> CopiedLocationInfo;
- CopiedLocationInfo _copied_locations;
- ArdourCanvas::Points _points;
+ typedef std::list<CopiedLocationMarkerInfo> CopiedLocationInfo;
+ CopiedLocationInfo _copied_locations;
+ ArdourCanvas::Points _points;
};
/** Control point drag */
@@ -1004,7 +1004,7 @@ private:
double _fixed_grab_y;
double _cumulative_x_drag;
double _cumulative_y_drag;
- bool _pushing;
+ bool _pushing;
uint32_t _final_index;
static double _zero_gain_fraction;
};
@@ -1172,8 +1172,8 @@ private:
bool _add;
TrackSelection _track_selection_at_start;
bool _time_selection_at_start;
- framepos_t start_at_start;
- framepos_t end_at_start;
+ framepos_t start_at_start;
+ framepos_t end_at_start;
};
/** Range marker drag */
@@ -1261,7 +1261,7 @@ private:
std::list<ControlPoint*> points; ///< points to drag on the line
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
- double original_fraction; ///< initial y-fraction before the drag
+ double original_fraction; ///< initial y-fraction before the drag
};
std::list<Line> _lines;
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 7ec3a63a8e..8723aad488 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -741,7 +741,7 @@ Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent*)
Location* loc = find_location_from_marker (marker, is_start);
if (_session && loc) {
- Glib::signal_idle().connect (sigc::bind (sigc::mem_fun(*this, &Editor::really_remove_marker), loc));
+ Glib::signal_idle().connect (sigc::bind (sigc::mem_fun(*this, &Editor::really_remove_marker), loc));
}
}
@@ -1094,7 +1094,7 @@ Editor::marker_menu_select_using_range ()
bool is_start;
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
- set_selection_from_range (*l);
+ set_selection_from_range (*l);
}
}
@@ -1112,7 +1112,7 @@ Editor::marker_menu_select_all_selectables_using_range ()
bool is_start;
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
- select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, track_views, Selection::Set, false);
+ select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, track_views, Selection::Set, false);
}
}
@@ -1131,7 +1131,7 @@ Editor::marker_menu_separate_regions_using_location ()
bool is_start;
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
- separate_regions_using_location (*l);
+ separate_regions_using_location (*l);
}
}
@@ -1604,11 +1604,13 @@ Editor::rename_marker(ArdourMarker *marker)
loc = find_location_from_marker (marker, is_start);
- if (!loc)
- return;
+ if (!loc) {
+ return;
+ }
- if (loc == transport_loop_location() || loc == transport_punch_location() || loc->is_session_range())
+ if (loc == transport_loop_location() || loc == transport_punch_location() || loc->is_session_range()) {
return;
+ }
ArdourPrompter dialog (true);
string txt;
@@ -1726,7 +1728,7 @@ Editor::update_punch_range_view ()
} else {
- transport_punch_range_rect->hide();
+ transport_punch_range_rect->hide();
}
}
@@ -1747,9 +1749,9 @@ Editor::marker_selection_changed ()
}
struct SortLocationsByPosition {
- bool operator() (Location* a, Location* b) {
- return a->start() < b->start();
- }
+ bool operator() (Location* a, Location* b) {
+ return a->start() < b->start();
+ }
};
void
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 2348ef7ba5..13b5e6e8e5 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -85,18 +85,18 @@ bool
Editor::mouse_frame (framepos_t& where, bool& in_track_canvas) const
{
/* gdk_window_get_pointer() has X11's XQueryPointer semantics in that it only
- pays attentions to subwindows. this means that menu windows are ignored, and
- if the pointer is in a menu, the return window from the call will be the
- the regular subwindow *under* the menu.
-
- this matters quite a lot if the pointer is moving around in a menu that overlaps
- the track canvas because we will believe that we are within the track canvas
- when we are not. therefore, we track enter/leave events for the track canvas
- and allow that to override the result of gdk_window_get_pointer().
+ pays attentions to subwindows. this means that menu windows are ignored, and
+ if the pointer is in a menu, the return window from the call will be the
+ the regular subwindow *under* the menu.
+
+ this matters quite a lot if the pointer is moving around in a menu that overlaps
+ the track canvas because we will believe that we are within the track canvas
+ when we are not. therefore, we track enter/leave events for the track canvas
+ and allow that to override the result of gdk_window_get_pointer().
*/
if (!within_track_canvas) {
- return false;
+ return false;
}
int x, y;
@@ -1300,7 +1300,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
break;
default:
- return button_press_dispatch (&event->button);
+ return button_press_dispatch (&event->button);
break;
}
@@ -1342,24 +1342,24 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
return true;
}
- bool were_dragging = false;
+ bool were_dragging = false;
if (!Keyboard::is_context_menu_event (&event->button)) {
- /* see if we're finishing a drag */
+ /* see if we're finishing a drag */
- if (_drags->active ()) {
- bool const r = _drags->end_grab (event);
- if (r) {
- /* grab dragged, so do nothing else */
- return true;
- }
+ if (_drags->active ()) {
+ bool const r = _drags->end_grab (event);
+ if (r) {
+ /* grab dragged, so do nothing else */
+ return true;
+ }
- were_dragging = true;
- }
+ were_dragging = true;
+ }
- update_region_layering_order_editor ();
- }
+ update_region_layering_order_editor ();
+ }
/* edit events get handled here */
@@ -1661,7 +1661,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
- /* do any (de)selection operations that should occur on button release */
+ /* do any (de)selection operations that should occur on button release */
button_selection (item, event, item_type);
return true;
@@ -1722,7 +1722,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
MeterMarker* m_marker = 0;
TempoMarker* t_marker = 0;
double fraction;
- bool ret = true;
+ bool ret = true;
/* by the time we reach here, entered_regionview and entered trackview
* will have already been set as appropriate. Things are done this
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index e7a1a74610..53a2aa8bb2 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -3139,8 +3139,8 @@ Editor::separate_regions_between (const TimeSelection& ts)
if (!latest_regionviews.empty()) {
rtv->view()->foreach_regionview (sigc::bind (
- sigc::ptr_fun (add_if_covered),
- &(*t), &new_selection));
+ sigc::ptr_fun (add_if_covered),
+ &(*t), &new_selection));
if (!in_command) {
begin_reversible_command (_("separate"));
@@ -3274,10 +3274,10 @@ Editor::separate_under_selected_regions ()
boost::shared_ptr<Playlist> playlist = (*rl)->playlist();
- if (!playlist) {
+ if (!playlist) {
// is this check necessary?
continue;
- }
+ }
vector<PlaylistState>::iterator i;
@@ -3853,26 +3853,26 @@ Editor::trim_to_region(bool forward)
if (forward) {
- next_region = playlist->find_next_region (region->first_frame(), Start, 1);
+ next_region = playlist->find_next_region (region->first_frame(), Start, 1);
- if (!next_region) {
- continue;
- }
+ if (!next_region) {
+ continue;
+ }
- region->trim_end((framepos_t) ( (next_region->first_frame() - 1) * speed));
- arv->region_changed (PropertyChange (ARDOUR::Properties::length));
+ region->trim_end((framepos_t) ( (next_region->first_frame() - 1) * speed));
+ arv->region_changed (PropertyChange (ARDOUR::Properties::length));
}
else {
- next_region = playlist->find_next_region (region->first_frame(), Start, 0);
+ next_region = playlist->find_next_region (region->first_frame(), Start, 0);
- if(!next_region){
- continue;
- }
+ if(!next_region){
+ continue;
+ }
- region->trim_front((framepos_t) ((next_region->last_frame() + 1) * speed));
+ region->trim_front((framepos_t) ((next_region->last_frame() + 1) * speed));
- arv->region_changed (ARDOUR::bounds_change);
+ arv->region_changed (ARDOUR::bounds_change);
}
if (!in_command) {
@@ -3945,8 +3945,8 @@ Editor::freeze_route ()
if (clicked_routeview->track()->has_external_redirects()) {
MessageDialog d (string_compose (_("<b>%1</b>\n\nThis track has at least one send/insert/return as part of its signal flow.\n\n"
- "Freezing will only process the signal as far as the first send/insert/return."),
- clicked_routeview->track()->name()), true, MESSAGE_INFO, BUTTONS_NONE, true);
+ "Freezing will only process the signal as far as the first send/insert/return."),
+ clicked_routeview->track()->name()), true, MESSAGE_INFO, BUTTONS_NONE, true);
d.add_button (_("Freeze anyway"), Gtk::RESPONSE_OK);
d.add_button (_("Don't freeze"), Gtk::RESPONSE_CANCEL);
@@ -4463,10 +4463,10 @@ Editor::remove_selected_regions ()
boost::shared_ptr<Playlist> playlist = (*rl)->playlist();
- if (!playlist) {
+ if (!playlist) {
// is this check necessary?
continue;
- }
+ }
/* get_regions_from_selection_and_entered() guarantees that
the playlists involved are unique, so there is no need
@@ -4823,8 +4823,8 @@ Editor::paste_internal (framepos_t position, float times, const int32_t sub_num)
/* Only one line copied, and one automation track selected. Do a
"greedy" paste from one automation type to another. */
- PasteContext ctx(paste_count, times, ItemCounts(), true);
- ts.front()->paste (position, *cut_buffer, ctx, sub_num);
+ PasteContext ctx(paste_count, times, ItemCounts(), true);
+ ts.front()->paste (position, *cut_buffer, ctx, sub_num);
} else {
@@ -5041,7 +5041,7 @@ Editor::remove_last_capture ()
if (Config->get_verify_remove_last_capture()) {
prompt = _("Do you really want to destroy the last capture?"
- "\n(This is destructive and cannot be undone)");
+ "\n(This is destructive and cannot be undone)");
choices.push_back (_("No, do nothing."));
choices.push_back (_("Yes, destroy it."));
@@ -5296,7 +5296,7 @@ Editor::strip_region_silence ()
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*> (*i);
- if (arv) {
+ if (arv) {
audio_only.push_back (arv);
}
}
@@ -7658,7 +7658,7 @@ Editor::do_remove_time ()
void
Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
- bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too)
+ bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too)
{
if (Config->get_edit_mode() == Lock) {
error << (_("Cannot insert or delete time when in Lock edit.")) << endmsg;
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 5ed8fe64c7..6ee68a0896 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -65,9 +65,9 @@ using namespace Editing;
using Gtkmm2ext::Keyboard;
struct ColumnInfo {
- int index;
- const char* label;
- const char* tooltip;
+ int index;
+ const char* label;
+ const char* tooltip;
};
EditorRegions::EditorRegions (Editor* e)
@@ -495,8 +495,8 @@ EditorRegions::remove_unused_regions ()
return;
}
- prompt = _("Do you really want to remove unused regions?"
- "\n(This is destructive and cannot be undone)");
+ prompt = _("Do you really want to remove unused regions?"
+ "\n(This is destructive and cannot be undone)");
choices.push_back (_("No, do nothing."));
choices.push_back (_("Yes, remove."));
@@ -1031,7 +1031,7 @@ EditorRegions::populate_row_name (boost::shared_ptr<Region> region, TreeModel::R
void
EditorRegions::populate_row_source (boost::shared_ptr<Region> region, TreeModel::Row const &row)
{
- if (boost::dynamic_pointer_cast<SilentFileSource>(region->source())) {
+ if (boost::dynamic_pointer_cast<SilentFileSource>(region->source())) {
row[_columns.path] = _("MISSING ") + Gtkmm2ext::markup_escape_text (region->source()->name());
} else {
row[_columns.path] = Gtkmm2ext::markup_escape_text (region->source()->name());
@@ -1056,10 +1056,10 @@ EditorRegions::set_full (bool f)
{
if (f) {
_display.expand_all ();
- expanded = true;
+ expanded = true;
} else {
_display.collapse_all ();
- expanded = false;
+ expanded = false;
}
}
@@ -1303,9 +1303,9 @@ EditorRegions::selection_mapover (sigc::slot<void,boost::shared_ptr<Region> > sl
void
EditorRegions::drag_data_received (const RefPtr<Gdk::DragContext>& context,
- int x, int y,
- const SelectionData& data,
- guint info, guint time)
+ int x, int y,
+ const SelectionData& data,
+ guint info, guint time)
{
vector<string> paths;
diff --git a/gtk2_ardour/editor_regions.h b/gtk2_ardour/editor_regions.h
index ae830b0e24..9679085501 100644
--- a/gtk2_ardour/editor_regions.h
+++ b/gtk2_ardour/editor_regions.h
@@ -127,9 +127,9 @@ private:
bool selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
- Gtk::Widget* old_focus;
- Gtk::CellEditable* name_editable;
- void name_editing_started (Gtk::CellEditable*, const Glib::ustring&);
+ 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 &);
@@ -140,33 +140,33 @@ private:
bool key_press (GdkEventKey *);
bool button_press (GdkEventButton *);
- bool focus_in (GdkEventFocus*);
- bool focus_out (GdkEventFocus*);
- bool enter_notify (GdkEventCrossing*);
- bool leave_notify (GdkEventCrossing*);
+ bool focus_in (GdkEventFocus*);
+ bool focus_out (GdkEventFocus*);
+ bool enter_notify (GdkEventCrossing*);
+ bool leave_notify (GdkEventCrossing*);
void show_context_menu (int button, int time);
int sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
- void format_position (ARDOUR::framepos_t pos, char* buf, size_t bufsize, bool onoff = true);
+ void format_position (ARDOUR::framepos_t pos, char* buf, size_t bufsize, bool onoff = true);
void add_region (boost::shared_ptr<ARDOUR::Region>);
void populate_row (boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &, PBD::PropertyChange const &);
- void populate_row_used (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_position (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_end (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_sync (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_fade_in (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
- void populate_row_fade_out (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
- void populate_row_locked (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_muted (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_glued (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_opaque (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
- void populate_row_length (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
- 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 populate_row_used (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_position (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_end (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_sync (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_fade_in (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
+ void populate_row_fade_out (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
+ void populate_row_locked (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_muted (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_glued (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_opaque (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+ void populate_row_length (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
+ 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_all_rows ();
@@ -215,7 +215,7 @@ private:
PBD::ScopedConnection editor_freeze_connection;
PBD::ScopedConnection editor_thaw_connection;
- bool expanded;
+ bool expanded;
};
#endif /* __gtk_ardour_editor_regions_h__ */
diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc
index 3cfa1eeafa..e9fca92bc3 100644
--- a/gtk2_ardour/editor_route_groups.cc
+++ b/gtk2_ardour/editor_route_groups.cc
@@ -58,9 +58,9 @@ using namespace Gtk;
using Gtkmm2ext::Keyboard;
struct ColumnInfo {
- int index;
- const char* label;
- const char* tooltip;
+ int index;
+ const char* label;
+ const char* tooltip;
};
EditorRouteGroups::EditorRouteGroups (Editor* e)
diff --git a/gtk2_ardour/editor_route_groups.h b/gtk2_ardour/editor_route_groups.h
index 65c4968d8d..79b61a95fe 100644
--- a/gtk2_ardour/editor_route_groups.h
+++ b/gtk2_ardour/editor_route_groups.h
@@ -38,9 +38,9 @@ public:
private:
- struct Columns : public Gtk::TreeModel::ColumnRecord {
+ struct Columns : public Gtk::TreeModel::ColumnRecord {
- Columns () {
+ Columns () {
add (gdkcolor);
add (text);
add (is_visible);
@@ -54,11 +54,11 @@ private:
add (active_shared);
add (active_state);
add (routegroup);
- }
+ }
- Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
- Gtk::TreeModelColumn<std::string> text;
- Gtk::TreeModelColumn<bool> is_visible;
+ Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
+ Gtk::TreeModelColumn<std::string> text;
+ Gtk::TreeModelColumn<bool> is_visible;
Gtk::TreeModelColumn<bool> gain;
Gtk::TreeModelColumn<bool> gain_relative;
Gtk::TreeModelColumn<bool> mute;
@@ -68,7 +68,7 @@ private:
Gtk::TreeModelColumn<bool> select;
Gtk::TreeModelColumn<bool> active_shared;
Gtk::TreeModelColumn<bool> active_state;
- Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
+ Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
};
Columns _columns;
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index b4bd802cd5..997d79efa9 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -149,7 +149,7 @@ Editor::initialize_rulers ()
minsec_nmarks = 0;
bbt_ruler = new ArdourCanvas::Ruler (_time_markers_group, *_bbt_metric,
- ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, timebar_height));
+ ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, timebar_height));
bbt_ruler->set_font_description (font);
CANVAS_DEBUG_NAME (bbt_ruler, "bbt ruler");
timecode_nmarks = 0;
@@ -681,7 +681,7 @@ Editor::update_tempo_based_rulers ()
void
Editor::set_timecode_ruler_scale (framepos_t lower, framepos_t upper)
{
- using namespace std;
+ using namespace std;
framepos_t spacer;
framepos_t fr;
@@ -771,22 +771,22 @@ Editor::set_timecode_ruler_scale (framepos_t lower, framepos_t upper)
timecode_nmarks = 2 + 24;
} else {
- const framecnt_t hours_in_range = range / (60 * 60 * fr);
- const int text_width_rough_guess = 120; /* pixels, very very approximate guess at how wide the tick mark text is */
+ const framecnt_t hours_in_range = range / (60 * 60 * fr);
+ const int text_width_rough_guess = 120; /* pixels, very very approximate guess at how wide the tick mark text is */
- /* Normally we do not need to know anything about the width of the canvas
- to set the ruler scale, because the caller has already determined
- the width and set lower + upper arguments to this function to match that.
+ /* Normally we do not need to know anything about the width of the canvas
+ to set the ruler scale, because the caller has already determined
+ the width and set lower + upper arguments to this function to match that.
- But in this case, where the range defined by lower and uppper can vary
- substantially (basically anything from 24hrs+ to several billion years)
- trying to decide which tick marks to show does require us to know
- about the available width.
- */
+ But in this case, where the range defined by lower and uppper can vary
+ substantially (basically anything from 24hrs+ to several billion years)
+ trying to decide which tick marks to show does require us to know
+ about the available width.
+ */
timecode_nmarks = _track_canvas->width() / text_width_rough_guess;
- timecode_ruler_scale = timecode_show_many_hours;
- timecode_mark_modulo = max ((framecnt_t) 1, 1 + (hours_in_range / timecode_nmarks));
+ timecode_ruler_scale = timecode_show_many_hours;
+ timecode_mark_modulo = max ((framecnt_t) 1, 1 + (hours_in_range / timecode_nmarks));
}
}
@@ -946,10 +946,10 @@ Editor::metric_get_timecode (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdou
if ((timecode.hours % timecode_mark_modulo) == 0) {
mark.style = ArdourCanvas::Ruler::Mark::Major;
snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", timecode.negative ? "-" : "", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
- mark.label = buf;
- mark.position = pos;
- marks.push_back (mark);
- ++n;
+ mark.label = buf;
+ mark.position = pos;
+ marks.push_back (mark);
+ ++n;
}
/* can't use Timecode::increment_hours() here because we may be traversing thousands of hours
* and doing it 1 hour at a time is just stupid (and slow).
@@ -994,69 +994,69 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
bbt_beat_subdivision = 2;
break;
case SnapToBeatDiv3:
- bbt_beat_subdivision = 3;
+ bbt_beat_subdivision = 3;
break;
case SnapToBeatDiv4:
- bbt_beat_subdivision = 4;
+ bbt_beat_subdivision = 4;
break;
case SnapToBeatDiv5:
- bbt_beat_subdivision = 5;
+ bbt_beat_subdivision = 5;
bbt_accent_modulo = 2; // XXX YIKES
break;
case SnapToBeatDiv6:
- bbt_beat_subdivision = 6;
+ bbt_beat_subdivision = 6;
bbt_accent_modulo = 2; // XXX YIKES
break;
case SnapToBeatDiv7:
- bbt_beat_subdivision = 7;
+ bbt_beat_subdivision = 7;
bbt_accent_modulo = 2; // XXX YIKES
break;
case SnapToBeatDiv8:
- bbt_beat_subdivision = 8;
+ bbt_beat_subdivision = 8;
bbt_accent_modulo = 2;
break;
case SnapToBeatDiv10:
- bbt_beat_subdivision = 10;
+ bbt_beat_subdivision = 10;
bbt_accent_modulo = 2; // XXX YIKES
break;
case SnapToBeatDiv12:
- bbt_beat_subdivision = 12;
+ bbt_beat_subdivision = 12;
bbt_accent_modulo = 3;
break;
case SnapToBeatDiv14:
- bbt_beat_subdivision = 14;
+ bbt_beat_subdivision = 14;
bbt_accent_modulo = 3; // XXX YIKES!
break;
case SnapToBeatDiv16:
- bbt_beat_subdivision = 16;
+ bbt_beat_subdivision = 16;
bbt_accent_modulo = 4;
break;
case SnapToBeatDiv20:
- bbt_beat_subdivision = 20;
+ bbt_beat_subdivision = 20;
bbt_accent_modulo = 5;
break;
case SnapToBeatDiv24:
- bbt_beat_subdivision = 24;
+ bbt_beat_subdivision = 24;
bbt_accent_modulo = 6;
break;
case SnapToBeatDiv28:
- bbt_beat_subdivision = 28;
+ bbt_beat_subdivision = 28;
bbt_accent_modulo = 7;
break;
case SnapToBeatDiv32:
- bbt_beat_subdivision = 32;
+ bbt_beat_subdivision = 32;
bbt_accent_modulo = 8;
break;
case SnapToBeatDiv64:
- bbt_beat_subdivision = 64;
+ bbt_beat_subdivision = 64;
bbt_accent_modulo = 8;
break;
case SnapToBeatDiv128:
- bbt_beat_subdivision = 128;
+ bbt_beat_subdivision = 128;
bbt_accent_modulo = 8;
break;
default:
- bbt_beat_subdivision = 4;
+ bbt_beat_subdivision = 4;
break;
}
@@ -1072,7 +1072,7 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
/* Only show the bar helper if there aren't many bars on the screen */
if ((bbt_bars < 2) || (beats < 5)) {
- bbt_bar_helper_on = true;
+ bbt_bar_helper_on = true;
}
if (beat_density > 8192) {
@@ -1196,7 +1196,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
helper_active = true;
} else {
- if ((*i).is_bar()) {
+ if ((*i).is_bar()) {
mark.style = ArdourCanvas::Ruler::Mark::Major;
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
} else {
@@ -1257,10 +1257,10 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
mark.style = ArdourCanvas::Ruler::Mark::Micro;
marks.push_back (mark);
- for (n = 1, i = grid.begin(); n < bbt_nmarks && i != grid.end(); ++i) {
+ for (n = 1, i = grid.begin(); n < bbt_nmarks && i != grid.end(); ++i) {
if ((*i).frame < lower && (bbt_bar_helper_on)) {
- snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
+ snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
edit_last_mark_label (marks, buf);
helper_active = true;
} else {
@@ -1297,7 +1297,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
i_am_accented = true;
}
if (i_am_accented && (pos > bbt_position_of_helper)){
- snprintf (buf, sizeof(buf), "%" PRIu32, tick);
+ snprintf (buf, sizeof(buf), "%" PRIu32, tick);
} else {
buf[0] = '\0';
}
@@ -1333,7 +1333,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
mark.style = ArdourCanvas::Ruler::Mark::Micro;
marks.push_back (mark);
- for (n = 1, i = grid.begin(); n < bbt_nmarks && i != grid.end(); ++i) {
+ for (n = 1, i = grid.begin(); n < bbt_nmarks && i != grid.end(); ++i) {
if ((*i).frame < lower && (bbt_bar_helper_on)) {
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
@@ -1397,18 +1397,18 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
break;
- case bbt_show_many:
- bbt_nmarks = 1;
- snprintf (buf, sizeof(buf), "cannot handle %" PRIu32 " bars", bbt_bars );
- mark.style = ArdourCanvas::Ruler::Mark::Major;
- mark.label = buf;
- mark.position = lower;
- marks.push_back (mark);
- break;
+ case bbt_show_many:
+ bbt_nmarks = 1;
+ snprintf (buf, sizeof(buf), "cannot handle %" PRIu32 " bars", bbt_bars );
+ mark.style = ArdourCanvas::Ruler::Mark::Major;
+ mark.label = buf;
+ mark.position = lower;
+ marks.push_back (mark);
+ break;
case bbt_show_64:
- bbt_nmarks = (gint) (bbt_bars / 64) + 1;
- for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; i++) {
+ bbt_nmarks = (gint) (bbt_bars / 64) + 1;
+ for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; i++) {
if ((*i).is_bar()) {
if ((*i).bar % 64 == 1) {
if ((*i).bar % 256 == 1) {
@@ -1432,19 +1432,19 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
break;
case bbt_show_16:
- bbt_nmarks = (bbt_bars / 16) + 1;
+ bbt_nmarks = (bbt_bars / 16) + 1;
for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; i++) {
- if ((*i).is_bar()) {
+ if ((*i).is_bar()) {
if ((*i).bar % 16 == 1) {
- if ((*i).bar % 64 == 1) {
- snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
+ if ((*i).bar % 64 == 1) {
+ snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
mark.style = ArdourCanvas::Ruler::Mark::Major;
} else {
buf[0] = '\0';
if ((*i).bar % 64 == 33) {
- mark.style = ArdourCanvas::Ruler::Mark::Minor;
+ mark.style = ArdourCanvas::Ruler::Mark::Minor;
} else {
- mark.style = ArdourCanvas::Ruler::Mark::Micro;
+ mark.style = ArdourCanvas::Ruler::Mark::Micro;
}
}
mark.label = buf;
@@ -1458,36 +1458,36 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
case bbt_show_4:
bbt_nmarks = (bbt_bars / 4) + 1;
- for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; ++i) {
- if ((*i).is_bar()) {
- if ((*i).bar % 4 == 1) {
- if ((*i).bar % 16 == 1) {
- snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
- mark.style = ArdourCanvas::Ruler::Mark::Major;
- } else {
- buf[0] = '\0';
- if ((*i).bar % 16 == 9) {
- mark.style = ArdourCanvas::Ruler::Mark::Minor;
+ for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; ++i) {
+ if ((*i).is_bar()) {
+ if ((*i).bar % 4 == 1) {
+ if ((*i).bar % 16 == 1) {
+ snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
+ mark.style = ArdourCanvas::Ruler::Mark::Major;
} else {
- mark.style = ArdourCanvas::Ruler::Mark::Micro;
+ buf[0] = '\0';
+ if ((*i).bar % 16 == 9) {
+ mark.style = ArdourCanvas::Ruler::Mark::Minor;
+ } else {
+ mark.style = ArdourCanvas::Ruler::Mark::Micro;
+ }
}
+ mark.label = buf;
+ mark.position = (*i).frame;
+ marks.push_back (mark);
+ ++n;
}
- mark.label = buf;
- mark.position = (*i).frame;
- marks.push_back (mark);
- ++n;
- }
}
}
break;
case bbt_show_1:
// default:
- bbt_nmarks = bbt_bars + 2;
+ bbt_nmarks = bbt_bars + 2;
for (n = 0, i = grid.begin(); i != grid.end() && n < bbt_nmarks; ++i) {
- if ((*i).is_bar()) {
+ if ((*i).is_bar()) {
if ((*i).bar % 4 == 1) {
- snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
+ snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
mark.style = ArdourCanvas::Ruler::Mark::Major;
} else {
buf[0] = '\0';
@@ -1590,106 +1590,106 @@ Editor::set_minsec_ruler_scale (framepos_t lower, framepos_t upper)
upper += spacer;
framecnt_t const range = (upper - lower) * 1000;
- if (range <= (fr / 10)) { /* 0-0.1 second */
+ if (range <= (fr / 10)) { /* 0-0.1 second */
minsec_mark_interval = fr / 1000; /* show 1/1000 seconds */
minsec_ruler_scale = minsec_show_msecs;
minsec_mark_modulo = 10;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= (fr / 2)) { /* 0-0.5 second */
minsec_mark_interval = fr / 100; /* show 1/100 seconds */
minsec_ruler_scale = minsec_show_msecs;
minsec_mark_modulo = 100;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= fr) { /* 0-1 second */
minsec_mark_interval = fr / 10; /* show 1/10 seconds */
minsec_ruler_scale = minsec_show_msecs;
minsec_mark_modulo = 200;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= 2 * fr) { /* 1-2 seconds */
minsec_mark_interval = fr / 10; /* show 1/10 seconds */
minsec_ruler_scale = minsec_show_msecs;
minsec_mark_modulo = 500;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= 8 * fr) { /* 2-5 seconds */
minsec_mark_interval = fr / 5; /* show 2 seconds */
minsec_ruler_scale = minsec_show_msecs;
minsec_mark_modulo = 1000;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= 16 * fr) { /* 8-16 seconds */
minsec_mark_interval = fr; /* show 1 seconds */
minsec_ruler_scale = minsec_show_seconds;
minsec_mark_modulo = 2;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= 30 * fr) { /* 10-30 seconds */
minsec_mark_interval = fr; /* show 1 seconds */
minsec_ruler_scale = minsec_show_seconds;
- minsec_mark_modulo = 5;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
+ minsec_mark_modulo = 5;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
} else if (range <= 60 * fr) { /* 30-60 seconds */
- minsec_mark_interval = fr; /* show 1 seconds */
- minsec_ruler_scale = minsec_show_seconds;
- minsec_mark_modulo = 5;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 2 * 60 * fr) { /* 1-2 minutes */
- minsec_mark_interval = 5 * fr; /* show 5 seconds */
- minsec_ruler_scale = minsec_show_seconds;
- minsec_mark_modulo = 3;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 4 * 60 * fr) { /* 4 minutes */
- minsec_mark_interval = 5 * fr; /* show 10 seconds */
- minsec_ruler_scale = minsec_show_seconds;
- minsec_mark_modulo = 30;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 10 * 60 * fr) { /* 10 minutes */
- minsec_mark_interval = 30 * fr; /* show 30 seconds */
- minsec_ruler_scale = minsec_show_seconds;
- minsec_mark_modulo = 120;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 30 * 60 * fr) { /* 10-30 minutes */
- minsec_mark_interval = 60 * fr; /* show 1 minute */
- minsec_ruler_scale = minsec_show_minutes;
+ minsec_mark_interval = fr; /* show 1 seconds */
+ minsec_ruler_scale = minsec_show_seconds;
minsec_mark_modulo = 5;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 60 * 60 * fr) { /* 30 minutes - 1hr */
- minsec_mark_interval = 2 * 60 * fr; /* show 2 minutes */
- minsec_ruler_scale = minsec_show_minutes;
- minsec_mark_modulo = 10;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 4 * 60 * 60 * fr) { /* 1 - 4 hrs*/
- minsec_mark_interval = 5 * 60 * fr; /* show 10 minutes */
- minsec_ruler_scale = minsec_show_minutes;
- minsec_mark_modulo = 30;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 8 * 60 * 60 * fr) { /* 4 - 8 hrs*/
- minsec_mark_interval = 20 * 60 * fr; /* show 20 minutes */
- minsec_ruler_scale = minsec_show_minutes;
- minsec_mark_modulo = 60;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else if (range <= 16 * 60 * 60 * fr) { /* 16-24 hrs*/
- minsec_mark_interval = 60 * 60 * fr; /* show 60 minutes */
- minsec_ruler_scale = minsec_show_hours;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 2 * 60 * fr) { /* 1-2 minutes */
+ minsec_mark_interval = 5 * fr; /* show 5 seconds */
+ minsec_ruler_scale = minsec_show_seconds;
+ minsec_mark_modulo = 3;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 4 * 60 * fr) { /* 4 minutes */
+ minsec_mark_interval = 5 * fr; /* show 10 seconds */
+ minsec_ruler_scale = minsec_show_seconds;
+ minsec_mark_modulo = 30;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 10 * 60 * fr) { /* 10 minutes */
+ minsec_mark_interval = 30 * fr; /* show 30 seconds */
+ minsec_ruler_scale = minsec_show_seconds;
+ minsec_mark_modulo = 120;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 30 * 60 * fr) { /* 10-30 minutes */
+ minsec_mark_interval = 60 * fr; /* show 1 minute */
+ minsec_ruler_scale = minsec_show_minutes;
+ minsec_mark_modulo = 5;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 60 * 60 * fr) { /* 30 minutes - 1hr */
+ minsec_mark_interval = 2 * 60 * fr; /* show 2 minutes */
+ minsec_ruler_scale = minsec_show_minutes;
+ minsec_mark_modulo = 10;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 4 * 60 * 60 * fr) { /* 1 - 4 hrs*/
+ minsec_mark_interval = 5 * 60 * fr; /* show 10 minutes */
+ minsec_ruler_scale = minsec_show_minutes;
+ minsec_mark_modulo = 30;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 8 * 60 * 60 * fr) { /* 4 - 8 hrs*/
+ minsec_mark_interval = 20 * 60 * fr; /* show 20 minutes */
+ minsec_ruler_scale = minsec_show_minutes;
+ minsec_mark_modulo = 60;
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else if (range <= 16 * 60 * 60 * fr) { /* 16-24 hrs*/
+ minsec_mark_interval = 60 * 60 * fr; /* show 60 minutes */
+ minsec_ruler_scale = minsec_show_hours;
minsec_mark_modulo = 2;
- minsec_nmarks = 2 + (range / minsec_mark_interval);
- } else {
-
- const framecnt_t hours_in_range = range / (60 * 60 * fr);
- const int text_width_rough_guess = 70; /* pixels, very very approximate guess at how wide the tick mark text is */
-
- /* Normally we do not need to know anything about the width of the canvas
- to set the ruler scale, because the caller has already determined
- the width and set lower + upper arguments to this function to match that.
-
- But in this case, where the range defined by lower and uppper can vary
- substantially (anything from 24hrs+ to several billion years)
- trying to decide which tick marks to show does require us to know
- about the available width.
- */
-
- minsec_nmarks = _track_canvas->width() / text_width_rough_guess;
- minsec_mark_modulo = max ((framecnt_t) 1, 1 + (hours_in_range / minsec_nmarks));
- minsec_mark_interval = minsec_mark_modulo * (60 * 60 * fr);
- minsec_ruler_scale = minsec_show_many_hours;
- }
+ minsec_nmarks = 2 + (range / minsec_mark_interval);
+ } else {
+
+ const framecnt_t hours_in_range = range / (60 * 60 * fr);
+ const int text_width_rough_guess = 70; /* pixels, very very approximate guess at how wide the tick mark text is */
+
+ /* Normally we do not need to know anything about the width of the canvas
+ to set the ruler scale, because the caller has already determined
+ the width and set lower + upper arguments to this function to match that.
+
+ But in this case, where the range defined by lower and uppper can vary
+ substantially (anything from 24hrs+ to several billion years)
+ trying to decide which tick marks to show does require us to know
+ about the available width.
+ */
+
+ minsec_nmarks = _track_canvas->width() / text_width_rough_guess;
+ minsec_mark_modulo = max ((framecnt_t) 1, 1 + (hours_in_range / minsec_nmarks));
+ minsec_mark_interval = minsec_mark_modulo * (60 * 60 * fr);
+ minsec_ruler_scale = minsec_show_many_hours;
+ }
}
void
@@ -1735,77 +1735,77 @@ Editor::metric_get_minsec (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdoubl
mark.position = pos/1000.0;
marks.push_back (mark);
}
- break;
+ break;
case minsec_show_seconds:
for (n = 0; n < minsec_nmarks; pos += minsec_mark_interval, ++n) {
- sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
- if (secs % minsec_mark_modulo == 0) {
+ sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
+ if (secs % minsec_mark_modulo == 0) {
if (secs == 0) {
mark.style = ArdourCanvas::Ruler::Mark::Major;
} else {
mark.style = ArdourCanvas::Ruler::Mark::Minor;
}
snprintf (buf, sizeof(buf), "%02ld:%02ld:%02ld", hrs, mins, secs);
- } else {
+ } else {
buf[0] = '\0';
- mark.style = ArdourCanvas::Ruler::Mark::Micro;
- }
- mark.label = buf;
+ mark.style = ArdourCanvas::Ruler::Mark::Micro;
+ }
+ mark.label = buf;
mark.position = pos/1000.0;
marks.push_back (mark);
}
- break;
+ break;
case minsec_show_minutes:
for (n = 0; n < minsec_nmarks; pos += minsec_mark_interval, ++n) {
- sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
- if (mins % minsec_mark_modulo == 0) {
- if (mins == 0) {
- mark.style = ArdourCanvas::Ruler::Mark::Major;
- } else {
- mark.style = ArdourCanvas::Ruler::Mark::Minor;
- }
- snprintf (buf, sizeof(buf), "%02ld:%02ld:%02ld", hrs, mins, secs);
- } else {
+ sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
+ if (mins % minsec_mark_modulo == 0) {
+ if (mins == 0) {
+ mark.style = ArdourCanvas::Ruler::Mark::Major;
+ } else {
+ mark.style = ArdourCanvas::Ruler::Mark::Minor;
+ }
+ snprintf (buf, sizeof(buf), "%02ld:%02ld:%02ld", hrs, mins, secs);
+ } else {
buf[0] = '\0';
- mark.style = ArdourCanvas::Ruler::Mark::Micro;
- }
- mark.label = buf;
- mark.position = pos/1000.0;
+ mark.style = ArdourCanvas::Ruler::Mark::Micro;
+ }
+ mark.label = buf;
+ mark.position = pos/1000.0;
marks.push_back (mark);
- }
- break;
+ }
+ break;
case minsec_show_hours:
for (n = 0; n < minsec_nmarks; pos += minsec_mark_interval, ++n) {
- sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
- if (hrs % minsec_mark_modulo == 0) {
- mark.style = ArdourCanvas::Ruler::Mark::Major;
- snprintf (buf, sizeof(buf), "%02ld:%02ld", hrs, mins);
- } else {
+ sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
+ if (hrs % minsec_mark_modulo == 0) {
+ mark.style = ArdourCanvas::Ruler::Mark::Major;
+ snprintf (buf, sizeof(buf), "%02ld:%02ld", hrs, mins);
+ } else {
buf[0] = '\0';
- mark.style = ArdourCanvas::Ruler::Mark::Micro;
- }
- mark.label = buf;
- mark.position = pos/1000.0;
+ mark.style = ArdourCanvas::Ruler::Mark::Micro;
+ }
+ mark.label = buf;
+ mark.position = pos/1000.0;
marks.push_back (mark);
- }
- break;
-
- case minsec_show_many_hours:
- for (n = 0; n < minsec_nmarks; ) {
- sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
- if (hrs % minsec_mark_modulo == 0) {
- mark.style = ArdourCanvas::Ruler::Mark::Major;
- snprintf (buf, sizeof(buf), "%02ld:00", hrs);
- mark.label = buf;
- mark.position = pos/1000.0;
- marks.push_back (mark);
- ++n;
- }
- pos += minsec_mark_interval;
- }
- break;
- }
+ }
+ break;
+
+ case minsec_show_many_hours:
+ for (n = 0; n < minsec_nmarks; ) {
+ sample_to_clock_parts (pos, _session->frame_rate(), &hrs, &mins, &secs, &millisecs);
+ if (hrs % minsec_mark_modulo == 0) {
+ mark.style = ArdourCanvas::Ruler::Mark::Major;
+ snprintf (buf, sizeof(buf), "%02ld:00", hrs);
+ mark.label = buf;
+ mark.position = pos/1000.0;
+ marks.push_back (mark);
+ ++n;
+ }
+ pos += minsec_mark_interval;
+ }
+ break;
+ }
}
diff --git a/gtk2_ardour/editor_snapshots.cc b/gtk2_ardour/editor_snapshots.cc
index 90521cd07d..0a2ea085cd 100644
--- a/gtk2_ardour/editor_snapshots.cc
+++ b/gtk2_ardour/editor_snapshots.cc
@@ -191,7 +191,7 @@ EditorSnapshots::redisplay ()
vector<std::string> state_file_paths;
get_state_files_in_directory (_session->session_directory().root_path(),
- state_file_paths);
+ state_file_paths);
if (state_file_paths.empty()) {
return;
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index 4a238259ef..c6bbe91c15 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -124,7 +124,7 @@ EditorSummary::render_background_image ()
cairo_t* cr = cairo_create (_image);
- /* background (really just the dividing lines between tracks */
+ /* background (really just the dividing lines between tracks */
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, 0, 0, get_width(), get_height());
@@ -989,7 +989,7 @@ EditorSummary::set_editor_y (pair<double, double> const y)
_editor->_routes->resume_redisplay ();
- set_editor_y (y.first);
+ set_editor_y (y.first);
}
void
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index 34a80dfc93..35f74b6d54 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -455,7 +455,7 @@ Editor::mouse_add_new_meter_event (framepos_t frame)
const double beat = map.beat_at_bbt (requested);
const double al_frame = map.frame_at_beat (beat);
begin_reversible_command (_("add meter mark"));
- XMLNode &before = map.get_state();
+ XMLNode &before = map.get_state();
if (meter_dialog.get_lock_style() == MusicTime) {
map.add_meter (Meter (bpb, note_type), beat, requested, 0, MusicTime);
@@ -514,7 +514,7 @@ Editor::edit_meter_section (MeterSection* section)
const PositionLockStyle pls = (meter_dialog.get_lock_style() == AudioTime) ? AudioTime : MusicTime;
begin_reversible_command (_("replace meter mark"));
- XMLNode &before = _session->tempo_map().get_state();
+ XMLNode &before = _session->tempo_map().get_state();
_session->tempo_map().replace_meter (*section, meter, when, frame, pls);
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 067cfef899..31bac68561 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -105,7 +105,7 @@ Editor::time_stretch (RegionSelection& regions, float fraction)
stretch.run (*i);
playlist->replace_region (regions.front()->region(), stretch.results[0],
- regions.front()->region()->position());
+ regions.front()->region()->position());
midi_playlists_affected.insert (playlist);
}
@@ -378,16 +378,16 @@ Editor::timefx_thread (void *arg)
tsd->editor.do_timefx ();
- /* GACK! HACK! sleep for a bit so that our request buffer for the GUI
- event loop doesn't die before any changes we made are processed
- by the GUI ...
- */
+ /* GACK! HACK! sleep for a bit so that our request buffer for the GUI
+ event loop doesn't die before any changes we made are processed
+ by the GUI ...
+ */
#ifdef PLATFORM_WINDOWS
Glib::usleep(2 * G_USEC_PER_SEC);
#else
- struct timespec t = { 2, 0 };
- nanosleep (&t, 0);
+ struct timespec t = { 2, 0 };
+ nanosleep (&t, 0);
#endif
return 0;
}
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index 08c1901edf..d0ecdcfa7c 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -401,8 +401,8 @@ EngineControl::unblock_changed_signals ()
EngineControl::SignalBlocker::SignalBlocker (EngineControl& engine_control,
const std::string& reason)
- : ec (engine_control)
- , m_reason (reason)
+ : ec (engine_control)
+ , m_reason (reason)
{
DEBUG_ECONTROL (string_compose ("SignalBlocker: %1", m_reason));
ec.block_changed_signals ();
diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h
index 142e1fea18..303f640828 100644
--- a/gtk2_ardour/engine_dialog.h
+++ b/gtk2_ardour/engine_dialog.h
@@ -40,102 +40,102 @@
class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
public:
- EngineControl ();
- ~EngineControl ();
+ EngineControl ();
+ ~EngineControl ();
- static bool need_setup ();
+ static bool need_setup ();
- XMLNode& get_state ();
- bool set_state (const XMLNode&);
+ XMLNode& get_state ();
+ bool set_state (const XMLNode&);
- void set_desired_sample_rate (uint32_t);
- bool try_autostart ();
+ void set_desired_sample_rate (uint32_t);
+ bool try_autostart ();
private:
- Gtk::Notebook notebook;
-
- Gtk::Label engine_status;
-
- /* core fields used by all backends */
-
- Gtk::Table basic_packer;
- Gtk::HBox basic_hbox;
- Gtk::VBox basic_vbox;
-
- Gtk::ComboBoxText backend_combo;
- Gtk::ComboBoxText driver_combo;
- Gtk::ComboBoxText device_combo;
- Gtk::ComboBoxText input_device_combo;
- Gtk::ComboBoxText output_device_combo;
- Gtk::ComboBoxText sample_rate_combo;
- Gtk::ComboBoxText midi_option_combo;
- Gtk::ComboBoxText buffer_size_combo;
- Gtk::Label buffer_size_duration_label;
- Gtk::ComboBoxText nperiods_combo;
- Gtk::Adjustment input_latency_adjustment;
- Gtk::SpinButton input_latency;
- Gtk::Adjustment output_latency_adjustment;
- Gtk::SpinButton output_latency;
- Gtk::Adjustment input_channels_adjustment;
- Gtk::SpinButton input_channels;
- Gtk::Adjustment output_channels_adjustment;
- Gtk::SpinButton output_channels;
- Gtk::Adjustment ports_adjustment;
- Gtk::SpinButton ports_spinner;
-
- Gtk::Label have_control_text;
- ArdourButton control_app_button;
- ArdourButton midi_devices_button;
- ArdourButton start_stop_button;
- ArdourButton update_devices_button;
- ArdourButton use_buffered_io_button;
-
- Gtk::Button connect_disconnect_button;
-
- /* latency measurement */
-
- Gtk::ComboBoxText lm_output_channel_combo;
- Gtk::ComboBoxText lm_input_channel_combo;
- Gtk::Label lm_measure_label;
- Gtk::Button lm_measure_button;
- Gtk::Button lm_use_button;
- Gtk::Button lm_back_button;
- ArdourButton lm_button_audio;
- Gtk::Label lm_title;
- Gtk::Label lm_preamble;
- Gtk::Label lm_results;
- Gtk::Table lm_table;
- Gtk::VBox lm_vbox;
- bool have_lm_results;
- bool lm_running;
-
- /* MIDI Tab */
-
- Gtk::VBox midi_vbox;
- Gtk::Button midi_back_button;
- Gtk::Table midi_device_table;
-
- /* MIDI ... JACK */
-
- Gtk::CheckButton aj_button;
-
- uint32_t ignore_changes; // state save/load
- uint32_t ignore_device_changes; // AudioEngine::DeviceListChanged
- uint32_t _desired_sample_rate;
- bool started_at_least_once;
- bool queue_device_changed;
-
- void driver_changed ();
- void backend_changed ();
- void sample_rate_changed ();
- void buffer_size_changed ();
- void nperiods_changed ();
- void parameter_changed ();
- void midi_option_changed ();
-
- void setup_midi_tab_for_backend ();
- void setup_midi_tab_for_jack ();
- void refresh_midi_display (std::string focus = "");
+ Gtk::Notebook notebook;
+
+ Gtk::Label engine_status;
+
+ /* core fields used by all backends */
+
+ Gtk::Table basic_packer;
+ Gtk::HBox basic_hbox;
+ Gtk::VBox basic_vbox;
+
+ Gtk::ComboBoxText backend_combo;
+ Gtk::ComboBoxText driver_combo;
+ Gtk::ComboBoxText device_combo;
+ Gtk::ComboBoxText input_device_combo;
+ Gtk::ComboBoxText output_device_combo;
+ Gtk::ComboBoxText sample_rate_combo;
+ Gtk::ComboBoxText midi_option_combo;
+ Gtk::ComboBoxText buffer_size_combo;
+ Gtk::Label buffer_size_duration_label;
+ Gtk::ComboBoxText nperiods_combo;
+ Gtk::Adjustment input_latency_adjustment;
+ Gtk::SpinButton input_latency;
+ Gtk::Adjustment output_latency_adjustment;
+ Gtk::SpinButton output_latency;
+ Gtk::Adjustment input_channels_adjustment;
+ Gtk::SpinButton input_channels;
+ Gtk::Adjustment output_channels_adjustment;
+ Gtk::SpinButton output_channels;
+ Gtk::Adjustment ports_adjustment;
+ Gtk::SpinButton ports_spinner;
+
+ Gtk::Label have_control_text;
+ ArdourButton control_app_button;
+ ArdourButton midi_devices_button;
+ ArdourButton start_stop_button;
+ ArdourButton update_devices_button;
+ ArdourButton use_buffered_io_button;
+
+ Gtk::Button connect_disconnect_button;
+
+ /* latency measurement */
+
+ Gtk::ComboBoxText lm_output_channel_combo;
+ Gtk::ComboBoxText lm_input_channel_combo;
+ Gtk::Label lm_measure_label;
+ Gtk::Button lm_measure_button;
+ Gtk::Button lm_use_button;
+ Gtk::Button lm_back_button;
+ ArdourButton lm_button_audio;
+ Gtk::Label lm_title;
+ Gtk::Label lm_preamble;
+ Gtk::Label lm_results;
+ Gtk::Table lm_table;
+ Gtk::VBox lm_vbox;
+ bool have_lm_results;
+ bool lm_running;
+
+ /* MIDI Tab */
+
+ Gtk::VBox midi_vbox;
+ Gtk::Button midi_back_button;
+ Gtk::Table midi_device_table;
+
+ /* MIDI ... JACK */
+
+ Gtk::CheckButton aj_button;
+
+ uint32_t ignore_changes; // state save/load
+ uint32_t ignore_device_changes; // AudioEngine::DeviceListChanged
+ uint32_t _desired_sample_rate;
+ bool started_at_least_once;
+ bool queue_device_changed;
+
+ void driver_changed ();
+ void backend_changed ();
+ void sample_rate_changed ();
+ void buffer_size_changed ();
+ void nperiods_changed ();
+ void parameter_changed ();
+ void midi_option_changed ();
+
+ void setup_midi_tab_for_backend ();
+ void setup_midi_tab_for_jack ();
+ void refresh_midi_display (std::string focus = "");
void update_midi_options ();
@@ -148,67 +148,67 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
std::vector<float> get_sample_rates_for_all_devices ();
std::vector<uint32_t> get_buffer_sizes_for_all_devices ();
- float get_rate() const;
- uint32_t get_buffer_size() const;
- uint32_t get_nperiods() const;
- uint32_t get_input_channels() const;
- uint32_t get_output_channels() const;
- uint32_t get_input_latency() const;
- uint32_t get_output_latency() const;
- std::string get_device_name() const;
- std::string get_input_device_name() const;
- std::string get_output_device_name() const;
- std::string get_driver() const;
- std::string get_backend() const;
- std::string get_midi_option () const;
- bool get_use_buffered_io () const;
+ float get_rate() const;
+ uint32_t get_buffer_size() const;
+ uint32_t get_nperiods() const;
+ uint32_t get_input_channels() const;
+ uint32_t get_output_channels() const;
+ uint32_t get_input_latency() const;
+ uint32_t get_output_latency() const;
+ std::string get_device_name() const;
+ std::string get_input_device_name() const;
+ std::string get_output_device_name() const;
+ std::string get_driver() const;
+ std::string get_backend() const;
+ std::string get_midi_option () const;
+ bool get_use_buffered_io () const;
std::string get_default_device (const std::string&,
const std::vector<std::string>&);
- void device_changed ();
- void input_device_changed ();
- void output_device_changed ();
- bool set_driver_popdown_strings ();
- bool set_device_popdown_strings ();
- bool set_input_device_popdown_strings ();
- bool set_output_device_popdown_strings ();
- void set_samplerate_popdown_strings ();
- void set_buffersize_popdown_strings ();
- void set_nperiods_popdown_strings ();
- void list_devices ();
- void show_buffer_duration ();
-
- void configure_midi_devices ();
-
- struct MidiDeviceSetting {
+ void device_changed ();
+ void input_device_changed ();
+ void output_device_changed ();
+ bool set_driver_popdown_strings ();
+ bool set_device_popdown_strings ();
+ bool set_input_device_popdown_strings ();
+ bool set_output_device_popdown_strings ();
+ void set_samplerate_popdown_strings ();
+ void set_buffersize_popdown_strings ();
+ void set_nperiods_popdown_strings ();
+ void list_devices ();
+ void show_buffer_duration ();
+
+ void configure_midi_devices ();
+
+ struct MidiDeviceSetting {
std::string name;
bool enabled;
uint32_t input_latency;
uint32_t output_latency;
MidiDeviceSetting (std::string n, bool en = true, uint32_t inl = 0, uint32_t oul = 0)
- : name (n)
- , enabled (en)
- , input_latency (inl)
- , output_latency (oul)
+ : name (n)
+ , enabled (en)
+ , input_latency (inl)
+ , output_latency (oul)
{}
- };
+ };
- typedef boost::shared_ptr<MidiDeviceSetting> MidiDeviceSettings;
- bool _can_set_midi_latencies;
- std::vector<MidiDeviceSettings> _midi_devices;
+ typedef boost::shared_ptr<MidiDeviceSetting> MidiDeviceSettings;
+ bool _can_set_midi_latencies;
+ std::vector<MidiDeviceSettings> _midi_devices;
- MidiDeviceSettings find_midi_device(std::string devicename) const {
+ MidiDeviceSettings find_midi_device(std::string devicename) const {
for (std::vector<MidiDeviceSettings>::const_iterator p = _midi_devices.begin(); p != _midi_devices.end(); ++p) {
- if ((*p)->name == devicename) {
+ if ((*p)->name == devicename) {
return *p;
- }
+ }
}
return MidiDeviceSettings();
- }
+ }
- struct StateStruct {
+ struct StateStruct {
std::string backend;
std::string driver;
std::string device;
@@ -238,38 +238,38 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
, use_buffered_io (false)
, lru (0) {}
- };
-
- typedef boost::shared_ptr<StateStruct> State;
- typedef std::list<State> StateList;
- static bool state_sort_cmp (const State &a, const State &b);
-
- StateList states;
+ };
- State get_matching_state (const std::string& backend);
- State get_matching_state (const std::string& backend,
- const std::string& driver,
- const std::string& device);
- State get_matching_state (const std::string& backend,
- const std::string& driver,
- const std::string& input_device,
- const std::string& output_device);
- State get_saved_state_for_currently_displayed_backend_and_device ();
- void maybe_display_saved_state ();
- State save_state ();
- void store_state (State);
- bool equivalent_states (const State&, const State&);
+ typedef boost::shared_ptr<StateStruct> State;
+ typedef std::list<State> StateList;
+ static bool state_sort_cmp (const State &a, const State &b);
+
+ StateList states;
+
+ State get_matching_state (const std::string& backend);
+ State get_matching_state (const std::string& backend,
+ const std::string& driver,
+ const std::string& device);
+ State get_matching_state (const std::string& backend,
+ const std::string& driver,
+ const std::string& input_device,
+ const std::string& output_device);
+ State get_saved_state_for_currently_displayed_backend_and_device ();
+ void maybe_display_saved_state ();
+ State save_state ();
+ void store_state (State);
+ bool equivalent_states (const State&, const State&);
bool set_current_state (const State& state);
void set_default_state ();
- bool _have_control;
+ bool _have_control;
- static bool print_channel_count (Gtk::SpinButton*);
+ static bool print_channel_count (Gtk::SpinButton*);
- void build_notebook ();
- void build_full_control_notebook ();
- void build_no_control_notebook ();
+ void build_notebook ();
+ void build_full_control_notebook ();
+ void build_no_control_notebook ();
void connect_changed_signals ();
void block_changed_signals ();
@@ -303,50 +303,50 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
sigc::connection input_channels_connection;
sigc::connection output_channels_connection;
- void on_show ();
- void on_map ();
- void control_app_button_clicked ();
- void start_stop_button_clicked ();
- void update_devices_button_clicked ();
- void use_buffered_io_button_clicked ();
- void use_latency_button_clicked ();
- void manage_control_app_sensitivity ();
- int push_state_to_backend (bool start);
- void post_push ();
- void update_sensitivity ();
+ void on_show ();
+ void on_map ();
+ void control_app_button_clicked ();
+ void start_stop_button_clicked ();
+ void update_devices_button_clicked ();
+ void use_buffered_io_button_clicked ();
+ void use_latency_button_clicked ();
+ void manage_control_app_sensitivity ();
+ int push_state_to_backend (bool start);
+ void post_push ();
+ void update_sensitivity ();
bool start_engine ();
bool stop_engine (bool for_latency = false);
- /* latency measurement */
- void latency_button_clicked ();
- void latency_back_button_clicked ();
- bool check_audio_latency_measurement ();
- bool check_midi_latency_measurement ();
- sigc::connection latency_timeout;
- void enable_latency_tab ();
- void disable_latency_tab ();
- void start_latency_detection ();
- void end_latency_detection ();
-
- void on_switch_page (GtkNotebookPage*, guint page_num);
- bool on_delete_event (GdkEventAny*);
-
- void engine_running ();
- void engine_stopped ();
- void device_list_changed ();
-
- PBD::ScopedConnection running_connection;
- PBD::ScopedConnectionList stopped_connection;
- PBD::ScopedConnection devicelist_connection;
-
- void connect_disconnect_click ();
- void calibrate_audio_latency ();
- void calibrate_midi_latency (MidiDeviceSettings);
-
- MidiDeviceSettings _measure_midi;
- void midi_latency_adjustment_changed(Gtk::Adjustment *, MidiDeviceSettings, bool);
- void midi_device_enabled_toggled(ArdourButton *, MidiDeviceSettings);
- sigc::connection lm_back_button_signal;
+ /* latency measurement */
+ void latency_button_clicked ();
+ void latency_back_button_clicked ();
+ bool check_audio_latency_measurement ();
+ bool check_midi_latency_measurement ();
+ sigc::connection latency_timeout;
+ void enable_latency_tab ();
+ void disable_latency_tab ();
+ void start_latency_detection ();
+ void end_latency_detection ();
+
+ void on_switch_page (GtkNotebookPage*, guint page_num);
+ bool on_delete_event (GdkEventAny*);
+
+ void engine_running ();
+ void engine_stopped ();
+ void device_list_changed ();
+
+ PBD::ScopedConnection running_connection;
+ PBD::ScopedConnectionList stopped_connection;
+ PBD::ScopedConnection devicelist_connection;
+
+ void connect_disconnect_click ();
+ void calibrate_audio_latency ();
+ void calibrate_midi_latency (MidiDeviceSettings);
+
+ MidiDeviceSettings _measure_midi;
+ void midi_latency_adjustment_changed(Gtk::Adjustment *, MidiDeviceSettings, bool);
+ void midi_device_enabled_toggled(ArdourButton *, MidiDeviceSettings);
+ sigc::connection lm_back_button_signal;
};
#endif /* __gtk2_ardour_engine_dialog_h__ */
diff --git a/gtk2_ardour/enums.cc b/gtk2_ardour/enums.cc
index 4f164c5f32..2f141d23a9 100644
--- a/gtk2_ardour/enums.cc
+++ b/gtk2_ardour/enums.cc
@@ -168,8 +168,8 @@ setup_gtk_ardour_enums ()
REGISTER_ENUM (FadeOutHandleItem);
REGISTER_ENUM (NoteItem);
REGISTER_ENUM (FeatureLineItem);
- REGISTER_ENUM (LeftFrameHandle);
- REGISTER_ENUM (RightFrameHandle);
+ REGISTER_ENUM (LeftFrameHandle);
+ REGISTER_ENUM (RightFrameHandle);
REGISTER_ENUM (StartCrossFadeItem);
REGISTER_ENUM (EndCrossFadeItem);
REGISTER_ENUM (CrossfadeViewItem);
diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc
index 347882501c..9043da3124 100644
--- a/gtk2_ardour/export_channel_selector.cc
+++ b/gtk2_ardour/export_channel_selector.cc
@@ -238,7 +238,7 @@ PortExportChannelSelector::ChannelTreeView::set_config (ChannelConfigPtr c)
for (Gtk::ListStore::Children::const_iterator p_it = port_list->children().begin(); p_it != port_list->children().end(); ++p_it) {
route_ports.insert ((*p_it)->get_value (route_cols.port_cols.port));
port_labels.insert (make_pair ((*p_it)->get_value (route_cols.port_cols.port),
- (*p_it)->get_value (route_cols.port_cols.label)));
+ (*p_it)->get_value (route_cols.port_cols.label)));
}
std::set_intersection (pec->get_ports().begin(), pec->get_ports().end(),
@@ -455,15 +455,15 @@ RegionExportChannelSelector::RegionExportChannelSelector (ARDOUR::Session * _ses
ProfileManagerPtr manager,
ARDOUR::AudioRegion const & region,
ARDOUR::AudioTrack & track) :
- ExportChannelSelector (_session, manager),
- region (region),
- track (track),
- region_chans (region.n_channels()),
- track_chans (track.n_outputs().n_audio()),
-
- raw_button (type_group),
- fades_button (type_group),
- processed_button (type_group)
+ ExportChannelSelector (_session, manager),
+ region (region),
+ track (track),
+ region_chans (region.n_channels()),
+ track_chans (track.n_outputs().n_audio()),
+
+ raw_button (type_group),
+ fades_button (type_group),
+ processed_button (type_group)
{
pack_start (vbox);
diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h
index 6edb797438..c45349f7c9 100644
--- a/gtk2_ardour/export_dialog.h
+++ b/gtk2_ardour/export_dialog.h
@@ -124,12 +124,12 @@ class ExportDialog : public ArdourDialog, public PBD::ScopedConnectionList
Gtk::HBox warn_hbox;
Gtk::Label warn_label;
- std::string warn_string;
+ std::string warn_string;
Gtk::HBox list_files_hbox;
Gtk::Label list_files_label;
Gtk::Button list_files_button;
- std::string list_files_string;
+ std::string list_files_string;
void add_error (std::string const & text);
void add_warning (std::string const & text);
diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc
index deeeba8828..a7ad061093 100644
--- a/gtk2_ardour/export_file_notebook.cc
+++ b/gtk2_ardour/export_file_notebook.cc
@@ -198,15 +198,15 @@ ExportFileNotebook::handle_page_change (GtkNotebookPage*, uint32_t page)
ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager, ExportFileNotebook * parent, uint32_t number,
ExportProfileManager::FormatStatePtr format_state,
ExportProfileManager::FilenameStatePtr filename_state) :
- format_state (format_state),
- filename_state (filename_state),
- profile_manager (profile_manager),
-
- format_label (_("Format"), Gtk::ALIGN_LEFT),
- filename_label (_("Location"), Gtk::ALIGN_LEFT),
- soundcloud_upload_button (_("Upload to Soundcloud")),
- analysis_button (_("Analyze Exported Audio")),
- tab_number (number)
+ format_state (format_state),
+ filename_state (filename_state),
+ profile_manager (profile_manager),
+
+ format_label (_("Format"), Gtk::ALIGN_LEFT),
+ filename_label (_("Location"), Gtk::ALIGN_LEFT),
+ soundcloud_upload_button (_("Upload to Soundcloud")),
+ analysis_button (_("Analyze Exported Audio")),
+ tab_number (number)
{
set_border_width (12);
diff --git a/gtk2_ardour/gprofhelper.c b/gtk2_ardour/gprofhelper.c
index b806a073c6..2732f76033 100644
--- a/gtk2_ardour/gprofhelper.c
+++ b/gtk2_ardour/gprofhelper.c
@@ -33,50 +33,50 @@ static int (*pthread_create_orig)(pthread_t *__restrict,
/* Library initialization function */
void _init(void)
{
- pthread_create_orig = dlsym(RTLD_NEXT, "pthread_create");
- fprintf(stderr, "pthreads: using profiling hooks for gprof\n");
- if(pthread_create_orig == NULL)
- {
- char *error = dlerror();
- if(error == NULL)
- {
- error = "pthread_create is NULL";
- }
- fprintf(stderr, "%s", error);
- exit(EXIT_FAILURE);
- }
+ pthread_create_orig = dlsym(RTLD_NEXT, "pthread_create");
+ fprintf(stderr, "pthreads: using profiling hooks for gprof\n");
+ if(pthread_create_orig == NULL)
+ {
+ char *error = dlerror();
+ if(error == NULL)
+ {
+ error = "pthread_create is NULL";
+ }
+ fprintf(stderr, "%s", error);
+ exit(EXIT_FAILURE);
+ }
}
/* Our data structure passed to the wrapper */
typedef struct wrapper_s
{
- void * (*start_routine)(void *);
- void * arg;
+ void * (*start_routine)(void *);
+ void * arg;
- pthread_mutex_t lock;
- pthread_cond_t wait;
+ pthread_mutex_t lock;
+ pthread_cond_t wait;
- struct itimerval itimer;
+ struct itimerval itimer;
} wrapper_t;
/* The wrapper function in charge for setting the itimer value */
static void * wrapper_routine(void * data)
{
- /* Put user data in thread-local variables */
- void * (*start_routine)(void *) = ((wrapper_t*)data)->start_routine;
- void * arg = ((wrapper_t*)data)->arg;
+ /* Put user data in thread-local variables */
+ void * (*start_routine)(void *) = ((wrapper_t*)data)->start_routine;
+ void * arg = ((wrapper_t*)data)->arg;
- /* Set the profile timer value */
- setitimer(ITIMER_PROF, &((wrapper_t*)data)->itimer, NULL);
+ /* Set the profile timer value */
+ setitimer(ITIMER_PROF, &((wrapper_t*)data)->itimer, NULL);
- /* Tell the calling thread that we don't need its data anymore */
- pthread_mutex_lock(&((wrapper_t*)data)->lock);
- pthread_cond_signal(&((wrapper_t*)data)->wait);
- pthread_mutex_unlock(&((wrapper_t*)data)->lock);
+ /* Tell the calling thread that we don't need its data anymore */
+ pthread_mutex_lock(&((wrapper_t*)data)->lock);
+ pthread_cond_signal(&((wrapper_t*)data)->wait);
+ pthread_mutex_unlock(&((wrapper_t*)data)->lock);
- /* Call the real function */
- return start_routine(arg);
+ /* Call the real function */
+ return start_routine(arg);
}
/* Our wrapper function for the real pthread_create() */
@@ -85,33 +85,33 @@ int pthread_create(pthread_t *__restrict thread,
void * (*start_routine)(void *),
void *__restrict arg)
{
- wrapper_t wrapper_data;
- int i_return;
-
- /* Initialize the wrapper structure */
- wrapper_data.start_routine = start_routine;
- wrapper_data.arg = arg;
- getitimer(ITIMER_PROF, &wrapper_data.itimer);
- pthread_cond_init(&wrapper_data.wait, NULL);
- pthread_mutex_init(&wrapper_data.lock, NULL);
- pthread_mutex_lock(&wrapper_data.lock);
-
- /* The real pthread_create call */
- i_return = pthread_create_orig(thread,
+ wrapper_t wrapper_data;
+ int i_return;
+
+ /* Initialize the wrapper structure */
+ wrapper_data.start_routine = start_routine;
+ wrapper_data.arg = arg;
+ getitimer(ITIMER_PROF, &wrapper_data.itimer);
+ pthread_cond_init(&wrapper_data.wait, NULL);
+ pthread_mutex_init(&wrapper_data.lock, NULL);
+ pthread_mutex_lock(&wrapper_data.lock);
+
+ /* The real pthread_create call */
+ i_return = pthread_create_orig(thread,
attr,
&wrapper_routine,
&wrapper_data);
- /* If the thread was successfully spawned, wait for the data
- * to be released */
- if(i_return == 0)
- {
- pthread_cond_wait(&wrapper_data.wait, &wrapper_data.lock);
- }
+ /* If the thread was successfully spawned, wait for the data
+ * to be released */
+ if(i_return == 0)
+ {
+ pthread_cond_wait(&wrapper_data.wait, &wrapper_data.lock);
+ }
- pthread_mutex_unlock(&wrapper_data.lock);
- pthread_mutex_destroy(&wrapper_data.lock);
- pthread_cond_destroy(&wrapper_data.wait);
+ pthread_mutex_unlock(&wrapper_data.lock);
+ pthread_mutex_destroy(&wrapper_data.lock);
+ pthread_cond_destroy(&wrapper_data.wait);
- return i_return;
+ return i_return;
}
diff --git a/gtk2_ardour/group_tabs.h b/gtk2_ardour/group_tabs.h
index fa32f7cf8d..cdbcf52a4f 100644
--- a/gtk2_ardour/group_tabs.h
+++ b/gtk2_ardour/group_tabs.h
@@ -48,7 +48,7 @@ public:
void set_session (ARDOUR::Session *);
/** @param g Route group, or 0.
- * @return Menu to be popped up on right-click over the given route group.
+ * @return Menu to be popped up on right-click over the given route group.
*/
Gtk::Menu* get_menu (ARDOUR::RouteGroup* g, bool tabArea = false);
@@ -110,7 +110,7 @@ private:
void set_activation (ARDOUR::RouteGroup *, bool);
void edit_group (ARDOUR::RouteGroup *);
void subgroup (ARDOUR::RouteGroup *, bool, ARDOUR::Placement);
- void un_subgroup (ARDOUR::RouteGroup *);
+ void un_subgroup (ARDOUR::RouteGroup *);
void activate_all ();
void disable_all ();
void remove_group (ARDOUR::RouteGroup *);
diff --git a/gtk2_ardour/gtk_pianokeyboard.c b/gtk2_ardour/gtk_pianokeyboard.c
index 2be8cdf2b6..96742d7462 100644
--- a/gtk2_ardour/gtk_pianokeyboard.c
+++ b/gtk2_ardour/gtk_pianokeyboard.c
@@ -367,7 +367,7 @@ keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer ignored)
GdkKeymapKey kk;
PianoKeyboard *pk = PIANO_KEYBOARD(mk);
- (void) ignored;
+ (void) ignored;
/* We're not using event->keyval, because we need keyval with level set to 0.
E.g. if user holds Shift and presses '7', we want to get a '7', not '&'. */
@@ -449,7 +449,7 @@ mouse_button_event_handler(PianoKeyboard *pk, GdkEventButton *event, gpointer ig
int note = get_note_for_xy(pk, x, y);
- (void) ignored;
+ (void) ignored;
if (event->button != 1)
return TRUE;
@@ -488,7 +488,7 @@ mouse_motion_event_handler(PianoKeyboard *pk, GdkEventMotion *event, gpointer ig
{
int note;
- (void) ignored;
+ (void) ignored;
if ((event->state & GDK_BUTTON1_MASK) == 0)
return TRUE;
@@ -542,7 +542,7 @@ piano_keyboard_expose(GtkWidget *widget, GdkEventExpose *event)
static void
piano_keyboard_size_request(GtkWidget* w, GtkRequisition *requisition)
{
- (void) w;
+ (void) w;
requisition->width = PIANO_KEYBOARD_DEFAULT_WIDTH;
requisition->height = PIANO_KEYBOARD_DEFAULT_HEIGHT;
@@ -625,8 +625,8 @@ piano_keyboard_class_init(PianoKeyboardClass *klass)
0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
piano_keyboard_signals[REST_SIGNAL] = g_signal_new ("rest",
- G_TYPE_FROM_CLASS (klass), (GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION),
- 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ G_TYPE_FROM_CLASS (klass), (GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION),
+ 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
widget_klass = (GtkWidgetClass*) klass;
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index 6d0ede316c..99050cc34b 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -141,15 +141,15 @@ IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
return;
}
- if (s) {
+ if (s) {
if (!f->connected_to (*j)) {
_io->connect (f, *j, 0);
}
- } else {
+ } else {
if (f->connected_to (*j)) {
_io->disconnect (f, *j, 0);
}
- }
+ }
}
}
}
diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h
index bba42e919d..fe47f28bca 100644
--- a/gtk2_ardour/io_selector.h
+++ b/gtk2_ardour/io_selector.h
@@ -34,7 +34,7 @@ class IOSelector : public PortMatrix
std::string disassociation_verb () const;
std::string channel_noun () const;
- ARDOUR::Session* session() const { return _session; }
+ ARDOUR::Session* session() const { return _session; }
uint32_t n_io_ports () const;
boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
diff --git a/gtk2_ardour/level_meter.h b/gtk2_ardour/level_meter.h
index 9b2a648b01..917a0089b6 100644
--- a/gtk2_ardour/level_meter.h
+++ b/gtk2_ardour/level_meter.h
@@ -87,19 +87,19 @@ class LevelMeterBase : public ARDOUR::SessionHandlePtr, virtual public sigc::tra
Width _width;
struct MeterInfo {
- Gtkmm2ext::FastMeter *meter;
- gint16 width;
+ Gtkmm2ext::FastMeter *meter;
+ gint16 width;
int length;
- bool packed;
- float max_peak;
-
- MeterInfo() {
- meter = 0;
- width = 0;
- length = 0;
- packed = false;
- max_peak = -INFINITY;
- }
+ bool packed;
+ float max_peak;
+
+ MeterInfo() {
+ meter = 0;
+ width = 0;
+ length = 0;
+ packed = false;
+ max_peak = -INFINITY;
+ }
};
guint16 regular_meter_width;
diff --git a/gtk2_ardour/luadialog.cc b/gtk2_ardour/luadialog.cc
index 295fa372f7..93c55261ad 100644
--- a/gtk2_ardour/luadialog.cc
+++ b/gtk2_ardour/luadialog.cc
@@ -642,7 +642,7 @@ Dialog::run (lua_State *L)
case Gtk::RESPONSE_ACCEPT:
break;
default:
- lua_pushnil (L);
+ lua_pushnil (L);
return 1;
}
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index 15ef13fa4e..0b52d144db 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -479,7 +479,7 @@ ArdourMarker::show ()
{
_shown = true;
- group->show ();
+ group->show ();
setup_line ();
}
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index e23c79b4bb..a99efc81c2 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -108,7 +108,7 @@ class ArdourMarker : public sigc::trackable
ArdourCanvas::Container* _parent;
ArdourCanvas::Container *group;
ArdourCanvas::Polygon *mark;
- ArdourCanvas::Text *_name_item;
+ ArdourCanvas::Text *_name_item;
ArdourCanvas::Points *points;
ArdourCanvas::Line* _track_canvas_line;
ArdourCanvas::Rectangle* _name_background;
@@ -142,7 +142,7 @@ private:
class TempoMarker : public ArdourMarker
{
public:
- TempoMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, ARDOUR::TempoSection&);
+ TempoMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, ARDOUR::TempoSection&);
~TempoMarker ();
ARDOUR::TempoSection& tempo() const { return _tempo; }
@@ -155,7 +155,7 @@ class TempoMarker : public ArdourMarker
class MeterMarker : public ArdourMarker
{
public:
- MeterMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, ARDOUR::MeterSection&);
+ MeterMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, ARDOUR::MeterSection&);
~MeterMarker ();
ARDOUR::MeterSection& meter() const { return _meter; }
diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc
index a5b0377358..d800e846c5 100644
--- a/gtk2_ardour/midi_channel_selector.cc
+++ b/gtk2_ardour/midi_channel_selector.cc
@@ -85,8 +85,8 @@ MidiChannelSelector::~MidiChannelSelector()
bool
MidiChannelSelector::was_clicked (GdkEventButton*)
{
- clicked ();
- return false;
+ clicked ();
+ return false;
}
void
@@ -360,16 +360,16 @@ MidiChannelSelectorWindow::build ()
VBox* vpacker;
HBox* capture_controls;
HBox* playback_controls;
- Button* b;
- Label* l;
+ Button* b;
+ Label* l;
- vpacker = manage (new VBox);
- vpacker->set_spacing (6);
- vpacker->set_border_width (12);
+ vpacker = manage (new VBox);
+ vpacker->set_spacing (6);
+ vpacker->set_border_width (12);
- l = manage (new Label (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Inbound"))));
+ l = manage (new Label (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Inbound"))));
l->set_use_markup (true);
- vpacker->pack_start (*l, true, true);
+ vpacker->pack_start (*l, true, true);
vpacker->pack_start (capture_all_button);
capture_all_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), AllChannels));
@@ -380,35 +380,35 @@ MidiChannelSelectorWindow::build ()
vpacker->pack_start (capture_force_button);
capture_force_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), ForceChannel));
- vpacker->pack_start (capture_mask_box);
+ vpacker->pack_start (capture_mask_box);
capture_controls = manage (new HBox);
capture_controls->set_spacing (6);
- b = manage (new Button (_("All")));
+ b = manage (new Button (_("All")));
Gtkmm2ext::UI::instance()->set_tip (*b, _("Click to enable recording all channels"));
capture_controls->pack_start (*b);
capture_mask_controls.push_back (b);
b->signal_clicked().connect (sigc::mem_fun (*this, &MidiChannelSelectorWindow::fill_capture_mask));
- b = manage (new Button (_("None")));
+ b = manage (new Button (_("None")));
Gtkmm2ext::UI::instance()->set_tip (*b, _("Click to disable recording all channels"));
capture_controls->pack_start (*b);
capture_mask_controls.push_back (b);
b->signal_clicked().connect (sigc::mem_fun (*this, &MidiChannelSelectorWindow::zero_capture_mask));
- b = manage (new Button (_("Invert")));
+ b = manage (new Button (_("Invert")));
Gtkmm2ext::UI::instance()->set_tip (*b, _("Click to invert currently selected recording channels"));
capture_controls->pack_start (*b);
capture_mask_controls.push_back (b);
b->signal_clicked().connect (sigc::mem_fun (*this, &MidiChannelSelectorWindow::invert_capture_mask));
- vpacker->pack_start (*capture_controls);
+ vpacker->pack_start (*capture_controls);
Gtk::HSeparator *hseparator2 = manage(new Gtk::HSeparator);
vpacker->pack_start (*hseparator2, false, false, 6);
- l = manage (new Label (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Playback"))));
+ l = manage (new Label (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Playback"))));
l->set_use_markup (true);
- vpacker->pack_start (*l);
+ vpacker->pack_start (*l);
vpacker->pack_start (playback_all_button);
playback_all_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), AllChannels));
@@ -424,12 +424,12 @@ MidiChannelSelectorWindow::build ()
playback_controls = manage (new HBox);
playback_controls->set_spacing (6);
- b = manage (new Button (_("All")));
+ b = manage (new Button (_("All")));
Gtkmm2ext::UI::instance()->set_tip (*b, _("Click to enable playback of all channels"));
playback_controls->pack_start (*b);
playback_mask_controls.push_back (b);
b->signal_clicked().connect (sigc::mem_fun (*this, &MidiChannelSelectorWindow::fill_playback_mask));
- b = manage (new Button (_("None")));
+ b = manage (new Button (_("None")));
Gtkmm2ext::UI::instance()->set_tip (*b, _("Click to disable playback of all channels"));
playback_controls->pack_start (*b);
playback_mask_controls.push_back (b);
@@ -440,9 +440,9 @@ MidiChannelSelectorWindow::build ()
playback_mask_controls.push_back (b);
b->signal_clicked().connect (sigc::mem_fun (*this, &MidiChannelSelectorWindow::invert_playback_mask));
- vpacker->pack_start (*playback_controls);
+ vpacker->pack_start (*playback_controls);
- add (*vpacker);
+ add (*vpacker);
}
void
diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h
index 3ec2cfbd2c..56a3f3b7c4 100644
--- a/gtk2_ardour/midi_channel_selector.h
+++ b/gtk2_ardour/midi_channel_selector.h
@@ -42,141 +42,141 @@ namespace ARDOUR {
class MidiChannelSelector : public Gtk::Table
{
public:
- MidiChannelSelector(int n_rows = 4, int n_columns = 4, int start_row = 0, int start_column = 0);
- virtual ~MidiChannelSelector() = 0;
+ MidiChannelSelector(int n_rows = 4, int n_columns = 4, int start_row = 0, int start_column = 0);
+ virtual ~MidiChannelSelector() = 0;
- sigc::signal<void> clicked;
+ sigc::signal<void> clicked;
- void set_channel_colors(const uint32_t new_channel_colors[16]);
- void set_default_channel_color();
+ void set_channel_colors(const uint32_t new_channel_colors[16]);
+ void set_default_channel_color();
protected:
- virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr) = 0;
- Gtk::Label _button_labels[4][4];
- Gtkmm2ext::StatefulToggleButton _buttons[4][4];
- int _recursion_counter;
+ virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr) = 0;
+ Gtk::Label _button_labels[4][4];
+ Gtkmm2ext::StatefulToggleButton _buttons[4][4];
+ int _recursion_counter;
- bool was_clicked (GdkEventButton*);
+ bool was_clicked (GdkEventButton*);
};
class SingleMidiChannelSelector : public MidiChannelSelector
{
public:
- SingleMidiChannelSelector(uint8_t active_channel = 0);
+ SingleMidiChannelSelector(uint8_t active_channel = 0);
- uint8_t get_active_channel() const { return _active_channel; }
+ uint8_t get_active_channel() const { return _active_channel; }
- sigc::signal<void, uint8_t> channel_selected;
+ sigc::signal<void, uint8_t> channel_selected;
protected:
- virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
+ virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
- Gtk::ToggleButton* _last_active_button;
- uint8_t _active_channel;
+ Gtk::ToggleButton* _last_active_button;
+ uint8_t _active_channel;
};
class MidiMultipleChannelSelector : public MidiChannelSelector
{
public:
- MidiMultipleChannelSelector(ARDOUR::ChannelMode mode = ARDOUR::FilterChannels,
+ MidiMultipleChannelSelector(ARDOUR::ChannelMode mode = ARDOUR::FilterChannels,
uint16_t initial_selection = 0xFFFF);
- virtual ~MidiMultipleChannelSelector();
+ virtual ~MidiMultipleChannelSelector();
- /** The channel mode or selected channel(s) has changed.
- * First parameter is the new channel mode, second parameter is a bitmask
- * of the currently selected channels.
- */
- sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
+ /** The channel mode or selected channel(s) has changed.
+ * First parameter is the new channel mode, second parameter is a bitmask
+ * of the currently selected channels.
+ */
+ sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
- void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
- ARDOUR::ChannelMode get_channel_mode () const { return _channel_mode; }
+ void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
+ ARDOUR::ChannelMode get_channel_mode () const { return _channel_mode; }
- /**
- * @return each bit in the returned word represents a midi channel, eg.
- * bit 0 represents channel 0 and bit 15 represents channel 15
- *
- */
- uint16_t get_selected_channels() const;
- void set_selected_channels(uint16_t selected_channels);
+ /**
+ * @return each bit in the returned word represents a midi channel, eg.
+ * bit 0 represents channel 0 and bit 15 represents channel 15
+ *
+ */
+ uint16_t get_selected_channels() const;
+ void set_selected_channels(uint16_t selected_channels);
protected:
- ARDOUR::ChannelMode _channel_mode;
- ARDOUR::NoteMode _note_mode;
+ ARDOUR::ChannelMode _channel_mode;
+ ARDOUR::NoteMode _note_mode;
- virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
- void force_channels_button_toggled();
+ virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
+ void force_channels_button_toggled();
- void select_all(bool on);
- void invert_selection(void);
+ void select_all(bool on);
+ void invert_selection(void);
- Gtk::Button _select_all;
- Gtk::Button _select_none;
- Gtk::Button _invert_selection;
- Gtk::ToggleButton _force_channel;
+ Gtk::Button _select_all;
+ Gtk::Button _select_none;
+ Gtk::Button _invert_selection;
+ Gtk::ToggleButton _force_channel;
};
class MidiChannelSelectorWindow : public ArdourWindow, public PBD::ScopedConnectionList
{
public:
- MidiChannelSelectorWindow (boost::shared_ptr<ARDOUR::MidiTrack>);
- ~MidiChannelSelectorWindow ();
+ MidiChannelSelectorWindow (boost::shared_ptr<ARDOUR::MidiTrack>);
+ ~MidiChannelSelectorWindow ();
- void set_channel_colors (const uint32_t new_channel_colors[16]);
- void set_default_channel_color();
+ void set_channel_colors (const uint32_t new_channel_colors[16]);
+ void set_default_channel_color();
private:
- boost::shared_ptr<ARDOUR::MidiTrack> track;
- std::vector<Gtk::ToggleButton*> playback_buttons;
- std::vector<Gtk::ToggleButton*> capture_buttons;
-
- std::vector<Gtk::Widget*> playback_mask_controls;
- std::vector<Gtk::Widget*> capture_mask_controls;
-
- Gtk::HBox capture_mask_box;
- Gtk::HBox playback_mask_box;
- Gtk::RadioButtonGroup playback_button_group;
- Gtk::RadioButton playback_all_button;
- Gtk::RadioButton playback_filter_button;
- Gtk::RadioButton playback_force_button;
- Gtk::RadioButtonGroup capture_button_group;
- Gtk::RadioButton capture_all_button;
- Gtk::RadioButton capture_filter_button;
- Gtk::RadioButton capture_force_button;
-
- ARDOUR::ChannelMode last_drawn_capture_mode;
- ARDOUR::ChannelMode last_drawn_playback_mode;
-
- void build();
- void set_capture_selected_channels (uint16_t);
- void set_playback_selected_channels (uint16_t);
-
- void fill_playback_mask ();
- void zero_playback_mask ();
- void invert_playback_mask ();
-
- void fill_capture_mask ();
- void zero_capture_mask ();
- void invert_capture_mask ();
-
- void playback_mask_changed ();
- void capture_mask_changed ();
- void playback_mode_changed ();
- void capture_mode_changed ();
-
- void playback_channel_clicked (uint16_t);
- void capture_channel_clicked (uint16_t);
-
- void playback_all_clicked();
- void playback_none_clicked();
- void playback_invert_clicked();
-
- void capture_all_clicked();
- void capture_none_clicked();
- void capture_invert_clicked();
-
- void capture_mode_toggled (ARDOUR::ChannelMode);
- void playback_mode_toggled (ARDOUR::ChannelMode);
+ boost::shared_ptr<ARDOUR::MidiTrack> track;
+ std::vector<Gtk::ToggleButton*> playback_buttons;
+ std::vector<Gtk::ToggleButton*> capture_buttons;
+
+ std::vector<Gtk::Widget*> playback_mask_controls;
+ std::vector<Gtk::Widget*> capture_mask_controls;
+
+ Gtk::HBox capture_mask_box;
+ Gtk::HBox playback_mask_box;
+ Gtk::RadioButtonGroup playback_button_group;
+ Gtk::RadioButton playback_all_button;
+ Gtk::RadioButton playback_filter_button;
+ Gtk::RadioButton playback_force_button;
+ Gtk::RadioButtonGroup capture_button_group;
+ Gtk::RadioButton capture_all_button;
+ Gtk::RadioButton capture_filter_button;
+ Gtk::RadioButton capture_force_button;
+
+ ARDOUR::ChannelMode last_drawn_capture_mode;
+ ARDOUR::ChannelMode last_drawn_playback_mode;
+
+ void build();
+ void set_capture_selected_channels (uint16_t);
+ void set_playback_selected_channels (uint16_t);
+
+ void fill_playback_mask ();
+ void zero_playback_mask ();
+ void invert_playback_mask ();
+
+ void fill_capture_mask ();
+ void zero_capture_mask ();
+ void invert_capture_mask ();
+
+ void playback_mask_changed ();
+ void capture_mask_changed ();
+ void playback_mode_changed ();
+ void capture_mode_changed ();
+
+ void playback_channel_clicked (uint16_t);
+ void capture_channel_clicked (uint16_t);
+
+ void playback_all_clicked();
+ void playback_none_clicked();
+ void playback_invert_clicked();
+
+ void capture_all_clicked();
+ void capture_none_clicked();
+ void capture_invert_clicked();
+
+ void capture_mode_toggled (ARDOUR::ChannelMode);
+ void playback_mode_toggled (ARDOUR::ChannelMode);
};
#endif /*__ardour_ui_midi_channel_selector_h__*/
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 0d5b82255d..145529317a 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -303,7 +303,7 @@ public:
void goto_previous_note (bool add_to_selection);
void goto_next_note (bool add_to_selection);
void change_note_lengths (bool, bool, Evoral::Beats beats, bool start, bool end);
- void change_velocities (bool up, bool fine, bool allow_smush, bool all_together);
+ void change_velocities (bool up, bool fine, bool allow_smush, bool all_together);
void transpose (bool up, bool fine, bool allow_smush);
void nudge_notes (bool forward, bool fine);
void channel_edit ();
diff --git a/gtk2_ardour/midi_velocity_dialog.h b/gtk2_ardour/midi_velocity_dialog.h
index b01a6fde79..7161e0bd5c 100644
--- a/gtk2_ardour/midi_velocity_dialog.h
+++ b/gtk2_ardour/midi_velocity_dialog.h
@@ -34,10 +34,10 @@ class MidiVelocityDialog : public ArdourDialog
uint8_t velocity() const;
private:
- Gtk::Adjustment adjustment;
- Gtk::SpinButton spinner;
- Gtk::Label label;
- Gtk::HBox packer;
+ Gtk::Adjustment adjustment;
+ Gtk::SpinButton spinner;
+ Gtk::Label label;
+ Gtk::HBox packer;
};
#endif /* __gtk2_ardour_midi_velocity_dialog_h__ */
diff --git a/gtk2_ardour/missing_file_dialog.h b/gtk2_ardour/missing_file_dialog.h
index 85ea1310cc..12695c5117 100644
--- a/gtk2_ardour/missing_file_dialog.h
+++ b/gtk2_ardour/missing_file_dialog.h
@@ -30,7 +30,7 @@
#include "ardour_dialog.h"
namespace ARDOUR {
- class Session;
+ class Session;
}
class MissingFileDialog : public ArdourDialog
diff --git a/gtk2_ardour/missing_plugin_dialog.cc b/gtk2_ardour/missing_plugin_dialog.cc
index 1f2a4f060f..98842b5b72 100644
--- a/gtk2_ardour/missing_plugin_dialog.cc
+++ b/gtk2_ardour/missing_plugin_dialog.cc
@@ -26,15 +26,15 @@ using namespace ARDOUR;
using namespace PBD;
MissingPluginDialog::MissingPluginDialog (Session * s, list<string> const & plugins)
- : ArdourDialog (_("Missing Plugins"), true, false)
+ : ArdourDialog (_("Missing Plugins"), true, false)
{
/* This dialog is always shown programatically. Center the window.*/
set_position (Gtk::WIN_POS_CENTER);
set_session (s);
- add_button (_("OK"), RESPONSE_OK);
- set_default_response (RESPONSE_OK);
+ add_button (_("OK"), RESPONSE_OK);
+ set_default_response (RESPONSE_OK);
Label* m = manage (new Label);
@@ -49,8 +49,8 @@ MissingPluginDialog::MissingPluginDialog (Session * s, list<string> const & plug
"It is recommended that you install the missing plugins and re-load the session.\n"
"(also check the blacklist, Window > Log and Preferences > Plugins)");
- m->set_markup (t.str ());
- get_vbox()->pack_start (*m, false, false);
+ m->set_markup (t.str ());
+ get_vbox()->pack_start (*m, false, false);
show_all ();
}
diff --git a/gtk2_ardour/missing_plugin_dialog.h b/gtk2_ardour/missing_plugin_dialog.h
index 2e4fd08e1f..87d4954575 100644
--- a/gtk2_ardour/missing_plugin_dialog.h
+++ b/gtk2_ardour/missing_plugin_dialog.h
@@ -24,13 +24,13 @@
#include "ardour_dialog.h"
namespace ARDOUR {
- class Session;
+ class Session;
}
class MissingPluginDialog : public ArdourDialog
{
public:
- MissingPluginDialog (ARDOUR::Session *, std::list<std::string> const &);
+ MissingPluginDialog (ARDOUR::Session *, std::list<std::string> const &);
};
#endif /* __gtk_ardour_missing_plugin_dialog_h__ */
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index aaf4bbf06a..884a840491 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -1125,11 +1125,11 @@ MixerStrip::maybe_add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, ARDOUR
void
MixerStrip::update_diskstream_display ()
{
- if (is_track() && input_selector) {
- input_selector->hide_all ();
- }
+ if (is_track() && input_selector) {
+ input_selector->hide_all ();
+ }
- route_color_changed ();
+ route_color_changed ();
}
void
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index a9083de370..e8c431041a 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -106,8 +106,8 @@ Mixer_UI::Mixer_UI ()
, _plugin_selector (0)
, _strip_width (UIConfiguration::instance().get_default_narrow_ms() ? Narrow : Wide)
, ignore_reorder (false)
- , _in_group_rebuild_or_clear (false)
- , _route_deletion_in_progress (false)
+ , _in_group_rebuild_or_clear (false)
+ , _route_deletion_in_progress (false)
, _maximised (false)
, _show_mixer_list (true)
, myactions (X_("mixer"))
@@ -442,7 +442,7 @@ Mixer_UI::remove_master (VCAMasterStrip* vms)
for (ri = rows.begin(); ri != rows.end(); ++ri) {
if ((*ri)[stripable_columns.strip] == vms) {
- PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
+ PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
track_model->erase (ri);
break;
}
@@ -667,7 +667,7 @@ Mixer_UI::remove_strip (MixerStrip* strip)
for (ri = rows.begin(); ri != rows.end(); ++ri) {
if ((*ri)[stripable_columns.strip] == strip) {
- PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
+ PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
track_model->erase (ri);
break;
}
@@ -1132,15 +1132,15 @@ Mixer_UI::hide_strip (MixerStrip* ms)
gint
Mixer_UI::start_updating ()
{
- fast_screen_update_connection = Timers::super_rapid_connect (sigc::mem_fun(*this, &Mixer_UI::fast_update_strips));
- return 0;
+ fast_screen_update_connection = Timers::super_rapid_connect (sigc::mem_fun(*this, &Mixer_UI::fast_update_strips));
+ return 0;
}
gint
Mixer_UI::stop_updating ()
{
- fast_screen_update_connection.disconnect();
- return 0;
+ fast_screen_update_connection.disconnect();
+ return 0;
}
void
@@ -1302,9 +1302,9 @@ Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&)
DEBUG_TRACE (DEBUG::OrderKeys, "mixer UI treeview row deleted\n");
sync_presentation_info_from_treeview ();
- if (_route_deletion_in_progress) {
- redisplay_track_list ();
- }
+ if (_route_deletion_in_progress) {
+ redisplay_track_list ();
+ }
}
void
diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h
index 79e428ce65..7dad355943 100644
--- a/gtk2_ardour/mixer_ui.h
+++ b/gtk2_ardour/mixer_ui.h
@@ -124,8 +124,8 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
void register_actions ();
- void load_bindings ();
- Gtkmm2ext::Bindings* bindings;
+ void load_bindings ();
+ Gtkmm2ext::Bindings* bindings;
protected:
void set_axis_targets_for_operation ();
diff --git a/gtk2_ardour/monitor_selector.cc b/gtk2_ardour/monitor_selector.cc
index 0a6d731f3e..7d34a3a53f 100644
--- a/gtk2_ardour/monitor_selector.cc
+++ b/gtk2_ardour/monitor_selector.cc
@@ -119,15 +119,15 @@ MonitorSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
return;
}
- if (s) {
+ if (s) {
if (!f->connected_to (*j)) {
_io->connect (f, *j, 0);
}
- } else {
+ } else {
if (f->connected_to (*j)) {
_io->disconnect (f, *j, 0);
}
- }
+ }
}
}
}
diff --git a/gtk2_ardour/mono_panner.cc b/gtk2_ardour/mono_panner.cc
index da98fcb120..778af0b582 100644
--- a/gtk2_ardour/mono_panner.cc
+++ b/gtk2_ardour/mono_panner.cc
@@ -487,12 +487,12 @@ MonoPanner::on_key_press_event (GdkEventKey* ev)
void
MonoPanner::set_colors ()
{
- colors.fill = UIConfiguration::instance().color_mod ("mono panner fill", "panner fill");
- colors.outline = UIConfiguration::instance().color ("mono panner outline");
- colors.text = UIConfiguration::instance().color ("mono panner text");
- colors.background = UIConfiguration::instance().color ("mono panner bg");
- colors.pos_outline = UIConfiguration::instance().color ("mono panner position outline");
- colors.pos_fill = UIConfiguration::instance().color_mod ("mono panner position fill", "mono panner position fill");
+ colors.fill = UIConfiguration::instance().color_mod ("mono panner fill", "panner fill");
+ colors.outline = UIConfiguration::instance().color ("mono panner outline");
+ colors.text = UIConfiguration::instance().color ("mono panner text");
+ colors.background = UIConfiguration::instance().color ("mono panner bg");
+ colors.pos_outline = UIConfiguration::instance().color ("mono panner position outline");
+ colors.pos_fill = UIConfiguration::instance().color_mod ("mono panner position fill", "mono panner position fill");
}
void
diff --git a/gtk2_ardour/mono_panner.h b/gtk2_ardour/mono_panner.h
index c5843f756c..7ceab6a865 100644
--- a/gtk2_ardour/mono_panner.h
+++ b/gtk2_ardour/mono_panner.h
@@ -33,7 +33,7 @@ namespace ARDOUR {
}
namespace PBD {
- class Controllable;
+ class Controllable;
}
class MonoPanner : public PannerInterface
@@ -42,7 +42,7 @@ class MonoPanner : public PannerInterface
MonoPanner (boost::shared_ptr<ARDOUR::PannerShell>);
~MonoPanner ();
- boost::shared_ptr<PBD::Controllable> get_controllable() const { return position_control; }
+ boost::shared_ptr<PBD::Controllable> get_controllable() const { return position_control; }
sigc::signal<void> StartGesture;
sigc::signal<void> StopGesture;
@@ -52,42 +52,42 @@ class MonoPanner : public PannerInterface
bool on_button_press_event (GdkEventButton*);
bool on_button_release_event (GdkEventButton*);
bool on_motion_notify_event (GdkEventMotion*);
- bool on_scroll_event (GdkEventScroll*);
- bool on_key_press_event (GdkEventKey*);
+ bool on_scroll_event (GdkEventScroll*);
+ bool on_key_press_event (GdkEventKey*);
private:
PannerEditor* editor ();
boost::shared_ptr<ARDOUR::PannerShell> _panner_shell;
- boost::shared_ptr<PBD::Controllable> position_control;
- PBD::ScopedConnectionList panvalue_connections;
- PBD::ScopedConnectionList panshell_connections;
- int drag_start_x;
- int last_drag_x;
- double accumulated_delta;
- bool detented;
+ boost::shared_ptr<PBD::Controllable> position_control;
+ PBD::ScopedConnectionList panvalue_connections;
+ PBD::ScopedConnectionList panshell_connections;
+ int drag_start_x;
+ int last_drag_x;
+ double accumulated_delta;
+ bool detented;
- BindingProxy position_binder;
+ BindingProxy position_binder;
- void set_tooltip ();
+ void set_tooltip ();
- struct ColorScheme {
- uint32_t outline;
- uint32_t fill;
- uint32_t text;
- uint32_t background;
- uint32_t pos_outline;
- uint32_t pos_fill;
- };
+ struct ColorScheme {
+ uint32_t outline;
+ uint32_t fill;
+ uint32_t text;
+ uint32_t background;
+ uint32_t pos_outline;
+ uint32_t pos_fill;
+ };
bool _dragging;
static Pango::AttrList panner_font_attributes;
static bool have_font;
- static ColorScheme colors;
- static void set_colors ();
- static bool have_colors;
+ static ColorScheme colors;
+ static void set_colors ();
+ static bool have_colors;
void color_handler ();
void bypass_handler ();
void pannable_handler ();
diff --git a/gtk2_ardour/nag.cc b/gtk2_ardour/nag.cc
index d553efd197..d2b08349b1 100644
--- a/gtk2_ardour/nag.cc
+++ b/gtk2_ardour/nag.cc
@@ -195,7 +195,7 @@ NagScreen::offer_to_donate ()
{
/* we don't care if it fails */
- PBD::open_uri (Config->get_donate_url());
+ PBD::open_uri (Config->get_donate_url());
}
void
diff --git a/gtk2_ardour/note_base.cc b/gtk2_ardour/note_base.cc
index 3852673e60..5142586715 100644
--- a/gtk2_ardour/note_base.cc
+++ b/gtk2_ardour/note_base.cc
@@ -321,6 +321,6 @@ NoteBase::mouse_near_ends () const
bool
NoteBase::big_enough_to_trim () const
{
- return (x1() - x0()) > 10;
+ return (x1() - x0()) > 10;
}
diff --git a/gtk2_ardour/nsm.cc b/gtk2_ardour/nsm.cc
index e3ceba355f..acbc7529d0 100644
--- a/gtk2_ardour/nsm.cc
+++ b/gtk2_ardour/nsm.cc
@@ -33,12 +33,12 @@ NSM_Client::NSM_Client()
int
NSM_Client::command_save(char **out_msg)
{
- (void) out_msg;
+ (void) out_msg;
- ARDOUR_UI::instance()->save_state();
- int r = ERR_OK;
+ ARDOUR_UI::instance()->save_state();
+ int r = ERR_OK;
- return r;
+ return r;
}
int
@@ -47,13 +47,13 @@ NSM_Client::command_open(const char* name,
const char* client_id,
char** /*out_msg*/)
{
- int r = ERR_OK;
+ int r = ERR_OK;
- ARDOUR_COMMAND_LINE::session_name = name;
- ARDOUR_COMMAND_LINE::backend_client_name = client_id;
+ ARDOUR_COMMAND_LINE::session_name = name;
+ ARDOUR_COMMAND_LINE::backend_client_name = client_id;
- if (ARDOUR_UI::instance()->get_session_parameters(true, false, "")) {
- return ERR_GENERAL;
- }
- return r;
+ if (ARDOUR_UI::instance()->get_session_parameters(true, false, "")) {
+ return ERR_GENERAL;
+ }
+ return r;
}
diff --git a/gtk2_ardour/nsm.h b/gtk2_ardour/nsm.h
index 5491e1985f..8dec072f00 100644
--- a/gtk2_ardour/nsm.h
+++ b/gtk2_ardour/nsm.h
@@ -23,17 +23,17 @@
class NSM_Client:public NSM::Client
{
- public:
+ public:
- NSM_Client();
- ~NSM_Client() { }
+ NSM_Client();
+ ~NSM_Client() { }
- protected:
+ protected:
- int command_open(const char *name,
- const char *display_name,
- const char *client_id,
- char **out_msg);
- int command_save(char **out_msg);
+ int command_open(const char *name,
+ const char *display_name,
+ const char *client_id,
+ char **out_msg);
+ int command_save(char **out_msg);
};
diff --git a/gtk2_ardour/nsmclient.cc b/gtk2_ardour/nsmclient.cc
index ae9570bcf8..e440d33c6f 100644
--- a/gtk2_ardour/nsmclient.cc
+++ b/gtk2_ardour/nsmclient.cc
@@ -43,262 +43,273 @@ namespace NSM
#undef OSC_REPLY
#undef OSC_REPLY_ERR
-#define OSC_REPLY( value ) lo_send_from( ((NSM::Client*)user_data)->nsm_addr, ((NSM::Client*)user_data)->_server, LO_TT_IMMEDIATE, "/reply", "ss", path, value )
-
-#define OSC_REPLY_ERR( errcode, value ) lo_send_from( ((NSM::Client*)user_data)->nsm_addr, ((NSM::Client*)user_data)->_server, LO_TT_IMMEDIATE, "/error", "sis", path, errcode, value )
-
- Client::Client ( )
- {
- nsm_addr = 0;
- _nsm_client_id = 0;
- _nsm_client_path = 0;
- _session_manager_name = 0;
- nsm_url = "";
- nsm_is_active = false;
- _server = 0;
- _st = 0;
- }
-
- Client::~Client ( )
- {
- if ( _st )
- stop();
-
- if ( _st )
- lo_server_thread_free( _st );
- else
- lo_server_free ( _server );
- }
-
- void
- Client::announce ( const char *application_name, const char *capabilities, const char *process_name )
- {
-
- lo_address to = lo_address_new_from_url( nsm_url );
-
- if ( ! to )
- {
- return;
- }
-
- int pid = (int)getpid();
-
- lo_send_from( to, _server, LO_TT_IMMEDIATE, "/nsm/server/announce", "sssiii",
+#define OSC_REPLY(value) lo_send_from( ((NSM::Client*)user_data)->nsm_addr, ((NSM::Client*)user_data)->_server, LO_TT_IMMEDIATE, "/reply", "ss", path, value)
+
+#define OSC_REPLY_ERR(errcode, value) lo_send_from( ((NSM::Client*)user_data)->nsm_addr, ((NSM::Client*)user_data)->_server, LO_TT_IMMEDIATE, "/error", "sis", path, errcode, value)
+
+ Client::Client ()
+ {
+ nsm_addr = 0;
+ _nsm_client_id = 0;
+ _nsm_client_path = 0;
+ _session_manager_name = 0;
+ nsm_url = "";
+ nsm_is_active = false;
+ _server = 0;
+ _st = 0;
+ }
+
+ Client::~Client ()
+ {
+ if (_st) {
+ stop();
+ }
+
+ if (_st) {
+ lo_server_thread_free (_st);
+ } else {
+ lo_server_free (_server);
+ }
+ }
+
+ void
+ Client::announce (const char *application_name, const char *capabilities, const char *process_name)
+ {
+
+ lo_address to = lo_address_new_from_url (nsm_url);
+
+ if (!to)
+ {
+ return;
+ }
+
+ int pid = (int)getpid();
+
+ lo_send_from (to, _server, LO_TT_IMMEDIATE, "/nsm/server/announce", "sssiii",
application_name,
capabilities,
process_name,
1, /* api_major_version */
0, /* api_minor_version */
- pid );
-
- lo_address_free( to );
- }
-
- void
- Client::progress ( float p )
- {
- if ( nsm_is_active )
- {
- lo_send_from( nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/progress", "f", p );
- }
- }
-
- void
- Client::is_dirty ( void )
- {
- if ( nsm_is_active )
- {
- lo_send_from( nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/is_dirty", "" );
- }
- }
-
- void
- Client::is_clean ( void )
- {
- if ( nsm_is_active )
- {
- lo_send_from( nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/is_clean", "" );
- }
- }
-
- void
- Client::message ( int priority, const char *msg )
- {
- if ( nsm_is_active )
- {
- lo_send_from( nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/message", "is", priority, msg );
- }
- }
-
-
- void
- Client::broadcast ( lo_message msg )
- {
- if ( nsm_is_active )
- {
- lo_send_message_from( nsm_addr, _server, "/nsm/server/broadcast", msg );
- }
- }
-
- void
- Client::check ( int timeout )
- {
- if ( lo_server_wait( _server, timeout ) )
- while ( lo_server_recv_noblock( _server, 0 ) ) {}
- }
-
- void
- Client::start ( )
- {
- lo_server_thread_start( _st );
- }
-
- void
- Client::stop ( )
- {
- lo_server_thread_stop( _st );
- }
-
- int
- Client::init ( const char *nsm_url )
- {
- this->nsm_url = nsm_url;
-
- lo_address addr = lo_address_new_from_url( nsm_url );
- int proto = lo_address_get_protocol( addr );
- lo_address_free( addr );
-
- _server = lo_server_new_with_proto( NULL, proto, NULL );
-
- if ( ! _server )
- return -1;
-
- lo_server_add_method( _server, "/error", "sis", &Client::osc_error, this );
- lo_server_add_method( _server, "/reply", "ssss", &Client::osc_announce_reply, this );
- lo_server_add_method( _server, "/nsm/client/open", "sss", &Client::osc_open, this );
- lo_server_add_method( _server, "/nsm/client/save", "", &Client::osc_save, this );
- lo_server_add_method( _server, "/nsm/client/session_is_loaded", "", &Client::osc_session_is_loaded, this );
- lo_server_add_method( _server, NULL, NULL, &Client::osc_broadcast, this );
-
- return 0;
- }
-
- int
- Client::init_thread ( const char *nsm_url )
- {
- this->nsm_url = nsm_url;
-
- lo_address addr = lo_address_new_from_url( nsm_url );
- int proto = lo_address_get_protocol( addr );
- lo_address_free( addr );
-
- _st = lo_server_thread_new_with_proto( NULL, proto, NULL );
- _server = lo_server_thread_get_server( _st );
-
- if ( ! _server || ! _st )
- return -1;
-
- lo_server_thread_add_method( _st, "/error", "sis", &Client::osc_error, this );
- lo_server_thread_add_method( _st, "/reply", "ssss", &Client::osc_announce_reply, this );
- lo_server_thread_add_method( _st, "/nsm/client/open", "sss", &Client::osc_open, this );
- lo_server_thread_add_method( _st, "/nsm/client/save", "", &Client::osc_save, this );
- lo_server_thread_add_method( _st, "/nsm/client/session_is_loaded", "", &Client::osc_session_is_loaded, this );
- lo_server_thread_add_method( _st, NULL, NULL, &Client::osc_broadcast, this );
-
- return 0;
- }
+ pid);
+
+ lo_address_free (to);
+ }
+
+ void
+ Client::progress (float p)
+ {
+ if (nsm_is_active)
+ {
+ lo_send_from (nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/progress", "f", p);
+ }
+ }
+
+ void
+ Client::is_dirty (void)
+ {
+ if (nsm_is_active)
+ {
+ lo_send_from (nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/is_dirty", "");
+ }
+ }
+
+ void
+ Client::is_clean (void)
+ {
+ if (nsm_is_active)
+ {
+ lo_send_from (nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/is_clean", "");
+ }
+ }
+
+ void
+ Client::message (int priority, const char *msg)
+ {
+ if (nsm_is_active)
+ {
+ lo_send_from (nsm_addr, _server, LO_TT_IMMEDIATE, "/nsm/client/message", "is", priority, msg);
+ }
+ }
+
+
+ void
+ Client::broadcast (lo_message msg)
+ {
+ if (nsm_is_active)
+ {
+ lo_send_message_from (nsm_addr, _server, "/nsm/server/broadcast", msg);
+ }
+ }
+
+ void
+ Client::check (int timeout)
+ {
+ if (lo_server_wait (_server, timeout)) {
+ while (lo_server_recv_noblock (_server, 0));
+ }
+ }
+
+ void
+ Client::start ()
+ {
+ lo_server_thread_start (_st);
+ }
+
+ void
+ Client::stop ()
+ {
+ lo_server_thread_stop (_st);
+ }
+
+ int
+ Client::init (const char *nsm_url)
+ {
+ this->nsm_url = nsm_url;
+
+ lo_address addr = lo_address_new_from_url (nsm_url);
+ int proto = lo_address_get_protocol (addr);
+ lo_address_free (addr);
+
+ _server = lo_server_new_with_proto (NULL, proto, NULL);
+
+ if (!_server) {
+ return -1;
+ }
+
+ lo_server_add_method (_server, "/error", "sis", &Client::osc_error, this);
+ lo_server_add_method (_server, "/reply", "ssss", &Client::osc_announce_reply, this);
+ lo_server_add_method (_server, "/nsm/client/open", "sss", &Client::osc_open, this);
+ lo_server_add_method (_server, "/nsm/client/save", "", &Client::osc_save, this);
+ lo_server_add_method (_server, "/nsm/client/session_is_loaded", "", &Client::osc_session_is_loaded, this);
+ lo_server_add_method (_server, NULL, NULL, &Client::osc_broadcast, this);
+
+ return 0;
+ }
+
+ int
+ Client::init_thread (const char *nsm_url)
+ {
+ this->nsm_url = nsm_url;
+
+ lo_address addr = lo_address_new_from_url (nsm_url);
+ int proto = lo_address_get_protocol (addr);
+ lo_address_free (addr);
+
+ _st = lo_server_thread_new_with_proto (NULL, proto, NULL);
+ _server = lo_server_thread_get_server (_st);
+
+ if (! _server || ! _st) {
+ return -1;
+ }
+
+ lo_server_thread_add_method (_st, "/error", "sis", &Client::osc_error, this);
+ lo_server_thread_add_method (_st, "/reply", "ssss", &Client::osc_announce_reply, this);
+ lo_server_thread_add_method (_st, "/nsm/client/open", "sss", &Client::osc_open, this);
+ lo_server_thread_add_method (_st, "/nsm/client/save", "", &Client::osc_save, this);
+ lo_server_thread_add_method (_st, "/nsm/client/session_is_loaded", "", &Client::osc_session_is_loaded, this);
+ lo_server_thread_add_method (_st, NULL, NULL, &Client::osc_broadcast, this);
+
+ return 0;
+ }
/************************/
/* OSC Message Handlers */
/************************/
- int
- Client::osc_broadcast ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
- {
- return ((NSM::Client*)user_data)->command_broadcast( path, msg );
- }
+ int
+ Client::osc_broadcast (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+ {
+ return ((NSM::Client*)user_data)->command_broadcast (path, msg);
+ }
- int
- Client::osc_save ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
- {
- char *out_msg = NULL;
+ int
+ Client::osc_save (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+ {
+ char *out_msg = NULL;
- int r = ((NSM::Client*)user_data)->command_save(&out_msg);
+ int r = ((NSM::Client*)user_data)->command_save(&out_msg);
- if ( r )
- OSC_REPLY_ERR( r, ( out_msg ? out_msg : "") );
- else
- OSC_REPLY( "OK" );
+ if (r) {
+ OSC_REPLY_ERR (r, (out_msg ? out_msg : ""));
+ } else {
+ OSC_REPLY ("OK");
+ }
- if ( out_msg )
- free( out_msg );
+ if (out_msg) {
+ free (out_msg);
+ }
- return 0;
- }
+ return 0;
+ }
- int
- Client::osc_open ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
- {
- char *out_msg = NULL;
+ int
+ Client::osc_open (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+ {
+ char *out_msg = NULL;
- NSM::Client *nsm = (NSM::Client*)user_data;
+ NSM::Client *nsm = (NSM::Client*)user_data;
- nsm->_nsm_client_id = strdup( &argv[2]->s );
- nsm->_nsm_client_path = strdup( &argv[0]->s );
+ nsm->_nsm_client_id = strdup (&argv[2]->s);
+ nsm->_nsm_client_path = strdup (&argv[0]->s);
- int r = ((NSM::Client*)user_data)->command_open( &argv[0]->s, &argv[1]->s, &argv[2]->s, &out_msg);
+ int r = ((NSM::Client*)user_data)->command_open (&argv[0]->s, &argv[1]->s, &argv[2]->s, &out_msg);
- if ( r )
- OSC_REPLY_ERR( r, ( out_msg ? out_msg : "") );
- else
- OSC_REPLY( "OK" );
+ if (r) {
+ OSC_REPLY_ERR (r, (out_msg ? out_msg : ""));
+ } else {
+ OSC_REPLY ("OK");
+ }
- if ( out_msg )
- free( out_msg );
+ if (out_msg) {
+ free(out_msg);
+ }
- return 0;
- }
+ return 0;
+ }
- int
- Client::osc_session_is_loaded ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
- {
- NSM::Client *nsm = (NSM::Client*)user_data;
+ int
+ Client::osc_session_is_loaded (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+ {
+ NSM::Client *nsm = (NSM::Client*)user_data;
- nsm->command_session_is_loaded();
+ nsm->command_session_is_loaded();
- return 0;
- }
+ return 0;
+ }
- int
- Client::osc_error ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
- {
- if ( strcmp( &argv[0]->s, "/nsm/server/announce" ) )
- return -1;
+ int
+ Client::osc_error (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+ {
+ if (strcmp (&argv[0]->s, "/nsm/server/announce")) {
+ return -1;
+ }
- NSM::Client *nsm = (NSM::Client*)user_data;
+ NSM::Client *nsm = (NSM::Client*)user_data;
- nsm->nsm_is_active = false;
+ nsm->nsm_is_active = false;
- nsm->command_active( nsm->nsm_is_active );
+ nsm->command_active (nsm->nsm_is_active);
- return 0;
- }
+ return 0;
+ }
- int
- Client::osc_announce_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
- {
- if ( strcmp( &argv[0]->s, "/nsm/server/announce" ) )
- return -1;
+ int
+ Client::osc_announce_reply (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+ {
+ if (strcmp (&argv[0]->s, "/nsm/server/announce")) {
+ return -1;
+ }
- NSM::Client *nsm = (NSM::Client*)user_data;
+ NSM::Client *nsm = (NSM::Client*)user_data;
- nsm->nsm_is_active = true;
- nsm->_session_manager_name = strdup( &argv[2]->s );
- nsm->nsm_addr = lo_address_new_from_url( lo_address_get_url( lo_message_get_source( msg ) ));
+ nsm->nsm_is_active = true;
+ nsm->_session_manager_name = strdup (&argv[2]->s);
+ nsm->nsm_addr = lo_address_new_from_url (lo_address_get_url (lo_message_get_source (msg)));
- nsm->command_active( nsm->nsm_is_active );
+ nsm->command_active (nsm->nsm_is_active);
- return 0;
- }
+ return 0;
+ }
};
diff --git a/gtk2_ardour/nsmclient.h b/gtk2_ardour/nsmclient.h
index ade86b4515..eea313d1f4 100644
--- a/gtk2_ardour/nsmclient.h
+++ b/gtk2_ardour/nsmclient.h
@@ -24,89 +24,89 @@
namespace NSM
{
- class Client
- {
+ class Client
+ {
- private:
+ private:
- const char *nsm_url;
+ const char *nsm_url;
- lo_server _server;
- lo_server_thread _st;
- lo_address nsm_addr;
+ lo_server _server;
+ lo_server_thread _st;
+ lo_address nsm_addr;
- bool nsm_is_active;
- char *_nsm_client_id;
- char *_session_manager_name;
- char *_nsm_client_path;
+ bool nsm_is_active;
+ char *_nsm_client_id;
+ char *_session_manager_name;
+ char *_nsm_client_path;
- public:
+ public:
- enum
- {
- ERR_OK = 0,
- ERR_GENERAL = -1,
- ERR_INCOMPATIBLE_API = -2,
- ERR_BLACKLISTED = -3,
- ERR_LAUNCH_FAILED = -4,
- ERR_NO_SUCH_FILE = -5,
- ERR_NO_SESSION_OPEN = -6,
- ERR_UNSAVED_CHANGES = -7,
- ERR_NOT_NOW = -8
- };
+ enum
+ {
+ ERR_OK = 0,
+ ERR_GENERAL = -1,
+ ERR_INCOMPATIBLE_API = -2,
+ ERR_BLACKLISTED = -3,
+ ERR_LAUNCH_FAILED = -4,
+ ERR_NO_SUCH_FILE = -5,
+ ERR_NO_SESSION_OPEN = -6,
+ ERR_UNSAVED_CHANGES = -7,
+ ERR_NOT_NOW = -8
+ };
- Client ( );
- virtual ~Client ( );
+ Client ( );
+ virtual ~Client ( );
- bool is_active ( void ) { return nsm_is_active; }
+ bool is_active ( void ) { return nsm_is_active; }
- const char *session_manager_name ( void ) { return _session_manager_name; }
- const char *client_id ( void ) { return _nsm_client_id; }
- const char *client_path ( void ) { return _nsm_client_path; }
+ const char *session_manager_name ( void ) { return _session_manager_name; }
+ const char *client_id ( void ) { return _nsm_client_id; }
+ const char *client_path ( void ) { return _nsm_client_path; }
- /* Client->Server methods */
- void is_dirty ( void );
- void is_clean ( void );
- void progress ( float f );
- void message( int priority, const char *msg );
- void announce ( const char *appliction_name, const char *capabilities, const char *process_name );
+ /* Client->Server methods */
+ void is_dirty ( void );
+ void is_clean ( void );
+ void progress ( float f );
+ void message( int priority, const char *msg );
+ void announce ( const char *appliction_name, const char *capabilities, const char *process_name );
- void broadcast ( lo_message msg );
+ void broadcast ( lo_message msg );
- /* init without threading */
- int init ( const char *nsm_url );
- /* init with threading */
- int init_thread ( const char *nsm_url );
+ /* init without threading */
+ int init ( const char *nsm_url );
+ /* init with threading */
+ int init_thread ( const char *nsm_url );
- /* call this periodically to check for new messages */
- void check ( int timeout = 0 );
+ /* call this periodically to check for new messages */
+ void check ( int timeout = 0 );
- /* or call these to start and stop a thread (must do your own locking in handler!) */
- void start ( void );
- void stop ( void );
+ /* or call these to start and stop a thread (must do your own locking in handler!) */
+ void start ( void );
+ void stop ( void );
- protected:
+ protected:
- /* Server->Client methods */
- virtual int command_open ( const char *name, const char *display_name, const char *client_id, char **out_msg ) = 0;
- virtual int command_save ( char **out_msg ) = 0;
+ /* Server->Client methods */
+ virtual int command_open ( const char *name, const char *display_name, const char *client_id, char **out_msg ) = 0;
+ virtual int command_save ( char **out_msg ) = 0;
- virtual void command_active ( bool ) { }
+ virtual void command_active ( bool ) { }
- virtual void command_session_is_loaded ( void ) { }
+ virtual void command_session_is_loaded ( void ) { }
- /* invoked when an unrecognized message is received. Should return 0 if you handled it, -1 otherwise. */
- virtual int command_broadcast ( const char *, lo_message ) { return -1; }
+ /* invoked when an unrecognized message is received. Should return 0 if you handled it, -1 otherwise. */
+ virtual int command_broadcast ( const char *, lo_message ) { return -1; }
- private:
+ private:
- /* osc handlers */
- static int osc_open ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_save ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_announce_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_error ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_session_is_loaded ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- static int osc_broadcast ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ /* osc handlers */
+ static int osc_open ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ static int osc_save ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ static int osc_announce_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ static int osc_error ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ static int osc_session_is_loaded ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
+ static int osc_broadcast ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
- };
+ };
};
diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc
index 57d54d5f47..eebc53d550 100644
--- a/gtk2_ardour/panner2d.cc
+++ b/gtk2_ardour/panner2d.cc
@@ -296,8 +296,8 @@ Panner2d::handle_position_change ()
uint32_t n;
double w = panner_shell->pannable()->pan_width_control->get_value();
- position.position = AngularVector (panner_shell->pannable()->pan_azimuth_control->get_value() * 360.0,
- panner_shell->pannable()->pan_elevation_control->get_value() * 90.0);
+ position.position = AngularVector (panner_shell->pannable()->pan_azimuth_control->get_value() * 360.0,
+ panner_shell->pannable()->pan_elevation_control->get_value() * 90.0);
for (uint32_t i = 0; i < signals.size(); ++i) {
signals[i]->position = panner_shell->panner()->signal_position (i);
@@ -341,10 +341,10 @@ Panner2d::find_closest_object (gdouble x, gdouble y, bool& is_signal)
/* start with the position itself */
- PBD::AngularVector dp = position.position;
- if (!have_elevation) dp.ele = 0;
- dp.azi = 270 - dp.azi;
- dp.cartesian (c);
+ PBD::AngularVector dp = position.position;
+ if (!have_elevation) dp.ele = 0;
+ dp.azi = 270 - dp.azi;
+ dp.cartesian (c);
cart_to_gtk (c);
best_distance = sqrt ((c.x - x) * (c.x - x) +
@@ -387,11 +387,11 @@ 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;
- PBD::AngularVector sp = candidate->position;
- sp.azi = 270 -sp.azi;
- CartesianVector c;
- sp.cartesian (c);
- cart_to_gtk (c);
+ PBD::AngularVector sp = candidate->position;
+ sp.azi = 270 -sp.azi;
+ CartesianVector c;
+ sp.cartesian (c);
+ cart_to_gtk (c);
distance = sqrt ((c.x - x) * (c.x - x) +
(c.y - y) * (c.y - y));
@@ -523,7 +523,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
}
if (!panner_shell->bypassed()) {
- /* convention top == front ^= azimuth == .5 (same as stereo/mono panners) */
+ /* convention top == front ^= azimuth == .5 (same as stereo/mono panners) */
if (signals.size() > 1) {
/* arc to show "diffusion" */
@@ -533,7 +533,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_save (cr);
cairo_translate (cr, radius, radius);
- cairo_rotate (cr, M_PI / 2.0);
+ cairo_rotate (cr, M_PI / 2.0);
cairo_rotate (cr, position_angle - (width_angle/2.0));
cairo_move_to (cr, 0, 0);
cairo_arc_negative (cr, 0, 0, radius, width_angle, 0.0);
@@ -562,9 +562,9 @@ Panner2d::on_expose_event (GdkEventExpose *event)
/* draw position */
- PBD::AngularVector dp = position.position;
- if (!have_elevation) dp.ele = 0;
- dp.azi = 270 - dp.azi;
+ PBD::AngularVector dp = position.position;
+ if (!have_elevation) dp.ele = 0;
+ dp.azi = 270 - dp.azi;
dp.cartesian (c);
cart_to_gtk (c);
@@ -588,7 +588,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
*/
PBD::AngularVector sp = signal->position;
if (!have_elevation) sp.ele = 0;
- sp.azi += 270.0;
+ sp.azi += 270.0;
sp.cartesian (c);
cart_to_gtk (c);
@@ -626,8 +626,8 @@ Panner2d::on_expose_event (GdkEventExpose *event)
if (speaker->visible) {
- PBD::AngularVector sp = speaker->position;
- sp.azi += 270.0;
+ PBD::AngularVector sp = speaker->position;
+ sp.azi += 270.0;
CartesianVector c;
sp.cartesian (c);
cart_to_gtk (c);
@@ -683,29 +683,29 @@ bool
Panner2d::on_button_press_event (GdkEventButton *ev)
{
GdkModifierType state;
- int x;
- int y;
- bool is_signal;
+ int x;
+ int y;
+ bool is_signal;
if (ev->type == GDK_2BUTTON_PRESS && ev->button == 1) {
return false;
}
- did_move = false;
+ did_move = false;
switch (ev->button) {
case 1:
case 2:
- x = ev->x - hoffset;
- y = ev->y - voffset;
+ x = ev->x - hoffset;
+ y = ev->y - voffset;
if ((drag_target = find_closest_object (x, y, is_signal)) != 0) {
- if (!is_signal) {
- panner_shell->panner()->set_position (drag_target->position.azi/360.0);
- drag_target = 0;
- } else {
- drag_target->set_selected (true);
- }
+ if (!is_signal) {
+ panner_shell->panner()->set_position (drag_target->position.azi/360.0);
+ drag_target = 0;
+ } else {
+ drag_target->set_selected (true);
+ }
}
state = (GdkModifierType) ev->state;
@@ -731,7 +731,7 @@ Panner2d::on_button_release_event (GdkEventButton *ev)
x = (int) floor (ev->x);
y = (int) floor (ev->y);
state = (GdkModifierType) ev->state;
- ret = handle_motion (x, y, state);
+ ret = handle_motion (x, y, state);
drag_target = 0;
break;
@@ -791,7 +791,7 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
if (!have_elevation) {
clamp_to_circle (cp.x, cp.y);
cp.angular (av);
- av.azi = fmod(270 - av.azi, 360);
+ av.azi = fmod(270 - av.azi, 360);
if (drag_target == &position) {
double degree_fract = av.azi / 360.0;
panner_shell->panner()->set_position (degree_fract);
@@ -803,7 +803,7 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
double r2d = 180.0 / M_PI;
av.azi = r2d * atan2(cp.y, cp.x);
av.ele = r2d * asin(cp.z);
- av.azi = fmod(270 - av.azi, 360);
+ av.azi = fmod(270 - av.azi, 360);
if (drag_target == &position) {
double azi_fract = av.azi / 360.0;
@@ -821,18 +821,18 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
bool
Panner2d::on_scroll_event (GdkEventScroll* ev)
{
- switch (ev->direction) {
- case GDK_SCROLL_UP:
- case GDK_SCROLL_RIGHT:
- panner_shell->panner()->set_position (panner_shell->pannable()->pan_azimuth_control->get_value() - 1.0/360.0);
- break;
-
- case GDK_SCROLL_DOWN:
- case GDK_SCROLL_LEFT:
- panner_shell->panner()->set_position (panner_shell->pannable()->pan_azimuth_control->get_value() + 1.0/360.0);
- break;
- }
- return true;
+ switch (ev->direction) {
+ case GDK_SCROLL_UP:
+ case GDK_SCROLL_RIGHT:
+ panner_shell->panner()->set_position (panner_shell->pannable()->pan_azimuth_control->get_value() - 1.0/360.0);
+ break;
+
+ case GDK_SCROLL_DOWN:
+ case GDK_SCROLL_LEFT:
+ panner_shell->panner()->set_position (panner_shell->pannable()->pan_azimuth_control->get_value() + 1.0/360.0);
+ break;
+ }
+ return true;
}
void
@@ -840,28 +840,28 @@ Panner2d::cart_to_gtk (CartesianVector& c) const
{
/* cartesian coordinate space:
center = 0.0
- dimension = 2.0 * 2.0
- increasing y moves up
- so max values along each axis are -1..+1
+ dimension = 2.0 * 2.0
+ increasing y moves up
+ so max values along each axis are -1..+1
GTK uses a coordinate space that is:
top left = 0.0
- dimension = (radius*2.0) * (radius*2.0)
- increasing y moves down
+ dimension = (radius*2.0) * (radius*2.0)
+ increasing y moves down
*/
- const double diameter = radius*2.0;
+ const double diameter = radius*2.0;
- c.x = diameter * ((c.x + 1.0) / 2.0);
- /* extra subtraction inverts the y-axis to match "increasing y moves down" */
- c.y = diameter - (diameter * ((c.y + 1.0) / 2.0));
+ c.x = diameter * ((c.x + 1.0) / 2.0);
+ /* extra subtraction inverts the y-axis to match "increasing y moves down" */
+ c.y = diameter - (diameter * ((c.y + 1.0) / 2.0));
}
void
Panner2d::gtk_to_cart (CartesianVector& c) const
{
- const double diameter = radius*2.0;
+ const double diameter = radius*2.0;
c.x = ((c.x / diameter) * 2.0) - 1.0;
- c.y = (((diameter - c.y) / diameter) * 2.0) - 1.0;
+ c.y = (((diameter - c.y) / diameter) * 2.0) - 1.0;
}
void
diff --git a/gtk2_ardour/panner_interface.cc b/gtk2_ardour/panner_interface.cc
index dcbb36487b..08b9a1bc15 100644
--- a/gtk2_ardour/panner_interface.cc
+++ b/gtk2_ardour/panner_interface.cc
@@ -36,13 +36,13 @@ PannerInterface::PannerInterface (boost::shared_ptr<Panner> p)
, _send_mode (false)
, _editor (0)
{
- set_flags (Gtk::CAN_FOCUS);
+ set_flags (Gtk::CAN_FOCUS);
- add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|
- Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|
- Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|
- Gdk::SCROLL_MASK|
- Gdk::POINTER_MOTION_MASK);
+ add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|
+ Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|
+ Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|
+ Gdk::SCROLL_MASK|
+ Gdk::POINTER_MOTION_MASK);
}
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index bc9da1b215..e8f3a8f435 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -60,10 +60,10 @@ PannerUI::PannerUI (Session* s)
pan_astate_menu = 0;
pan_astyle_menu = 0;
in_pan_update = false;
- _stereo_panner = 0;
+ _stereo_panner = 0;
_mono_panner = 0;
- _ignore_width_change = false;
- _ignore_position_change = false;
+ _ignore_width_change = false;
+ _ignore_position_change = false;
pan_automation_state_button.set_name ("MixerAutomationPlaybackButton");
@@ -87,8 +87,8 @@ PannerUI::PannerUI (Session* s)
void
PannerUI::set_panner (boost::shared_ptr<PannerShell> ps, boost::shared_ptr<Panner> p)
{
- /* note that the panshell might not change here (i.e. ps == _panshell)
- */
+ /* note that the panshell might not change here (i.e. ps == _panshell)
+ */
connections.drop_connections ();
@@ -98,17 +98,17 @@ PannerUI::set_panner (boost::shared_ptr<PannerShell> ps, boost::shared_ptr<Panne
delete pan_astate_menu;
pan_astate_menu = 0;
- _panshell = ps;
+ _panshell = ps;
_panner = p;
delete twod_panner;
twod_panner = 0;
- delete _stereo_panner;
- _stereo_panner = 0;
+ delete _stereo_panner;
+ _stereo_panner = 0;
- delete _mono_panner;
- _mono_panner = 0;
+ delete _mono_panner;
+ _mono_panner = 0;
if (!_panner) {
return;
@@ -116,13 +116,13 @@ PannerUI::set_panner (boost::shared_ptr<PannerShell> ps, boost::shared_ptr<Panne
_panshell->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panshell_changed, this), gui_context());
- /* new panner object, force complete reset of panner GUI
- */
+ /* new panner object, force complete reset of panner GUI
+ */
- _current_nouts = 0;
- _current_nins = 0;
+ _current_nouts = 0;
+ _current_nins = 0;
- setup_pan ();
+ setup_pan ();
update_pan_sensitive ();
pan_automation_state_changed ();
}
@@ -176,7 +176,7 @@ PannerUI::build_astyle_menu ()
void
PannerUI::on_size_allocate (Allocation& a)
{
- HBox::on_size_allocate (a);
+ HBox::on_size_allocate (a);
}
void
@@ -192,8 +192,8 @@ PannerUI::~PannerUI ()
delete pan_menu;
delete pan_astyle_menu;
delete pan_astate_menu;
- delete _stereo_panner;
- delete _mono_panner;
+ delete _stereo_panner;
+ delete _mono_panner;
}
void
@@ -217,16 +217,16 @@ PannerUI::setup_pan ()
return;
}
- _current_nins = nins;
- _current_nouts = nouts;
- _current_uri = _panshell->panner_gui_uri();
+ _current_nins = nins;
+ _current_nouts = nouts;
+ _current_uri = _panshell->panner_gui_uri();
- container_clear (pan_vbox);
+ container_clear (pan_vbox);
- delete twod_panner;
- twod_panner = 0;
- delete _stereo_panner;
- _stereo_panner = 0;
+ delete twod_panner;
+ twod_panner = 0;
+ delete _stereo_panner;
+ _stereo_panner = 0;
delete _mono_panner;
_mono_panner = 0;
@@ -338,21 +338,21 @@ PannerUI::set_send_drawing_mode (bool onoff)
void
PannerUI::start_touch (boost::weak_ptr<AutomationControl> wac)
{
- boost::shared_ptr<AutomationControl> ac = wac.lock();
- if (!ac) {
- return;
- }
- ac->start_touch (ac->session().transport_frame());
+ boost::shared_ptr<AutomationControl> ac = wac.lock();
+ if (!ac) {
+ return;
+ }
+ ac->start_touch (ac->session().transport_frame());
}
void
PannerUI::stop_touch (boost::weak_ptr<AutomationControl> wac)
{
- boost::shared_ptr<AutomationControl> ac = wac.lock();
- if (!ac) {
- return;
- }
- ac->stop_touch (false, ac->session().transport_frame());
+ boost::shared_ptr<AutomationControl> ac = wac.lock();
+ if (!ac) {
+ return;
+ }
+ ac->stop_touch (false, ac->session().transport_frame());
}
bool
@@ -465,13 +465,13 @@ PannerUI::pan_set_custom_type (std::string uri) {
void
PannerUI::effective_pan_display ()
{
- if (_stereo_panner) {
- _stereo_panner->queue_draw ();
- } else if (_mono_panner) {
- _mono_panner->queue_draw ();
- } else if (twod_panner) {
- twod_panner->queue_draw ();
- }
+ if (_stereo_panner) {
+ _stereo_panner->queue_draw ();
+ } else if (_mono_panner) {
+ _mono_panner->queue_draw ();
+ } else if (twod_panner) {
+ twod_panner->queue_draw ();
+ }
}
void
@@ -479,11 +479,11 @@ PannerUI::update_pan_sensitive ()
{
bool const sensitive = !(_panner->pannable()->automation_state() & Play);
- pan_vbox.set_sensitive (sensitive);
+ pan_vbox.set_sensitive (sensitive);
- if (big_window) {
- big_window->set_sensitive (sensitive);
- }
+ if (big_window) {
+ big_window->set_sensitive (sensitive);
+ }
}
gint
@@ -512,21 +512,21 @@ PannerUI::pan_automation_state_button_event (GdkEventButton *ev)
void
PannerUI::pan_automation_state_changed ()
{
- boost::shared_ptr<Pannable> pannable (_panner->pannable());
+ boost::shared_ptr<Pannable> pannable (_panner->pannable());
switch (_width) {
case Wide:
- pan_automation_state_button.set_label (astate_string(pannable->automation_state()));
+ pan_automation_state_button.set_label (astate_string(pannable->automation_state()));
break;
case Narrow:
- pan_automation_state_button.set_label (short_astate_string(pannable->automation_state()));
+ pan_automation_state_button.set_label (short_astate_string(pannable->automation_state()));
break;
}
bool x = (pannable->automation_state() != ARDOUR::Off);
if (pan_automation_state_button.get_active() != x) {
- ignore_toggle = true;
+ ignore_toggle = true;
pan_automation_state_button.set_active (x);
ignore_toggle = false;
}
diff --git a/gtk2_ardour/panner_ui.h b/gtk2_ardour/panner_ui.h
index e6372f3486..20a38cc0d9 100644
--- a/gtk2_ardour/panner_ui.h
+++ b/gtk2_ardour/panner_ui.h
@@ -46,7 +46,7 @@ namespace ARDOUR {
class Panner;
class PannerShell;
class Delivery;
- class AutomationControl;
+ class AutomationControl;
}
namespace Gtkmm2ext {
@@ -108,15 +108,15 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
Gtk::VBox poswidth_box;
Width _width;
- StereoPanner* _stereo_panner;
+ StereoPanner* _stereo_panner;
MonoPanner* _mono_panner;
- bool _ignore_width_change;
- bool _ignore_position_change;
- void width_adjusted ();
- void show_width ();
- void position_adjusted ();
- void show_position ();
+ bool _ignore_width_change;
+ bool _ignore_position_change;
+ void width_adjusted ();
+ void show_width ();
+ void position_adjusted ();
+ void show_position ();
Gtk::Menu* pan_astate_menu;
Gtk::Menu* pan_astyle_menu;
@@ -153,8 +153,8 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
std::string short_astate_string (ARDOUR::AutoState);
std::string _astate_string (ARDOUR::AutoState, bool);
- void start_touch (boost::weak_ptr<ARDOUR::AutomationControl>);
- void stop_touch (boost::weak_ptr<ARDOUR::AutomationControl>);
+ void start_touch (boost::weak_ptr<ARDOUR::AutomationControl>);
+ void stop_touch (boost::weak_ptr<ARDOUR::AutomationControl>);
std::map<std::string,std::string> _panner_list;
bool _suspend_menu_callbacks;
diff --git a/gtk2_ardour/patch_change_dialog.h b/gtk2_ardour/patch_change_dialog.h
index ed98df78a3..65b107c8a5 100644
--- a/gtk2_ardour/patch_change_dialog.h
+++ b/gtk2_ardour/patch_change_dialog.h
@@ -77,6 +77,6 @@ private:
boost::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank;
bool _ignore_signals;
- void instrument_info_changed ();
- PBD::ScopedConnection _info_changed_connection;
+ void instrument_info_changed ();
+ PBD::ScopedConnection _info_changed_connection;
};
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc
index 069f3733e1..c637968181 100644
--- a/gtk2_ardour/plugin_eq_gui.cc
+++ b/gtk2_ardour/plugin_eq_gui.cc
@@ -758,7 +758,7 @@ PluginEqGui::plot_impulse_amplitude(Gtk::Widget *w, cairo_t *cr)
// float width = w->get_width();
float height = w->get_height();
- cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
+ cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
cairo_set_line_width (cr, 2.5);
for (uint32_t i = 0; i < _impulse_fft->bins()-1; i++) {
diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h
index 384359b439..428fd76d3c 100644
--- a/gtk2_ardour/plugin_eq_gui.h
+++ b/gtk2_ardour/plugin_eq_gui.h
@@ -36,7 +36,7 @@ namespace ARDOUR {
}
namespace GTKArdour {
- class FFT;
+ class FFT;
}
class PluginEqGui : public Gtk::Table
@@ -113,9 +113,9 @@ private:
float _analysis_height;
// My objects
- GTKArdour::FFT *_impulse_fft;
- GTKArdour::FFT *_signal_input_fft;
- GTKArdour::FFT *_signal_output_fft;
+ 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;
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index 7b8e2b4ace..c67af473a0 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -620,14 +620,14 @@ PluginSelector::run ()
PluginPtr p = load_plugin (pp);
if (p) {
plugins.push_back (p);
- } else {
- MessageDialog msg (string_compose (_("The plugin \"%1\" could not be loaded\n\nSee the Log window for more details (maybe)"), pp->name));
- msg.run ();
- }
+ } else {
+ MessageDialog msg (string_compose (_("The plugin \"%1\" could not be loaded\n\nSee the Log window for more details (maybe)"), pp->name));
+ msg.run ();
+ }
}
if (interested_object && !plugins.empty()) {
finish = !interested_object->use_plugins (plugins);
- }
+ }
break;
@@ -689,57 +689,57 @@ PluginSelector::on_show ()
}
struct PluginMenuCompareByCreator {
- bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
- int cmp;
-
- cmp = cmp_nocase_utf8 (a->creator, b->creator);
-
- if (cmp < 0) {
- return true;
- } else if (cmp == 0) {
- /* same creator ... compare names */
- if (cmp_nocase_utf8 (a->name, b->name) < 0) {
- return true;
- }
- }
- return false;
- }
+ bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
+ int cmp;
+
+ cmp = cmp_nocase_utf8 (a->creator, b->creator);
+
+ if (cmp < 0) {
+ return true;
+ } else if (cmp == 0) {
+ /* same creator ... compare names */
+ if (cmp_nocase_utf8 (a->name, b->name) < 0) {
+ return true;
+ }
+ }
+ return false;
+ }
};
struct PluginMenuCompareByName {
- bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
- int cmp;
-
- cmp = cmp_nocase_utf8 (a->name, b->name);
-
- if (cmp < 0) {
- return true;
- } else if (cmp == 0) {
- /* same name ... compare type */
- if (a->type < b->type) {
- return true;
- }
- }
- return false;
- }
+ bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
+ int cmp;
+
+ cmp = cmp_nocase_utf8 (a->name, b->name);
+
+ if (cmp < 0) {
+ return true;
+ } else if (cmp == 0) {
+ /* same name ... compare type */
+ if (a->type < b->type) {
+ return true;
+ }
+ }
+ return false;
+ }
};
struct PluginMenuCompareByCategory {
- bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
- int cmp;
-
- cmp = cmp_nocase_utf8 (a->category, b->category);
-
- if (cmp < 0) {
- return true;
- } else if (cmp == 0) {
- /* same category ... compare names */
- if (cmp_nocase_utf8 (a->name, b->name) < 0) {
- return true;
- }
- }
- return false;
- }
+ bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
+ int cmp;
+
+ cmp = cmp_nocase_utf8 (a->category, b->category);
+
+ if (cmp < 0) {
+ return true;
+ } else if (cmp == 0) {
+ /* same category ... compare names */
+ if (cmp_nocase_utf8 (a->name, b->name) < 0) {
+ return true;
+ }
+ }
+ return false;
+ }
};
/** @return Plugin menu. The caller should not delete it */
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 15600772e2..7314eb0042 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -92,8 +92,8 @@ PluginUIWindow::PluginUIWindow (
, was_visible (false)
, _keyboard_focused (false)
#ifdef AUDIOUNIT_SUPPORT
- , pre_deactivate_x (-1)
- , pre_deactivate_y (-1)
+ , pre_deactivate_x (-1)
+ , pre_deactivate_y (-1)
#endif
{
@@ -188,9 +188,9 @@ PluginUIWindow::on_show ()
if (_pluginui) {
#if defined (HAVE_AUDIOUNITS) && defined(__APPLE__)
- if (pre_deactivate_x >= 0) {
- move (pre_deactivate_x, pre_deactivate_y);
- }
+ if (pre_deactivate_x >= 0) {
+ move (pre_deactivate_x, pre_deactivate_y);
+ }
#endif
if (_pluginui->on_window_show (_title)) {
@@ -203,7 +203,7 @@ void
PluginUIWindow::on_hide ()
{
#if defined (HAVE_AUDIOUNITS) && defined(__APPLE__)
- get_position (pre_deactivate_x, pre_deactivate_y);
+ get_position (pre_deactivate_x, pre_deactivate_y);
#endif
Window::on_hide ();
@@ -342,15 +342,15 @@ PluginUIWindow::app_activated (bool)
if (yn) {
if (was_visible) {
_pluginui->activate ();
- if (pre_deactivate_x >= 0) {
- move (pre_deactivate_x, pre_deactivate_y);
- }
+ if (pre_deactivate_x >= 0) {
+ move (pre_deactivate_x, pre_deactivate_y);
+ }
present ();
was_visible = true;
}
} else {
was_visible = is_visible();
- get_position (pre_deactivate_x, pre_deactivate_y);
+ get_position (pre_deactivate_x, pre_deactivate_y);
hide ();
_pluginui->deactivate ();
}
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 8bdc4deec2..042a2404a2 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -144,7 +144,7 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL
ArdourButton automation_manual_all_button;
/** a button which sets all controls' automation setting to Play */
ArdourButton automation_play_all_button;
- /** a button which sets all controls' automation setting to Write */
+ /** a button which sets all controls' automation setting to Write */
ArdourButton automation_write_all_button;
/** a button which sets all controls' automation setting to Touch */
ArdourButton automation_touch_all_button;
@@ -328,8 +328,8 @@ class PluginUIWindow : public ArdourWindow
bool was_visible;
bool _keyboard_focused;
#ifdef AUDIOUNIT_SUPPORT
- int pre_deactivate_x;
- int pre_deactivate_y;
+ int pre_deactivate_x;
+ int pre_deactivate_y;
#endif
void keyboard_focused (bool yn);
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index 5db8585a83..63291498e1 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -351,11 +351,11 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
for (RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
- /* we never show the monitor bus inputs */
+ /* we never show the monitor bus inputs */
- if (inputs && (*i)->is_monitor()) {
- continue;
- }
+ if (inputs && (*i)->is_monitor()) {
+ continue;
+ }
/* keep track of IOs that we have taken bundles from,
so that we can avoid taking the same IO from both
@@ -500,10 +500,10 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
std::vector<std::string> extra_program[DataType::num_types];
std::vector<std::string> extra_other[DataType::num_types];
- string lpn (PROGRAM_NAME);
- boost::to_lower (lpn);
- string lpnc = lpn;
- lpnc += ':';
+ string lpn (PROGRAM_NAME);
+ boost::to_lower (lpn);
+ string lpnc = lpn;
+ lpnc += ':';
vector<string> ports;
if (type == DataType::NIL) {
@@ -529,31 +529,31 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
!program->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.
- */
+ /* special hack: ignore MIDI ports labelled Midi-Through. these
+ are basically useless and mess things up for default
+ connections.
+ */
if (p.find ("Midi-Through") != string::npos || p.find ("Midi Through") != string::npos) {
- ++s;
- continue;
- }
+ ++s;
+ continue;
+ }
- /* special hack: ignore our monitor inputs (which show up here because
- we excluded them earlier.
- */
+ /* special hack: ignore our monitor inputs (which show up here because
+ we excluded them earlier.
+ */
string lp = p;
string monitor = _("Monitor");
boost::to_lower (lp);
- boost::to_lower (monitor);
+ boost::to_lower (monitor);
- if ((lp.find (monitor) != string::npos) &&
- (lp.find (lpn) != string::npos)) {
- ++s;
- continue;
- }
+ if ((lp.find (monitor) != string::npos) &&
+ (lp.find (lpn) != string::npos)) {
+ ++s;
+ continue;
+ }
/* can't use the audio engine for this as we
* are looking at ports not owned by the
diff --git a/gtk2_ardour/port_insert_ui.cc b/gtk2_ardour/port_insert_ui.cc
index 0bf8653299..2cbd8b228f 100644
--- a/gtk2_ardour/port_insert_ui.cc
+++ b/gtk2_ardour/port_insert_ui.cc
@@ -35,110 +35,110 @@ using namespace ARDOUR;
using namespace Gtk;
PortInsertUI::PortInsertUI (Gtk::Window* parent, ARDOUR::Session* sess, boost::shared_ptr<ARDOUR::PortInsert> pi)
- : _pi (pi)
- , latency_button (_("Measure Latency"))
- , input_selector (parent, sess, pi->input())
- , output_selector (parent, sess, pi->output())
+ : _pi (pi)
+ , latency_button (_("Measure Latency"))
+ , input_selector (parent, sess, pi->input())
+ , output_selector (parent, sess, pi->output())
{
- latency_hbox.pack_start (latency_button, false, false);
- latency_hbox.pack_start (latency_display, false, false);
+ latency_hbox.pack_start (latency_button, false, false);
+ latency_hbox.pack_start (latency_display, false, false);
latency_hbox.set_spacing (4);
output_selector.set_min_height_divisor (2);
input_selector.set_min_height_divisor (2);
- notebook.append_page (output_selector, _("Send/Output"));
- notebook.append_page (input_selector, _("Return/Input"));
+ notebook.append_page (output_selector, _("Send/Output"));
+ notebook.append_page (input_selector, _("Return/Input"));
- notebook.set_current_page (0);
+ notebook.set_current_page (0);
- set_spacing (12);
- pack_start (notebook, true, true);
- pack_start (latency_hbox, false, false);
+ set_spacing (12);
+ pack_start (notebook, true, true);
+ pack_start (latency_hbox, false, false);
- update_latency_display ();
+ update_latency_display ();
- latency_button.signal_toggled().connect (mem_fun (*this, &PortInsertUI::latency_button_toggled));
+ latency_button.signal_toggled().connect (mem_fun (*this, &PortInsertUI::latency_button_toggled));
latency_button.set_name (X_("MeasureLatencyButton"));
}
void
PortInsertUI::update_latency_display ()
{
- framecnt_t const sample_rate = AudioEngine::instance()->sample_rate();
- if (sample_rate == 0) {
- latency_display.set_text (_("Disconnected from audio engine"));
- } else {
- char buf[64];
- 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);
- }
+ framecnt_t const sample_rate = AudioEngine::instance()->sample_rate();
+ if (sample_rate == 0) {
+ latency_display.set_text (_("Disconnected from audio engine"));
+ } else {
+ char buf[64];
+ 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);
+ }
}
bool
PortInsertUI::check_latency_measurement ()
{
- MTDM* mtdm = _pi->mtdm ();
+ MTDM* mtdm = _pi->mtdm ();
- if (mtdm->resolve () < 0) {
- latency_display.set_text (_("No signal detected"));
- return true;
- }
+ if (mtdm->resolve () < 0) {
+ latency_display.set_text (_("No signal detected"));
+ return true;
+ }
- if (mtdm->err () > 0.3) {
- mtdm->invert ();
- mtdm->resolve ();
- }
+ if (mtdm->err () > 0.3) {
+ mtdm->invert ();
+ mtdm->resolve ();
+ }
- char buf[128];
- framecnt_t const sample_rate = AudioEngine::instance()->sample_rate();
+ char buf[128];
+ framecnt_t const sample_rate = AudioEngine::instance()->sample_rate();
- if (sample_rate == 0) {
- latency_display.set_text (_("Disconnected from audio engine"));
- _pi->stop_latency_detection ();
- return false;
- }
+ if (sample_rate == 0) {
+ latency_display.set_text (_("Disconnected from audio engine"));
+ _pi->stop_latency_detection ();
+ return false;
+ }
- snprintf (buf, sizeof (buf), "%10.3lf frames %10.3lf ms", mtdm->del (), mtdm->del () * 1000.0f/sample_rate);
+ snprintf (buf, sizeof (buf), "%10.3lf frames %10.3lf ms", mtdm->del (), mtdm->del () * 1000.0f/sample_rate);
- bool solid = true;
+ bool solid = true;
- if (mtdm->err () > 0.2) {
- strcat (buf, " ??");
- solid = false;
- }
+ if (mtdm->err () > 0.2) {
+ strcat (buf, " ??");
+ solid = false;
+ }
- if (mtdm->inv ()) {
- strcat (buf, " (Inv)");
- solid = false;
- }
+ if (mtdm->inv ()) {
+ strcat (buf, " (Inv)");
+ solid = false;
+ }
- if (solid) {
- _pi->set_measured_latency (rint (mtdm->del()));
- latency_button.set_active (false);
- strcat (buf, " (set)");
- }
+ if (solid) {
+ _pi->set_measured_latency (rint (mtdm->del()));
+ latency_button.set_active (false);
+ strcat (buf, " (set)");
+ }
- latency_display.set_text (buf);
+ latency_display.set_text (buf);
- return true;
+ return true;
}
void
PortInsertUI::latency_button_toggled ()
{
- if (latency_button.get_active ()) {
+ if (latency_button.get_active ()) {
- _pi->start_latency_detection ();
- latency_display.set_text (_("Detecting ..."));
- latency_timeout = Glib::signal_timeout().connect (mem_fun (*this, &PortInsertUI::check_latency_measurement), 250);
+ _pi->start_latency_detection ();
+ latency_display.set_text (_("Detecting ..."));
+ latency_timeout = Glib::signal_timeout().connect (mem_fun (*this, &PortInsertUI::check_latency_measurement), 250);
- } else {
- _pi->stop_latency_detection ();
- latency_timeout.disconnect ();
- update_latency_display ();
- }
+ } else {
+ _pi->stop_latency_detection ();
+ latency_timeout.disconnect ();
+ update_latency_display ();
+ }
}
void
diff --git a/gtk2_ardour/port_insert_ui.h b/gtk2_ardour/port_insert_ui.h
index 75a4ad17c0..d0f2e53e90 100644
--- a/gtk2_ardour/port_insert_ui.h
+++ b/gtk2_ardour/port_insert_ui.h
@@ -37,19 +37,19 @@ class PortInsertUI : public Gtk::VBox
void finished (IOSelector::Result);
private:
- boost::shared_ptr<ARDOUR::PortInsert> _pi;
+ boost::shared_ptr<ARDOUR::PortInsert> _pi;
- Gtk::Notebook notebook;
+ Gtk::Notebook notebook;
Gtkmm2ext::StatefulToggleButton latency_button;
IOSelector input_selector;
IOSelector output_selector;
- Gtk::Label latency_display;
- Gtk::HBox latency_hbox;
- sigc::connection latency_timeout;
+ Gtk::Label latency_display;
+ Gtk::HBox latency_hbox;
+ sigc::connection latency_timeout;
- bool check_latency_measurement ();
- void latency_button_toggled ();
- void update_latency_display ();
+ bool check_latency_measurement ();
+ void latency_button_toggled ();
+ void update_latency_display ();
};
class PortInsertWindow : public ArdourDialog
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 1b588511fd..23e9acaf62 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -483,12 +483,12 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
);
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))) {
- add_remove_option (sub, w, i);
- }
- }
- }
+ for (uint32_t i = 0; i < bc[dim].bundle->nchannels().n_total(); ++i) {
+ if (should_show (bc[dim].bundle->channel_type(i))) {
+ add_remove_option (sub, w, i);
+ }
+ }
+ }
}
}
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index 24fb575d39..c07a6dc529 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -471,7 +471,7 @@ PortMatrixBody::highlight_associated_channels (int dim, ARDOUR::BundleChannel h)
PortGroup::BundleList const b = _matrix->visible_ports(1 - dim)->bundles ();
for (PortGroup::BundleList::const_iterator i = b.begin(); i != b.end(); ++i) {
- for (uint32_t j = 0; j < (*i)->bundle->nchannels().n_total(); ++j) {
+ for (uint32_t j = 0; j < (*i)->bundle->nchannels().n_total(); ++j) {
if (!_matrix->should_show ((*i)->bundle->channel_type(j))) {
continue;
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index f1dd84a84d..14ba4a8e63 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -2745,11 +2745,11 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
wp->set_state (*ui_xml, 0);
}
- void* existing_ui = p->get_ui ();
+ void* existing_ui = p->get_ui ();
- if (existing_ui) {
- wp->use_window (*(reinterpret_cast<Gtk::Window*>(existing_ui)));
- }
+ if (existing_ui) {
+ wp->use_window (*(reinterpret_cast<Gtk::Window*>(existing_ui)));
+ }
p->set_window_proxy (wp);
WM::Manager::instance().register_window (wp);
@@ -3270,26 +3270,26 @@ ProcessorBox::rename_processor (boost::shared_ptr<Processor> processor)
name_prompter.get_result (result);
if (result.length()) {
- int tries = 0;
- string test = result;
-
- while (tries < 100) {
- if (_session->io_name_is_legal (test)) {
- result = test;
- break;
- }
- tries++;
-
- test = string_compose ("%1-%2", result, tries);
- }
-
- if (tries < 100) {
- processor->set_name (result);
- } else {
- /* unlikely! */
- ARDOUR_UI::instance()->popup_error
- (string_compose (_("At least 100 IO objects exist with a name like %1 - name not changed"), result));
- }
+ int tries = 0;
+ string test = result;
+
+ while (tries < 100) {
+ if (_session->io_name_is_legal (test)) {
+ result = test;
+ break;
+ }
+ tries++;
+
+ test = string_compose ("%1-%2", result, tries);
+ }
+
+ if (tries < 100) {
+ processor->set_name (result);
+ } else {
+ /* unlikely! */
+ ARDOUR_UI::instance()->popup_error
+ (string_compose (_("At least 100 IO objects exist with a name like %1 - name not changed"), result));
+ }
}
break;
}
@@ -3362,10 +3362,10 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
IOProcessor::prepare_for_reset (n, s->name());
- if (s->set_state (n, Stateful::loading_state_version)) {
- delete s;
- return;
- }
+ if (s->set_state (n, Stateful::loading_state_version)) {
+ delete s;
+ return;
+ }
p.reset (s);
@@ -3378,24 +3378,24 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
IOProcessor::prepare_for_reset (n, s->name());
- if (s->set_state (n, Stateful::loading_state_version)) {
- delete s;
- return;
- }
+ if (s->set_state (n, Stateful::loading_state_version)) {
+ delete s;
+ return;
+ }
p.reset (s);
} else if (type->value() == "return") {
XMLNode n (**niter);
- Return* r = new Return (*_session);
+ Return* r = new Return (*_session);
IOProcessor::prepare_for_reset (n, r->name());
- if (r->set_state (n, Stateful::loading_state_version)) {
- delete r;
- return;
- }
+ if (r->set_state (n, Stateful::loading_state_version)) {
+ delete r;
+ return;
+ }
p.reset (r);
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h
index 5e73afa45c..cd75c7c8a0 100644
--- a/gtk2_ardour/processor_box.h
+++ b/gtk2_ardour/processor_box.h
@@ -435,16 +435,16 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
bool edit_aux_send(boost::shared_ptr<ARDOUR::Processor>);
- /* Everything except a WindowProxy object should use this to get the window */
+ /* Everything except a WindowProxy object should use this to get the window */
Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;
- /* a WindowProxy object can use this */
- Gtk::Window* get_editor_window (boost::shared_ptr<ARDOUR::Processor>, bool);
- Gtk::Window* get_generic_editor_window (boost::shared_ptr<ARDOUR::Processor>);
+ /* a WindowProxy object can use this */
+ Gtk::Window* get_editor_window (boost::shared_ptr<ARDOUR::Processor>, bool);
+ Gtk::Window* get_generic_editor_window (boost::shared_ptr<ARDOUR::Processor>);
- void manage_pins (boost::shared_ptr<ARDOUR::Processor>);
- void edit_processor (boost::shared_ptr<ARDOUR::Processor>);
- void generic_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
+ void manage_pins (boost::shared_ptr<ARDOUR::Processor>);
+ void edit_processor (boost::shared_ptr<ARDOUR::Processor>);
+ void generic_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
void update_gui_object_state (ProcessorEntry *);
@@ -497,7 +497,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
void route_going_away ();
- bool is_editor_mixer_strip() const;
+ bool is_editor_mixer_strip() const;
Gtkmm2ext::DnDVBox<ProcessorEntry> processor_display;
Gtk::ScrolledWindow processor_scroller;
@@ -511,7 +511,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
void object_drop (Gtkmm2ext::DnDVBox<ProcessorEntry> *, ProcessorEntry *, Glib::RefPtr<Gdk::DragContext> const &);
Width _width;
- bool _redisplay_pending;
+ bool _redisplay_pending;
Gtk::Menu *processor_menu;
gint processor_menu_map_handler (GdkEventAny *ev);
@@ -609,10 +609,10 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
void route_property_changed (const PBD::PropertyChange&);
std::string generate_processor_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
- //typedef std::list<ProcessorWindowProxy*> ProcessorWindowProxies;
- //ProcessorWindowProxies _processor_window_info;
+ //typedef std::list<ProcessorWindowProxy*> ProcessorWindowProxies;
+ //ProcessorWindowProxies _processor_window_info;
- ProcessorWindowProxy* find_window_proxy (boost::shared_ptr<ARDOUR::Processor>) const;
+ ProcessorWindowProxy* find_window_proxy (boost::shared_ptr<ARDOUR::Processor>) const;
void set_processor_ui (boost::shared_ptr<ARDOUR::Processor>, Gtk::Window *);
void maybe_add_processor_to_ui_list (boost::weak_ptr<ARDOUR::Processor>);
diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc
index 596f6009aa..b480750810 100644
--- a/gtk2_ardour/region_editor.cc
+++ b/gtk2_ardour/region_editor.cc
@@ -46,30 +46,30 @@ using namespace ARDOUR_UI_UTILS;
RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
: ArdourDialog (_("Region"))
- , _table (9, 2)
- , _table_row (0)
- , _region (r)
- , name_label (_("Name:"))
- , audition_button (_("Audition"))
- , _clock_group (new ClockGroup)
- , position_clock (X_("regionposition"), true, "", true, false)
- , end_clock (X_("regionend"), true, "", true, false)
- , length_clock (X_("regionlength"), true, "", true, false, true)
- , sync_offset_relative_clock (X_("regionsyncoffsetrelative"), true, "", true, false)
- , sync_offset_absolute_clock (X_("regionsyncoffsetabsolute"), true, "", true, false)
- /* XXX cannot file start yet */
- , start_clock (X_("regionstart"), true, "", false, false)
- , _sources (1)
+ , _table (9, 2)
+ , _table_row (0)
+ , _region (r)
+ , name_label (_("Name:"))
+ , audition_button (_("Audition"))
+ , _clock_group (new ClockGroup)
+ , position_clock (X_("regionposition"), true, "", true, false)
+ , end_clock (X_("regionend"), true, "", true, false)
+ , length_clock (X_("regionlength"), true, "", true, false, true)
+ , sync_offset_relative_clock (X_("regionsyncoffsetrelative"), true, "", true, false)
+ , sync_offset_absolute_clock (X_("regionsyncoffsetabsolute"), true, "", true, false)
+ /* XXX cannot file start yet */
+ , start_clock (X_("regionstart"), true, "", false, false)
+ , _sources (1)
{
set_session (s);
- _clock_group->set_clock_mode (ARDOUR_UI::instance()->secondary_clock->mode());
- _clock_group->add (position_clock);
- _clock_group->add (end_clock);
- _clock_group->add (length_clock);
- _clock_group->add (sync_offset_relative_clock);
- _clock_group->add (sync_offset_absolute_clock);
- _clock_group->add (start_clock);
+ _clock_group->set_clock_mode (ARDOUR_UI::instance()->secondary_clock->mode());
+ _clock_group->add (position_clock);
+ _clock_group->add (end_clock);
+ _clock_group->add (length_clock);
+ _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);
@@ -198,7 +198,7 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
RegionEditor::~RegionEditor ()
{
- delete _clock_group;
+ delete _clock_group;
}
void
@@ -299,7 +299,7 @@ RegionEditor::end_clock_changed ()
PublicEditor::instance().begin_reversible_command (_("change region end position"));
in_command = true;
- _region->clear_changes ();
+ _region->clear_changes ();
_region->trim_end (end_clock.current_time());
_session->add_command(new StatefulDiffCommand (_region));
}
@@ -415,7 +415,7 @@ RegionEditor::sync_offset_absolute_clock_changed ()
{
PublicEditor::instance().begin_reversible_command (_("change region sync point"));
- _region->clear_changes ();
+ _region->clear_changes ();
_region->set_sync_position (sync_offset_absolute_clock.current_time());
_session->add_command (new StatefulDiffCommand (_region));
@@ -427,7 +427,7 @@ RegionEditor::sync_offset_relative_clock_changed ()
{
PublicEditor::instance().begin_reversible_command (_("change region sync point"));
- _region->clear_changes ();
+ _region->clear_changes ();
_region->set_sync_position (sync_offset_relative_clock.current_time() + _region->position ());
_session->add_command (new StatefulDiffCommand (_region));
diff --git a/gtk2_ardour/region_editor.h b/gtk2_ardour/region_editor.h
index b584a9b0b8..1889731fff 100644
--- a/gtk2_ardour/region_editor.h
+++ b/gtk2_ardour/region_editor.h
@@ -77,7 +77,7 @@ class RegionEditor : public ArdourDialog
Gtk::Label sync_absolute_label;
Gtk::Label start_label;
- ClockGroup* _clock_group;
+ ClockGroup* _clock_group;
AudioClock position_clock;
AudioClock end_clock;
diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc
index f263c17888..134809c9e5 100644
--- a/gtk2_ardour/region_gain_line.cc
+++ b/gtk2_ardour/region_gain_line.cc
@@ -59,7 +59,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
+ // 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));
@@ -75,7 +75,7 @@ AudioRegionGainLine::remove_point (ControlPoint& cp)
XMLNode &before = alist->get_state();
if (!rv.audio_region()->envelope_active()) {
- rv.audio_region()->clear_changes ();
+ rv.audio_region()->clear_changes ();
rv.audio_region()->set_envelope_active(true);
trackview.session()->add_command(new StatefulDiffCommand (rv.audio_region()));
}
diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h
index 018ed3d936..f1f9ae88b5 100644
--- a/gtk2_ardour/region_gain_line.h
+++ b/gtk2_ardour/region_gain_line.h
@@ -37,8 +37,8 @@ class AudioRegionGainLine : public AutomationLine
public:
AudioRegionGainLine (const std::string & name, AudioRegionView&, ArdourCanvas::Container& parent, boost::shared_ptr<ARDOUR::AutomationList>);
- void start_drag_single (ControlPoint*, double, float);
- void end_drag (bool with_push, uint32_t final_index);
+ void start_drag_single (ControlPoint*, double, float);
+ void end_drag (bool with_push, uint32_t final_index);
void remove_point (ControlPoint&);
AudioRegionView& region_view () { return rv; }
diff --git a/gtk2_ardour/region_layering_order_editor.cc b/gtk2_ardour/region_layering_order_editor.cc
index e58c7c9768..35f493654e 100644
--- a/gtk2_ardour/region_layering_order_editor.cc
+++ b/gtk2_ardour/region_layering_order_editor.cc
@@ -42,9 +42,9 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
: ArdourWindow (_("RegionLayeringOrderEditor"))
, position (0)
, in_row_change (false)
- , regions_at_position (0)
+ , regions_at_position (0)
, layering_order_model (Gtk::ListStore::create (layering_order_columns))
- , clock ("layer dialog", true, "", false, false, false)
+ , clock ("layer dialog", true, "", false, false, false)
, editor (pe)
, _time_axis_view (0)
{
@@ -62,29 +62,29 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
clock.set_mode (AudioClock::BBT);
- Gtk::Table* scroller_table = manage (new Gtk::Table);
- scroller_table->set_size_request (300, 250);
- scroller_table->attach (scroller, 0, 1, 0, 1);
- scroller_table->set_col_spacings (5);
- scroller_table->set_row_spacings (5);
+ Gtk::Table* scroller_table = manage (new Gtk::Table);
+ scroller_table->set_size_request (300, 250);
+ 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_name ("RegionLayeringOrderEditorLabel");
+ track_label.set_text (_("Track:"));
track_label.set_alignment (0, 0.5);
- clock_label.set_name ("RegionLayeringOrderEditorLabel");
- clock_label.set_text (_("Position:"));
+ clock_label.set_name ("RegionLayeringOrderEditorLabel");
+ clock_label.set_text (_("Position:"));
clock_label.set_alignment (0, 0.5);
- track_name_label.set_name ("RegionLayeringOrderEditorNameLabel");
+ track_name_label.set_name ("RegionLayeringOrderEditorNameLabel");
track_name_label.set_alignment (0, 0.5);
- clock.set_mode (AudioClock::BBT);
+ 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);
- info_table->attach (track_label, 0, 1, 0, 1, FILL, FILL);
- 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, Gtk::AttachOptions(0), FILL);
+ Gtk::Table* info_table = manage (new Gtk::Table (2, 2));
+ info_table->set_col_spacings (5);
+ info_table->set_row_spacings (5);
+ info_table->attach (track_label, 0, 1, 0, 1, FILL, FILL);
+ 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, Gtk::AttachOptions(0), FILL);
Gtk::VBox* vbox = Gtk::manage (new Gtk::VBox ());
vbox->set_spacing (12);
@@ -92,8 +92,8 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
vbox->pack_start (*scroller_table, true, true);
add (*vbox);
- info_table->set_name ("RegionLayeringOrderTable");
- scroller_table->set_name ("RegionLayeringOrderTable");
+ info_table->set_name ("RegionLayeringOrderTable");
+ scroller_table->set_name ("RegionLayeringOrderTable");
layering_order_display.set_name ("RegionLayeringOrderDisplay");
layering_order_display.get_selection()->set_mode (SELECTION_SINGLE);
@@ -177,9 +177,9 @@ RegionLayeringOrderEditor::refill ()
newrow[layering_order_columns.name] = (*i)->region()->name();
newrow[layering_order_columns.region_view] = *i;
- if (i == region_list.begin()) {
- layering_order_display.get_selection()->select(newrow);
- }
+ if (i == region_list.begin()) {
+ layering_order_display.get_selection()->select(newrow);
+ }
}
in_row_change = false;
@@ -188,7 +188,7 @@ RegionLayeringOrderEditor::refill ()
void
RegionLayeringOrderEditor::set_context (const string& a_name, Session* s, TimeAxisView* tav, boost::shared_ptr<Playlist> pl, framepos_t pos)
{
- track_name_label.set_text (a_name);
+ track_name_label.set_text (a_name);
clock.set_session (s);
clock.set (pos, true);
diff --git a/gtk2_ardour/region_layering_order_editor.h b/gtk2_ardour/region_layering_order_editor.h
index eb9e252017..a1246dbc64 100644
--- a/gtk2_ardour/region_layering_order_editor.h
+++ b/gtk2_ardour/region_layering_order_editor.h
@@ -54,7 +54,7 @@ class RegionLayeringOrderEditor : public ArdourWindow
bool in_row_change;
uint32_t regions_at_position;
- PBD::ScopedConnection playlist_modified_connection;
+ PBD::ScopedConnection playlist_modified_connection;
struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord {
LayeringOrderColumns () {
@@ -75,7 +75,7 @@ class RegionLayeringOrderEditor : public ArdourWindow
PublicEditor& editor;
TimeAxisView* _time_axis_view;
- void row_selected ();
+ void row_selected ();
void refill ();
void playlist_modified ();
};
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 2679cc9381..c0f3f60e3f 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -106,12 +106,12 @@ bool
RegionSelection::add (RegionView* rv)
{
if (!rv->region()->playlist()) {
- /* not attached to a playlist - selection not allowed.
- This happens if the user tries to select a region
- during a capture pass.
- */
- return false;
- }
+ /* not attached to a playlist - selection not allowed.
+ This happens if the user tries to select a region
+ during a capture pass.
+ */
+ return false;
+ }
if (contains (rv)) {
/* we already have it */
@@ -180,9 +180,9 @@ RegionSelection::add_to_layer (RegionView * rv)
}
struct RegionSortByTime {
- bool operator() (const RegionView* a, const RegionView* b) const {
- return a->region()->position() < b->region()->position();
- }
+ bool operator() (const RegionView* a, const RegionView* b) const {
+ return a->region()->position() < b->region()->position();
+ }
};
@@ -205,16 +205,16 @@ RegionSelection::by_position (list<RegionView*>& foo) const
}
struct RegionSortByTrack {
- bool operator() (const RegionView* a, const RegionView* b) const {
+ bool operator() (const RegionView* a, const RegionView* b) const {
- /* really, track and position */
+ /* really, track and position */
- if (a->get_time_axis_view().order() == b->get_time_axis_view().order()) {
- return a->region()->position() < b->region()->position();
- } else {
- return a->get_time_axis_view().order() < b->get_time_axis_view().order();
- }
- }
+ if (a->get_time_axis_view().order() == b->get_time_axis_view().order()) {
+ return a->region()->position() < b->region()->position();
+ } else {
+ return a->get_time_axis_view().order() < b->get_time_axis_view().order();
+ }
+ }
};
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index c689a15e7d..893a973ddd 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -203,7 +203,7 @@ RegionView::~RegionView ()
delete *i;
}
- drop_silent_frames ();
+ drop_silent_frames ();
delete editor;
}
@@ -220,16 +220,16 @@ RegionView::canvas_group_event (GdkEvent* event)
void
RegionView::set_silent_frames (const AudioIntervalResult& silences, double /*threshold*/)
{
- framecnt_t shortest = max_framecnt;
+ framecnt_t shortest = max_framecnt;
/* remove old silent frames */
- drop_silent_frames ();
+ drop_silent_frames ();
- if (silences.empty()) {
- return;
- }
+ if (silences.empty()) {
+ return;
+ }
- uint32_t const color = UIConfiguration::instance().color_mod ("silence", "silence");
+ uint32_t const color = UIConfiguration::instance().color_mod ("silence", "silence");
for (AudioIntervalResult::const_iterator i = silences.begin(); i != silences.end(); ++i) {
@@ -250,7 +250,7 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double /*thr
}
/* Find shortest audible segment */
- framecnt_t shortest_audible = max_framecnt;
+ framecnt_t shortest_audible = max_framecnt;
framecnt_t s = _region->start();
for (AudioIntervalResult::const_iterator i = silences.begin(); i != silences.end(); ++i) {
@@ -267,50 +267,50 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double /*thr
shortest_audible = min (shortest_audible, dur);
}
- _silence_text = new ArdourCanvas::Text (group);
+ _silence_text = new ArdourCanvas::Text (group);
_silence_text->set_ignore_events (true);
- _silence_text->set_font_description (get_font_for_style (N_("SilenceText")));
- _silence_text->set_color (UIConfiguration::instance().color ("silence text"));
+ _silence_text->set_font_description (get_font_for_style (N_("SilenceText")));
+ _silence_text->set_color (UIConfiguration::instance().color ("silence text"));
- /* both positions are relative to the region start offset in source */
+ /* both positions are relative to the region start offset in source */
- _silence_text->set_x_position (trackview.editor().sample_to_pixel (silences.front().first - _region->start()) + 10.0);
- _silence_text->set_y_position (20.0);
+ _silence_text->set_x_position (trackview.editor().sample_to_pixel (silences.front().first - _region->start()) + 10.0);
+ _silence_text->set_y_position (20.0);
- double ms = (float) shortest/_region->session().frame_rate();
+ double ms = (float) shortest/_region->session().frame_rate();
- /* ms are now in seconds */
+ /* ms are now in seconds */
- char const * sunits;
+ char const * sunits;
- if (ms >= 60.0) {
- sunits = _("minutes");
- ms /= 60.0;
- } else if (ms < 1.0) {
- sunits = _("msecs");
- ms *= 1000.0;
- } else {
- sunits = _("secs");
- }
+ if (ms >= 60.0) {
+ sunits = _("minutes");
+ ms /= 60.0;
+ } else if (ms < 1.0) {
+ sunits = _("msecs");
+ ms *= 1000.0;
+ } else {
+ sunits = _("secs");
+ }
string text = string_compose (ngettext ("%1 silent segment", "%1 silent segments", silences.size()), silences.size())
+ ", "
+ string_compose (_("shortest = %1 %2"), ms, sunits);
- if (shortest_audible != max_framepos) {
- /* 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;
- } else if (ma < 1.0) {
- aunits = _("msecs");
- ma *= 1000.0;
- } else {
- aunits = _("secs");
- }
+ if (shortest_audible != max_framepos) {
+ /* 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;
+ } else if (ma < 1.0) {
+ aunits = _("msecs");
+ ma *= 1000.0;
+ } else {
+ aunits = _("secs");
+ }
text += string_compose (_("\n (shortest audible segment = %1 %2)"), ma, aunits);
}
@@ -322,9 +322,9 @@ void
RegionView::hide_silent_frames ()
{
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin (); i != _silent_frames.end (); ++i) {
- (*i)->hide ();
+ (*i)->hide ();
}
- _silence_text->hide();
+ _silence_text->hide();
}
void
@@ -333,10 +333,10 @@ RegionView::drop_silent_frames ()
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin (); i != _silent_frames.end (); ++i) {
delete *i;
}
- _silent_frames.clear ();
+ _silent_frames.clear ();
- delete _silence_text;
- _silence_text = 0;
+ delete _silence_text;
+ _silence_text = 0;
}
gint
diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h
index 10eb7b5dc6..4e5354ea31 100644
--- a/gtk2_ardour/region_view.h
+++ b/gtk2_ardour/region_view.h
@@ -108,12 +108,12 @@ class RegionView : public TimeAxisViewItem
virtual void trim_front_ending () {}
bool trim_end (framepos_t, bool, const int32_t sub_num);
- void move_contents (ARDOUR::frameoffset_t);
+ void move_contents (ARDOUR::frameoffset_t);
virtual void thaw_after_trim ();
- void set_silent_frames (const ARDOUR::AudioIntervalResult&, double threshold);
- void drop_silent_frames ();
- void hide_silent_frames ();
+ void set_silent_frames (const ARDOUR::AudioIntervalResult&, double threshold);
+ void drop_silent_frames ();
+ void hide_silent_frames ();
struct PositionOrder {
bool operator()(const RegionView* a, const RegionView* b) {
@@ -136,7 +136,7 @@ class RegionView : public TimeAxisViewItem
bool recording,
TimeAxisViewItem::Visibility);
- bool canvas_group_event (GdkEvent*);
+ bool canvas_group_event (GdkEvent*);
virtual void region_resized (const PBD::PropertyChange&);
virtual void region_muted ();
@@ -187,9 +187,9 @@ class RegionView : public TimeAxisViewItem
/** a list of rectangles used to show the current silence threshold
*/
std::list<ArdourCanvas::Rectangle*> _silent_threshold_frames;
- /** a text item to display strip silence statistics
- */
- ArdourCanvas::Text* _silence_text;
+ /** a text item to display strip silence statistics
+ */
+ ArdourCanvas::Text* _silence_text;
};
#endif /* __gtk_ardour_region_view_h__ */
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index fe33a002f4..2b069ff519 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -155,22 +155,22 @@ protected:
boost::shared_ptr<AutomationTimeAxisView> view;
RouteTimeAxisView& parent;
- ProcessorAutomationNode (Evoral::Parameter w, Gtk::CheckMenuItem* mitem, RouteTimeAxisView& p)
+ ProcessorAutomationNode (Evoral::Parameter w, Gtk::CheckMenuItem* mitem, RouteTimeAxisView& p)
: what (w), menu_item (mitem), parent (p) {}
- ~ProcessorAutomationNode ();
+ ~ProcessorAutomationNode ();
};
struct ProcessorAutomationInfo {
- boost::shared_ptr<ARDOUR::Processor> processor;
- bool valid;
- Gtk::Menu* menu;
- std::vector<ProcessorAutomationNode*> lines;
+ boost::shared_ptr<ARDOUR::Processor> processor;
+ bool valid;
+ Gtk::Menu* menu;
+ std::vector<ProcessorAutomationNode*> lines;
- ProcessorAutomationInfo (boost::shared_ptr<ARDOUR::Processor> i)
+ ProcessorAutomationInfo (boost::shared_ptr<ARDOUR::Processor> i)
: processor (i), valid (true), menu (0) {}
- ~ProcessorAutomationInfo ();
+ ~ProcessorAutomationInfo ();
};
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index c35d80d848..4e11956189 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -770,7 +770,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
return false;
if (!_session->engine().connected()) {
- MessageDialog msg (_("Not connected to AudioEngine - cannot engage record"));
+ MessageDialog msg (_("Not connected to AudioEngine - cannot engage record"));
msg.run ();
return false;
}
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index 7baf99d32a..a61703a18e 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -308,16 +308,16 @@ class RouteUI : public virtual Selectable, public virtual ARDOUR::SessionHandleP
protected:
struct SoloMuteRelease {
- 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;
- boost::shared_ptr<ARDOUR::Route> route;
- bool active;
- bool exclusive;
+ 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;
+ boost::shared_ptr<ARDOUR::Route> route;
+ bool active;
+ bool exclusive;
};
SoloMuteRelease* _solo_release;
diff --git a/gtk2_ardour/search_path_option.cc b/gtk2_ardour/search_path_option.cc
index 925b9834cb..6f51511e44 100644
--- a/gtk2_ardour/search_path_option.cc
+++ b/gtk2_ardour/search_path_option.cc
@@ -29,30 +29,30 @@ using namespace Gtk;
SearchPathOption::SearchPathOption (const string& pathname, const string& label,
const string& default_path,
sigc::slot<std::string> get, sigc::slot<bool, std::string> set)
- : Option (pathname, label)
- , _get (get)
- , _set (set)
- , add_chooser (_("Select folder to search for media"), FILE_CHOOSER_ACTION_SELECT_FOLDER)
+ : Option (pathname, label)
+ , _get (get)
+ , _set (set)
+ , add_chooser (_("Select folder to search for media"), FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
- add_chooser.signal_file_set().connect (sigc::mem_fun (*this, &SearchPathOption::path_chosen));
+ add_chooser.signal_file_set().connect (sigc::mem_fun (*this, &SearchPathOption::path_chosen));
- HBox* hbox = manage (new HBox);
+ HBox* hbox = manage (new HBox);
- hbox->set_border_width (12);
- hbox->set_spacing (6);
- hbox->pack_end (add_chooser, true, true);
- hbox->pack_end (*manage (new Label (_("Click to add a new location"))), false, false);
- hbox->show_all ();
+ hbox->set_border_width (12);
+ hbox->set_spacing (6);
+ 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);
+ vbox.pack_start (path_box);
+ vbox.pack_end (*hbox);
- session_label.set_use_markup (true);
- session_label.set_markup (string_compose ("<i>%1 (%2)</i>", _("the session folder"), short_path (default_path, 32)));
- session_label.set_alignment (0.0, 0.5);
- session_label.show ();
+ session_label.set_use_markup (true);
+ session_label.set_markup (string_compose ("<i>%1 (%2)</i>", _("the session folder"), short_path (default_path, 32)));
+ session_label.set_alignment (0.0, 0.5);
+ session_label.show ();
- path_box.pack_start (session_label);
+ path_box.pack_start (session_label);
}
SearchPathOption::~SearchPathOption()
@@ -64,9 +64,9 @@ SearchPathOption::~SearchPathOption()
void
SearchPathOption::path_chosen ()
{
- string path = add_chooser.get_filename ();
- add_path (path);
- changed ();
+ string path = add_chooser.get_filename ();
+ add_path (path);
+ changed ();
}
void
@@ -75,9 +75,9 @@ SearchPathOption::add_to_page (OptionEditorPage* p)
int const n = p->table.property_n_rows();
p->table.resize (n + 1, 3);
- Label* label = manage (new Label);
- label->set_alignment (0.0, 0.0);
- label->set_text (string_compose ("%1", _name));
+ Label* label = manage (new Label);
+ label->set_alignment (0.0, 0.0);
+ label->set_text (string_compose ("%1", _name));
p->table.attach (*label, 1, 2, n, n + 1, FILL | EXPAND);
p->table.attach (vbox, 2, 3, n, n + 1, FILL | EXPAND);
@@ -86,78 +86,78 @@ SearchPathOption::add_to_page (OptionEditorPage* p)
void
SearchPathOption::clear ()
{
- path_box.remove (session_label);
- for (list<PathEntry*>::iterator p = paths.begin(); p != paths.end(); ++p) {
- path_box.remove ((*p)->box);
- delete *p;
- }
- paths.clear ();
+ path_box.remove (session_label);
+ for (list<PathEntry*>::iterator p = paths.begin(); p != paths.end(); ++p) {
+ path_box.remove ((*p)->box);
+ delete *p;
+ }
+ paths.clear ();
}
void
SearchPathOption::set_state_from_config ()
{
- string str = _get ();
- vector<string> dirs;
+ string str = _get ();
+ vector<string> dirs;
- clear ();
- path_box.pack_start (session_label);
+ clear ();
+ path_box.pack_start (session_label);
- split (str, dirs, G_SEARCHPATH_SEPARATOR);
+ split (str, dirs, G_SEARCHPATH_SEPARATOR);
- for (vector<string>::iterator d = dirs.begin(); d != dirs.end(); ++d) {
- add_path (*d);
- }
+ for (vector<string>::iterator d = dirs.begin(); d != dirs.end(); ++d) {
+ add_path (*d);
+ }
}
void
SearchPathOption::changed ()
{
- string str;
+ string str;
- for (list<PathEntry*>::iterator p = paths.begin(); p != paths.end(); ++p) {
+ for (list<PathEntry*>::iterator p = paths.begin(); p != paths.end(); ++p) {
- if (!str.empty()) {
- str += G_SEARCHPATH_SEPARATOR;
- }
- str += (*p)->entry.get_text ();
- }
+ if (!str.empty()) {
+ str += G_SEARCHPATH_SEPARATOR;
+ }
+ str += (*p)->entry.get_text ();
+ }
- _set (str);
+ _set (str);
}
void
SearchPathOption::add_path (const string& path, bool removable)
{
- PathEntry* pe = new PathEntry (path, removable);
- paths.push_back (pe);
- path_box.pack_start (pe->box, false, false);
- pe->remove_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &SearchPathOption::remove_path), pe));
+ PathEntry* pe = new PathEntry (path, removable);
+ paths.push_back (pe);
+ path_box.pack_start (pe->box, false, false);
+ pe->remove_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &SearchPathOption::remove_path), pe));
}
void
SearchPathOption::remove_path (PathEntry* pe)
{
- path_box.remove (pe->box);
- paths.remove (pe);
- delete pe;
- changed ();
+ path_box.remove (pe->box);
+ paths.remove (pe);
+ delete pe;
+ changed ();
}
SearchPathOption::PathEntry::PathEntry (const std::string& path, bool removable)
- : remove_button (Stock::REMOVE)
+ : remove_button (Stock::REMOVE)
{
- entry.set_text (path);
- entry.show ();
+ entry.set_text (path);
+ entry.show ();
- box.set_spacing (6);
- box.set_homogeneous (false);
- box.pack_start (entry, true, true);
+ 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 ();
- }
+ if (removable) {
+ box.pack_start (remove_button, false, false);
+ remove_button.show ();
+ }
- box.show ();
+ box.show ();
}
diff --git a/gtk2_ardour/search_path_option.h b/gtk2_ardour/search_path_option.h
index 0230666656..8e2e4e5c23 100644
--- a/gtk2_ardour/search_path_option.h
+++ b/gtk2_ardour/search_path_option.h
@@ -32,41 +32,41 @@
class SearchPathOption : public Option
{
public:
- SearchPathOption (const std::string& pathname, const std::string& label,
+ SearchPathOption (const std::string& pathname, const std::string& label,
const std::string& default_path,
sigc::slot<std::string>, sigc::slot<bool, std::string>);
- ~SearchPathOption ();
+ ~SearchPathOption ();
- void set_state_from_config ();
- void add_to_page (OptionEditorPage*);
- void clear ();
+ void set_state_from_config ();
+ void add_to_page (OptionEditorPage*);
+ void clear ();
- Gtk::Widget& tip_widget() { return add_chooser; }
+ Gtk::Widget& tip_widget() { return add_chooser; }
protected:
sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
sigc::slot<bool, std::string> _set; ///< slot to set the configuration variable's value
- struct PathEntry {
- PathEntry (const std::string& path, bool removable=true);
+ struct PathEntry {
+ PathEntry (const std::string& path, bool removable=true);
- Gtk::Entry entry;
- Gtk::Button remove_button;
- Gtk::HBox box;
+ Gtk::Entry entry;
+ Gtk::Button remove_button;
+ Gtk::HBox box;
- std::string path;
- };
+ std::string path;
+ };
- std::list<PathEntry*> paths;
- Gtk::FileChooserButton add_chooser;
- Gtk::VBox vbox;
- Gtk::VBox path_box;
- Gtk::Label session_label;
+ std::list<PathEntry*> paths;
+ Gtk::FileChooserButton add_chooser;
+ Gtk::VBox vbox;
+ Gtk::VBox path_box;
+ Gtk::Label session_label;
- void add_path (const std::string& path, bool removable=true);
- void remove_path (PathEntry*);
- void changed ();
- void path_chosen ();
+ void add_path (const std::string& path, bool removable=true);
+ void remove_path (PathEntry*);
+ void changed ();
+ void path_chosen ();
};
#endif /* __gtk_ardour_search_path_option_h__ */
diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h
index 307a148c85..66fddbd67b 100644
--- a/gtk2_ardour/selection.h
+++ b/gtk2_ardour/selection.h
@@ -186,7 +186,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void remove_regions (TimeAxisView *);
- void move_time (framecnt_t);
+ void move_time (framecnt_t);
void replace (uint32_t time_index, framepos_t start, framepos_t end);
diff --git a/gtk2_ardour/session_dialog.h b/gtk2_ardour/session_dialog.h
index a464e5a5ef..0443ffd648 100644
--- a/gtk2_ardour/session_dialog.h
+++ b/gtk2_ardour/session_dialog.h
@@ -47,12 +47,12 @@ class EngineControl;
class SessionDialog : public ArdourDialog {
public:
- SessionDialog (bool require_new, const std::string& session_name, const std::string& session_path,
+ SessionDialog (bool require_new, const std::string& session_name, const std::string& session_path,
const std::string& template_name, bool cancel_not_quit);
- SessionDialog ();
+ SessionDialog ();
~SessionDialog ();
- void clear_given ();
+ void clear_given ();
std::string session_name (bool& should_be_new);
std::string session_folder ();
@@ -83,20 +83,20 @@ class SessionDialog : public ArdourDialog {
private:
bool new_only;
- std::string _provided_session_name;
- std::string _provided_session_path;
+ std::string _provided_session_name;
+ std::string _provided_session_path;
bool on_delete_event (GdkEventAny*);
- Gtk::Button* cancel_button;
- Gtk::Button* open_button;
- Gtk::Button* back_button;
- Gtk::Button* quit_button;
+ Gtk::Button* cancel_button;
+ Gtk::Button* open_button;
+ Gtk::Button* back_button;
+ Gtk::Button* quit_button;
- bool back_button_pressed (GdkEventButton*);
- bool open_button_pressed (GdkEventButton*);
+ bool back_button_pressed (GdkEventButton*);
+ bool open_button_pressed (GdkEventButton*);
- Gtk::Frame info_frame;
+ Gtk::Frame info_frame;
/* initial choice page */
@@ -104,7 +104,7 @@ class SessionDialog : public ArdourDialog {
void setup_recent_sessions ();
Gtk::VBox ic_vbox;
Gtk::Button ic_new_session_button;
- void new_session_button_clicked ();
+ void new_session_button_clicked ();
/* recent sessions */
@@ -176,7 +176,7 @@ class SessionDialog : public ArdourDialog {
Gtk::VBox session_existing_vbox;
Gtk::Expander more_new_session_options_button;
Gtk::CheckButton use_template_button;
- std::string load_template_override;
+ std::string load_template_override;
void more_new_session_options_button_clicked();
void new_name_changed ();
@@ -251,10 +251,10 @@ class SessionDialog : public ArdourDialog {
bool _existing_session_chooser_used; ///< set to true when the existing session chooser has been used
Gtk::Label info_scroller_label;
- std::string::size_type info_scroller_count;
- bool info_scroller_update();
+ std::string::size_type info_scroller_count;
+ bool info_scroller_update();
sigc::connection info_scroller_connection;
- void updates_button_clicked ();
+ void updates_button_clicked ();
};
#endif /* __gtk2_ardour_session_dialog_h__ */
diff --git a/gtk2_ardour/session_import_dialog.cc b/gtk2_ardour/session_import_dialog.cc
index b528f91b6c..ac5e54260d 100644
--- a/gtk2_ardour/session_import_dialog.cc
+++ b/gtk2_ardour/session_import_dialog.cc
@@ -108,9 +108,9 @@ SessionImportDialog::load_session (const string& filename)
{
if (_session) {
if (tree.read (filename)) {
- error << string_compose (_("Cannot load XML for session from %1"), filename) << endmsg;
- return;
- }
+ error << string_compose (_("Cannot load XML for session from %1"), filename) << endmsg;
+ return;
+ }
boost::shared_ptr<AudioRegionImportHandler> region_handler (new AudioRegionImportHandler (tree, *_session));
boost::shared_ptr<AudioPlaylistImportHandler> pl_handler (new AudioPlaylistImportHandler (tree, *_session, *region_handler));
diff --git a/gtk2_ardour/session_metadata_dialog.h b/gtk2_ardour/session_metadata_dialog.h
index b52efe4c0c..a1d1015b1a 100644
--- a/gtk2_ardour/session_metadata_dialog.h
+++ b/gtk2_ardour/session_metadata_dialog.h
@@ -57,8 +57,8 @@ class MetadataField {
/// Get widget for editing value
virtual Gtk::Widget & edit_widget () = 0;
protected:
- std::string _name;
- std::string _value;
+ std::string _name;
+ std::string _value;
};
/// MetadataField that contains text
@@ -106,7 +106,7 @@ class NumberMetadataField : public MetadataField {
Gtk::Widget & edit_widget ();
private:
void update_value ();
- std::string uint_to_str (uint32_t i) const;
+ std::string uint_to_str (uint32_t i) const;
uint32_t str_to_uint (std::string const & str) const;
Getter getter;
@@ -140,7 +140,7 @@ class EAN13MetadataField : public MetadataField {
void update_status ();
private:
void update_value ();
- std::string numeric_string (std::string const & str) const;
+ std::string numeric_string (std::string const & str) const;
Getter getter;
Setter setter;
@@ -171,7 +171,7 @@ class SessionMetadataSet : public ARDOUR::SessionHandlePtr {
protected:
typedef std::list<MetadataPtr> DataList;
DataList list;
- std::string name;
+ std::string name;
};
/// Contains MetadataFields for editing
diff --git a/gtk2_ardour/speaker_dialog.cc b/gtk2_ardour/speaker_dialog.cc
index 3831094c5d..00495a8000 100644
--- a/gtk2_ardour/speaker_dialog.cc
+++ b/gtk2_ardour/speaker_dialog.cc
@@ -33,30 +33,30 @@ using namespace Gtk;
using namespace Gtkmm2ext;
SpeakerDialog::SpeakerDialog ()
- : ArdourWindow (_("Speaker Configuration"))
- , aspect_frame ("", 0.5, 0.5, 1.5, false)
- , azimuth_adjustment (0, 0.0, 360.0, 10.0, 1.0)
- , azimuth_spinner (azimuth_adjustment)
- , add_speaker_button (_("Add Speaker"))
+ : ArdourWindow (_("Speaker Configuration"))
+ , aspect_frame ("", 0.5, 0.5, 1.5, false)
+ , azimuth_adjustment (0, 0.0, 360.0, 10.0, 1.0)
+ , azimuth_spinner (azimuth_adjustment)
+ , add_speaker_button (_("Add Speaker"))
, remove_speaker_button (_("Remove Speaker"))
/* initialize to 0 so that set_selected works below */
, selected_index (0)
, ignore_speaker_position_change (false)
, ignore_azimuth_change (false)
{
- side_vbox.set_homogeneous (false);
- side_vbox.set_border_width (6);
- side_vbox.set_spacing (6);
- side_vbox.pack_start (add_speaker_button, false, false);
+ side_vbox.set_homogeneous (false);
+ side_vbox.set_border_width (6);
+ side_vbox.set_spacing (6);
+ side_vbox.pack_start (add_speaker_button, false, false);
- aspect_frame.set_size_request (300, 200);
- aspect_frame.set_shadow_type (SHADOW_NONE);
- aspect_frame.add (darea);
+ aspect_frame.set_size_request (300, 200);
+ aspect_frame.set_shadow_type (SHADOW_NONE);
+ aspect_frame.add (darea);
- hbox.set_spacing (6);
- hbox.set_border_width (6);
- hbox.pack_start (aspect_frame, true, true);
- hbox.pack_start (side_vbox, false, false);
+ hbox.set_spacing (6);
+ hbox.set_border_width (6);
+ hbox.pack_start (aspect_frame, true, true);
+ hbox.pack_start (side_vbox, false, false);
HBox* current_speaker_hbox = manage (new HBox);
current_speaker_hbox->set_spacing (4);
@@ -70,19 +70,19 @@ SpeakerDialog::SpeakerDialog ()
vbox->show_all ();
add (*vbox);
- darea.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
+ darea.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
- darea.signal_size_allocate().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_size_allocate));
- darea.signal_expose_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_expose_event));
- darea.signal_button_press_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_button_press_event));
- darea.signal_button_release_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_button_release_event));
- darea.signal_motion_notify_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_motion_notify_event));
+ darea.signal_size_allocate().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_size_allocate));
+ darea.signal_expose_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_expose_event));
+ darea.signal_button_press_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_button_press_event));
+ darea.signal_button_release_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_button_release_event));
+ darea.signal_motion_notify_event().connect (sigc::mem_fun (*this, &SpeakerDialog::darea_motion_notify_event));
add_speaker_button.signal_clicked().connect (sigc::mem_fun (*this, &SpeakerDialog::add_speaker));
remove_speaker_button.signal_clicked().connect (sigc::mem_fun (*this, &SpeakerDialog::remove_speaker));
azimuth_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &SpeakerDialog::azimuth_changed));
- drag_index = -1;
+ drag_index = -1;
/* selected index initialised to 0 above; this will set `no selection' and
sensitize widgets accordingly.
@@ -93,13 +93,13 @@ SpeakerDialog::SpeakerDialog ()
void
SpeakerDialog::set_speakers (boost::shared_ptr<Speakers> s)
{
- _speakers = s;
+ _speakers = s;
}
boost::shared_ptr<Speakers>
SpeakerDialog::get_speakers () const
{
- return _speakers.lock ();
+ return _speakers.lock ();
}
bool
@@ -118,7 +118,7 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
cairo_set_line_width (cr, 1.0);
cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
- cairo_set_source_rgba (cr, 0.1, 0.1, 0.1, 1.0);
+ cairo_set_source_rgba (cr, 0.1, 0.1, 0.1, 1.0);
cairo_fill_preserve (cr);
cairo_clip (cr);
@@ -142,25 +142,25 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
cairo_arc (cr, width/2, height/2, height/2, 0, 2.0 * M_PI);
cairo_stroke (cr);
- float arc_radius;
+ float arc_radius;
- cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+ 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;
- } else {
- cairo_set_font_size (cr, 16);
- arc_radius = 4.0;
- }
+ if (height < 100) {
+ cairo_set_font_size (cr, 10);
+ arc_radius = 2.0;
+ } else {
+ cairo_set_font_size (cr, 16);
+ arc_radius = 4.0;
+ }
- int n = 0;
- for (vector<Speaker>::iterator i = speakers->speakers().begin(); i != speakers->speakers().end(); ++i) {
+ int n = 0;
+ for (vector<Speaker>::iterator i = speakers->speakers().begin(); i != speakers->speakers().end(); ++i) {
- Speaker& s (*i);
- CartesianVector c (s.coords());
+ Speaker& s (*i);
+ CartesianVector c (s.coords());
- cart_to_gtk (c);
+ cart_to_gtk (c);
/* We have already moved our plotting origin to x_origin, y_origin,
so compensate for that.
@@ -168,33 +168,33 @@ SpeakerDialog::darea_expose_event (GdkEventExpose* event)
c.x -= x_origin;
c.y -= y_origin;
- x = (gint) floor (c.x);
- y = (gint) floor (c.y);
+ x = (gint) floor (c.x);
+ y = (gint) floor (c.y);
- /* XXX need to shift circles so that they are centered on the circle */
+ /* 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);
+ 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);
} else {
cairo_set_source_rgb (cr, 0.8, 0.2, 0.1);
}
- cairo_close_path (cr);
- cairo_fill (cr);
+ cairo_close_path (cr);
+ cairo_fill (cr);
- cairo_move_to (cr, x + 6, y + 6);
+ cairo_move_to (cr, x + 6, y + 6);
- char buf[256];
+ char buf[256];
if (n == selected_index) {
snprintf (buf, sizeof (buf), "%d:%d", n+1, (int) lrint (s.angles().azi));
} else {
snprintf (buf, sizeof (buf), "%d", n + 1);
}
- cairo_show_text (cr, buf);
- ++n;
- }
+ cairo_show_text (cr, buf);
+ ++n;
+ }
- cairo_destroy (cr);
+ cairo_destroy (cr);
return true;
@@ -237,7 +237,7 @@ SpeakerDialog::clamp_to_circle (double& x, double& y)
{
double azi, ele;
double z = 0.0;
- double l;
+ double l;
PBD::cartesian_to_spherical (x, y, z, azi, ele, l);
PBD::spherical_to_cartesian (azi, ele, 1.0, x, y, z);
@@ -279,7 +279,7 @@ SpeakerDialog::darea_button_press_event (GdkEventButton *ev)
return false;
}
- drag_index = -1;
+ drag_index = -1;
switch (ev->button) {
case 1:
@@ -350,7 +350,7 @@ SpeakerDialog::darea_button_release_event (GdkEventButton *ev)
y = (int) floor (ev->y);
state = (GdkModifierType) ev->state;
- ret = handle_motion (x, y, state);
+ ret = handle_motion (x, y, state);
break;
case 3:
@@ -358,7 +358,7 @@ SpeakerDialog::darea_button_release_event (GdkEventButton *ev)
}
- drag_index = -1;
+ drag_index = -1;
return ret;
}
@@ -374,7 +374,7 @@ SpeakerDialog::find_closest_object (gdouble x, gdouble y)
float distance;
float best_distance = FLT_MAX;
int n = 0;
- int which = -1;
+ int which = -1;
for (vector<Speaker>::iterator i = speakers->speakers().begin(); i != speakers->speakers().end(); ++i, ++n) {
@@ -395,10 +395,10 @@ SpeakerDialog::find_closest_object (gdouble x, gdouble y)
}
if (best_distance > 20) { // arbitrary
- return -1;
+ return -1;
}
- return which;
+ return which;
}
bool
@@ -449,7 +449,7 @@ SpeakerDialog::handle_motion (gint evx, gint evy, GdkModifierType state)
if (state & GDK_BUTTON1_MASK && !(state & GDK_BUTTON2_MASK)) {
CartesianVector c;
bool need_move = false;
- Speaker& moving (speakers->speakers()[drag_index]);
+ Speaker& moving (speakers->speakers()[drag_index]);
moving.angles().cartesian (c);
cart_to_gtk (c);
@@ -471,11 +471,11 @@ SpeakerDialog::handle_motion (gint evx, gint evy, GdkModifierType state)
/* generate an angular representation and set drag target (GUI) position */
- AngularVector a;
+ AngularVector a;
cp.angular (a);
- moving.move (a);
+ moving.move (a);
queue_draw ();
}
diff --git a/gtk2_ardour/startup.h b/gtk2_ardour/startup.h
index e27b1c14ed..48c4cc93b0 100644
--- a/gtk2_ardour/startup.h
+++ b/gtk2_ardour/startup.h
@@ -46,10 +46,10 @@ class EngineControl;
class ArdourStartup : public Gtk::Assistant {
public:
- ArdourStartup ();
+ ArdourStartup ();
~ArdourStartup ();
- static bool required ();
+ static bool required ();
gint response () const {
return _response;
@@ -76,7 +76,7 @@ class ArdourStartup : public Gtk::Assistant {
bool splash_expose (GdkEventExpose* ev);
void setup_first_time_config_page ();
- void config_changed ();
+ void config_changed ();
/* first page */
Gtk::FileChooserButton* default_dir_chooser;
diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc
index f7df9e6da9..639b8b7317 100644
--- a/gtk2_ardour/step_entry.cc
+++ b/gtk2_ardour/step_entry.cc
@@ -57,10 +57,10 @@ _rest_event_handler (GtkWidget* /*widget*/, gpointer arg)
StepEntry::StepEntry (StepEditor& seditor)
: ArdourWindow (string_compose (_("Step Entry: %1"), seditor.name()))
- , _current_note_length (1.0)
- , _current_note_velocity (64)
+ , _current_note_length (1.0)
+ , _current_note_velocity (64)
, triplet_button ("3")
- , dot_adjustment (0.0, 0.0, 3.0, 1.0, 1.0)
+ , dot_adjustment (0.0, 0.0, 3.0, 1.0, 1.0)
, beat_resync_button (_(">beat"))
, bar_resync_button (_(">bar"))
, resync_button (_(">EP"))
@@ -70,25 +70,25 @@ StepEntry::StepEntry (StepEditor& seditor)
, back_button (_("back"))
, 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)
- , length_divisor_adjustment (1.0, 1.0, 128, 1.0, 4.0)
- , length_divisor_spinner (length_divisor_adjustment)
- , velocity_adjustment (64.0, 0.0, 127.0, 1.0, 4.0)
- , velocity_spinner (velocity_adjustment)
- , bank_adjustment (0, 0.0, 127.0, 1.0, 4.0)
- , bank_spinner (bank_adjustment)
- , bank_button (_("+"))
- , program_adjustment (0, 0.0, 127.0, 1.0, 4.0)
- , program_spinner (program_adjustment)
- , program_button (_("+"))
+ , octave_adjustment (4, 0, 10, 1, 4) // start in octave 4
+ , octave_spinner (octave_adjustment)
+ , length_divisor_adjustment (1.0, 1.0, 128, 1.0, 4.0)
+ , length_divisor_spinner (length_divisor_adjustment)
+ , velocity_adjustment (64.0, 0.0, 127.0, 1.0, 4.0)
+ , velocity_spinner (velocity_adjustment)
+ , bank_adjustment (0, 0.0, 127.0, 1.0, 4.0)
+ , bank_spinner (bank_adjustment)
+ , bank_button (_("+"))
+ , program_adjustment (0, 0.0, 127.0, 1.0, 4.0)
+ , program_spinner (program_adjustment)
+ , program_button (_("+"))
, _piano (0)
, piano (0)
, se (&seditor)
, myactions (X_("step entry"))
{
- register_actions ();
- load_bindings ();
+ register_actions ();
+ load_bindings ();
#if 0
/* set channel selector to first selected channel. if none
@@ -140,37 +140,37 @@ StepEntry::StepEntry (StepEditor& seditor)
w->show();
length_64_button.add (*w);
- RefPtr<Action> act;
-
- act = myactions.find_action ("StepEditing/note-length-whole");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_1_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-half");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_2_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-quarter");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_4_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-eighth");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_8_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-sixteenth");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_16_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-thirtysecond");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_32_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-length-sixtyfourth");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_64_button.gobj()), act->gobj());
-
- length_1_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_1_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 1), false);
- length_2_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_2_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 2), false);
- length_4_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_4_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 4), false);
- length_8_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_8_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 8), false);
- length_16_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_16_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 16), false);
- length_32_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_32_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 32), false);
- length_64_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- length_64_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 64), false);
+ RefPtr<Action> act;
+
+ act = myactions.find_action ("StepEditing/note-length-whole");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_1_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-half");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_2_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-quarter");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_4_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-eighth");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_8_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-sixteenth");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_16_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-thirtysecond");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_32_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-length-sixtyfourth");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (length_64_button.gobj()), act->gobj());
+
+ length_1_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_1_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 1), false);
+ length_2_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_2_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 2), false);
+ length_4_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_4_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 4), false);
+ length_8_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_8_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 8), false);
+ length_16_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_16_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 16), false);
+ length_32_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_32_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 32), false);
+ length_64_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ length_64_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &length_1_button, 64), false);
length_1_button.property_draw_indicator() = false;
length_2_button.property_draw_indicator() = false;
@@ -230,39 +230,39 @@ StepEntry::StepEntry (StepEditor& seditor)
w->show();
velocity_fff_button.add (*w);
- act = myactions.find_action ("StepEditing/note-velocity-ppp");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ppp_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-pp");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_pp_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-p");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_p_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-mp");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mp_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-mf");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mf_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-f");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_f_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-ff");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ff_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/note-velocity-fff");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_fff_button.gobj()), act->gobj());
-
- velocity_ppp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_ppp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ppp_button, 1), false);
- velocity_pp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_pp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_pp_button, 16), false);
- velocity_p_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_p_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_p_button, 32), false);
- velocity_mp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_mp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mp_button, 64), false);
- velocity_mf_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_mf_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mf_button, 80), false);
- velocity_f_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_f_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_f_button, 96), false);
- velocity_ff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_ff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ff_button, 112), false);
- velocity_fff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
- velocity_fff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_fff_button, 127), false);
+ act = myactions.find_action ("StepEditing/note-velocity-ppp");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ppp_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-pp");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_pp_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-p");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_p_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-mp");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mp_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-mf");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_mf_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-f");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_f_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-ff");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_ff_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/note-velocity-fff");
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (velocity_fff_button.gobj()), act->gobj());
+
+ velocity_ppp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_ppp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ppp_button, 1), false);
+ velocity_pp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_pp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_pp_button, 16), false);
+ velocity_p_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_p_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_p_button, 32), false);
+ velocity_mp_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_mp_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mp_button, 64), false);
+ velocity_mf_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_mf_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_mf_button, 80), false);
+ velocity_f_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_f_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_f_button, 96), false);
+ velocity_ff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_ff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_ff_button, 112), false);
+ velocity_fff_button.signal_button_press_event().connect (sigc::mem_fun (*this, &StepEntry::radio_button_press), false);
+ velocity_fff_button.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &StepEntry::radio_button_release), &velocity_fff_button, 127), false);
velocity_ppp_button.property_draw_indicator() = false;
velocity_pp_button.property_draw_indicator() = false;
@@ -343,39 +343,39 @@ StepEntry::StepEntry (StepEditor& seditor)
set_tooltip (&back_button, _("Move Insert Position Back by Note Length"), "");
set_tooltip (&resync_button, _("Move Insert Position to Edit Point"), "");
- act = myactions.find_action ("StepEditing/back");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (back_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (back_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/sync-to-edit-point");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (resync_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (resync_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-triplet");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (triplet_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (triplet_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/no-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot0_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot0_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot1_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot1_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-double-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot2_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot2_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-triple-dotted");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot3_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot3_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/toggle-chord");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (chord_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (chord_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/insert-rest");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (rest_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (rest_button.gobj()), act->gobj());
- act = myactions.find_action ("StepEditing/insert-snap-rest");
- gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (grid_rest_button.gobj()), false);
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (grid_rest_button.gobj()), act->gobj());
- 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());
+ act = myactions.find_action ("StepEditing/back");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (back_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (back_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/sync-to-edit-point");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (resync_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (resync_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-triplet");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (triplet_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (triplet_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/no-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot0_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot0_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot1_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot1_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-double-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot2_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot2_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-triple-dotted");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dot3_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (dot3_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/toggle-chord");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (chord_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (chord_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/insert-rest");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (rest_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (rest_button.gobj()), act->gobj());
+ act = myactions.find_action ("StepEditing/insert-snap-rest");
+ gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (grid_rest_button.gobj()), false);
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (grid_rest_button.gobj()), act->gobj());
+ 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);
@@ -390,35 +390,35 @@ StepEntry::StepEntry (StepEditor& seditor)
VBox* v;
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Channel")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (channel_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("1/Note")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (length_divisor_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Velocity")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (velocity_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Octave")));
v->set_spacing (6);
v->pack_start (*l, false, false);
v->pack_start (octave_spinner, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Bank")));
v->set_spacing (6);
v->pack_start (*l, false, false);
@@ -426,7 +426,7 @@ StepEntry::StepEntry (StepEditor& seditor)
v->pack_start (bank_button, false, false);
upper_box.pack_start (*v, false, false);
- v = manage (new VBox);
+ v = manage (new VBox);
l = manage (new Label (_("Program")));
v->set_spacing (6);
v->pack_start (*l, false, false);
@@ -434,9 +434,9 @@ StepEntry::StepEntry (StepEditor& seditor)
v->pack_start (program_button, false, false);
upper_box.pack_start (*v, false, false);
- velocity_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::velocity_value_change));
- length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_value_change));
- dot_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::dot_value_change));
+ velocity_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::velocity_value_change));
+ length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_value_change));
+ dot_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::dot_value_change));
_piano = (PianoKeyboard*) piano_keyboard_new ();
piano = wrap ((GtkWidget*) _piano);
@@ -451,7 +451,7 @@ StepEntry::StepEntry (StepEditor& seditor)
beat_resync_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::beat_resync_click));
bar_resync_button.signal_clicked().connect (sigc::mem_fun (*this, &StepEntry::bar_resync_click));
- length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_changed));
+ length_divisor_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &StepEntry::length_changed));
packer.set_spacing (6);
packer.pack_start (upper_box, false, false);
@@ -462,12 +462,12 @@ StepEntry::StepEntry (StepEditor& seditor)
/* initial settings: quarter note and mezzo forte */
- act = myactions.find_action ("StepEditing/note-length-quarter");
+ act = myactions.find_action ("StepEditing/note-length-quarter");
RefPtr<RadioAction> r = RefPtr<RadioAction>::cast_dynamic (act);
assert (r);
r->set_active (true);
- act = myactions.find_action ("StepEditing/note-velocity-mf");
+ act = myactions.find_action ("StepEditing/note-velocity-mf");
r = RefPtr<RadioAction>::cast_dynamic (act);
assert (r);
r->set_active (true);
@@ -480,21 +480,21 @@ StepEntry::~StepEntry()
void
StepEntry::length_changed ()
{
- length_1_button.queue_draw ();
- length_2_button.queue_draw ();
- length_4_button.queue_draw ();
- length_8_button.queue_draw ();
- length_16_button.queue_draw ();
- length_32_button.queue_draw ();
- length_64_button.queue_draw ();
+ length_1_button.queue_draw ();
+ length_2_button.queue_draw ();
+ length_4_button.queue_draw ();
+ length_8_button.queue_draw ();
+ length_16_button.queue_draw ();
+ length_32_button.queue_draw ();
+ length_64_button.queue_draw ();
}
bool
StepEntry::on_key_press_event (GdkEventKey* ev)
{
- /* focus widget gets first shot, then bindings, otherwise
- forward to main window
- */
+ /* focus widget gets first shot, then bindings, otherwise
+ forward to main window
+ */
if (gtk_window_propagate_key_event (GTK_WINDOW(gobj()), ev)) {
return true;
@@ -510,9 +510,9 @@ StepEntry::on_key_release_event (GdkEventKey* ev)
return true;
}
- /* don't forward releases */
+ /* don't forward releases */
- return true;
+ return true;
}
void
@@ -524,24 +524,24 @@ StepEntry::rest_event_handler ()
Evoral::Beats
StepEntry::note_length ()
{
- double base_time = 4.0 / (double) length_divisor_adjustment.get_value();
+ double base_time = 4.0 / (double) 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 ();
+ RefPtr<Action> act = myactions.find_action ("StepEditing/toggle-triplet");
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
+ bool triplets = tact->get_active ();
- if (triplets) {
- base_time *= (2.0/3.0);
- }
+ if (triplets) {
+ base_time *= (2.0/3.0);
+ }
- double dots = dot_adjustment.get_value ();
+ double dots = dot_adjustment.get_value ();
- if (dots > 0) {
- dots = pow (2.0, dots);
- base_time *= 1 + ((dots - 1.0)/dots);
- }
+ if (dots > 0) {
+ dots = pow (2.0, dots);
+ base_time *= 1 + ((dots - 1.0)/dots);
+ }
- return Evoral::Beats(base_time);
+ return Evoral::Beats(base_time);
}
uint8_t
@@ -559,7 +559,7 @@ StepEntry::note_channel() const
void
StepEntry::note_off_event_handler (int note)
{
- insert_note (note);
+ insert_note (note);
}
@@ -579,7 +579,7 @@ StepEntry::beat_resync_click ()
void
StepEntry::bar_resync_click ()
{
- se->step_edit_bar_sync ();
+ se->step_edit_bar_sync ();
}
void
@@ -695,78 +695,78 @@ void
StepEntry::load_bindings ()
{
bindings = Bindings::get_bindings (X_("Step Editing"), myactions);
- set_data ("ardour-bindings", bindings);
+ set_data ("ardour-bindings", bindings);
}
void
StepEntry::toggle_triplet ()
{
- se->set_step_edit_cursor_width (note_length());
+ se->set_step_edit_cursor_width (note_length());
}
void
StepEntry::toggle_chord ()
{
- se->step_edit_toggle_chord ();
+ se->step_edit_toggle_chord ();
}
void
StepEntry::dot_change (GtkAction* act)
{
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
- gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
- dot_adjustment.set_value (v);
- }
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) {
+ gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act));
+ dot_adjustment.set_value (v);
+ }
}
void
StepEntry::dot_value_change ()
{
- RefPtr<Action> act;
- RefPtr<RadioAction> ract;
- double val = dot_adjustment.get_value();
- bool inconsistent = true;
- vector<const char*> dot_actions;
-
- dot_actions.push_back ("StepEditing/no-dotted");
- dot_actions.push_back ("StepEditing/toggle-dotted");
- dot_actions.push_back ("StepEditing/toggle-double-dotted");
- dot_actions.push_back ("StepEditing/toggle-triple-dotted");
-
- 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->property_value() == val) {
- ract->set_active (true);
- inconsistent = false;
- break;
- }
- }
- }
- }
-
- dot1_button.set_inconsistent (inconsistent);
- dot2_button.set_inconsistent (inconsistent);
- dot3_button.set_inconsistent (inconsistent);
-
- se->set_step_edit_cursor_width (note_length());
+ RefPtr<Action> act;
+ RefPtr<RadioAction> ract;
+ double val = dot_adjustment.get_value();
+ bool inconsistent = true;
+ vector<const char*> dot_actions;
+
+ dot_actions.push_back ("StepEditing/no-dotted");
+ dot_actions.push_back ("StepEditing/toggle-dotted");
+ dot_actions.push_back ("StepEditing/toggle-double-dotted");
+ dot_actions.push_back ("StepEditing/toggle-triple-dotted");
+
+ 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->property_value() == val) {
+ ract->set_active (true);
+ inconsistent = false;
+ break;
+ }
+ }
+ }
+ }
+
+ dot1_button.set_inconsistent (inconsistent);
+ dot2_button.set_inconsistent (inconsistent);
+ dot3_button.set_inconsistent (inconsistent);
+
+ se->set_step_edit_cursor_width (note_length());
}
void
StepEntry::program_click ()
{
- se->step_add_program_change (note_channel(), (int8_t) floor (program_adjustment.get_value()));
+ se->step_add_program_change (note_channel(), (int8_t) floor (program_adjustment.get_value()));
}
void
StepEntry::bank_click ()
{
- se->step_add_bank_change (note_channel(), (int8_t) floor (bank_adjustment.get_value()));
+ se->step_add_bank_change (note_channel(), (int8_t) floor (bank_adjustment.get_value()));
}
void
@@ -784,367 +784,367 @@ StepEntry::insert_grid_rest ()
void
StepEntry::insert_note (uint8_t note)
{
- if (note > 127) {
- return;
- }
+ if (note > 127) {
+ return;
+ }
se->step_add_note (note_channel(), note, note_velocity(), note_length());
}
void
StepEntry::insert_c ()
{
- insert_note (0 + (current_octave() * 12));
+ insert_note (0 + (current_octave() * 12));
}
void
StepEntry::insert_csharp ()
{
- insert_note (1 + (current_octave() * 12));
+ insert_note (1 + (current_octave() * 12));
}
void
StepEntry::insert_d ()
{
- insert_note (2 + (current_octave() * 12));
+ insert_note (2 + (current_octave() * 12));
}
void
StepEntry::insert_dsharp ()
{
- insert_note (3 + (current_octave() * 12));
+ insert_note (3 + (current_octave() * 12));
}
void
StepEntry::insert_e ()
{
- insert_note (4 + (current_octave() * 12));
+ insert_note (4 + (current_octave() * 12));
}
void
StepEntry::insert_f ()
{
- insert_note (5 + (current_octave() * 12));
+ insert_note (5 + (current_octave() * 12));
}
void
StepEntry::insert_fsharp ()
{
- insert_note (6 + (current_octave() * 12));
+ insert_note (6 + (current_octave() * 12));
}
void
StepEntry::insert_g ()
{
- insert_note (7 + (current_octave() * 12));
+ insert_note (7 + (current_octave() * 12));
}
void
StepEntry::insert_gsharp ()
{
- insert_note (8 + (current_octave() * 12));
+ insert_note (8 + (current_octave() * 12));
}
void
StepEntry::insert_a ()
{
- insert_note (9 + (current_octave() * 12));
+ insert_note (9 + (current_octave() * 12));
}
void
StepEntry::insert_asharp ()
{
- insert_note (10 + (current_octave() * 12));
+ insert_note (10 + (current_octave() * 12));
}
void
StepEntry::insert_b ()
{
- insert_note (11 + (current_octave() * 12));
+ insert_note (11 + (current_octave() * 12));
}
void
StepEntry::note_length_change (GtkAction* act)
{
- /* it doesn't matter which note length action we look up - we are interested
- in the current_value which is global across the whole group of note length
- actions. this method is called twice for every user operation,
- once for the action that became "inactive" and once for the action that
- 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);
- }
+ /* it doesn't matter which note length action we look up - we are interested
+ in the current_value which is global across the whole group of note length
+ actions. this method is called twice for every user operation,
+ once for the action that became "inactive" and once for the action that
+ 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);
+ }
}
void
StepEntry::note_velocity_change (GtkAction* act)
{
- /* it doesn't matter which note length action we look up - we are interested
- in the current_value which is global across the whole group of note length
- actions. this method is called twice for every user operation,
- once for the action that became "inactive" and once for the action that
- 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);
- }
+ /* it doesn't matter which note length action we look up - we are interested
+ in the current_value which is global across the whole group of note length
+ actions. this method is called twice for every user operation,
+ once for the action that became "inactive" and once for the action that
+ 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);
+ }
}
void
StepEntry::velocity_value_change ()
{
- RefPtr<Action> act;
- RefPtr<RadioAction> ract;
- double val = velocity_adjustment.get_value();
- bool inconsistent = true;
- vector<const char*> velocity_actions;
-
- velocity_actions.push_back ("StepEditing/note-velocity-ppp");
- velocity_actions.push_back ("StepEditing/note-velocity-pp");
- velocity_actions.push_back ("StepEditing/note-velocity-p");
- velocity_actions.push_back ("StepEditing/note-velocity-mp");
- velocity_actions.push_back ("StepEditing/note-velocity-mf");
- velocity_actions.push_back ("StepEditing/note-velocity-f");
- velocity_actions.push_back ("StepEditing/note-velocity-ff");
- velocity_actions.push_back ("StepEditing/note-velocity-fff");
-
- 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->property_value() == val) {
- ract->set_active (true);
- inconsistent = false;
- break;
- }
- }
- }
- }
-
- velocity_ppp_button.set_inconsistent (inconsistent);
- velocity_pp_button.set_inconsistent (inconsistent);
- velocity_p_button.set_inconsistent (inconsistent);
- velocity_mp_button.set_inconsistent (inconsistent);
- velocity_mf_button.set_inconsistent (inconsistent);
- velocity_f_button.set_inconsistent (inconsistent);
- velocity_ff_button.set_inconsistent (inconsistent);
- velocity_fff_button.set_inconsistent (inconsistent);
+ RefPtr<Action> act;
+ RefPtr<RadioAction> ract;
+ double val = velocity_adjustment.get_value();
+ bool inconsistent = true;
+ vector<const char*> velocity_actions;
+
+ velocity_actions.push_back ("StepEditing/note-velocity-ppp");
+ velocity_actions.push_back ("StepEditing/note-velocity-pp");
+ velocity_actions.push_back ("StepEditing/note-velocity-p");
+ velocity_actions.push_back ("StepEditing/note-velocity-mp");
+ velocity_actions.push_back ("StepEditing/note-velocity-mf");
+ velocity_actions.push_back ("StepEditing/note-velocity-f");
+ velocity_actions.push_back ("StepEditing/note-velocity-ff");
+ velocity_actions.push_back ("StepEditing/note-velocity-fff");
+
+ 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->property_value() == val) {
+ ract->set_active (true);
+ inconsistent = false;
+ break;
+ }
+ }
+ }
+ }
+
+ velocity_ppp_button.set_inconsistent (inconsistent);
+ velocity_pp_button.set_inconsistent (inconsistent);
+ velocity_p_button.set_inconsistent (inconsistent);
+ velocity_mp_button.set_inconsistent (inconsistent);
+ velocity_mf_button.set_inconsistent (inconsistent);
+ velocity_f_button.set_inconsistent (inconsistent);
+ velocity_ff_button.set_inconsistent (inconsistent);
+ velocity_fff_button.set_inconsistent (inconsistent);
}
void
StepEntry::length_value_change ()
{
- RefPtr<Action> act;
- RefPtr<RadioAction> ract;
- double val = length_divisor_adjustment.get_value();
- bool inconsistent = true;
- vector<const char*> length_actions;
-
- length_actions.push_back ("StepEditing/note-length-whole");
- length_actions.push_back ("StepEditing/note-length-half");
- length_actions.push_back ("StepEditing/note-length-quarter");
- length_actions.push_back ("StepEditing/note-length-eighth");
- length_actions.push_back ("StepEditing/note-length-sixteenth");
- length_actions.push_back ("StepEditing/note-length-thirtysecond");
- length_actions.push_back ("StepEditing/note-length-sixtyfourth");
-
- 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->property_value() == val) {
- ract->set_active (true);
- inconsistent = false;
- break;
- }
- }
- }
- }
-
- length_1_button.set_inconsistent (inconsistent);
- length_2_button.set_inconsistent (inconsistent);
- length_4_button.set_inconsistent (inconsistent);
- length_8_button.set_inconsistent (inconsistent);
- length_16_button.set_inconsistent (inconsistent);
- length_32_button.set_inconsistent (inconsistent);
- length_64_button.set_inconsistent (inconsistent);
-
- se->set_step_edit_cursor_width (note_length());
+ RefPtr<Action> act;
+ RefPtr<RadioAction> ract;
+ double val = length_divisor_adjustment.get_value();
+ bool inconsistent = true;
+ vector<const char*> length_actions;
+
+ length_actions.push_back ("StepEditing/note-length-whole");
+ length_actions.push_back ("StepEditing/note-length-half");
+ length_actions.push_back ("StepEditing/note-length-quarter");
+ length_actions.push_back ("StepEditing/note-length-eighth");
+ length_actions.push_back ("StepEditing/note-length-sixteenth");
+ length_actions.push_back ("StepEditing/note-length-thirtysecond");
+ length_actions.push_back ("StepEditing/note-length-sixtyfourth");
+
+ 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->property_value() == val) {
+ ract->set_active (true);
+ inconsistent = false;
+ break;
+ }
+ }
+ }
+ }
+
+ length_1_button.set_inconsistent (inconsistent);
+ length_2_button.set_inconsistent (inconsistent);
+ length_4_button.set_inconsistent (inconsistent);
+ length_8_button.set_inconsistent (inconsistent);
+ length_16_button.set_inconsistent (inconsistent);
+ length_32_button.set_inconsistent (inconsistent);
+ length_64_button.set_inconsistent (inconsistent);
+
+ se->set_step_edit_cursor_width (note_length());
}
bool
StepEntry::radio_button_press (GdkEventButton* ev)
{
- if (ev->button == 1) {
- return true;
- }
+ if (ev->button == 1) {
+ return true;
+ }
- return false;
+ return false;
}
bool
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 (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);
- }
+ if (act) {
+ gtk_radio_action_set_current_value (GTK_RADIO_ACTION(act), v);
+ }
- return true;
- }
+ return true;
+ }
- return false;
+ return false;
}
void
StepEntry::next_octave ()
{
- octave_adjustment.set_value (octave_adjustment.get_value() + 1.0);
+ octave_adjustment.set_value (octave_adjustment.get_value() + 1.0);
}
void
StepEntry::prev_octave ()
{
- octave_adjustment.set_value (octave_adjustment.get_value() - 1.0);
+ octave_adjustment.set_value (octave_adjustment.get_value() - 1.0);
}
void
StepEntry::inc_note_length ()
{
- length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() - 1.0);
+ length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() - 1.0);
}
void
StepEntry::dec_note_length ()
{
- length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() + 1.0);
+ length_divisor_adjustment.set_value (length_divisor_adjustment.get_value() + 1.0);
}
void
StepEntry::prev_note_length ()
{
- double l = length_divisor_adjustment.get_value();
- int il = (int) lrintf (l); // round to nearest integer
- il = (il/2) * 2; // round to power of 2
+ double l = length_divisor_adjustment.get_value();
+ int il = (int) lrintf (l); // round to nearest integer
+ il = (il/2) * 2; // round to power of 2
- if (il == 0) {
- il = 1;
- }
+ if (il == 0) {
+ il = 1;
+ }
- il *= 2; // double
+ il *= 2; // double
- length_divisor_adjustment.set_value (il);
+ length_divisor_adjustment.set_value (il);
}
void
StepEntry::next_note_length ()
{
- double l = length_divisor_adjustment.get_value();
- int il = (int) lrintf (l); // round to nearest integer
- il = (il/2) * 2; // round to power of 2
+ double l = length_divisor_adjustment.get_value();
+ int il = (int) lrintf (l); // round to nearest integer
+ il = (il/2) * 2; // round to power of 2
- if (il == 0) {
- il = 1;
- }
+ if (il == 0) {
+ il = 1;
+ }
- il /= 2; // half
+ il /= 2; // half
- if (il > 0) {
- length_divisor_adjustment.set_value (il);
- }
+ if (il > 0) {
+ length_divisor_adjustment.set_value (il);
+ }
}
void
StepEntry::inc_note_velocity ()
{
- velocity_adjustment.set_value (velocity_adjustment.get_value() + 1.0);
+ velocity_adjustment.set_value (velocity_adjustment.get_value() + 1.0);
}
void
StepEntry::dec_note_velocity ()
{
- velocity_adjustment.set_value (velocity_adjustment.get_value() - 1.0);
+ velocity_adjustment.set_value (velocity_adjustment.get_value() - 1.0);
}
void
StepEntry::next_note_velocity ()
{
- double l = velocity_adjustment.get_value ();
-
- if (l < 16) {
- l = 16;
- } else if (l < 32) {
- l = 32;
- } else if (l < 48) {
- l = 48;
- } else if (l < 64) {
- l = 64;
- } else if (l < 80) {
- l = 80;
- } else if (l < 96) {
- l = 96;
- } else if (l < 112) {
- l = 112;
- } else if (l < 127) {
- l = 127;
- }
-
- velocity_adjustment.set_value (l);
+ double l = velocity_adjustment.get_value ();
+
+ if (l < 16) {
+ l = 16;
+ } else if (l < 32) {
+ l = 32;
+ } else if (l < 48) {
+ l = 48;
+ } else if (l < 64) {
+ l = 64;
+ } else if (l < 80) {
+ l = 80;
+ } else if (l < 96) {
+ l = 96;
+ } else if (l < 112) {
+ l = 112;
+ } else if (l < 127) {
+ l = 127;
+ }
+
+ velocity_adjustment.set_value (l);
}
void
StepEntry::prev_note_velocity ()
{
- double l = velocity_adjustment.get_value ();
-
- if (l > 112) {
- l = 112;
- } else if (l > 96) {
- l = 96;
- } else if (l > 80) {
- l = 80;
- } else if (l > 64) {
- l = 64;
- } else if (l > 48) {
- l = 48;
- } else if (l > 32) {
- l = 32;
- } else if (l > 16) {
- l = 16;
- } else {
- l = 1;
- }
-
- velocity_adjustment.set_value (l);
+ double l = velocity_adjustment.get_value ();
+
+ if (l > 112) {
+ l = 112;
+ } else if (l > 96) {
+ l = 96;
+ } else if (l > 80) {
+ l = 80;
+ } else if (l > 64) {
+ l = 64;
+ } else if (l > 48) {
+ l = 48;
+ } else if (l > 32) {
+ l = 32;
+ } else if (l > 16) {
+ l = 16;
+ } else {
+ l = 1;
+ }
+
+ velocity_adjustment.set_value (l);
}
void
StepEntry::octave_n (int n)
{
- octave_adjustment.set_value (n);
+ octave_adjustment.set_value (n);
}
void
StepEntry::do_sustain ()
{
- se->step_edit_sustain (note_length());
+ se->step_edit_sustain (note_length());
}
void
StepEntry::back ()
{
- se->move_step_edit_beat_pos (-note_length());
+ se->move_step_edit_beat_pos (-note_length());
}
void
StepEntry::sync_to_edit_point ()
{
- se->resync_step_edit_to_edit_point ();
+ se->resync_step_edit_to_edit_point ();
}
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index 834890f57d..094a93eaa9 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -126,7 +126,7 @@ public:
sigc::signal<void> ContentsHeightChanged;
protected:
- StreamView (RouteTimeAxisView&, ArdourCanvas::Container* canvas_group = 0);
+ StreamView (RouteTimeAxisView&, ArdourCanvas::Container* canvas_group = 0);
void transport_changed();
void transport_looped();
diff --git a/gtk2_ardour/tempo_curve.cc b/gtk2_ardour/tempo_curve.cc
index 3a29b5c752..4d2ea31a46 100644
--- a/gtk2_ardour/tempo_curve.cc
+++ b/gtk2_ardour/tempo_curve.cc
@@ -190,7 +190,7 @@ TempoCurve::show ()
{
_shown = true;
- group->show ();
+ group->show ();
}
void
diff --git a/gtk2_ardour/tempo_curve.h b/gtk2_ardour/tempo_curve.h
index ec1c6fd90f..73cce4b168 100644
--- a/gtk2_ardour/tempo_curve.h
+++ b/gtk2_ardour/tempo_curve.h
@@ -69,8 +69,8 @@ private:
TempoCurve (TempoCurve const &);
TempoCurve & operator= (TempoCurve const &);
ARDOUR::TempoSection& _tempo;
- ArdourCanvas::Text *_start_text;
- ArdourCanvas::Text *_end_text;
+ ArdourCanvas::Text *_start_text;
+ ArdourCanvas::Text *_end_text;
};
#endif /* __gtk_ardour_tempo_curve_h__ */
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc
index 875b23c2f6..723d931cb8 100644
--- a/gtk2_ardour/tempo_dialog.cc
+++ b/gtk2_ardour/tempo_dialog.cc
@@ -670,13 +670,13 @@ MeterDialog::entry_key_release (GdkEventKey*)
void
MeterDialog::note_type_change ()
{
- set_response_sensitive (RESPONSE_ACCEPT, is_user_input_valid());
+ set_response_sensitive (RESPONSE_ACCEPT, is_user_input_valid());
}
void
MeterDialog::lock_style_change ()
{
- set_response_sensitive (RESPONSE_ACCEPT, is_user_input_valid());
+ set_response_sensitive (RESPONSE_ACCEPT, is_user_input_valid());
}
double
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 5bd26b193a..c1ec7767e5 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -629,12 +629,12 @@ TimeAxisView::begin_name_edit ()
*/
int x, y;
- int wx, wy;
+ int wx, wy;
- name_label.translate_coordinates (*toplevel, 0, 0, x, y);
- toplevel->get_window()->get_origin (wx, wy);
+ name_label.translate_coordinates (*toplevel, 0, 0, x, y);
+ toplevel->get_window()->get_origin (wx, wy);
- fte->move (wx + x, wy + y);
+ fte->move (wx + x, wy + y);
fte->present ();
}
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 66d9f7ab1d..0587db9e2c 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -66,22 +66,22 @@ double TimeAxisViewItem::NAME_HIGHLIGHT_THRESH;
void
TimeAxisViewItem::set_constant_heights ()
{
- NAME_FONT = Pango::FontDescription (UIConfiguration::instance().get_SmallFont());
+ NAME_FONT = Pango::FontDescription (UIConfiguration::instance().get_SmallFont());
- Gtk::Window win;
- Gtk::Label foo;
- win.add (foo);
+ 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;
+ 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);
- get_pixel_size (layout, width, height);
+ layout->set_font_description (NAME_FONT);
+ get_pixel_size (layout, width, height);
- layout = foo.create_pango_layout (X_("H")); /* just the ascender */
+ layout = foo.create_pango_layout (X_("H")); /* just the ascender */
- NAME_HEIGHT = height;
+ NAME_HEIGHT = height;
/* Config->get_show_name_highlight) == true:
Y_OFFSET is measured from bottom of the time axis view item.
@@ -96,7 +96,7 @@ TimeAxisViewItem::set_constant_heights ()
NAME_Y_OFFSET = 3;
NAME_HIGHLIGHT_SIZE = 0;
}
- NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 3;
+ NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 3;
}
/**
@@ -205,8 +205,8 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
name_highlight = new ArdourCanvas::Rectangle (group);
CANVAS_DEBUG_NAME (name_highlight, string_compose ("name highlight for %1", get_item_name()));
name_highlight->set_data ("timeaxisviewitem", this);
- name_highlight->set_outline_what (ArdourCanvas::Rectangle::TOP);
- name_highlight->set_outline_color (RGBA_TO_UINT (0,0,0,255)); // this should use a theme color
+ name_highlight->set_outline_what (ArdourCanvas::Rectangle::TOP);
+ name_highlight->set_outline_color (RGBA_TO_UINT (0,0,0,255)); // this should use a theme color
} else {
name_highlight = 0;
@@ -543,7 +543,7 @@ TimeAxisViewItem::set_name_text(const string& new_name)
void
TimeAxisViewItem::set_height (double height)
{
- _height = height;
+ _height = height;
manage_name_highlight ();
@@ -637,7 +637,7 @@ TimeAxisViewItem::set_colors()
set_frame_color ();
if (name_highlight) {
- name_highlight->set_fill_color (fill_color);
+ name_highlight->set_fill_color (fill_color);
}
set_name_text_color ();
diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h
index 19bf84b1bc..7e665663da 100644
--- a/gtk2_ardour/time_axis_view_item.h
+++ b/gtk2_ardour/time_axis_view_item.h
@@ -235,7 +235,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
bool _recregion;
bool _automation; ///< true if this is an automation region view
bool _dragging;
- double _width;
+ double _width;
private:
void parameter_changed (std::string);
diff --git a/gtk2_ardour/time_info_box.h b/gtk2_ardour/time_info_box.h
index 625f5345a3..14dff4e36b 100644
--- a/gtk2_ardour/time_info_box.h
+++ b/gtk2_ardour/time_info_box.h
@@ -35,7 +35,7 @@
namespace ARDOUR {
class Session;
- class Location;
+ class Location;
}
class AudioClock;
diff --git a/gtk2_ardour/time_selection.h b/gtk2_ardour/time_selection.h
index 413cb75de6..4c535a8e6a 100644
--- a/gtk2_ardour/time_selection.h
+++ b/gtk2_ardour/time_selection.h
@@ -32,9 +32,9 @@ 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();
+ ARDOUR::framepos_t start();
+ ARDOUR::framepos_t end_frame();
+ ARDOUR::framepos_t length();
bool consolidate ();
};
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc
index 0c0deaed15..66dbfed34b 100644
--- a/gtk2_ardour/ui_config.cc
+++ b/gtk2_ardour/ui_config.cc
@@ -218,7 +218,7 @@ UIConfiguration::post_gui_init ()
int
UIConfiguration::load_defaults ()
{
- std::string rcfile;
+ std::string rcfile;
int ret = -1;
if (find_file (ardour_config_search_path(), default_ui_config_file_name, rcfile) ) {
diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h
index 590d817b49..c9a52c96cf 100644
--- a/gtk2_ardour/utils.h
+++ b/gtk2_ardour/utils.h
@@ -33,14 +33,14 @@
#include "canvas/types.h"
namespace PBD {
- class Controllable;
- class ScopedConnectionList;
+ class Controllable;
+ class ScopedConnectionList;
}
namespace Gtk {
class Window;
class ComboBoxText;
- class Adjustment;
+ class Adjustment;
}
namespace ArdourCanvas {
diff --git a/gtk2_ardour/verbose_cursor.h b/gtk2_ardour/verbose_cursor.h
index f4c76b1087..20866a4e04 100644
--- a/gtk2_ardour/verbose_cursor.h
+++ b/gtk2_ardour/verbose_cursor.h
@@ -26,7 +26,7 @@
class Editor;
namespace ArdourCanvas {
- class TrackingText;
+ class TrackingText;
}
class VerboseCursor
diff --git a/gtk2_ardour/window_manager.h b/gtk2_ardour/window_manager.h
index 9d0363eba9..a5a9714cc8 100644
--- a/gtk2_ardour/window_manager.h
+++ b/gtk2_ardour/window_manager.h
@@ -52,7 +52,7 @@ class ProxyBase;
class Manager : public ARDOUR::SessionHandlePtr
{
- public:
+public:
static Manager& instance();
void register_window (ProxyBase*);
@@ -66,7 +66,7 @@ class Manager : public ARDOUR::SessionHandlePtr
void set_transient_for (Gtk::Window*);
Gtk::Window* transient_parent() const { return current_transient_parent; }
- private:
+private:
typedef std::list<ProxyBase*> Windows;
Windows _windows;
Glib::RefPtr<Gtk::ActionGroup> window_actions;
@@ -76,26 +76,26 @@ class Manager : public ARDOUR::SessionHandlePtr
~Manager();
static Manager* _instance;
- private:
+private:
void window_proxy_was_mapped (ProxyBase*);
void window_proxy_was_unmapped (ProxyBase*);
};
class ProxyBase : public ARDOUR::SessionHandlePtr, public Gtkmm2ext::WindowProxy
{
- public:
+public:
ProxyBase (const std::string& name, const std::string& menu_name);
ProxyBase (const std::string& name, const std::string& menu_name, const XMLNode&);
virtual ARDOUR::SessionHandlePtr* session_handle () = 0;
- protected:
+protected:
void setup ();
};
class ProxyTemporary: public ProxyBase
{
- public:
+public:
ProxyTemporary (const std::string& name, Gtk::Window* win);
~ProxyTemporary();
@@ -114,7 +114,7 @@ class ProxyTemporary: public ProxyBase
template<typename T>
class ProxyWithConstructor: public ProxyBase
{
- public:
+public:
ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c)
: ProxyBase (name, menu_name) , creator (c) {}
@@ -155,14 +155,14 @@ class ProxyWithConstructor: public ProxyBase
}
}
- private:
+private:
boost::function<T*()> creator;
};
template<typename T>
class Proxy : public ProxyBase
{
- public:
+public:
Proxy (const std::string& name, const std::string& menu_name)
: ProxyBase (name, menu_name) {}
@@ -203,7 +203,7 @@ class Proxy : public ProxyBase
}
}
- private:
+private:
boost::function<T*()> creator;
};