summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /gtk2_ardour
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff)
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/about.cc16
-rw-r--r--gtk2_ardour/about.h4
-rw-r--r--gtk2_ardour/actions.cc52
-rw-r--r--gtk2_ardour/actions.h36
-rw-r--r--gtk2_ardour/add_midi_cc_track_dialog.cc6
-rw-r--r--gtk2_ardour/add_midi_cc_track_dialog.h2
-rw-r--r--gtk2_ardour/add_route_dialog.cc26
-rw-r--r--gtk2_ardour/add_route_dialog.h6
-rw-r--r--gtk2_ardour/analysis_window.cc84
-rw-r--r--gtk2_ardour/ardour_dialog.cc2
-rw-r--r--gtk2_ardour/ardour_dialog.h2
-rw-r--r--gtk2_ardour/ardour_image_compositor_socket.h96
-rw-r--r--gtk2_ardour/ardour_ui.cc378
-rw-r--r--gtk2_ardour/ardour_ui.h10
-rw-r--r--gtk2_ardour/ardour_ui2.cc74
-rw-r--r--gtk2_ardour/ardour_ui_dependents.cc6
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc58
-rw-r--r--gtk2_ardour/ardour_ui_mixer.cc4
-rw-r--r--gtk2_ardour/au_pluginui.h6
-rw-r--r--gtk2_ardour/audio_clock.cc186
-rw-r--r--gtk2_ardour/audio_clock.h18
-rw-r--r--gtk2_ardour/audio_region_editor.cc32
-rw-r--r--gtk2_ardour/audio_region_editor.h4
-rw-r--r--gtk2_ardour/audio_region_view.cc126
-rw-r--r--gtk2_ardour/audio_region_view.h42
-rw-r--r--gtk2_ardour/audio_streamview.cc108
-rw-r--r--gtk2_ardour/audio_streamview.h10
-rw-r--r--gtk2_ardour/audio_time_axis.cc24
-rw-r--r--gtk2_ardour/audio_time_axis.h14
-rw-r--r--gtk2_ardour/automation_controller.cc20
-rw-r--r--gtk2_ardour/automation_controller.h8
-rw-r--r--gtk2_ardour/automation_line.cc162
-rw-r--r--gtk2_ardour/automation_line.h18
-rw-r--r--gtk2_ardour/automation_region_view.cc10
-rw-r--r--gtk2_ardour/automation_region_view.h12
-rw-r--r--gtk2_ardour/automation_selectable.h2
-rw-r--r--gtk2_ardour/automation_selection.h2
-rw-r--r--gtk2_ardour/automation_streamview.cc20
-rw-r--r--gtk2_ardour/automation_streamview.h18
-rw-r--r--gtk2_ardour/automation_time_axis.cc72
-rw-r--r--gtk2_ardour/automation_time_axis.h22
-rw-r--r--gtk2_ardour/axis_view.cc8
-rw-r--r--gtk2_ardour/axis_view.h6
-rw-r--r--gtk2_ardour/bundle_manager.cc36
-rw-r--r--gtk2_ardour/bundle_manager.h14
-rw-r--r--gtk2_ardour/cairo_widget.cc6
-rw-r--r--gtk2_ardour/cairo_widget.h4
-rw-r--r--gtk2_ardour/canvas-curve.h2
-rw-r--r--gtk2_ardour/canvas-flag.cc8
-rw-r--r--gtk2_ardour/canvas-flag.h8
-rw-r--r--gtk2_ardour/canvas-hit.cc2
-rw-r--r--gtk2_ardour/canvas-hit.h6
-rw-r--r--gtk2_ardour/canvas-imageframe.c30
-rw-r--r--gtk2_ardour/canvas-imageframe.h6
-rw-r--r--gtk2_ardour/canvas-note-event.cc46
-rw-r--r--gtk2_ardour/canvas-note-event.h18
-rw-r--r--gtk2_ardour/canvas-note.cc2
-rw-r--r--gtk2_ardour/canvas-program-change.cc50
-rw-r--r--gtk2_ardour/canvas-program-change.h14
-rw-r--r--gtk2_ardour/canvas-simpleline.c50
-rw-r--r--gtk2_ardour/canvas-simplerect.c114
-rw-r--r--gtk2_ardour/canvas-sysex.cc16
-rw-r--r--gtk2_ardour/canvas-sysex.h4
-rw-r--r--gtk2_ardour/canvas-waveview.c260
-rw-r--r--gtk2_ardour/canvas-waveview.h10
-rw-r--r--gtk2_ardour/canvas.h2
-rw-r--r--gtk2_ardour/canvas_impl.h2
-rw-r--r--gtk2_ardour/control_point.cc8
-rw-r--r--gtk2_ardour/control_point.h10
-rw-r--r--gtk2_ardour/control_point_dialog.cc8
-rw-r--r--gtk2_ardour/control_point_dialog.h2
-rw-r--r--gtk2_ardour/crossfade_edit.cc126
-rw-r--r--gtk2_ardour/crossfade_edit.h60
-rw-r--r--gtk2_ardour/crossfade_view.cc26
-rw-r--r--gtk2_ardour/crossfade_view.h8
-rw-r--r--gtk2_ardour/crossfade_xpms.h2
-rw-r--r--gtk2_ardour/curvetest.cc12
-rw-r--r--gtk2_ardour/diamond.cc4
-rw-r--r--gtk2_ardour/diamond.h4
-rw-r--r--gtk2_ardour/editing.cc2
-rw-r--r--gtk2_ardour/editing.h2
-rw-r--r--gtk2_ardour/editing_syms.h2
-rw-r--r--gtk2_ardour/editor.cc488
-rw-r--r--gtk2_ardour/editor.h158
-rw-r--r--gtk2_ardour/editor_actions.cc56
-rw-r--r--gtk2_ardour/editor_audio_import.cc142
-rw-r--r--gtk2_ardour/editor_audiotrack.cc4
-rw-r--r--gtk2_ardour/editor_canvas.cc86
-rw-r--r--gtk2_ardour/editor_canvas_events.cc70
-rw-r--r--gtk2_ardour/editor_component.cc4
-rw-r--r--gtk2_ardour/editor_component.h4
-rw-r--r--gtk2_ardour/editor_cursors.cc8
-rw-r--r--gtk2_ardour/editor_drag.cc730
-rw-r--r--gtk2_ardour/editor_drag.h34
-rw-r--r--gtk2_ardour/editor_enums.h2
-rw-r--r--gtk2_ardour/editor_export_audio.cc72
-rw-r--r--gtk2_ardour/editor_group_tabs.cc18
-rw-r--r--gtk2_ardour/editor_group_tabs.h2
-rw-r--r--gtk2_ardour/editor_hscroller.cc2
-rw-r--r--gtk2_ardour/editor_imageframe.cc144
-rw-r--r--gtk2_ardour/editor_items.h6
-rw-r--r--gtk2_ardour/editor_keyboard.cc12
-rw-r--r--gtk2_ardour/editor_keys.cc4
-rw-r--r--gtk2_ardour/editor_markers.cc106
-rw-r--r--gtk2_ardour/editor_mixer.cc48
-rw-r--r--gtk2_ardour/editor_mouse.cc404
-rw-r--r--gtk2_ardour/editor_nudge.cc2
-rw-r--r--gtk2_ardour/editor_ops.cc834
-rw-r--r--gtk2_ardour/editor_regions.cc284
-rw-r--r--gtk2_ardour/editor_regions.h14
-rw-r--r--gtk2_ardour/editor_route_groups.cc48
-rw-r--r--gtk2_ardour/editor_route_groups.h6
-rw-r--r--gtk2_ardour/editor_routes.cc86
-rw-r--r--gtk2_ardour/editor_routes.h6
-rw-r--r--gtk2_ardour/editor_rulers.cc140
-rw-r--r--gtk2_ardour/editor_selection.cc144
-rw-r--r--gtk2_ardour/editor_selection_list.cc18
-rw-r--r--gtk2_ardour/editor_snapshots.cc18
-rw-r--r--gtk2_ardour/editor_snapshots.h8
-rw-r--r--gtk2_ardour/editor_summary.cc66
-rw-r--r--gtk2_ardour/editor_summary.h2
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc54
-rw-r--r--gtk2_ardour/editor_timefx.cc46
-rw-r--r--gtk2_ardour/engine_dialog.cc86
-rw-r--r--gtk2_ardour/engine_dialog.h6
-rw-r--r--gtk2_ardour/enums.cc2
-rw-r--r--gtk2_ardour/enums.h2
-rw-r--r--gtk2_ardour/evtest.cc14
-rw-r--r--gtk2_ardour/export_channel_selector.cc178
-rw-r--r--gtk2_ardour/export_channel_selector.h82
-rw-r--r--gtk2_ardour/export_dialog.cc82
-rw-r--r--gtk2_ardour/export_dialog.h40
-rw-r--r--gtk2_ardour/export_file_notebook.cc46
-rw-r--r--gtk2_ardour/export_file_notebook.h40
-rw-r--r--gtk2_ardour/export_filename_selector.cc94
-rw-r--r--gtk2_ardour/export_filename_selector.h38
-rw-r--r--gtk2_ardour/export_format_dialog.cc284
-rw-r--r--gtk2_ardour/export_format_dialog.h122
-rw-r--r--gtk2_ardour/export_format_selector.cc16
-rw-r--r--gtk2_ardour/export_format_selector.h12
-rw-r--r--gtk2_ardour/export_multiplicator.cc76
-rw-r--r--gtk2_ardour/export_multiplicator.h34
-rw-r--r--gtk2_ardour/export_preset_selector.cc34
-rw-r--r--gtk2_ardour/export_preset_selector.h18
-rw-r--r--gtk2_ardour/export_range_markers_dialog.cc58
-rw-r--r--gtk2_ardour/export_range_markers_dialog.h12
-rw-r--r--gtk2_ardour/export_timespan_selector.cc114
-rw-r--r--gtk2_ardour/export_timespan_selector.h32
-rw-r--r--gtk2_ardour/fft.cc12
-rw-r--r--gtk2_ardour/fft_graph.cc80
-rw-r--r--gtk2_ardour/fft_graph.h12
-rw-r--r--gtk2_ardour/fft_result.cc14
-rw-r--r--gtk2_ardour/fft_result.h14
-rw-r--r--gtk2_ardour/gain_meter.cc84
-rw-r--r--gtk2_ardour/gain_meter.h8
-rw-r--r--gtk2_ardour/generic_pluginui.cc116
-rw-r--r--gtk2_ardour/ghostregion.cc10
-rw-r--r--gtk2_ardour/ghostregion.h6
-rw-r--r--gtk2_ardour/global_port_matrix.cc4
-rw-r--r--gtk2_ardour/global_port_matrix.h8
-rw-r--r--gtk2_ardour/group_tabs.cc32
-rw-r--r--gtk2_ardour/group_tabs.h2
-rw-r--r--gtk2_ardour/gtk-custom-hruler.c26
-rw-r--r--gtk2_ardour/gtk-custom-hruler.h2
-rw-r--r--gtk2_ardour/gtk-custom-ruler.c44
-rw-r--r--gtk2_ardour/gtk-custom-ruler.h4
-rw-r--r--gtk2_ardour/gui_thread.h2
-rw-r--r--gtk2_ardour/i18n.h2
-rw-r--r--gtk2_ardour/imageframe.cc2
-rw-r--r--gtk2_ardour/imageframe.h2
-rw-r--r--gtk2_ardour/imageframe_p.h2
-rw-r--r--gtk2_ardour/imageframe_socket_handler.cc578
-rw-r--r--gtk2_ardour/imageframe_socket_handler.h212
-rw-r--r--gtk2_ardour/imageframe_time_axis.cc54
-rw-r--r--gtk2_ardour/imageframe_time_axis.h50
-rw-r--r--gtk2_ardour/imageframe_time_axis_group.cc60
-rw-r--r--gtk2_ardour/imageframe_time_axis_group.h96
-rw-r--r--gtk2_ardour/imageframe_time_axis_view.cc72
-rw-r--r--gtk2_ardour/imageframe_time_axis_view.h92
-rw-r--r--gtk2_ardour/imageframe_view.cc68
-rw-r--r--gtk2_ardour/imageframe_view.h60
-rw-r--r--gtk2_ardour/interactive-item.h16
-rw-r--r--gtk2_ardour/io_selector.cc20
-rw-r--r--gtk2_ardour/io_selector.h22
-rw-r--r--gtk2_ardour/itest.cc26
-rw-r--r--gtk2_ardour/keyboard.cc114
-rw-r--r--gtk2_ardour/keyboard.h2
-rw-r--r--gtk2_ardour/keyeditor.cc44
-rw-r--r--gtk2_ardour/keyeditor.h2
-rw-r--r--gtk2_ardour/latency_gui.cc8
-rw-r--r--gtk2_ardour/latency_gui.h6
-rw-r--r--gtk2_ardour/level_meter.cc12
-rw-r--r--gtk2_ardour/level_meter.h8
-rw-r--r--gtk2_ardour/lineset.cc34
-rw-r--r--gtk2_ardour/lineset.h6
-rw-r--r--gtk2_ardour/location_ui.cc114
-rw-r--r--gtk2_ardour/location_ui.h34
-rw-r--r--gtk2_ardour/logmeter.h8
-rw-r--r--gtk2_ardour/lv2_plugin_ui.cc14
-rw-r--r--gtk2_ardour/lv2_plugin_ui.h6
-rw-r--r--gtk2_ardour/main.cc38
-rw-r--r--gtk2_ardour/marker.cc142
-rw-r--r--gtk2_ardour/marker.h10
-rw-r--r--gtk2_ardour/marker_selection.h4
-rw-r--r--gtk2_ardour/marker_time_axis.cc22
-rw-r--r--gtk2_ardour/marker_time_axis.h40
-rw-r--r--gtk2_ardour/marker_time_axis_view.cc54
-rw-r--r--gtk2_ardour/marker_time_axis_view.h64
-rw-r--r--gtk2_ardour/marker_view.cc18
-rw-r--r--gtk2_ardour/marker_view.h36
-rw-r--r--gtk2_ardour/midi_channel_selector.cc46
-rw-r--r--gtk2_ardour/midi_channel_selector.h30
-rw-r--r--gtk2_ardour/midi_cut_buffer.h4
-rw-r--r--gtk2_ardour/midi_list_editor.cc12
-rw-r--r--gtk2_ardour/midi_list_editor.h6
-rw-r--r--gtk2_ardour/midi_region_view.cc282
-rw-r--r--gtk2_ardour/midi_region_view.h62
-rw-r--r--gtk2_ardour/midi_scroomer.cc6
-rw-r--r--gtk2_ardour/midi_scroomer.h2
-rw-r--r--gtk2_ardour/midi_selection.h2
-rw-r--r--gtk2_ardour/midi_streamview.cc120
-rw-r--r--gtk2_ardour/midi_streamview.h24
-rw-r--r--gtk2_ardour/midi_time_axis.cc102
-rw-r--r--gtk2_ardour/midi_time_axis.h18
-rw-r--r--gtk2_ardour/midi_util.h4
-rw-r--r--gtk2_ardour/mixer_group_tabs.cc32
-rw-r--r--gtk2_ardour/mixer_group_tabs.h2
-rw-r--r--gtk2_ardour/mixer_strip.cc200
-rw-r--r--gtk2_ardour/mixer_strip.h12
-rw-r--r--gtk2_ardour/mixer_ui.cc132
-rw-r--r--gtk2_ardour/mixer_ui.h20
-rw-r--r--gtk2_ardour/mtest.cc16
-rw-r--r--gtk2_ardour/nag.cc14
-rw-r--r--gtk2_ardour/nag.h2
-rw-r--r--gtk2_ardour/option_editor.h42
-rw-r--r--gtk2_ardour/opts.cc14
-rw-r--r--gtk2_ardour/opts.h2
-rw-r--r--gtk2_ardour/panner.cc20
-rw-r--r--gtk2_ardour/panner.h2
-rw-r--r--gtk2_ardour/panner2d.cc84
-rw-r--r--gtk2_ardour/panner2d.h8
-rw-r--r--gtk2_ardour/panner_ui.cc56
-rw-r--r--gtk2_ardour/panner_ui.h2
-rw-r--r--gtk2_ardour/piano_roll_header.cc20
-rw-r--r--gtk2_ardour/piano_roll_header.h6
-rw-r--r--gtk2_ardour/playlist_selection.h2
-rw-r--r--gtk2_ardour/playlist_selector.cc32
-rw-r--r--gtk2_ardour/playlist_selector.h4
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc76
-rw-r--r--gtk2_ardour/plugin_eq_gui.h6
-rw-r--r--gtk2_ardour/plugin_interest.h2
-rw-r--r--gtk2_ardour/plugin_selector.cc52
-rw-r--r--gtk2_ardour/plugin_selector.h6
-rw-r--r--gtk2_ardour/plugin_ui.cc38
-rw-r--r--gtk2_ardour/plugin_ui.h30
-rw-r--r--gtk2_ardour/point_selection.h4
-rw-r--r--gtk2_ardour/port_group.cc56
-rw-r--r--gtk2_ardour/port_group.h10
-rw-r--r--gtk2_ardour/port_matrix.cc40
-rw-r--r--gtk2_ardour/port_matrix.h10
-rw-r--r--gtk2_ardour/port_matrix_body.cc36
-rw-r--r--gtk2_ardour/port_matrix_body.h6
-rw-r--r--gtk2_ardour/port_matrix_column_labels.cc88
-rw-r--r--gtk2_ardour/port_matrix_column_labels.h8
-rw-r--r--gtk2_ardour/port_matrix_component.cc12
-rw-r--r--gtk2_ardour/port_matrix_component.h8
-rw-r--r--gtk2_ardour/port_matrix_grid.cc120
-rw-r--r--gtk2_ardour/port_matrix_grid.h8
-rw-r--r--gtk2_ardour/port_matrix_labels.cc2
-rw-r--r--gtk2_ardour/port_matrix_labels.h2
-rw-r--r--gtk2_ardour/port_matrix_row_labels.cc40
-rw-r--r--gtk2_ardour/port_matrix_row_labels.h6
-rw-r--r--gtk2_ardour/port_matrix_types.h6
-rw-r--r--gtk2_ardour/processor_box.cc40
-rw-r--r--gtk2_ardour/processor_box.h16
-rw-r--r--gtk2_ardour/processor_selection.h8
-rw-r--r--gtk2_ardour/prompter.cc2
-rw-r--r--gtk2_ardour/prompter.h2
-rw-r--r--gtk2_ardour/public_editor.cc2
-rw-r--r--gtk2_ardour/public_editor.h16
-rw-r--r--gtk2_ardour/quantize_dialog.cc16
-rw-r--r--gtk2_ardour/quantize_dialog.h6
-rw-r--r--gtk2_ardour/rc_option_editor.cc90
-rw-r--r--gtk2_ardour/region_editor.h2
-rw-r--r--gtk2_ardour/region_gain_line.cc14
-rw-r--r--gtk2_ardour/region_gain_line.h4
-rw-r--r--gtk2_ardour/region_selection.cc38
-rw-r--r--gtk2_ardour/region_selection.h10
-rw-r--r--gtk2_ardour/region_view.cc34
-rw-r--r--gtk2_ardour/region_view.h50
-rw-r--r--gtk2_ardour/return_ui.cc14
-rw-r--r--gtk2_ardour/return_ui.h4
-rw-r--r--gtk2_ardour/rgb_macros.h4
-rw-r--r--gtk2_ardour/rhythm_ferret.cc40
-rw-r--r--gtk2_ardour/rhythm_ferret.h4
-rw-r--r--gtk2_ardour/route_group_dialog.cc8
-rw-r--r--gtk2_ardour/route_group_dialog.h4
-rw-r--r--gtk2_ardour/route_group_menu.cc8
-rw-r--r--gtk2_ardour/route_group_menu.h4
-rw-r--r--gtk2_ardour/route_params_ui.cc88
-rw-r--r--gtk2_ardour/route_params_ui.h36
-rw-r--r--gtk2_ardour/route_processor_selection.cc4
-rw-r--r--gtk2_ardour/route_processor_selection.h4
-rw-r--r--gtk2_ardour/route_selection.h2
-rw-r--r--gtk2_ardour/route_time_axis.cc194
-rw-r--r--gtk2_ardour/route_time_axis.h54
-rw-r--r--gtk2_ardour/route_ui.cc118
-rw-r--r--gtk2_ardour/route_ui.h18
-rw-r--r--gtk2_ardour/selectable.h2
-rw-r--r--gtk2_ardour/selection.cc48
-rw-r--r--gtk2_ardour/selection.h8
-rw-r--r--gtk2_ardour/selection_templates.h6
-rw-r--r--gtk2_ardour/send_ui.cc12
-rw-r--r--gtk2_ardour/send_ui.h4
-rw-r--r--gtk2_ardour/session_import_dialog.cc52
-rw-r--r--gtk2_ardour/session_import_dialog.h14
-rw-r--r--gtk2_ardour/session_metadata_dialog.cc136
-rw-r--r--gtk2_ardour/session_metadata_dialog.h78
-rw-r--r--gtk2_ardour/session_option_editor.cc30
-rw-r--r--gtk2_ardour/sfdb_ui.cc140
-rw-r--r--gtk2_ardour/sfdb_ui.h38
-rw-r--r--gtk2_ardour/simpleline.cc10
-rw-r--r--gtk2_ardour/simpleline.h22
-rw-r--r--gtk2_ardour/simpleline_p.h2
-rw-r--r--gtk2_ardour/simplerect.h2
-rw-r--r--gtk2_ardour/simplerect_p.h2
-rw-r--r--gtk2_ardour/splash.cc6
-rw-r--r--gtk2_ardour/splash.h8
-rw-r--r--gtk2_ardour/startup.cc106
-rw-r--r--gtk2_ardour/startup.h18
-rw-r--r--gtk2_ardour/streamview.cc56
-rw-r--r--gtk2_ardour/streamview.h18
-rw-r--r--gtk2_ardour/strip_selection.h2
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc16
-rw-r--r--gtk2_ardour/strip_silence_dialog.h6
-rw-r--r--gtk2_ardour/tape_region_view.cc14
-rw-r--r--gtk2_ardour/tape_region_view.h4
-rw-r--r--gtk2_ardour/tempo_dialog.cc52
-rw-r--r--gtk2_ardour/tempo_dialog.h12
-rw-r--r--gtk2_ardour/tempo_lines.cc26
-rw-r--r--gtk2_ardour/tempo_lines.h2
-rw-r--r--gtk2_ardour/theme_manager.cc22
-rw-r--r--gtk2_ardour/theme_manager.h8
-rw-r--r--gtk2_ardour/time_axis_view.cc40
-rw-r--r--gtk2_ardour/time_axis_view.h18
-rw-r--r--gtk2_ardour/time_axis_view_item.cc88
-rw-r--r--gtk2_ardour/time_axis_view_item.h118
-rw-r--r--gtk2_ardour/time_fx_dialog.cc8
-rw-r--r--gtk2_ardour/time_fx_dialog.h2
-rw-r--r--gtk2_ardour/time_selection.cc10
-rw-r--r--gtk2_ardour/time_selection.h10
-rw-r--r--gtk2_ardour/track_selection.h4
-rw-r--r--gtk2_ardour/ui_config.cc24
-rw-r--r--gtk2_ardour/ui_config.h4
-rw-r--r--gtk2_ardour/utils.cc106
-rw-r--r--gtk2_ardour/utils.h6
-rw-r--r--gtk2_ardour/visual_time_axis.cc42
-rw-r--r--gtk2_ardour/visual_time_axis.h82
-rw-r--r--gtk2_ardour/vst_pluginui.cc14
-rw-r--r--gtk2_ardour/waveview.cc2
-rw-r--r--gtk2_ardour/waveview.h4
-rw-r--r--gtk2_ardour/waveview_p.h2
362 files changed, 8047 insertions, 8047 deletions
diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc
index 0954bad44a..d8b0323491 100644
--- a/gtk2_ardour/about.cc
+++ b/gtk2_ardour/about.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -220,13 +220,13 @@ About::About ()
set_website (X_("http://ardour.org/"));
set_website_label (_("visit http://www.ardour.org/"));
set_version ((string_compose(_("%1\n(built from revision %2)"),
- VERSIONSTRING,
+ VERSIONSTRING,
svn_revision)));
-
+
#ifdef WITH_PAYMENT_OPTIONS
paypal_button.add (paypal_pixmap);
-
+
HBox *payment_box = manage (new HBox);
payment_box->pack_start (paypal_button, true, false);
@@ -247,15 +247,15 @@ About::goto_paypal ()
char *argv[4];
char *docfile = "foo";
int grandchild;
-
+
if (fork() == 0) {
/* child */
if ((grandchild = fork()) == 0) {
-
+
/* grandchild */
-
+
argv[0] = "mozilla";
argv[1] = "-remote";
snprintf (buf, sizeof(buf), "openurl(%s)", docfile);
@@ -270,6 +270,6 @@ About::goto_paypal ()
waitpid (grandchild, &status, 0);
}
- }
+ }
}
#endif
diff --git a/gtk2_ardour/about.h b/gtk2_ardour/about.h
index 2eb02dd223..33b5a9ed89 100644
--- a/gtk2_ardour/about.h
+++ b/gtk2_ardour/about.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,6 +35,6 @@ class About : public Gtk::AboutDialog
Gtk::Button paypal_button;
void goto_paypal ();
#endif
-};
+};
#endif /* __ardour_gtk_about_h__ */
diff --git a/gtk2_ardour/actions.cc b/gtk2_ardour/actions.cc
index 19a33ef177..b446ee8569 100644
--- a/gtk2_ardour/actions.cc
+++ b/gtk2_ardour/actions.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2005 Paul Davis
+ Copyright (C) 2005 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -79,7 +79,7 @@ ActionManager::init ()
find_file_in_search_path (spath, "ardour.menus", ui_file);
bool loaded = false;
-
+
try {
ui_manager->add_ui_from_file (ui_file.to_string());
loaded = true;
@@ -142,12 +142,12 @@ ActionManager::register_toggle_action (RefPtr<ActionGroup> group, const char * n
return act;
}
-bool
+bool
ActionManager::lookup_entry (const ustring accel_path, Gtk::AccelKey& key)
{
GtkAccelKey gkey;
bool known = gtk_accel_map_lookup_entry (accel_path.c_str(), &gkey);
-
+
if (known) {
key = AccelKey (gkey.accel_key, Gdk::ModifierType (gkey.accel_mods));
} else {
@@ -177,11 +177,11 @@ ActionManager::get_all_actions (vector<string>& groups, vector<string>& names, v
GList* acts;
for (node = list; node; node = g_list_next (node)) {
-
+
GtkActionGroup* group = (GtkActionGroup*) node->data;
-
+
/* first pass: collect them all */
-
+
typedef std::list<Glib::RefPtr<Gtk::Action> > action_list;
action_list the_acts;
@@ -189,9 +189,9 @@ ActionManager::get_all_actions (vector<string>& groups, vector<string>& names, v
GtkAction* action = (GtkAction*) acts->data;
the_acts.push_back (Glib::wrap (action, true));
}
-
+
/* now sort by label */
-
+
SortActionsByLabel cmp;
the_acts.sort (cmp);
@@ -201,7 +201,7 @@ ActionManager::get_all_actions (vector<string>& groups, vector<string>& names, v
groups.push_back (gtk_action_group_get_name(group));
names.push_back (accel_path.substr (accel_path.find_last_of ('/') + 1));
-
+
AccelKey key;
lookup_entry (accel_path, key);
bindings.push_back (AccelKey (key.get_key(), Gdk::ModifierType (key.get_mod())));
@@ -221,11 +221,11 @@ ActionManager::get_all_actions (vector<string>& names, vector<string>& paths, ve
GList* acts;
for (node = list; node; node = g_list_next (node)) {
-
+
GtkActionGroup* group = (GtkActionGroup*) node->data;
-
+
/* first pass: collect them all */
-
+
typedef std::list<Glib::RefPtr<Gtk::Action> > action_list;
action_list the_acts;
@@ -233,9 +233,9 @@ ActionManager::get_all_actions (vector<string>& names, vector<string>& paths, ve
GtkAction* action = (GtkAction*) acts->data;
the_acts.push_back (Glib::wrap (action, true));
}
-
+
/* now sort by label */
-
+
SortActionsByLabel cmp;
the_acts.sort (cmp);
@@ -246,16 +246,16 @@ ActionManager::get_all_actions (vector<string>& names, vector<string>& paths, ve
names.push_back (label);
paths.push_back (accel_path);
-
+
AccelKey key;
bool known = lookup_entry (accel_path, key);
-
+
if (known) {
keys.push_back (ui_manager->get_accel_group()->name (key.get_key(), Gdk::ModifierType (key.get_mod())));
} else {
keys.push_back (unbound_string);
}
-
+
bindings.push_back (AccelKey (key.get_key(), Gdk::ModifierType (key.get_mod())));
}
}
@@ -300,11 +300,11 @@ ActionManager::get_action (const char* group_name, const char* action_name)
for (node = list; node; node = g_list_next (node)) {
GtkActionGroup* _ag = (GtkActionGroup*) node->data;
-
+
if (strcmp (group_name, gtk_action_group_get_name (_ag)) == 0) {
-
+
GtkAction* _act;
-
+
if ((_act = gtk_action_group_get_action (_ag, action_name)) != 0) {
act = Glib::wrap (_act, true);
break;
@@ -315,7 +315,7 @@ ActionManager::get_action (const char* group_name, const char* action_name)
return act;
}
-void
+void
ActionManager::set_sensitive (vector<RefPtr<Action> >& actions, bool state)
{
for (vector<RefPtr<Action> >::iterator i = actions.begin(); i != actions.end(); ++i) {
@@ -368,10 +368,10 @@ ActionManager::toggle_config_state (const char* group, const char* action, bool
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact) {
bool x = (Config->*get)();
-
+
if (x != tact->get_active()) {
(Config->*set) (!x);
}
@@ -411,7 +411,7 @@ ActionManager::map_some_state (const char* group, const char* action, bool (RCCo
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
if (tact) {
-
+
bool x = (Config->*get)();
if (tact->get_active() != x) {
@@ -433,7 +433,7 @@ ActionManager::map_some_state (const char* group, const char* action, sigc::slot
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
if (tact) {
-
+
bool const x = get ();
if (tact->get_active() != x) {
diff --git a/gtk2_ardour/actions.h b/gtk2_ardour/actions.h
index 35331fdac2..187168e4b4 100644
--- a/gtk2_ardour/actions.h
+++ b/gtk2_ardour/actions.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,35 +76,35 @@ class ActionManager
static void add_action_group (Glib::RefPtr<Gtk::ActionGroup>);
- static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
+ static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
const char * name, const char * label);
- static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
- const char * name, const char * label, sigc::slot<void> sl,
+ static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
+ const char * name, const char * label, sigc::slot<void> sl,
guint key, Gdk::ModifierType mods);
- static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
+ static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
const char * name, const char * label, sigc::slot<void> sl);
-
- static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&,
- const char * name, const char * label, sigc::slot<void> sl,
+
+ static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&,
+ const char * name, const char * label, sigc::slot<void> sl,
guint key, Gdk::ModifierType mods);
- static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&,
+ static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&,
const char * name, const char * label, sigc::slot<void> sl);
-
- static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group,
- const char * name, const char * label, sigc::slot<void> sl,
+
+ static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group,
+ const char * name, const char * label, sigc::slot<void> sl,
guint key, Gdk::ModifierType mods);
- static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group,
+ static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group,
const char * name, const char * label, sigc::slot<void> sl);
static bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key);
- static void get_all_actions (std::vector<std::string>& names,
- std::vector<std::string>& paths,
- std::vector<std::string>& keys,
+ static void get_all_actions (std::vector<std::string>& names,
+ std::vector<std::string>& paths,
+ std::vector<std::string>& keys,
std::vector<Gtk::AccelKey>& bindings);
- static void get_all_actions (std::vector<std::string>& groups,
- std::vector<std::string>& paths,
+ static void get_all_actions (std::vector<std::string>& groups,
+ std::vector<std::string>& paths,
std::vector<Gtk::AccelKey>& bindings);
static void uncheck_toggleaction (const char * actionname);
diff --git a/gtk2_ardour/add_midi_cc_track_dialog.cc b/gtk2_ardour/add_midi_cc_track_dialog.cc
index fed1218c57..455a9f7715 100644
--- a/gtk2_ardour/add_midi_cc_track_dialog.cc
+++ b/gtk2_ardour/add_midi_cc_track_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ AddMidiCCTrackDialog::AddMidiCCTrackDialog ()
_chan_spinner.set_name ("AddMidiCCTrackDialogSpinner");
_cc_num_spinner.set_name ("AddMidiCCTrackDialogSpinner");
-
+
HBox *chan_box = manage (new HBox());
Label *chan_label = manage(new Label("Channel: "));
chan_box->pack_start(*chan_label, true, true, 4);
@@ -65,7 +65,7 @@ AddMidiCCTrackDialog::AddMidiCCTrackDialog ()
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::ADD, RESPONSE_ACCEPT);
-
+
_chan_spinner.show();
chan_box->show();
chan_label->show();
diff --git a/gtk2_ardour/add_midi_cc_track_dialog.h b/gtk2_ardour/add_midi_cc_track_dialog.h
index ecdc9588c8..08811df513 100644
--- a/gtk2_ardour/add_midi_cc_track_dialog.h
+++ b/gtk2_ardour/add_midi_cc_track_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc
index f165d191c6..9d65931ec1 100644
--- a/gtk2_ardour/add_route_dialog.cc
+++ b/gtk2_ardour/add_route_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@ AddRouteDialog::AddRouteDialog (Session & s)
}
}
}
-
+
set_name ("AddRouteDialog");
set_position (Gtk::WIN_POS_MOUSE);
set_modal (true);
@@ -108,13 +108,13 @@ AddRouteDialog::AddRouteDialog (Session & s)
HBox *type_hbox = manage (new HBox);
type_hbox->set_spacing (6);
-
+
/* track/bus choice */
type_hbox->pack_start (*manage (new Label (_("Add:"))));
type_hbox->pack_start (routes_spinner);
type_hbox->pack_start (track_bus_combo);
-
+
vbox->pack_start (*type_hbox, false, true);
VBox* options_box = manage (new VBox);
@@ -153,7 +153,7 @@ AddRouteDialog::AddRouteDialog (Session & s)
l = manage (new Label (_("Group:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
table2->attach (*l, 1, 2, 2, 3, Gtk::FILL, Gtk::EXPAND, 0, 0);
table2->attach (route_group_combo, 2, 3, 2, 3, Gtk::FILL, Gtk::EXPAND & Gtk::FILL, 0, 0);
-
+
options_box->pack_start (*table2, false, true);
vbox->pack_start (*options_box, false, true);
@@ -197,7 +197,7 @@ ARDOUR::DataType
AddRouteDialog::type ()
{
// FIXME: ew
-
+
const string str = channel_combo.get_active_text();
if (str == _("MIDI")) {
return ARDOUR::DataType::MIDI;
@@ -245,7 +245,7 @@ int
AddRouteDialog::channels ()
{
string str = channel_combo.get_active_text();
-
+
for (ChannelSetups::iterator i = channel_setups.begin(); i != channel_setups.end(); ++i) {
if (str == (*i).name) {
return (*i).channels;
@@ -274,7 +274,7 @@ AddRouteDialog::on_show ()
{
refill_channel_setups ();
refill_route_groups ();
-
+
Dialog::on_show ();
}
@@ -282,7 +282,7 @@ void
AddRouteDialog::refill_channel_setups ()
{
ChannelSetup chn;
-
+
route_templates.clear ();
channel_combo_strings.clear ();
channel_setups.clear ();
@@ -316,10 +316,10 @@ AddRouteDialog::refill_channel_setups ()
chn.template_path = x->path;
channel_setups.push_back (chn);
}
- }
+ }
/* clear template path for the rest */
-
+
chn.template_path = "";
chn.name = _("3 Channel");
@@ -386,7 +386,7 @@ AddRouteDialog::refill_route_groups ()
route_group_combo.append_text (_("No group"));
_session.foreach_route_group (mem_fun (*this, &AddRouteDialog::add_route_group));
-
+
route_group_combo.set_active (2);
}
@@ -395,7 +395,7 @@ AddRouteDialog::group_changed ()
{
if (route_group_combo.get_active_text () == _("New group...")) {
RouteGroup* g = new RouteGroup (_session, "", RouteGroup::Active);
-
+
RouteGroupDialog d (g, Gtk::Stock::NEW);
int const r = d.do_run ();
diff --git a/gtk2_ardour/add_route_dialog.h b/gtk2_ardour/add_route_dialog.h
index 78dd51035c..d8c0b07762 100644
--- a/gtk2_ardour/add_route_dialog.h
+++ b/gtk2_ardour/add_route_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@ class AddRouteDialog : public ArdourDialog
Gtk::ComboBoxText route_group_combo;
std::vector<ARDOUR::TemplateInfo> route_templates;
-
+
void track_type_chosen ();
void refill_channel_setups ();
void refill_route_groups ();
@@ -79,7 +79,7 @@ class AddRouteDialog : public ArdourDialog
bool route_separator (const Glib::RefPtr<Gtk::TreeModel> &m, const Gtk::TreeModel::iterator &i);
void reset_template_option_visibility ();
-
+
void on_show ();
struct ChannelSetup {
diff --git a/gtk2_ardour/analysis_window.cc b/gtk2_ardour/analysis_window.cc
index 9b34ae4a4f..ea75875566 100644
--- a/gtk2_ardour/analysis_window.cc
+++ b/gtk2_ardour/analysis_window.cc
@@ -46,11 +46,11 @@ AnalysisWindow::AnalysisWindow() :
source_selection_label (_("Signal source")),
source_selection_ranges_rb (_("Selected ranges")),
source_selection_regions_rb (_("Selected regions")),
-
+
display_model_label (_("Display model")),
display_model_composite_separate_rb (_("Composite graphs for each track")),
display_model_composite_all_tracks_rb (_("Composite graph of all tracks")),
-
+
show_minmax_button (_("Show frequency power range")),
show_normalized_button (_("Normalize values")),
@@ -60,7 +60,7 @@ AnalysisWindow::AnalysisWindow() :
set_title(_("FFT analysis window"));
track_list_ready = false;
-
+
// Left side: track list + controls
tlmodel = Gtk::ListStore::create(tlcols);
track_list.set_model (tlmodel);
@@ -73,16 +73,16 @@ AnalysisWindow::AnalysisWindow() :
Gtk::TreeViewColumn* track_col = track_list.get_column(0);
Gtk::CellRendererText* renderer = dynamic_cast<Gtk::CellRendererText*>(track_list.get_column_cell_renderer (0));
-
+
track_col->add_attribute(renderer->property_foreground_gdk(), tlcols.color);
track_col->set_expand(true);
tlmodel->signal_row_changed().connect (
mem_fun(*this, &AnalysisWindow::track_list_row_changed) );
-
+
fft_graph.set_analysis_window(this);
-
+
vbox.pack_start(track_list);
@@ -94,10 +94,10 @@ AnalysisWindow::AnalysisWindow() :
source_selection_regions_rb.set_group(group);
source_selection_ranges_rb.set_active();
-
+
vbox.pack_start (source_selection_ranges_rb, false, false);
vbox.pack_start (source_selection_regions_rb, false, false);
-
+
// "Selected ranges" radio
source_selection_ranges_rb.signal_toggled().connect (
bind ( mem_fun(*this, &AnalysisWindow::source_selection_changed), &source_selection_ranges_rb));
@@ -106,24 +106,24 @@ AnalysisWindow::AnalysisWindow() :
source_selection_regions_rb.signal_toggled().connect (
bind ( mem_fun(*this, &AnalysisWindow::source_selection_changed), &source_selection_regions_rb));
}
-
+
vbox.pack_start(hseparator1, false, false);
-
+
// "Display model"
vbox.pack_start(display_model_label, false, false);
{
Gtk::RadioButtonGroup group = display_model_composite_separate_rb.get_group();
display_model_composite_all_tracks_rb.set_group (group);
-
+
display_model_composite_separate_rb.set_active();
-
+
vbox.pack_start (display_model_composite_separate_rb, false, false);
vbox.pack_start (display_model_composite_all_tracks_rb, false, false);
// "Composite graphs for all tracks"
display_model_composite_separate_rb.signal_toggled().connect (
bind ( mem_fun(*this, &AnalysisWindow::display_model_changed), &display_model_composite_separate_rb));
-
+
// "Composite graph of all tracks"
display_model_composite_all_tracks_rb.signal_toggled().connect (
bind ( mem_fun(*this, &AnalysisWindow::display_model_changed), &display_model_composite_all_tracks_rb));
@@ -134,7 +134,7 @@ AnalysisWindow::AnalysisWindow() :
refresh_button.set_name("EditorGTKButton");
refresh_button.set_label(_("Re-analyze data"));
- refresh_button.signal_clicked().connect ( bind ( mem_fun(*this, &AnalysisWindow::analyze_data), &refresh_button));
+ refresh_button.signal_clicked().connect ( bind ( mem_fun(*this, &AnalysisWindow::analyze_data), &refresh_button));
vbox.pack_start(refresh_button, false, false, 10);
@@ -149,18 +149,18 @@ AnalysisWindow::AnalysisWindow() :
show_normalized_button.signal_toggled().connect( mem_fun(*this, &AnalysisWindow::show_normalized_changed));
vbox.pack_start(show_normalized_button, false, false);
-
-
-
+
+
+
hbox.pack_start(vbox, Gtk::PACK_SHRINK);
-
+
// Analysis window on the right
fft_graph.ensure_style();
hbox.add(fft_graph);
-
-
+
+
// And last we pack the hbox
add(hbox);
@@ -197,7 +197,7 @@ AnalysisWindow::set_regionmode()
source_selection_regions_rb.set_active(true);
}
-void
+void
AnalysisWindow::track_list_row_changed(const Gtk::TreeModel::Path& /*path*/, const Gtk::TreeModel::iterator& /*iter*/)
{
if (track_list_ready) {
@@ -211,7 +211,7 @@ AnalysisWindow::clear_tracklist()
{
// Empty track list & free old graphs
Gtk::TreeNodeChildren children = track_list.get_model()->children();
-
+
for (Gtk::TreeIter i = children.begin(); i != children.end(); i++) {
Gtk::TreeModel::Row row = *i;
@@ -221,10 +221,10 @@ AnalysisWindow::clear_tracklist()
// Make sure it's not drawn
row[tlcols.graph] = 0;
-
+
delete delete_me;
}
-
+
tlmodel->clear();
}
@@ -243,17 +243,17 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
// Empty track list & free old graphs
clear_tracklist();
-
+
// first we gather the FFTResults of all tracks
-
+
Sample *buf = (Sample *) malloc(sizeof(Sample) * fft_graph.windowSize());
Sample *mixbuf = (Sample *) malloc(sizeof(Sample) * fft_graph.windowSize());
float *gain = (float *) malloc(sizeof(float) * fft_graph.windowSize());
-
+
Selection s = PublicEditor::instance().get_selection();
TimeSelection ts = s.time;
RegionSelection ars = s.regions;
-
+
for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) {
boost::shared_ptr<AudioPlaylist> pl
= boost::dynamic_pointer_cast<AudioPlaylist>((*i)->playlist());
@@ -269,11 +269,11 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
continue;
FFTResult *res = fft_graph.prepareResult(rui->color(), rui->route()->name());
-
+
// if timeSelection
if (source_selection_ranges_rb.get_active()) {
// cerr << "Analyzing ranges on track " << *&rui->route().name() << endl;
-
+
for (std::list<AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
int n;
@@ -305,15 +305,15 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
}
} else if (source_selection_regions_rb.get_active()) {
// cerr << "Analyzing selected regions on track " << *&rui->route().name() << endl;
-
+
TimeAxisView *current_axis = (*i);
-
+
for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) {
// Check that the region is actually audio (so we can analyze it)
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*j);
if (!arv)
continue;
-
+
// Check that the region really is selected on _this_ track/solo
if ( &arv->get_time_axis_view() != current_axis)
continue;
@@ -357,21 +357,21 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
}
res->finalize();
-
+
Gtk::TreeModel::Row newrow = *(tlmodel)->append();
newrow[tlcols.trackname] = rui->route()->name();
newrow[tlcols.visible] = true;
newrow[tlcols.color] = rui->color();
newrow[tlcols.graph] = res;
- }
+ }
+
-
free(buf);
free(mixbuf);
track_list_ready = true;
} /* end lock */
-
+
fft_graph.redraw();
}
@@ -384,13 +384,13 @@ AnalysisWindow::source_selection_changed (Gtk::RadioButton *button)
/*
cerr << "AnalysisWindow: signal source = ";
-
+
if (button == &source_selection_ranges_rb) {
cerr << "selected ranges" << endl;
-
+
} else if (button == &source_selection_regions_rb) {
cerr << "selected regions" << endl;
-
+
} else {
cerr << "unknown?" << endl;
}
@@ -406,7 +406,7 @@ AnalysisWindow::display_model_changed (Gtk::RadioButton *button)
/*
cerr << "AnalysisWindow: display model = ";
-
+
if (button == &display_model_composite_separate_rb) {
cerr << "separate composites of tracks" << endl;
} else if (button == &display_model_composite_all_tracks_rb) {
@@ -416,5 +416,5 @@ AnalysisWindow::display_model_changed (Gtk::RadioButton *button)
}
*/
}
-
+
diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc
index 7c78677d3e..5affa6e363 100644
--- a/gtk2_ardour/ardour_dialog.cc
+++ b/gtk2_ardour/ardour_dialog.cc
@@ -87,7 +87,7 @@ ArdourDialog::on_show ()
Dialog::on_show ();
}
-void
+void
ArdourDialog::init ()
{
session = 0;
diff --git a/gtk2_ardour/ardour_dialog.h b/gtk2_ardour/ardour_dialog.h
index 3384c013d4..cd0fce4162 100644
--- a/gtk2_ardour/ardour_dialog.h
+++ b/gtk2_ardour/ardour_dialog.h
@@ -37,7 +37,7 @@ class ArdourDialog : public Gtk::Dialog
{
public:
ArdourDialog (std::string title, bool modal = false, bool use_separator = false);
- ArdourDialog (Gtk::Window& parent, std::string title, bool modal = false, bool use_separator = false);
+ ArdourDialog (Gtk::Window& parent, std::string title, bool modal = false, bool use_separator = false);
~ArdourDialog();
static int close_all_current_dialogs (int response);
diff --git a/gtk2_ardour/ardour_image_compositor_socket.h b/gtk2_ardour/ardour_image_compositor_socket.h
index 6ed92ef8ac..88e9e377b8 100644
--- a/gtk2_ardour/ardour_image_compositor_socket.h
+++ b/gtk2_ardour/ardour_image_compositor_socket.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,28 +21,28 @@
#ifndef __ardour_image_comp_h__
#define __ardour_image_comp_h__
-#include <string>
+#include <string>
namespace ardourvis
{
/** Simple version number */
const int32_t MSG_VERSION = 1 ;
-
+
/** the default port we use */
const int32_t DEFAULT_PORT = 30000 ;
-
+
/** the maximum buffer size we will use to send receive a message (image data handled differently) */
const int32_t MAX_MSG_SIZE = 256 ;
-
+
/** the number of characters used for a value describing the characters within a textual data element */
const int32_t TEXT_SIZE_CHARS = 3 ;
-
+
/** the number of characters we use for time values within a message */
const int32_t TIME_VALUE_CHARS = 10 ;
-
+
/** the number of charachters we use for other value data, ie image width/height values */
const int32_t IMAGE_SIZE_CHARS = 3 ;
-
+
/** the number of characters used to for the size of the image data message */
const int32_t IMAGE_DATA_MESSAGE_SIZE_CHARS = 32 ;
@@ -51,116 +51,116 @@ namespace ardourvis
// we join the action chars with items to create the message
// with the exception of the return values, all messages begin with one
// of these message parts
-
+
/** Insert an Item */
const std::string INSERT_ITEM = "IN" ;
-
+
/** Remove an Item */
const std::string REMOVE_ITEM = "RM" ;
-
+
/** Rename a named item */
const std::string RENAME_ITEM = "MV" ;
-
+
/** Request some aditional data */
const std::string REQUEST_DATA = "RQ" ;
-
+
/** Return of a data request */
const std::string RETURN_DATA = "RD" ;
-
+
/** Update a item */
const std::string ITEM_UPDATE = "IU" ;
-
+
/** Select an Item */
const std::string ITEM_SELECTED = "IS" ;
-
+
/** Sesion Action */
const std::string SESSION_ACTION = "SA" ;
-
+
/** Sesion Action */
const std::string SHUTDOWN = "SD" ;
-
+
// ------------------------------------------------------------------------- //
// Return values
const std::string RETURN_TRUE = "RT1" ;
const std::string RETURN_FALSE = "RT0" ;
-
-
-
+
+
+
// ------------------------------------------------------------------------- //
// Updateable attributes
-
+
/** Update the position of a time axis item */
const std::string POSITION_CHANGE = "PC" ;
-
+
/** Update the duration of a time axis item */
const std::string DURATION_CHANGE = "DC" ;
-
+
/** Enable the position lock constraint no a time axis item */
const std::string POSITION_LOCK_CHANGE = "PL" ;
-
+
/** Enable the duration lock constraint no a time axis item */
const std::string DURATION_LOCK_CHANGE = "PL" ;
-
+
/** Update the Maximum duration of a time axis item (_Upper _Duration) */
const std::string MAX_DURATION_CHANGE = "UD" ;
-
+
/** Enable the Maximum duration constraint of a time axis item (_Enable _Upper (Duration)) */
const std::string MAX_DURATION_ENABLE_CHANGE = "EU" ;
-
+
/** Update the Minimum duration of a time axis item (_Lowerr _Duration) */
const std::string MIN_DURATION_CHANGE = "LD" ;
-
+
/** Enable the Minimum duration constraint of a time axis item (_Enable _Lower (Duration)) */
const std::string MIN_DURATION_ENABLE_CHANGE = "EL" ;
-
+
/** Refresh the image data of an imageframe item (original image has been altered?) */
const std::string IMAGE_REFRESH = "IR" ;
-
+
/** the session sample rate has changed */
const std::string SAMPLE_RATE_CHANGE = "RC" ;
-
-
-
+
+
+
// ------------------------------------------------------------------------- //
// Requestable data items
-
+
/** RGB data of the iamge */
// this is probably a bad choice of string !
const std::string IMAGE_RGB_DATA = "ID" ;
-
+
/** the (path) name of the Ardour session */
const std::string SESSION_NAME = "SN" ;
-
+
/** the current sample rate */
const std::string SAMPLE_RATE = "SR" ;
-
+
/** the (path) name of the image compositor session */
const std::string COMPOSITOR_SESSION = "CS" ;
-
-
+
+
// ------------------------------------------------------------------------- //
// Session Actions - follwed by session path
-
+
/** Close a session */
const std::string CLOSE_SESSION = "CS" ;
-
+
/** Open a session */
const std::string OPEN_SESSION = "OS" ;
-
-
-
+
+
+
// ------------------------------------------------------------------------- //
// Items
-
+
const std::string IMAGEFRAME_TIME_AXIS = "IT" ;
const std::string MARKER_TIME_AXIS = "MT" ;
const std::string IMAGEFRAME_ITEM = "II" ;
const std::string MARKER_ITEM = "MI" ;
-
+
/** or an ImageFrameTimeAxisGroup */
const std::string IMAGEFRAME_GROUP = "IG" ;
-
+
} /* namespace ardour_visual */
#endif /* __ardour_image_comp_socket_h__ */
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 45f6191dd3..423f9de14a 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999-2007 Paul Davis
+ Copyright (C) 1999-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -115,7 +115,7 @@ sigc::signal<void,nframes_t, bool, nframes_t> ARDOUR_UI::Clock;
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
: Gtkmm2ext::UI (X_("Ardour"), argcp, argvp),
-
+
primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, false, true),
secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, false, true),
preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, true),
@@ -149,7 +149,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
auto_loop_button (auto_loop_controllable),
play_selection_button (play_selection_controllable),
rec_button (rec_controllable),
-
+
shuttle_units_button (_("% ")),
punch_in_button (_("Punch In")),
@@ -169,7 +169,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
using namespace Gtk::Menu_Helpers;
Gtkmm2ext::init();
-
+
#ifdef TOP_MENUBAR
// _auto_display_errors = false;
@@ -190,7 +190,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
ui_config = new UIConfiguration();
theme_manager = new ThemeManager();
-
+
editor = 0;
mixer = 0;
session = 0;
@@ -232,9 +232,9 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
shuttle_unit_menu = 0;
// We do not have jack linked in yet so;
-
+
last_shuttle_request = last_peak_grab = 0; // get_microseconds();
-
+
ARDOUR::Diskstream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
ARDOUR::Diskstream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
@@ -267,7 +267,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
error << _("could not initialize Ardour.") << endmsg;
// pass it on up
throw;
- }
+ }
/* we like keyboards */
@@ -293,7 +293,7 @@ ARDOUR_UI::run_startup (bool should_be_new)
main().run();
- /* we don't return here until the startup assistant is finished */
+ /* we don't return here until the startup assistant is finished */
_startup->hide ();
}
@@ -309,7 +309,7 @@ ARDOUR_UI::create_engine ()
loading_message (_("Starting audio engine"));
- try {
+ try {
engine = new ARDOUR::AudioEngine (ARDOUR_COMMAND_LINE::jack_client_name);
} catch (...) {
@@ -344,7 +344,7 @@ ARDOUR_UI::post_engine ()
if (setup_windows ()) {
throw failed_constructor ();
}
-
+
check_memory_locking();
/* this is the first point at which all the keybindings are available */
@@ -384,7 +384,7 @@ ARDOUR_UI::post_engine ()
}
/* start the time-of-day-clock */
-
+
#ifndef GTKOSX
/* OS X provides an always visible wallclock, so don't be stupid */
update_wall_clock ();
@@ -399,8 +399,8 @@ ARDOUR_UI::post_engine ()
if (do_engine_start () == 0) {
if (session && _session_is_new) {
- /* we need to retain initial visual
- settings for a new session
+ /* we need to retain initial visual
+ settings for a new session
*/
session->save_state ("");
}
@@ -455,7 +455,7 @@ ARDOUR_UI::configure_handler (GdkEventConfigure* /*conf*/)
Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::configure_timeout), 100);
have_configure_timeout = true;
}
-
+
return FALSE;
}
@@ -522,7 +522,7 @@ ARDOUR_UI::save_ardour_state ()
if (!keyboard || !mixer || !editor) {
return;
}
-
+
/* XXX this is all a bit dubious. add_extra_xml() uses
a different lifetime model from add_instant_xml().
*/
@@ -555,7 +555,7 @@ ARDOUR_UI::autosave_session ()
{
if (g_main_depth() > 1) {
/* inside a recursive main loop,
- give up because we may not be able to
+ give up because we may not be able to
take a lock.
*/
return 1;
@@ -588,7 +588,7 @@ ARDOUR_UI::update_autosave ()
} else {
if (_autosave_connection.connected()) {
_autosave_connection.disconnect();
- }
+ }
}
}
@@ -606,7 +606,7 @@ ARDOUR_UI::backend_audio_error (bool we_set_params, Gtk::Window* toplevel)
false,
Gtk::MESSAGE_INFO,
Gtk::BUTTONS_NONE);
-
+
if (we_set_params) {
win.set_secondary_text(_("There are several possible reasons:\n\
\n\
@@ -635,7 +635,7 @@ Please consider the possibilities, and perhaps (re)start JACK."));
}
win.set_default_response (RESPONSE_CLOSE);
-
+
win.show_all ();
win.set_position (Gtk::WIN_POS_CENTER);
pop_back_splash ();
@@ -649,11 +649,11 @@ void
ARDOUR_UI::startup ()
{
XMLNode* audio_setup = Config->extra_xml ("AudioSetup");
-
+
if (audio_setup && _startup && _startup->engine_control()) {
_startup->engine_control()->set_state (*audio_setup);
}
-
+
if (get_session_parameters (ARDOUR_COMMAND_LINE::new_session)) {
exit (1);
}
@@ -661,7 +661,7 @@ ARDOUR_UI::startup ()
use_config ();
goto_editor_window ();
-
+
BootMessage (_("Ardour is ready for use"));
show ();
}
@@ -698,24 +698,24 @@ ARDOUR_UI::check_memory_locking ()
if (getrlimit (RLIMIT_MEMLOCK, &limits)) {
return;
}
-
+
if (limits.rlim_cur != RLIM_INFINITY) {
if (ram == 0 || ((double) limits.rlim_cur / ram) < 0.75) {
-
+
MessageDialog msg (_("WARNING: Your system has a limit for maximum amount of locked memory. "
"This might cause Ardour to run out of memory before your system "
"runs out of memory. \n\n"
"You can view the memory limit with 'ulimit -l', "
"and it is normally controlled by /etc/security/limits.conf"));
-
+
VBox* vbox = msg.get_vbox();
HBox hbox;
CheckButton cb (_("Do not show this window again"));
-
+
cb.signal_toggled().connect (mem_fun (*this, &ARDOUR_UI::no_memory_warning));
-
+
hbox.pack_start (cb, true, false);
vbox->pack_start (hbox);
cb.show();
@@ -723,7 +723,7 @@ ARDOUR_UI::check_memory_locking ()
hbox.show ();
pop_back_splash ();
-
+
editor->ensure_float (msg);
msg.run ();
}
@@ -752,7 +752,7 @@ ARDOUR_UI::finish()
/* use the default name */
if (save_state_canfail ("")) {
/* failed - don't quit */
- MessageDialog msg (*editor,
+ MessageDialog msg (*editor,
_("\
Ardour was unable to save your session.\n\n\
If you still wish to quit, please use the\n\n\
@@ -766,7 +766,7 @@ If you still wish to quit, please use the\n\n\
break;
}
}
-
+
session->set_deletion_in_progress ();
}
@@ -806,9 +806,9 @@ ARDOUR_UI::ask_about_saving_session (const string & what)
} else {
type = _("snapshot");
}
- prompt = string_compose(_("The %1 \"%2\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"),
+ prompt = string_compose(_("The %1 \"%2\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"),
type, session->snap_name());
-
+
prompt_label.set_text (prompt);
prompt_label.set_name (X_("PrompterLabel"));
prompt_label.set_alignment(ALIGN_LEFT, ALIGN_TOP);
@@ -846,7 +846,7 @@ ARDOUR_UI::ask_about_saving_session (const string & what)
return -1;
}
-
+
gint
ARDOUR_UI::every_second ()
{
@@ -887,13 +887,13 @@ ARDOUR_UI::update_sample_rate (nframes_t ignored)
} else {
nframes_t rate = engine->frame_rate();
-
+
if (fmod (rate, 1000.0) != 0.0) {
- snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f ms"),
+ snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f ms"),
(float) rate/1000.0f,
(engine->frames_per_cycle() / (float) rate) * 1000.0f);
} else {
- snprintf (buf, sizeof (buf), _("%u kHz / %4.1f ms"),
+ snprintf (buf, sizeof (buf), _("%u kHz / %4.1f ms"),
rate/1000,
(engine->frames_per_cycle() / (float) rate) * 1000.0f);
}
@@ -919,10 +919,10 @@ ARDOUR_UI::update_buffer_load ()
if (session) {
c = session->capture_load ();
p = session->playback_load ();
-
+
push_buffer_stats (c, p);
- snprintf (buf, sizeof (buf), _("Buffers p:%" PRIu32 "%% c:%" PRIu32 "%%"),
+ snprintf (buf, sizeof (buf), _("Buffers p:%" PRIu32 "%% c:%" PRIu32 "%%"),
session->playback_load(), session->capture_load());
buffer_load_label.set_text (buf);
} else {
@@ -949,41 +949,41 @@ ARDOUR_UI::update_disk_space()
nframes_t frames = session->available_capture_duration();
char buf[64];
nframes_t fr = session->frame_rate();
-
+
if (frames == max_frames) {
strcpy (buf, _("Disk: 24hrs+"));
} else {
rec_enabled_streams = 0;
session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams);
-
+
if (rec_enabled_streams) {
frames /= rec_enabled_streams;
}
-
+
int hrs;
int mins;
int secs;
-
+
hrs = frames / (fr * 3600);
frames -= hrs * fr * 3600;
mins = frames / (fr * 60);
frames -= mins * fr * 60;
secs = frames / fr;
-
+
snprintf (buf, sizeof(buf), _("Disk: %02dh:%02dm:%02ds"), hrs, mins, secs);
}
-
+
disk_space_label.set_text (buf);
-
+
// An attempt to make the disk space label flash red when space has run out.
-
+
if (frames < fr * 60 * 5) {
/* disk_space_box.style ("disk_space_label_empty"); */
} else {
/* disk_space_box.style ("disk_space_label"); */
}
-}
+}
gint
ARDOUR_UI::update_wall_clock ()
@@ -1013,7 +1013,7 @@ ARDOUR_UI::redisplay_recent_sessions ()
{
std::vector<sys::path> session_directories;
RecentSessionsSorter cmp;
-
+
recent_session_display.set_model (Glib::RefPtr<TreeModel>(0));
recent_session_model->clear ();
@@ -1027,16 +1027,16 @@ ARDOUR_UI::redisplay_recent_sessions ()
//
// sort them alphabetically
sort (rs.begin(), rs.end(), cmp);
-
+
for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) {
session_directories.push_back ((*i).second);
}
-
+
for (vector<sys::path>::const_iterator i = session_directories.begin();
i != session_directories.end(); ++i)
{
std::vector<sys::path> state_file_paths;
-
+
// now get available states for this session
get_state_files_in_directory (*i, state_file_paths);
@@ -1044,7 +1044,7 @@ ARDOUR_UI::redisplay_recent_sessions ()
vector<string*>* states;
vector<const gchar*> item;
string fullpath = (*i).to_string();
-
+
/* remove any trailing / */
if (fullpath[fullpath.length()-1] == '/') {
@@ -1056,22 +1056,22 @@ ARDOUR_UI::redisplay_recent_sessions ()
/* session doesn't exist */
cerr << "skipping non-existent session " << fullpath << endl;
continue;
- }
-
+ }
+
/* now get available states for this session */
if ((states = Session::possible_states (fullpath)) == 0) {
/* no state file? */
continue;
}
-
+
std::vector<string> state_file_names(get_file_names_no_extension (state_file_paths));
Gtk::TreeModel::Row row = *(recent_session_model->append());
row[recent_session_columns.visible_name] = Glib::path_get_basename (fullpath);
row[recent_session_columns.fullpath] = fullpath;
-
+
if (state_file_names.size() > 1) {
// add the children
@@ -1095,9 +1095,9 @@ void
ARDOUR_UI::build_session_selector ()
{
session_selector_window = new ArdourDialog (_("Recent Sessions"));
-
+
Gtk::ScrolledWindow *scroller = manage (new Gtk::ScrolledWindow);
-
+
session_selector_window->add_button (Stock::CANCEL, RESPONSE_CANCEL);
session_selector_window->add_button (Stock::OPEN, RESPONSE_ACCEPT);
session_selector_window->set_default_response (RESPONSE_ACCEPT);
@@ -1134,15 +1134,15 @@ ARDOUR_UI::open_recent_session ()
if (session_selector_window == 0) {
build_session_selector ();
}
-
+
redisplay_recent_sessions ();
while (true) {
-
+
session_selector_window->set_position (WIN_POS_MOUSE);
ResponseType r = (ResponseType) session_selector_window->run ();
-
+
switch (r) {
case RESPONSE_ACCEPT:
break;
@@ -1158,20 +1158,20 @@ ARDOUR_UI::open_recent_session ()
if (recent_session_display.get_selection()->count_selected_rows() == 0) {
continue;
}
-
+
session_selector_window->hide();
Gtk::TreeModel::iterator i = recent_session_display.get_selection()->get_selected();
-
+
if (i == recent_session_model->children().end()) {
return;
}
-
+
Glib::ustring path = (*i)[recent_session_columns.fullpath];
Glib::ustring state = (*i)[recent_session_columns.visible_name];
-
+
_session_is_new = false;
-
+
if (load_session (path, state) == 0) {
break;
}
@@ -1202,7 +1202,7 @@ ARDOUR_UI::open_session ()
{
if (!check_audioengine()) {
return;
-
+
}
/* popup selector window */
@@ -1258,7 +1258,7 @@ ARDOUR_UI::session_add_midi_route (bool disk, RouteGroup* route_group, uint32_t
return;
}
- try {
+ try {
if (disk) {
tracks = session->new_midi_track (ARDOUR::Normal, route_group, how_many);
@@ -1278,7 +1278,7 @@ ARDOUR_UI::session_add_midi_route (bool disk, RouteGroup* route_group, uint32_t
}
catch (...) {
- MessageDialog msg (*editor,
+ MessageDialog msg (*editor,
_("There are insufficient JACK ports available\n\
to create a new track or bus.\n\
You should save Ardour, exit and\n\
@@ -1299,7 +1299,7 @@ ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t
return;
}
- try {
+ try {
if (track) {
tracks = session->new_audio_track (input_channels, output_channels, mode, route_group, how_many);
@@ -1307,7 +1307,7 @@ ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t
if (how_many == 1) {
error << _("could not create a new audio track") << endmsg;
} else {
- error << string_compose (_("could only create %1 of %2 new audio %3"),
+ error << string_compose (_("could only create %1 of %2 new audio %3"),
tracks.size(), how_many, (track ? _("tracks") : _("busses"))) << endmsg;
}
}
@@ -1324,14 +1324,14 @@ ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t
}
}
}
-
+
#if CONTROLOUTS
if (need_control_room_outs) {
pan_t pans[2];
-
+
pans[0] = 0.5;
pans[1] = 0.5;
-
+
route->set_stereo_control_outs (control_lr_channels);
route->control_outs()->set_stereo_pan (pans, this);
}
@@ -1339,7 +1339,7 @@ ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t
}
catch (...) {
- MessageDialog msg (*editor,
+ MessageDialog msg (*editor,
_("There are insufficient JACK ports available\n\
to create a new track or bus.\n\
You should save Ardour, exit and\n\
@@ -1369,16 +1369,16 @@ ARDOUR_UI::do_transport_locate (nframes_t new_position)
}
void
-ARDOUR_UI::transport_goto_start ()
+ARDOUR_UI::transport_goto_start ()
{
if (session) {
session->goto_start();
-
+
/* force displayed area in editor to start no matter
what "follow playhead" setting is.
*/
-
+
if (editor) {
editor->reset_x_origin (session->current_start_frame());
}
@@ -1391,11 +1391,11 @@ ARDOUR_UI::transport_goto_zero ()
if (session) {
session->request_locate (0);
-
+
/* force displayed area in editor to start no matter
what "follow playhead" setting is.
*/
-
+
if (editor) {
editor->reset_x_origin (0);
}
@@ -1410,10 +1410,10 @@ ARDOUR_UI::transport_goto_wallclock ()
time_t now;
struct tm tmnow;
nframes64_t frames;
-
+
time (&now);
localtime_r (&now, &tmnow);
-
+
frames = tmnow.tm_hour * (60 * 60 * session->frame_rate());
frames += tmnow.tm_min * (60 * session->frame_rate());
frames += tmnow.tm_sec * session->frame_rate();
@@ -1423,7 +1423,7 @@ ARDOUR_UI::transport_goto_wallclock ()
/* force displayed area in editor to start no matter
what "follow playhead" setting is.
*/
-
+
if (editor) {
editor->reset_x_origin (frames - (editor->current_page_frames()/2));
}
@@ -1440,7 +1440,7 @@ ARDOUR_UI::transport_goto_end ()
/* force displayed area in editor to start no matter
what "follow playhead" setting is.
*/
-
+
if (editor) {
editor->reset_x_origin (frame);
}
@@ -1458,11 +1458,11 @@ ARDOUR_UI::transport_stop ()
session->cancel_audition ();
return;
}
-
+
if (session->get_play_loop ()) {
session->request_play_loop (false);
}
-
+
session->request_stop ();
}
@@ -1485,7 +1485,7 @@ ARDOUR_UI::remove_last_capture()
void
ARDOUR_UI::transport_record (bool roll)
{
-
+
if (session) {
switch (session->record_status()) {
case Session::Disabled:
@@ -1577,10 +1577,10 @@ void
ARDOUR_UI::transport_rewind (int option)
{
float current_transport_speed;
-
+
if (session) {
current_transport_speed = session->transport_speed();
-
+
if (current_transport_speed >= 0.0f) {
switch (option) {
case 0:
@@ -1604,10 +1604,10 @@ void
ARDOUR_UI::transport_forward (int option)
{
float current_transport_speed;
-
+
if (session) {
current_transport_speed = session->transport_speed();
-
+
if (current_transport_speed <= 0.0f) {
switch (option) {
case 0:
@@ -1635,7 +1635,7 @@ ARDOUR_UI::toggle_record_enable (uint32_t dstream)
}
boost::shared_ptr<Route> r;
-
+
if ((r = session->route_by_remote_id (dstream)) != 0) {
Track* t;
@@ -1722,7 +1722,7 @@ ARDOUR_UI::engine_running ()
if (action_name) {
action = ActionManager::get_action (X_("JACK"), action_name);
-
+
if (action) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (action);
ract->set_active ();
@@ -1740,7 +1740,7 @@ ARDOUR_UI::engine_halted ()
update_sample_rate (0);
- MessageDialog msg (*editor,
+ MessageDialog msg (*editor,
_("\
JACK has either been shutdown or it\n\
disconnected Ardour because Ardour\n\
@@ -1753,7 +1753,7 @@ JACK, reconnect and save the session."));
int32_t
ARDOUR_UI::do_engine_start ()
{
- try {
+ try {
engine->start();
}
@@ -1764,7 +1764,7 @@ ARDOUR_UI::do_engine_start ()
unload_session ();
return -2;
}
-
+
return 0;
}
@@ -1793,7 +1793,7 @@ ARDOUR_UI::stop_clocking ()
{
clock_signal_connection.disconnect ();
}
-
+
void
ARDOUR_UI::toggle_clocking ()
{
@@ -1828,7 +1828,7 @@ ARDOUR_UI::start_blinking ()
*/
if (blink_timeout_tag < 0) {
- blink_on = false;
+ blink_on = false;
blink_timeout_tag = g_timeout_add (240, _blink, this);
}
}
@@ -1862,7 +1862,7 @@ ARDOUR_UI::snapshot_session ()
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
prompter.set_prompt (_("Name of New Snapshot"));
prompter.set_initial_text (timebuf);
-
+
switch (prompter.run()) {
case RESPONSE_ACCEPT:
{
@@ -1886,7 +1886,7 @@ ARDOUR_UI::snapshot_session ()
do_save = false;
}
}
-
+
if (do_save) {
save_state (snapname);
}
@@ -1903,7 +1903,7 @@ ARDOUR_UI::save_state (const string & name)
{
(void) save_state_canfail (name);
}
-
+
int
ARDOUR_UI::save_state_canfail (string name)
{
@@ -1947,7 +1947,7 @@ ARDOUR_UI::secondary_clock_value_changed ()
}
void
-ARDOUR_UI::transport_rec_enable_blink (bool onoff)
+ARDOUR_UI::transport_rec_enable_blink (bool onoff)
{
if (session == 0) {
return;
@@ -1955,7 +1955,7 @@ ARDOUR_UI::transport_rec_enable_blink (bool onoff)
Session::RecordState const r = session->record_status ();
bool const h = session->have_rec_enabled_diskstream ();
-
+
if (r == Session::Enabled || (r == Session::Recording && !h)) {
if (onoff) {
rec_button.set_visual_state (2);
@@ -1988,7 +1988,7 @@ ARDOUR_UI::save_template ()
switch (prompter.run()) {
case RESPONSE_ACCEPT:
prompter.get_result (name);
-
+
if (name.length()) {
session->save_template (name);
}
@@ -2021,12 +2021,12 @@ void
ARDOUR_UI::fontconfig_dialog ()
{
#ifdef GTKOSX
- /* X11 users will always have fontconfig info around, but new GTK-OSX users
+ /* X11 users will always have fontconfig info around, but new GTK-OSX users
may not and it can take a while to build it. Warn them.
*/
-
+
Glib::ustring fontconfig = Glib::build_filename (Glib::get_home_dir(), ".fontconfig");
-
+
if (!Glib::file_test (fontconfig, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_DIR)) {
MessageDialog msg (*_startup,
_("Welcome to Ardour.\n\n"
@@ -2060,7 +2060,7 @@ ARDOUR_UI::parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring&
/* it doesn't exist, assume the best */
session_path = Glib::path_get_dirname (string (cmdline_path));
}
-
+
session_name = basename_nosuffix (string (cmdline_path));
}
@@ -2078,22 +2078,22 @@ ARDOUR_UI::load_cmdline_session (const Glib::ustring& session_name, const Glib::
if (session_name.length() == 0 || session_path.length() == 0) {
return false;
}
-
+
if (Glib::file_test (session_path, Glib::FILE_TEST_IS_DIR)) {
Glib::ustring predicted_session_file;
-
+
predicted_session_file = session_path;
predicted_session_file += '/';
predicted_session_file += session_name;
predicted_session_file += ARDOUR::statefile_suffix;
-
+
if (Glib::file_test (predicted_session_file, Glib::FILE_TEST_EXISTS)) {
existing_session = true;
}
-
+
} else if (Glib::file_test (session_path, Glib::FILE_TEST_EXISTS)) {
-
+
if (session_path.find (ARDOUR::statefile_suffix) == session_path.length() - 7) {
/* existing .ardour file */
existing_session = true;
@@ -2102,14 +2102,14 @@ ARDOUR_UI::load_cmdline_session (const Glib::ustring& session_name, const Glib::
} else {
existing_session = false;
}
-
+
/* lets just try to load it */
-
+
if (create_engine ()) {
backend_audio_error (false, _startup);
return -1;
}
-
+
return load_session (session_path, session_name);
}
@@ -2117,14 +2117,14 @@ bool
ARDOUR_UI::ask_about_loading_existing_session (const Glib::ustring& session_path)
{
Glib::ustring str = string_compose (_("This session\n%1\nalready exists. Do you want to open it?"), session_path);
-
+
MessageDialog msg (str,
false,
Gtk::MESSAGE_WARNING,
Gtk::BUTTONS_YES_NO,
true);
-
-
+
+
msg.set_name (X_("CleanupDialog"));
msg.set_wmclass (X_("existing_session"), "Ardour");
msg.set_position (Gtk::WIN_POS_MOUSE);
@@ -2141,59 +2141,59 @@ ARDOUR_UI::ask_about_loading_existing_session (const Glib::ustring& session_path
int
ARDOUR_UI::build_session_from_nsd (const Glib::ustring& session_path, const Glib::ustring& session_name)
{
-
+
uint32_t cchns;
uint32_t mchns;
AutoConnectOption iconnect;
AutoConnectOption oconnect;
uint32_t nphysin;
uint32_t nphysout;
-
+
if (Profile->get_sae()) {
-
+
cchns = 0;
mchns = 2;
iconnect = AutoConnectPhysical;
oconnect = AutoConnectMaster;
nphysin = 0; // use all available
nphysout = 0; // use all available
-
+
} else {
-
+
/* get settings from advanced section of NSD */
-
+
if (_startup->create_control_bus()) {
cchns = (uint32_t) _startup->control_channel_count();
} else {
cchns = 0;
}
-
+
if (_startup->create_master_bus()) {
mchns = (uint32_t) _startup->master_channel_count();
} else {
mchns = 0;
}
-
+
if (_startup->connect_inputs()) {
iconnect = AutoConnectPhysical;
} else {
iconnect = AutoConnectOption (0);
}
-
+
/// @todo some minor tweaks.
-
+
if (_startup->connect_outs_to_master()) {
oconnect = AutoConnectMaster;
} else if (_startup->connect_outs_to_physical()) {
oconnect = AutoConnectPhysical;
} else {
oconnect = AutoConnectOption (0);
- }
-
+ }
+
nphysin = (uint32_t) _startup->input_limit_count();
nphysout = (uint32_t) _startup->output_limit_count();
}
-
+
if (build_session (session_path,
session_name,
cchns,
@@ -2201,9 +2201,9 @@ ARDOUR_UI::build_session_from_nsd (const Glib::ustring& session_path, const Glib
iconnect,
oconnect,
nphysin,
- nphysout,
+ nphysout,
engine->frame_rate() * 60 * 5)) {
-
+
return -1;
}
@@ -2272,7 +2272,7 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
if (!should_be_new && !ARDOUR_COMMAND_LINE::session_name.empty()) {
- /* if they named a specific statefile, use it, otherwise they are
+ /* if they named a specific statefile, use it, otherwise they are
just giving a session folder, and we want to use it as is
to find the session.
*/
@@ -2288,33 +2288,33 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
} else {
run_startup (should_be_new);
-
+
/* if we run the startup dialog again, offer more than just "new session" */
-
+
should_be_new = false;
-
+
session_name = _startup->session_name (likely_new);
-
+
/* this shouldn't happen, but we catch it just in case it does */
-
+
if (session_name.empty()) {
break;
- }
+ }
if (_startup->use_session_template()) {
template_name = _startup->session_template_name();
_session_is_new = true;
- }
+ }
- if (session_name[0] == '/' ||
+ if (session_name[0] == '/' ||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == '/') ||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == '/')) {
-
+
session_path = Glib::path_get_dirname (session_name);
session_name = Glib::path_get_basename (session_name);
-
+
} else {
-
+
session_path = _startup->session_folder();
}
}
@@ -2322,18 +2322,18 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
if (create_engine ()) {
break;
}
-
+
if (Glib::file_test (session_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
if (likely_new) {
Glib::ustring existing = Glib::build_filename (session_path, session_name);
-
+
if (!ask_about_loading_existing_session (existing)) {
ARDOUR_COMMAND_LINE::session_name = ""; // cancel that
continue;
- }
- }
+ }
+ }
_session_is_new = false;
@@ -2350,7 +2350,7 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
}
if (likely_new && template_name.empty()) {
-
+
ret = build_session_from_nsd (session_path, session_name);
} else {
@@ -2358,9 +2358,9 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
ret = load_session (session_path, session_name, template_name);
}
}
-
+
return ret;
-}
+}
void
ARDOUR_UI::close_session()
@@ -2411,7 +2411,7 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
true,
Gtk::MESSAGE_INFO,
Gtk::BUTTONS_CLOSE);
-
+
msg.set_title (_("Port Registration Error"));
msg.set_secondary_text (_("Click the Close button to try again."));
msg.set_position (Gtk::WIN_POS_CENTER);
@@ -2437,7 +2437,7 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
true,
Gtk::MESSAGE_INFO,
Gtk::BUTTONS_CLOSE);
-
+
msg.set_title (_("Loading Error"));
msg.set_secondary_text (_("Click the Close button to try again."));
msg.set_position (Gtk::WIN_POS_CENTER);
@@ -2460,7 +2460,7 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
connect_to_session (new_session);
session_loaded = true;
-
+
goto_editor_window ();
if (session) {
@@ -2475,9 +2475,9 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
}
int
-ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_name,
+ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_name,
uint32_t control_channels,
- uint32_t master_channels,
+ uint32_t master_channels,
AutoConnectOption input_connect,
AutoConnectOption output_connect,
uint32_t nphysin,
@@ -2500,7 +2500,7 @@ ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_n
} else if (x > 0) {
return 0;
}
-
+
_session_is_new = true;
try {
@@ -2530,7 +2530,7 @@ ARDOUR_UI::show ()
{
if (editor) {
editor->show_window ();
-
+
if (!shown_flag) {
editor->present ();
}
@@ -2592,7 +2592,7 @@ ARDOUR_UI::hide_splash ()
}
void
-ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* list_title,
+ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* list_title,
const string& plural_msg, const string& singular_msg)
{
size_t removed;
@@ -2601,7 +2601,7 @@ ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* l
if (removed == 0) {
MessageDialog msgd (*editor,
- _("No audio files were ready for cleanup"),
+ _("No audio files were ready for cleanup"),
true,
Gtk::MESSAGE_INFO,
(Gtk::ButtonsType)(Gtk::BUTTONS_OK) );
@@ -2609,15 +2609,15 @@ ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* l
check for any existing snapshots.\n\
These may still include regions that\n\
require some unused files to continue to exist."));
-
+
msgd.run ();
return;
- }
+ }
ArdourDialog results (_("ardour: cleanup"), true, false);
-
+
struct CleanupResultsModelColumns : public Gtk::TreeModel::ColumnRecord {
- CleanupResultsModelColumns() {
+ CleanupResultsModelColumns() {
add (visible_name);
add (fullpath);
}
@@ -2625,11 +2625,11 @@ require some unused files to continue to exist."));
Gtk::TreeModelColumn<Glib::ustring> fullpath;
};
-
+
CleanupResultsModelColumns results_columns;
Glib::RefPtr<Gtk::ListStore> results_model;
Gtk::TreeView results_display;
-
+
results_model = ListStore::create (results_columns);
results_display.set_model (results_model);
results_display.append_column (list_title, results_columns.visible_name);
@@ -2684,7 +2684,7 @@ require some unused files to continue to exist."));
row[results_columns.visible_name] = *i;
row[results_columns.fullpath] = *i;
}
-
+
list_scroller.add (results_display);
list_scroller.set_size_request (-1, 150);
list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
@@ -2731,7 +2731,7 @@ ARDOUR_UI::cleanup ()
ALL undo/redo information will be lost if you cleanup.\n\
After cleanup, unused audio files will be moved to a \
\"dead sounds\" location."));
-
+
checker.add_button (Stock::CANCEL, RESPONSE_CANCEL);
checker.add_button (_("Clean Up"), RESPONSE_ACCEPT);
checker.set_default_response (RESPONSE_CANCEL);
@@ -2762,11 +2762,11 @@ After cleanup, unused audio files will be moved to a \
editor->finish_cleanup ();
return;
}
-
+
editor->finish_cleanup ();
checker.hide();
- display_cleanup_results (rep,
+ display_cleanup_results (rep,
_("cleaned files"),
_("\
The following %1 files were not in use and \n\
@@ -2800,7 +2800,7 @@ ARDOUR_UI::flush_trash ()
return;
}
- display_cleanup_results (rep,
+ display_cleanup_results (rep,
_("deleted file"),
_("The following %1 files were deleted from\n\
%2,\n\
@@ -2848,7 +2848,7 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
}
string template_path = add_route_dialog->track_template();
-
+
if (!template_path.empty()) {
session->new_route_from_template (count, template_path);
return;
@@ -2869,7 +2869,7 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
}
/* XXX do something with name template */
-
+
if (add_route_dialog->type() == ARDOUR::DataType::MIDI) {
if (track) {
session_add_midi_track (route_group, count);
@@ -2879,7 +2879,7 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
msg.run ();
//session_add_midi_bus();
}
- } else {
+ } else {
if (track) {
session_add_audio_track (input_chan, output_chan, add_route_dialog->mode(), route_group, count);
} else {
@@ -2916,7 +2916,7 @@ ARDOUR_UI::editor_settings () const
} else {
node = Config->instant_xml(X_("Editor"));
}
-
+
if (!node) {
if (getenv("ARDOUR_INSTANT_XML_PATH")) {
node = Config->instant_xml(getenv("ARDOUR_INSTANT_XML_PATH"));
@@ -2936,7 +2936,7 @@ ARDOUR_UI::keyboard_settings () const
XMLNode* node = 0;
node = Config->extra_xml(X_("Keyboard"));
-
+
if (!node) {
node = new XMLNode (X_("Keyboard"));
}
@@ -3013,7 +3013,7 @@ ARDOUR_UI::write_buffer_stats ()
strftime (buf, sizeof (buf), "%T", &tm);
fprintf(fout, "%s %u %u\n", buf, (*i).capture, (*i).playback);
}
-
+
disk_buffer_stats.clear ();
fclose (fout);
@@ -3060,7 +3060,7 @@ Specifically, it failed to read data from disk\n\
quickly enough to keep up with playback.\n"));
msg->signal_response().connect (bind (mem_fun (*this, &ARDOUR_UI::disk_speed_dialog_gone), msg));
msg->show ();
- }
+ }
}
void
@@ -3074,7 +3074,7 @@ void
ARDOUR_UI::session_dialog (std::string msg)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::session_dialog), msg));
-
+
MessageDialog* d;
if (editor) {
@@ -3086,7 +3086,7 @@ ARDOUR_UI::session_dialog (std::string msg)
d->show_all ();
d->run ();
delete d;
-}
+}
int
ARDOUR_UI::pending_state_dialog ()
@@ -3153,7 +3153,7 @@ The audioengine is currently running at %2 Hz\n"), desired, actual));
}
}
-
+
void
ARDOUR_UI::disconnect_from_jack ()
{
@@ -3222,7 +3222,7 @@ ARDOUR_UI::record_state_changed ()
Session::RecordState const r = session->record_status ();
bool const h = session->have_rec_enabled_diskstream ();
-
+
if (r == Session::Recording && h) {
big_clock.set_widget_name ("BigClockRecording");
} else {
@@ -3259,11 +3259,11 @@ ARDOUR_UI::store_clock_modes ()
}
-
+
ARDOUR_UI::TransportControllable::TransportControllable (std::string name, ARDOUR_UI& u, ToggleType tp)
: Controllable (name), ui (u), type(tp)
{
-
+
}
void
@@ -3281,7 +3281,7 @@ ARDOUR_UI::TransportControllable::set_value (float val)
fract = ((val - 0.5f)/0.5f);
}
}
-
+
ui.set_shuttle_fract (fract);
return;
}
@@ -3334,7 +3334,7 @@ float
ARDOUR_UI::TransportControllable::get_value (void) const
{
float val = 0.0f;
-
+
switch (type) {
case Roll:
break;
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 407867167a..eb161d8e2d 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -139,7 +139,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void set_will_create_new_session_automatically (bool yn) {
_will_create_new_session_automatically = yn;
}
-
+
int get_session_parameters (bool should_be_new = false);
void parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session);
int load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session);
@@ -521,7 +521,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void open_session ();
void open_recent_session ();
void save_template ();
-
+
void edit_metadata ();
void import_metadata ();
@@ -616,7 +616,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::MenuItem *cleanup_item;
- void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title,
+ void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title,
const std::string& plural_msg, const std::string& singular_msg);
void cleanup ();
void flush_trash ();
@@ -633,10 +633,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI
uint32_t capture;
uint32_t playback;
- DiskBufferStat (time_t w, uint32_t c, uint32_t p)
+ DiskBufferStat (time_t w, uint32_t c, uint32_t p)
: when (w), capture (c), playback (p) {}
};
-
+
std::list<DiskBufferStat> disk_buffer_stats;
void push_buffer_stats (uint32_t, uint32_t);
void write_buffer_stats ();
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index 0394d8be8c..0b9ad8bcba 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999 Paul Davis
+ Copyright (C) 1999 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ using namespace Gtk;
using namespace Glib;
using namespace sigc;
-int
+int
ARDOUR_UI::setup_windows ()
{
if (create_editor ()) {
@@ -80,18 +80,18 @@ ARDOUR_UI::setup_windows ()
#ifdef TOP_MENUBAR
HBox* status_bar_packer = manage (new HBox);
-
+
status_bar_label.set_size_request (300, -1);
status_bar_packer->pack_start (status_bar_label, true, true, 6);
status_bar_packer->pack_start (error_log_button, false, false);
-
+
error_log_button.signal_clicked().connect (mem_fun (*this, &UI::toggle_errors));
editor->get_status_bar_packer().pack_start (*status_bar_packer, true, true);
editor->get_status_bar_packer().pack_start (menu_bar_base, false, false, 6);
#else
top_packer.pack_start (menu_bar_base, false, false);
-#endif
+#endif
top_packer.pack_start (transport_frame, false, false);
@@ -130,7 +130,7 @@ void
ARDOUR_UI::transport_stopped ()
{
stop_button.set_visual_state (1);
-
+
roll_button.set_visual_state (0);
play_selection_button.set_visual_state (0);
auto_loop_button.set_visual_state (0);
@@ -206,15 +206,15 @@ ARDOUR_UI::setup_transport ()
transport_frame.set_name ("BaseFrame");
transport_frame.add (transport_base);
- transport_tearoff->Detach.connect (bind (mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
+ transport_tearoff->Detach.connect (bind (mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
static_cast<Widget*>(&transport_frame)));
- transport_tearoff->Attach.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
+ transport_tearoff->Attach.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
static_cast<Widget*> (&transport_frame), 1));
- transport_tearoff->Hidden.connect (bind (mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
+ transport_tearoff->Hidden.connect (bind (mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
static_cast<Widget*>(&transport_frame)));
- transport_tearoff->Visible.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
+ transport_tearoff->Visible.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
static_cast<Widget*> (&transport_frame), 1));
-
+
shuttle_box.set_name ("TransportButton");
goto_start_button.set_name ("TransportButton");
goto_end_button.set_name ("TransportButton");
@@ -239,11 +239,11 @@ ARDOUR_UI::setup_transport ()
goto_start_button.set_size_request(29, -1);
goto_end_button.set_size_request(29, -1);
rec_button.set_size_request(29, -1);
-
+
Widget* w;
stop_button.set_visual_state (1);
-
+
w = manage (new Image (get_icon (X_("transport_start"))));
w->show();
goto_start_button.add (*w);
@@ -303,7 +303,7 @@ ARDOUR_UI::setup_transport ()
ARDOUR_UI::instance()->tooltips().set_tip (shuttle_box, _("Shuttle speed control"));
ARDOUR_UI::instance()->tooltips().set_tip (shuttle_units_button, _("Select semitones or %%-age for speed display"));
ARDOUR_UI::instance()->tooltips().set_tip (speed_display_box, _("Current transport speed"));
-
+
shuttle_box.set_flags (CAN_FOCUS);
shuttle_box.add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::POINTER_MOTION_MASK|Gdk::SCROLL_MASK);
shuttle_box.set_size_request (100, 15);
@@ -376,7 +376,7 @@ ARDOUR_UI::setup_transport ()
shuttle_units_button.set_name (X_("ShuttleButton"));
shuttle_units_button.signal_clicked().connect (mem_fun(*this, &ARDOUR_UI::shuttle_unit_clicked));
-
+
shuttle_style_button.set_name (X_("ShuttleStyleButton"));
vector<string> shuttle_strings;
@@ -399,7 +399,7 @@ ARDOUR_UI::setup_transport ()
shbox->pack_start (*sdframe, false, false);
shbox->pack_start (shuttle_units_button, true, true);
shbox->pack_start (shuttle_style_button, false, false);
-
+
svbox->pack_start (*sframe, false, false);
svbox->pack_start (*shbox, false, false);
@@ -429,7 +429,7 @@ ARDOUR_UI::setup_transport ()
transport_tearoff_hbox.pack_start (*clock_box, false, false, 0);
HBox* toggle_box = manage(new HBox);
-
+
VBox* punch_box = manage (new VBox);
punch_box->pack_start (punch_in_button, false, false);
punch_box->pack_start (punch_out_button, false, false);
@@ -439,12 +439,12 @@ ARDOUR_UI::setup_transport ()
auto_box->pack_start (auto_play_button, false, false);
auto_box->pack_start (auto_return_button, false, false);
toggle_box->pack_start (*auto_box, false, false);
-
+
VBox* io_box = manage (new VBox);
io_box->pack_start (auto_input_button, false, false);
io_box->pack_start (click_button, false, false);
toggle_box->pack_start (*io_box, false, false);
-
+
/* desensitize */
set_transport_sensitivity (false);
@@ -457,7 +457,7 @@ ARDOUR_UI::setup_transport ()
transport_tearoff_hbox.pack_start (*toggle_box, false, false, 4);
transport_tearoff_hbox.pack_start (alert_box, false, false);
-
+
if (Profile->get_sae()) {
Image* img = manage (new Image ((::get_icon (X_("sae")))));
transport_tearoff_hbox.pack_end (*img, false, false, 6);
@@ -531,7 +531,7 @@ ARDOUR_UI::solo_blink (bool onoff)
if (session == 0) {
return;
}
-
+
if (session->soloing()) {
if (onoff) {
solo_alert_button.set_state (STATE_ACTIVE);
@@ -550,7 +550,7 @@ ARDOUR_UI::audition_blink (bool onoff)
if (session == 0) {
return;
}
-
+
if (session->is_auditioning()) {
if (onoff) {
auditioning_alert_button.set_state (STATE_ACTIVE);
@@ -578,27 +578,27 @@ ARDOUR_UI::build_shuttle_context_menu ()
speed_items.push_back (RadioMenuElem (group, "8", bind (mem_fun (*this, &ARDOUR_UI::set_shuttle_max_speed), 8.0f)));
if (shuttle_max_speed == 8.0) {
- static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
+ static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
}
speed_items.push_back (RadioMenuElem (group, "6", bind (mem_fun (*this, &ARDOUR_UI::set_shuttle_max_speed), 6.0f)));
if (shuttle_max_speed == 6.0) {
- static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
+ static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
}
speed_items.push_back (RadioMenuElem (group, "4", bind (mem_fun (*this, &ARDOUR_UI::set_shuttle_max_speed), 4.0f)));
if (shuttle_max_speed == 4.0) {
- static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
+ static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
}
speed_items.push_back (RadioMenuElem (group, "3", bind (mem_fun (*this, &ARDOUR_UI::set_shuttle_max_speed), 3.0f)));
if (shuttle_max_speed == 3.0) {
- static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
+ static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
}
speed_items.push_back (RadioMenuElem (group, "2", bind (mem_fun (*this, &ARDOUR_UI::set_shuttle_max_speed), 2.0f)));
if (shuttle_max_speed == 2.0) {
- static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
+ static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
}
speed_items.push_back (RadioMenuElem (group, "1.5", bind (mem_fun (*this, &ARDOUR_UI::set_shuttle_max_speed), 1.5f)));
if (shuttle_max_speed == 1.5) {
- static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
+ static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();
}
items.push_back (MenuElem (_("Maximum speed"), *speed_menu));
@@ -658,7 +658,7 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
if (!session) {
return true;
}
-
+
switch (ev->button) {
case 1:
mouse_shuttle (ev->x, true);
@@ -666,7 +666,7 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
shuttle_box.remove_modal_grab ();
if (Config->get_shuttle_behaviour() == Sprung) {
if (session->config.get_auto_play() || roll_button.get_visual_state()) {
- shuttle_fract = SHUTTLE_FRACT_SPEED1;
+ shuttle_fract = SHUTTLE_FRACT_SPEED1;
session->request_transport_speed (1.0);
stop_button.set_visual_state (0);
roll_button.set_visual_state (1);
@@ -707,9 +707,9 @@ ARDOUR_UI::shuttle_box_scroll (GdkEventScroll* ev)
if (!session) {
return true;
}
-
+
switch (ev->direction) {
-
+
case GDK_SCROLL_UP:
shuttle_fract += 0.005;
break;
@@ -764,7 +764,7 @@ void
ARDOUR_UI::use_shuttle_fract (bool force)
{
microseconds_t now = get_microseconds();
-
+
/* do not attempt to submit a motion-driven transport speed request
more than once per process cycle.
*/
@@ -772,7 +772,7 @@ ARDOUR_UI::use_shuttle_fract (bool force)
if (!force && (last_shuttle_request - now) < (microseconds_t) engine->usecs_per_cycle()) {
return;
}
-
+
last_shuttle_request = now;
if (Config->get_shuttle_units() == Semitones) {
@@ -790,7 +790,7 @@ ARDOUR_UI::use_shuttle_fract (bool force)
bool neg;
double fract;
-
+
neg = (shuttle_fract < 0.0);
fract = 1 - sqrt (1 - (shuttle_fract * shuttle_fract)); // Formula A1
@@ -886,8 +886,8 @@ ARDOUR_UI::update_speed_display ()
last_speed_displayed = x;
}
-}
-
+}
+
void
ARDOUR_UI::set_transport_sensitivity (bool yn)
{
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc
index ac7c8cfdde..6755b27d1e 100644
--- a/gtk2_ardour/ardour_ui_dependents.cc
+++ b/gtk2_ardour/ardour_ui_dependents.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ ARDOUR_UI::connect_dependents_to_session (ARDOUR::Session *s)
mixer->connect_to_session (s);
/* its safe to do this now */
-
+
BootMessage (_("Reload Session History"));
s->restore_history ("");
}
@@ -93,7 +93,7 @@ void
ARDOUR_UI::goto_editor_window ()
{
if (splash && splash->is_visible()) {
- // in 2 seconds, hide the splash screen
+ // in 2 seconds, hide the splash screen
Glib::signal_timeout().connect (bind (sigc::ptr_fun (_hide_splash), this), 2000);
}
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index e816c3ce91..486c60dbe4 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
*/
/* This file contains any ARDOUR_UI methods that require knowledge of
- the various dialog boxes, and exists so that no compilation dependency
+ the various dialog boxes, and exists so that no compilation dependency
exists between the main ARDOUR_UI modules and their respective classes.
This is to cut down on the compile times. It also helps with my sanity.
*/
@@ -58,7 +58,7 @@ ARDOUR_UI::connect_to_session (Session *s)
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, true);
ActionManager::set_sensitive (ActionManager::write_sensitive_actions, session->writable());
-
+
if (session->locations()->num_range_markers()) {
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, true);
} else {
@@ -92,7 +92,7 @@ ARDOUR_UI::connect_to_session (Session *s)
rec_button.set_sensitive (true);
shuttle_box.set_sensitive (true);
-
+
if (location_ui) {
location_ui->set_session(s);
}
@@ -134,7 +134,7 @@ ARDOUR_UI::connect_to_session (Session *s)
/* Clocks are on by default after we are connected to a session, so show that here.
*/
-
+
connect_dependents_to_session (s);
/* listen to clock mode changes. don't do this earlier because otherwise as the clocks
@@ -164,7 +164,7 @@ ARDOUR_UI::unload_session (bool hide_stuff)
case -1:
// cancel
return 1;
-
+
case 1:
session->save_state ("");
break;
@@ -183,7 +183,7 @@ ARDOUR_UI::unload_session (bool hide_stuff)
point_zero_one_second_connection.disconnect();
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, false);
-
+
rec_button.set_sensitive (false);
shuttle_box.set_sensitive (false);
@@ -214,13 +214,13 @@ ARDOUR_UI::toggle_big_clock_window ()
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleBigClock"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact->get_active()) {
big_clock_window->show_all ();
big_clock_window->present ();
} else {
big_clock_window->hide ();
- }
+ }
}
}
@@ -231,18 +231,18 @@ ARDOUR_UI::toggle_rc_options_window ()
rc_option_editor = new RCOptionEditor;
rc_option_editor->signal_unmap().connect(sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleRCOptionsEditor")));
rc_option_editor->set_session (session);
- }
+ }
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleRCOptionsEditor"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact->get_active()) {
rc_option_editor->show_all ();
rc_option_editor->present ();
} else {
rc_option_editor->hide ();
- }
+ }
}
}
@@ -252,18 +252,18 @@ ARDOUR_UI::toggle_session_options_window ()
if (session_option_editor == 0) {
session_option_editor = new SessionOptionEditor (session);
session_option_editor->signal_unmap().connect(sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleSessionOptionsEditor")));
- }
+ }
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleSessionOptionsEditor"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
-
+
if (tact->get_active()) {
session_option_editor->show_all ();
session_option_editor->present ();
} else {
session_option_editor->hide ();
- }
+ }
}
}
@@ -288,13 +288,13 @@ ARDOUR_UI::toggle_location_window ()
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleLocations"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact->get_active()) {
location_ui->show_all ();
location_ui->present ();
} else {
location_ui->hide ();
- }
+ }
}
}
@@ -303,19 +303,19 @@ ARDOUR_UI::toggle_key_editor ()
{
if (key_editor == 0) {
key_editor = new KeyEditor;
- key_editor->signal_unmap().connect (sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleKeyEditor")));
+ key_editor->signal_unmap().connect (sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleKeyEditor")));
}
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleKeyEditor"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact->get_active()) {
key_editor->show_all ();
key_editor->present ();
} else {
key_editor->hide ();
- }
+ }
}
}
@@ -325,13 +325,13 @@ ARDOUR_UI::toggle_theme_manager ()
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleThemeManager"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact->get_active()) {
theme_manager->show_all ();
theme_manager->present ();
} else {
theme_manager->hide ();
- }
+ }
}
}
@@ -348,17 +348,17 @@ void
ARDOUR_UI::toggle_bundle_manager ()
{
create_bundle_manager ();
-
+
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleBundleManager"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
-
+
if (tact->get_active()) {
bundle_manager->show_all ();
bundle_manager->present ();
} else {
bundle_manager->hide ();
- }
+ }
}
}
@@ -383,13 +383,13 @@ ARDOUR_UI::toggle_route_params_window ()
RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleInspector"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact->get_active()) {
route_params->show_all ();
route_params->present ();
} else {
route_params->hide ();
- }
+ }
}
}
@@ -410,14 +410,14 @@ ARDOUR_UI::main_window_state_event_handler (GdkEventWindowState* ev, bool window
{
if (window_was_editor) {
- if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) &&
+ if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) &&
(ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
float_big_clock (editor);
}
} else {
- if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) &&
+ if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) &&
(ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
float_big_clock (mixer);
}
diff --git a/gtk2_ardour/ardour_ui_mixer.cc b/gtk2_ardour/ardour_ui_mixer.cc
index 6373bc8b8c..0fbc7fe11d 100644
--- a/gtk2_ardour/ardour_ui_mixer.cc
+++ b/gtk2_ardour/ardour_ui_mixer.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ ARDOUR_UI::create_mixer ()
{
try {
mixer = new Mixer_UI ();
- }
+ }
catch (failed_constructor& err) {
return -1;
diff --git a/gtk2_ardour/au_pluginui.h b/gtk2_ardour/au_pluginui.h
index 41f15a80ba..445ab27ec5 100644
--- a/gtk2_ardour/au_pluginui.h
+++ b/gtk2_ardour/au_pluginui.h
@@ -33,12 +33,12 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
public:
AUPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>);
~AUPluginUI ();
-
+
gint get_preferred_height () { return prefheight; }
gint get_preferred_width () { return prefwidth; }
bool start_updating(GdkEventAny*);
bool stop_updating(GdkEventAny*);
-
+
void activate ();
void deactivate ();
@@ -77,7 +77,7 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
NSWindow* cocoa_parent;
ComponentDescription carbon_descriptor;
AudioUnitCarbonView editView;
- WindowRef carbon_window;
+ WindowRef carbon_window;
EventHandlerRef carbon_event_handler;
bool _activating_from_app;
NSView* packView;
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index e79ba1906e..42531732fa 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999 Paul Davis
+ Copyright (C) 1999 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ const uint32_t AudioClock::field_length[(int) AudioClock::AudioFrames+1] = {
10 /* Audio Frame */
};
-AudioClock::AudioClock (std::string clock_name, bool transient, std::string widget_name, bool allow_edit, bool duration, bool with_info)
+AudioClock::AudioClock (std::string clock_name, bool transient, std::string widget_name, bool allow_edit, bool duration, bool with_info)
: _name (clock_name),
is_transient (transient),
is_duration (duration),
@@ -93,7 +93,7 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
smpte_lower_info_label = manage (new Label);
bbt_upper_info_label = manage (new Label);
bbt_lower_info_label = manage (new Label);
-
+
frames_upper_info_label->set_name ("AudioClockFramesUpperInfo");
frames_lower_info_label->set_name ("AudioClockFramesLowerInfo");
smpte_upper_info_label->set_name ("AudioClockSMPTEUpperInfo");
@@ -113,7 +113,7 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
smpte_info_box.pack_start (*smpte_lower_info_label, true, true);
bbt_info_box.pack_start (*bbt_upper_info_label, true, true);
bbt_info_box.pack_start (*bbt_lower_info_label, true, true);
-
+
} else {
frames_upper_info_label = 0;
frames_lower_info_label = 0;
@@ -121,18 +121,18 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
smpte_lower_info_label = 0;
bbt_upper_info_label = 0;
bbt_lower_info_label = 0;
- }
-
+ }
+
audio_frames_ebox.add (audio_frames_label);
-
+
frames_packer.set_homogeneous (false);
frames_packer.set_border_width (2);
frames_packer.pack_start (audio_frames_ebox, false, false);
-
+
if (with_info) {
frames_packer.pack_start (frames_info_box, false, false, 5);
}
-
+
frames_packer_hbox.pack_start (frames_packer, true, false);
hours_ebox.add (hours_label);
@@ -254,7 +254,7 @@ AudioClock::set_widget_name (string name)
ms_hours_ebox.set_name (name);
ms_minutes_ebox.set_name (name);
ms_seconds_ebox.set_name (name);
-
+
colon1.set_name (name);
colon2.set_name (name);
colon3.set_name (name);
@@ -418,7 +418,7 @@ AudioClock::set (nframes_t when, bool force, nframes_t offset, char which)
if ((!force && !is_visible()) || session == 0) {
return;
}
-
+
if (when == last_when && !offset && !force) {
return;
}
@@ -495,22 +495,22 @@ AudioClock::set_frames (nframes_t when, bool /*force*/)
char buf[32];
snprintf (buf, sizeof (buf), "%u", when);
audio_frames_label.set_text (buf);
-
+
if (frames_upper_info_label) {
nframes_t rate = session->frame_rate();
-
+
if (fmod (rate, 1000.0) == 0.000) {
sprintf (buf, "%uK", rate/1000);
} else {
sprintf (buf, "%.3fK", rate/1000.0f);
}
-
+
if (frames_upper_info_label->get_text() != buf) {
frames_upper_info_label->set_text (buf);
}
-
+
float vid_pullup = session->config.get_video_pullup();
-
+
if (vid_pullup == 0.0) {
if (frames_lower_info_label->get_text () != _("none")) {
frames_lower_info_label->set_text(_("none"));
@@ -522,7 +522,7 @@ AudioClock::set_frames (nframes_t when, bool /*force*/)
}
}
}
-}
+}
void
AudioClock::set_minsec (nframes_t when, bool force)
@@ -532,7 +532,7 @@ AudioClock::set_minsec (nframes_t when, bool force)
int hrs;
int mins;
float secs;
-
+
left = when;
hrs = (int) floor (left / (session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
@@ -564,7 +564,7 @@ AudioClock::set_smpte (nframes_t when, bool force)
{
char buf[32];
SMPTE::Time smpte;
-
+
if (is_duration) {
session->smpte_duration (when, smpte);
} else {
@@ -599,20 +599,20 @@ AudioClock::set_smpte (nframes_t when, bool force)
frames_label.set_text (buf);
last_frames = smpte.frames;
}
-
+
if (smpte_upper_info_label) {
double smpte_frames = session->smpte_frames_per_second();
-
+
if ( fmod(smpte_frames, 1.0) == 0.0) {
- sprintf (buf, "%u", int (smpte_frames));
+ sprintf (buf, "%u", int (smpte_frames));
} else {
sprintf (buf, "%.2f", smpte_frames);
}
-
+
if (smpte_upper_info_label->get_text() != buf) {
smpte_upper_info_label->set_text (buf);
}
-
+
if ((fabs(smpte_frames - 29.97) < 0.0001) || smpte_frames == 30) {
if (session->smpte_drop_frames()) {
sprintf (buf, "DF");
@@ -623,7 +623,7 @@ AudioClock::set_smpte (nframes_t when, bool force)
// there is no drop frame alternative
buf[0] = '\0';
}
-
+
if (smpte_lower_info_label->get_text() != buf) {
smpte_lower_info_label->set_text (buf);
}
@@ -641,7 +641,7 @@ AudioClock::set_bbt (nframes_t when, bool force)
if (when == 0) {
bbt.bars = 0;
bbt.beats = 0;
- bbt.ticks = 0;
+ bbt.ticks = 0;
} else {
session->tempo_map().bbt_time (when, bbt);
bbt.bars--;
@@ -663,7 +663,7 @@ AudioClock::set_bbt (nframes_t when, bool force)
if (force || ticks_label.get_text () != buf) {
ticks_label.set_text (buf);
}
-
+
if (bbt_upper_info_label) {
nframes64_t pos;
@@ -696,7 +696,7 @@ AudioClock::set_session (Session *s)
XMLProperty* prop;
XMLNode* node = session->extra_xml (X_("ClockModes"));
AudioClock::Mode amode;
-
+
if (node) {
if ((prop = node->property (_name)) != 0) {
amode = AudioClock::Mode (string_2_enum (prop->value(), amode));
@@ -889,11 +889,11 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
if (key_entry_state == field_length[field]) {
move_on = true;
}
-
+
if (move_on) {
if (key_entry_state) {
-
+
switch (field) {
case SMPTE_Hours:
case SMPTE_Minutes:
@@ -917,17 +917,17 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
default:
break;
}
-
+
ValueChanged(); /* EMIT_SIGNAL */
}
-
+
/* move on to the next field.
*/
-
+
switch (field) {
-
+
/* SMPTE */
-
+
case SMPTE_Hours:
minutes_ebox.grab_focus ();
break;
@@ -1130,7 +1130,7 @@ AudioClock::field_button_release_event (GdkEventButton *ev, Field field)
}
ops_menu->popup (1, ev->time);
return true;
- }
+ }
switch (ev->button) {
case 1:
@@ -1151,7 +1151,7 @@ AudioClock::field_button_release_event (GdkEventButton *ev, Field field)
case AudioFrames:
audio_frames_ebox.grab_focus();
break;
-
+
case MS_Hours:
ms_hours_ebox.grab_focus();
break;
@@ -1161,7 +1161,7 @@ AudioClock::field_button_release_event (GdkEventButton *ev, Field field)
case MS_Seconds:
ms_seconds_ebox.grab_focus();
break;
-
+
case Bars:
bars_ebox.grab_focus ();
break;
@@ -1173,7 +1173,7 @@ AudioClock::field_button_release_event (GdkEventButton *ev, Field field)
break;
}
break;
-
+
default:
break;
}
@@ -1196,10 +1196,10 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field /*field*/)
set (frames, true);
ValueChanged (); /* EMIT_SIGNAL */
}
-
+
/* make absolutely sure that the pointer is grabbed */
gdk_pointer_grab(ev->window,false ,
- GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK),
+ GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK),
NULL,NULL,ev->time);
dragging = true;
drag_accum = 0;
@@ -1223,7 +1223,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field /*field*/)
return false;
break;
}
-
+
return true;
}
@@ -1255,13 +1255,13 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
frames *= 10;
}
-
+
if ((double)current_time() - (double)frames < 0.0) {
set (0, true);
} else {
set (current_time() - frames, true);
}
-
+
ValueChanged (); /* EMIT_SIGNAL */
}
break;
@@ -1270,7 +1270,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
return false;
break;
}
-
+
return true;
}
@@ -1280,7 +1280,7 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (session == 0 || !dragging) {
return false;
}
-
+
float pixel_frame_scale_factor = 0.2f;
/*
@@ -1289,7 +1289,7 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
}
- if (Keyboard::modifier_state_contains (ev->state,
+ if (Keyboard::modifier_state_contains (ev->state,
Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) {
pixel_frame_scale_factor = 0.025f;
@@ -1309,19 +1309,19 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
dir = (drag_accum < 0 ? 1:-1);
pos = current_time();
frames = get_frames (field,pos,dir);
-
+
if (frames != 0 && frames * drag_accum < current_time()) {
-
+
set ((nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
-
+
} else {
set (0 , false);
-
+
}
drag_accum= 0;
- ValueChanged(); /* EMIT_SIGNAL */
-
+ ValueChanged(); /* EMIT_SIGNAL */
+
}
@@ -1448,11 +1448,11 @@ AudioClock::smpte_sanitize_display()
if (atoi(minutes_label.get_text()) > 59) {
minutes_label.set_text("59");
}
-
+
if (atoi(seconds_label.get_text()) > 59) {
seconds_label.set_text("59");
}
-
+
switch ((long)rint(session->smpte_frames_per_second())) {
case 24:
if (atoi(frames_label.get_text()) > 23) {
@@ -1472,7 +1472,7 @@ AudioClock::smpte_sanitize_display()
default:
break;
}
-
+
if (session->smpte_drop_frames()) {
if ((atoi(minutes_label.get_text()) % 10) && (atoi(seconds_label.get_text()) == 0) && (atoi(frames_label.get_text()) < 2)) {
frames_label.set_text("02");
@@ -1486,10 +1486,10 @@ AudioClock::smpte_frame_from_display () const
if (session == 0) {
return 0;
}
-
+
SMPTE::Time smpte;
nframes_t sample;
-
+
smpte.hours = atoi (hours_label.get_text());
smpte.minutes = atoi (minutes_label.get_text());
smpte.seconds = atoi (seconds_label.get_text());
@@ -1498,7 +1498,7 @@ AudioClock::smpte_frame_from_display () const
smpte.drop= session->smpte_drop_frames();
session->smpte_to_sample( smpte, sample, false /* use_offset */, false /* use_subframes */ );
-
+
#if 0
#define SMPTE_SAMPLE_TEST_1
@@ -1533,7 +1533,7 @@ AudioClock::smpte_frame_from_display () const
cout << "smpte2: " << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
break;
}
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte1: " << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1554,7 +1554,7 @@ AudioClock::smpte_frame_from_display () const
#ifdef SMPTE_SAMPLE_TEST_2
// Test 2: use_offset = true, use_subframes = false
cout << "use_offset = true, use_subframes = false" << endl;
-
+
smpte1.hours = 0;
smpte1.minutes = 0;
smpte1.seconds = 0;
@@ -1574,7 +1574,7 @@ AudioClock::smpte_frame_from_display () const
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
-
+
if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1583,7 +1583,7 @@ AudioClock::smpte_frame_from_display () const
cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
break;
}
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1603,7 +1603,7 @@ AudioClock::smpte_frame_from_display () const
#ifdef SMPTE_SAMPLE_TEST_3
// Test 3: use_offset = true, use_subframes = false, decrement
- cout << "use_offset = true, use_subframes = false, decrement" << endl;
+ cout << "use_offset = true, use_subframes = false, decrement" << endl;
session->sample_to_smpte( sample1, smpte1, true /* use_offset */, false /* use_subframes */ );
cout << "Starting at sample: " << sample1 << " -> ";
@@ -1617,7 +1617,7 @@ AudioClock::smpte_frame_from_display () const
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
-
+
if ((i > 0) && ( ((oldsample - sample1) != sample_increment) && ((oldsample - sample1) != (sample_increment + 1)) && ((oldsample - sample1) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (oldsample - sample1) << " != " << sample_increment << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1626,7 +1626,7 @@ AudioClock::smpte_frame_from_display () const
cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
break;
}
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1648,7 +1648,7 @@ AudioClock::smpte_frame_from_display () const
#ifdef SMPTE_SAMPLE_TEST_4
// Test 4: use_offset = true, use_subframes = true
cout << "use_offset = true, use_subframes = true" << endl;
-
+
for (long sub = 5; sub < 80; sub += 5) {
smpte1.hours = 0;
smpte1.minutes = 0;
@@ -1656,16 +1656,16 @@ AudioClock::smpte_frame_from_display () const
smpte1.frames = 0;
smpte1.subframes = 0;
sample1 = oldsample = (sample_increment * sub) / 80;
-
+
session->sample_to_smpte( sample1, smpte1, true /* use_offset */, true /* use_subframes */ );
-
+
cout << "starting at sample: " << sample1 << " -> ";
cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
-
+
for (int i = 0; i < 108003; i++) {
session->smpte_to_sample( smpte1, sample1, true /* use_offset */, true /* use_subframes */ );
session->sample_to_smpte( sample1, smpte2, true /* use_offset */, true /* use_subframes */ );
-
+
if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1674,7 +1674,7 @@ AudioClock::smpte_frame_from_display () const
cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
//break;
}
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames || smpte2.subframes != smpte1.subframes) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1686,7 +1686,7 @@ AudioClock::smpte_frame_from_display () const
oldsample = sample1;
session->smpte_increment( smpte1 );
}
-
+
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
@@ -1694,7 +1694,7 @@ AudioClock::smpte_frame_from_display () const
for (int i = 0; i < 108003; i++) {
session->smpte_to_sample( smpte1, sample1, true /* use_offset */, true /* use_subframes */ );
session->sample_to_smpte( sample1, smpte2, true /* use_offset */, true /* use_subframes */ );
-
+
if ((i > 0) && ( ((oldsample - sample1) != sample_increment) && ((oldsample - sample1) != (sample_increment + 1)) && ((oldsample - sample1) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (oldsample - sample1) << " != " << sample_increment << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1703,7 +1703,7 @@ AudioClock::smpte_frame_from_display () const
cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
//break;
}
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames || smpte2.subframes != smpte1.subframes) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1715,7 +1715,7 @@ AudioClock::smpte_frame_from_display () const
oldsample = sample1;
session->smpte_decrement( smpte1 );
}
-
+
cout << "sample_decrement: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
@@ -1726,7 +1726,7 @@ AudioClock::smpte_frame_from_display () const
#ifdef SMPTE_SAMPLE_TEST_5
// Test 5: use_offset = true, use_subframes = false, increment seconds
cout << "use_offset = true, use_subframes = false, increment seconds" << endl;
-
+
smpte1.hours = 0;
smpte1.minutes = 0;
smpte1.seconds = 0;
@@ -1747,13 +1747,13 @@ AudioClock::smpte_frame_from_display () const
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
-
+
// if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1))))
// {
// cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
// break;
// }
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1775,7 +1775,7 @@ AudioClock::smpte_frame_from_display () const
#ifdef SMPTE_SAMPLE_TEST_6
// Test 6: use_offset = true, use_subframes = false, increment minutes
cout << "use_offset = true, use_subframes = false, increment minutes" << endl;
-
+
smpte1.hours = 0;
smpte1.minutes = 0;
smpte1.seconds = 0;
@@ -1796,13 +1796,13 @@ AudioClock::smpte_frame_from_display () const
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
-
+
// if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1))))
// {
// cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
// break;
// }
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1823,7 +1823,7 @@ AudioClock::smpte_frame_from_display () const
#ifdef SMPTE_SAMPLE_TEST_7
// Test 7: use_offset = true, use_subframes = false, increment hours
cout << "use_offset = true, use_subframes = false, increment hours" << endl;
-
+
smpte1.hours = 0;
smpte1.minutes = 0;
smpte1.seconds = 0;
@@ -1844,13 +1844,13 @@ AudioClock::smpte_frame_from_display () const
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
-
+
// if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1))))
// {
// cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
// break;
// }
-
+
if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
cout << "ERROR: smpte2 not equal smpte1" << endl;
cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
@@ -1868,7 +1868,7 @@ AudioClock::smpte_frame_from_display () const
cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
#endif
-#endif
+#endif
return sample;
}
@@ -1929,7 +1929,7 @@ AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
bbt.bars = atoi (bars_label.get_text());
bbt.beats = atoi (beats_label.get_text());
bbt.ticks = atoi (ticks_label.get_text());
-
+
return session->tempo_map().bbt_duration_at(pos,bbt,1);
}
@@ -1946,7 +1946,7 @@ AudioClock::build_ops_menu ()
ops_menu = new Menu;
MenuList& ops_items = ops_menu->items();
ops_menu->set_name ("ArdourContextMenu");
-
+
if (!Profile->get_sae()) {
ops_items.push_back (MenuElem (_("Timecode"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE)));
}
@@ -1967,13 +1967,13 @@ AudioClock::set_mode (Mode m)
*/
clock_base.grab_focus ();
-
+
if (_mode == m) {
return;
}
-
+
clock_base.remove ();
-
+
_mode = m;
switch (_mode) {
@@ -1999,7 +1999,7 @@ AudioClock::set_mode (Mode m)
}
set_size_requests ();
-
+
set (last_when, true);
clock_base.show_all ();
key_entry_state = 0;
@@ -2042,7 +2042,7 @@ AudioClock::set_size_requests ()
case Off:
Gtkmm2ext::set_size_request_to_display_given_text (off_hbox, "00000", 5, 5);
break;
-
+
}
}
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index 1d9c550052..2de4cee3eb 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999 Paul Davis
+ Copyright (C) 1999 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ class AudioClock : public Gtk::HBox
Frames,
Off
};
-
+
AudioClock (std::string clock_name, bool transient, std::string widget_name, bool editable, bool is_duration = false, bool with_info = false);
Mode mode() const { return _mode; }
@@ -66,7 +66,7 @@ class AudioClock : public Gtk::HBox
static sigc::signal<void> ModeChanged;
static std::vector<AudioClock*> clocks;
-
+
static bool has_focus() { return _has_focus; }
private:
@@ -91,7 +91,7 @@ class AudioClock : public Gtk::HBox
Gtk::HBox frames_packer_hbox;
Gtk::HBox frames_packer;
-
+
enum Field {
SMPTE_Hours,
SMPTE_Minutes,
@@ -101,7 +101,7 @@ class AudioClock : public Gtk::HBox
MS_Minutes,
MS_Seconds,
Bars,
- Beats,
+ Beats,
Ticks,
AudioFrames
};
@@ -146,7 +146,7 @@ class AudioClock : public Gtk::HBox
Gtk::Label* smpte_upper_info_label;
Gtk::Label* smpte_lower_info_label;
-
+
Gtk::Label* bbt_upper_info_label;
Gtk::Label* bbt_lower_info_label;
@@ -178,7 +178,7 @@ class AudioClock : public Gtk::HBox
double drag_accum;
void on_realize ();
-
+
bool field_motion_notify_event (GdkEventMotion *ev, Field);
bool field_button_press_event (GdkEventButton *ev, Field);
bool field_button_release_event (GdkEventButton *ev, Field);
@@ -195,7 +195,7 @@ class AudioClock : public Gtk::HBox
void set_frames (nframes_t, bool);
nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
-
+
void smpte_sanitize_display();
nframes_t smpte_frame_from_display () const;
nframes_t bbt_frame_from_display (nframes_t) const;
@@ -211,7 +211,7 @@ class AudioClock : public Gtk::HBox
static const uint32_t field_length[(int)AudioFrames+1];
static bool _has_focus;
-
+
};
#endif /* __audio_clock_h__ */
diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc
index 73a9f92f1b..07d87cab75 100644
--- a/gtk2_ardour/audio_region_editor.cc
+++ b/gtk2_ardour/audio_region_editor.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -72,14 +72,14 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
ARDOUR_UI::instance()->tooltips().set_tip (audition_button, _("audition this region"));
audition_button.unset_flags (Gtk::CAN_FOCUS);
-
+
audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
top_row_button_hbox.set_border_width (5);
top_row_button_hbox.set_spacing (5);
top_row_button_hbox.set_homogeneous (false);
top_row_button_hbox.pack_end (audition_button, false, false);
-
+
top_row_hbox.pack_start (name_hbox, true, true);
top_row_hbox.pack_end (top_row_button_hbox, true, true);
@@ -93,7 +93,7 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
sync_label.set_text (_("SYNC POINT:"));
start_label.set_name ("AudioRegionEditorLabel");
start_label.set_text (_("FILE START:"));
-
+
time_table.set_col_spacings (2);
time_table.set_row_spacings (5);
time_table.set_border_width (5);
@@ -149,9 +149,9 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
bounds_changed (Change (StartChanged|LengthChanged|PositionChanged|StartChanged|Region::SyncOffsetChanged));
_region->StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
-
+
spin_arrow_grab = false;
-
+
connect_editor_events ();
}
@@ -171,7 +171,7 @@ AudioRegionEditor::region_changed (Change what_changed)
}
}
-gint
+gint
AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* /*but*/, void (AudioRegionEditor::*/*pmf*/)())
{
switch (ev->button) {
@@ -184,9 +184,9 @@ AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* /*but*/, void
// if ((ev->window == but->gobj()->panel)) {
// spin_arrow_grab = true;
// (this->*pmf)();
- // }
- }
- }
+ // }
+ }
+ }
break;
default:
break;
@@ -194,7 +194,7 @@ AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* /*but*/, void
return FALSE;
}
-gint
+gint
AudioRegionEditor::breleased (GdkEventButton* /*ev*/, Gtk::SpinButton* /*but*/, void (AudioRegionEditor::*pmf)())
{
if (spin_arrow_grab) {
@@ -240,7 +240,7 @@ AudioRegionEditor::end_clock_changed ()
_session.begin_reversible_command (_("change region end position"));
boost::shared_ptr<Playlist> pl = _region->playlist();
-
+
if (pl) {
XMLNode &before = pl->get_state();
_region->trim_end (end_clock.current_time(), this);
@@ -257,9 +257,9 @@ void
AudioRegionEditor::length_clock_changed ()
{
nframes_t frames = length_clock.current_time();
-
+
_session.begin_reversible_command (_("change region length"));
-
+
boost::shared_ptr<Playlist> pl = _region->playlist();
if (pl) {
@@ -319,8 +319,8 @@ AudioRegionEditor::bounds_changed (Change what_changed)
void
AudioRegionEditor::activation ()
{
-
-}
+
+}
void
AudioRegionEditor::name_entry_changed ()
diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h
index 57a9ba40c6..00e77e430e 100644
--- a/gtk2_ardour/audio_region_editor.h
+++ b/gtk2_ardour/audio_region_editor.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@ class AudioRegionEditor : public RegionEditor
Gtk::ToggleButton audition_button;
Gtk::HBox lower_hbox;
-
+
Gtk::Table time_table;
Gtk::Label position_label;
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index d688e9e629..c8d33ec2e2 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2006 Paul Davis
+ Copyright (C) 2001-2006 Paul Davis
This program is free software; you can r>edistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -82,7 +82,7 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
}
-AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv, boost::shared_ptr<AudioRegion> r, double spu,
+AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv, boost::shared_ptr<AudioRegion> r, double spu,
Gdk::Color const & basic_color, bool recording, TimeAxisViewItem::Visibility visibility)
: RegionView (parent, tv, r, spu, basic_color, recording, visibility)
, sync_mark(0)
@@ -118,7 +118,7 @@ AudioRegionView::AudioRegionView (const AudioRegionView& other)
UINT_TO_RGBA (other.fill_color, &r, &g, &b, &a);
c.set_rgb_p (r/255.0, g/255.0, b/255.0);
-
+
init (c, false);
}
@@ -149,9 +149,9 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
{
// FIXME: Some redundancy here with RegionView::init. Need to figure out
// where order is important and where it isn't...
-
+
RegionView::init (basic_color, wfd);
-
+
XMLNode *node;
_amplitude_above_axis = 1.0;
@@ -170,13 +170,13 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
}
compute_colors (basic_color);
-
+
create_waves ();
fade_in_shape = new ArdourCanvas::Polygon (*group);
fade_in_shape->property_fill_color_rgba() = fade_color;
fade_in_shape->set_data ("regionview", this);
-
+
fade_out_shape = new ArdourCanvas::Polygon (*group);
fade_out_shape->property_fill_color_rgba() = fade_color;
fade_out_shape->set_data ("regionview", this);
@@ -184,17 +184,17 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
{
uint32_t r,g,b,a;
UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
-
+
fade_in_handle = new ArdourCanvas::SimpleRect (*group);
fade_in_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,0);
fade_in_handle->property_outline_pixels() = 0;
-
+
fade_in_handle->set_data ("regionview", this);
-
+
fade_out_handle = new ArdourCanvas::SimpleRect (*group);
fade_out_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,0);
fade_out_handle->property_outline_pixels() = 0;
-
+
fade_out_handle->set_data ("regionview", this);
}
@@ -315,7 +315,7 @@ AudioRegionView::fade_in_active_changed ()
fade_in_shape->property_fill_color_rgba() = col;
fade_in_shape->property_width_pixels() = 0;
fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(r,g,b,0);
- } else {
+ } else {
col = RGBA_TO_UINT(r,g,b,0);
fade_in_shape->property_fill_color_rgba() = col;
fade_in_shape->property_width_pixels() = 1;
@@ -335,7 +335,7 @@ AudioRegionView::fade_out_active_changed ()
fade_out_shape->property_fill_color_rgba() = col;
fade_out_shape->property_width_pixels() = 0;
fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(r,g,b,0);
- } else {
+ } else {
col = RGBA_TO_UINT(r,g,b,0);
fade_out_shape->property_fill_color_rgba() = col;
fade_out_shape->property_width_pixels() = 1;
@@ -359,7 +359,7 @@ void
AudioRegionView::region_renamed ()
{
Glib::ustring str = RegionView::make_name ();
-
+
if (audio_region()->speed_mismatch (trackview.session().frame_rate())) {
str = string ("*") + str;
}
@@ -384,7 +384,7 @@ AudioRegionView::region_resized (Change what_changed)
for (uint32_t n = 0; n < waves.size(); ++n) {
waves[n]->property_region_start() = _region->start();
}
-
+
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
if((agr = dynamic_cast<AudioGhostRegion*>(*i)) != 0) {
@@ -452,7 +452,7 @@ AudioRegionView::setup_fade_handle_positions()
fade_in_handle->property_y1() = handle_pos;
fade_in_handle->property_y2() = handle_pos + handle_height;
}
-
+
if (fade_out_handle) {
fade_out_handle->property_y1() = handle_pos;
fade_out_handle->property_y2() = handle_pos + handle_height;
@@ -468,7 +468,7 @@ AudioRegionView::set_height (gdouble height)
// FIXME: ick
height -= 2;
-
+
_height = height;
for (uint32_t n=0; n < wcnt; ++n) {
@@ -479,9 +479,9 @@ AudioRegionView::set_height (gdouble height)
} else {
ht = (((height-2*wcnt) - NAME_HIGHLIGHT_SIZE) / (double) wcnt);
}
-
+
gdouble yoff = n * (ht+1);
-
+
waves[n]->property_height() = ht;
waves[n]->property_y() = yoff + 2;
}
@@ -535,7 +535,7 @@ AudioRegionView::reset_fade_in_shape ()
{
reset_fade_in_shape_width ((nframes_t) audio_region()->fade_in()->back()->when);
}
-
+
void
AudioRegionView::reset_fade_in_shape_width (nframes_t width)
{
@@ -550,8 +550,8 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
Points* points;
double pwidth = width / samples_per_unit;
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
- double h;
-
+ double h;
+
if (_height < 5) {
fade_in_shape->hide();
fade_in_handle->hide();
@@ -560,7 +560,7 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
double handle_center;
handle_center = pwidth;
-
+
if (handle_center > 7.0) {
handle_center -= 3.0;
} else {
@@ -569,7 +569,7 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
fade_in_handle->property_x1() = handle_center - 3.0;
fade_in_handle->property_x2() = handle_center + 3.0;
-
+
if (pwidth < 5) {
fade_in_shape->hide();
return;
@@ -599,7 +599,7 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
(*points)[pi].set_x(1 + (pc * xdelta));
(*points)[pi++].set_y(2 + (h - (curve[pc] * h)));
}
-
+
/* fold back */
(*points)[pi].set_x(pwidth);
@@ -611,10 +611,10 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
/* connect the dots ... */
(*points)[pi] = (*points)[0];
-
+
fade_in_shape->property_points() = *points;
delete points;
-
+
/* ensure trim handle stays on top */
frame_handle_start->raise_to_top();
}
@@ -627,7 +627,7 @@ AudioRegionView::reset_fade_out_shape ()
void
AudioRegionView::reset_fade_out_shape_width (nframes_t width)
-{
+{
if (fade_out_handle == 0) {
return;
}
@@ -649,23 +649,23 @@ AudioRegionView::reset_fade_out_shape_width (nframes_t width)
double handle_center;
handle_center = (_region->length() - width) / samples_per_unit;
-
+
if (handle_center > 7.0) {
handle_center -= 3.0;
} else {
handle_center = 3.0;
}
-
+
fade_out_handle->property_x1() = handle_center - 3.0;
fade_out_handle->property_x2() = handle_center + 3.0;
/* don't show shape if its too small */
-
+
if (pwidth < 5) {
fade_out_shape->hide();
return;
- }
-
+ }
+
if (trackview.session().config.get_show_region_fades()) {
fade_out_shape->show();
}
@@ -690,7 +690,7 @@ AudioRegionView::reset_fade_out_shape_width (nframes_t width)
(*points)[pi].set_x(_pixel_width - 1 - pwidth + (pc*xdelta));
(*points)[pi++].set_y(2 + (h - (curve[pc] * h)));
}
-
+
/* fold back */
(*points)[pi].set_x(_pixel_width);
@@ -705,7 +705,7 @@ AudioRegionView::reset_fade_out_shape_width (nframes_t width)
fade_out_shape->property_points() = *points;
delete points;
-
+
/* ensure trim handle stays on top */
frame_handle_end->raise_to_top();
}
@@ -740,7 +740,7 @@ void
AudioRegionView::compute_colors (Gdk::Color const & basic_color)
{
RegionView::compute_colors (basic_color);
-
+
uint32_t r, g, b, a;
/* gain color computed in envelope_active_changed() */
@@ -753,7 +753,7 @@ void
AudioRegionView::set_colors ()
{
RegionView::set_colors();
-
+
if (gain_line) {
gain_line->set_line_color (audio_region()->envelope_active() ? ARDOUR_UI::config()->canvasvar_GainLine.get() : ARDOUR_UI::config()->canvasvar_GainLineInactive.get());
}
@@ -778,7 +778,7 @@ AudioRegionView::show_region_editor ()
// GTK2FIX : how to ensure float without realizing
// editor->realize ();
// trackview.editor.ensure_float (*editor);
- }
+ }
editor->present ();
editor->show_all();
@@ -852,18 +852,18 @@ AudioRegionView::create_waves ()
// cerr << "creating waves for " << _region->name() << " with wfd = " << wait_for_data
// << " and channels = " << nchans.n_audio() << endl;
-
+
/* in tmp_waves, set up null pointers for each channel so the vector is allocated */
for (uint32_t n = 0; n < nchans.n_audio(); ++n) {
tmp_waves.push_back (0);
}
for (uint32_t n = 0; n < nchans.n_audio(); ++n) {
-
+
if (n >= audio_region()->n_channels()) {
break;
}
-
+
wave_caches.push_back (WaveView::create_cache ());
// cerr << "\tchannel " << n << endl;
@@ -877,7 +877,7 @@ AudioRegionView::create_waves ()
// we'll get a PeaksReady signal from the source in the future
// and will call create_one_wave(n) then.
}
-
+
} else {
// cerr << "\tdon't delay, display today!\n";
create_one_wave (n, true);
@@ -948,9 +948,9 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
} else {
/* n-channel track, >n-channel source */
}
-
+
/* see if we're all ready */
-
+
for (n = 0; n < nchans; ++n) {
if (tmp_waves[n] == 0) {
break;
@@ -965,7 +965,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
tmp_waves.clear ();
/* all waves created, don't hook into peaks ready anymore */
- data_ready_connection.disconnect ();
+ data_ready_connection.disconnect ();
#if 0
if (!zero_line) {
@@ -998,7 +998,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
/* don't create points that can't be seen */
set_envelope_visible (true);
-
+
x = ev->button.x;
y = ev->button.y;
@@ -1029,7 +1029,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
}
audio_region()->envelope()->add (fx, y);
-
+
XMLNode &after = audio_region()->envelope()->get_state();
trackview.session().add_command (new MementoCommand<AutomationList>(*audio_region()->envelope().get(), &before, &after));
trackview.session().commit_reversible_command ();
@@ -1084,13 +1084,13 @@ AudioRegionView::set_flags (XMLNode* node)
}
}
}
-
+
void
AudioRegionView::set_waveform_shape (WaveformShape shape)
{
bool yn;
- /* this slightly odd approach is to leave the door open to
+ /* this slightly odd approach is to leave the door open to
other "shapes" such as spectral displays, etc.
*/
@@ -1155,15 +1155,15 @@ AudioRegionView::add_ghost (TimeAxisView& tv)
double unit_position = _region->position () / samples_per_unit;
AudioGhostRegion* ghost = new AudioGhostRegion (tv, trackview, unit_position);
uint32_t nchans;
-
+
nchans = rtv->get_diskstream()->n_channels().n_audio();
for (uint32_t n = 0; n < nchans; ++n) {
-
+
if (n >= audio_region()->n_channels()) {
break;
}
-
+
WaveView *wave = new WaveView(*ghost->group);
wave->property_data_src() = _region.get();
@@ -1202,7 +1202,7 @@ AudioRegionView::entered ()
uint32_t r,g,b,a;
UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
a=255;
-
+
if (fade_in_handle) {
fade_in_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
fade_out_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
@@ -1215,11 +1215,11 @@ AudioRegionView::exited ()
if (gain_line) {
gain_line->hide_all_but_selected_control_points ();
}
-
+
uint32_t r,g,b,a;
UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
a=0;
-
+
if (fade_in_handle) {
fade_in_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
fade_out_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
@@ -1244,11 +1244,11 @@ AudioRegionView::set_waveview_data_src()
// TODO: something else to let it know the channel
waves[n]->property_data_src() = _region.get();
}
-
+
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
-
+
(*i)->set_duration (unit_length);
-
+
if((agr = dynamic_cast<AudioGhostRegion*>(*i)) != 0) {
for (vector<WaveView*>::iterator w = agr->waves.begin(); w != agr->waves.end(); ++w) {
(*w)->property_data_src() = _region.get();
@@ -1287,7 +1287,7 @@ AudioRegionView::set_frame_color ()
}
uint32_t r,g,b,a;
-
+
if (_selected && should_show_selection) {
UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), &r, &g, &b, &a);
frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a);
@@ -1338,10 +1338,10 @@ AudioRegionView::set_fade_visibility (bool yn)
}
if (fade_out_shape) {
fade_out_shape->show ();
- }
+ }
if (fade_in_handle) {
fade_in_handle->show ();
- }
+ }
if (fade_out_handle) {
fade_out_handle->show ();
}
@@ -1351,10 +1351,10 @@ AudioRegionView::set_fade_visibility (bool yn)
}
if (fade_out_shape) {
fade_out_shape->hide ();
- }
+ }
if (fade_in_handle) {
fade_in_handle->hide ();
- }
+ }
if (fade_out_handle) {
fade_out_handle->hide ();
}
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index cbd9e1f645..9fe658f877 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2006 Paul Davis
+ Copyright (C) 2001-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,13 +48,13 @@ class RouteTimeAxisView;
class AudioRegionView : public RegionView
{
public:
- AudioRegionView (ArdourCanvas::Group *,
+ AudioRegionView (ArdourCanvas::Group *,
RouteTimeAxisView&,
boost::shared_ptr<ARDOUR::AudioRegion>,
double initial_samples_per_unit,
Gdk::Color const & basic_color);
- AudioRegionView (ArdourCanvas::Group *,
+ AudioRegionView (ArdourCanvas::Group *,
RouteTimeAxisView&,
boost::shared_ptr<ARDOUR::AudioRegion>,
double samples_per_unit,
@@ -66,43 +66,43 @@ class AudioRegionView : public RegionView
AudioRegionView (const AudioRegionView& other, boost::shared_ptr<ARDOUR::AudioRegion>);
~AudioRegionView ();
-
+
virtual void init (Gdk::Color const & base_color, bool wait_for_data);
-
+
boost::shared_ptr<ARDOUR::AudioRegion> audio_region() const;
-
+
void create_waves ();
void set_height (double);
void set_samples_per_unit (double);
-
+
void set_amplitude_above_axis (gdouble spp);
-
+
void temporarily_hide_envelope (); ///< Dangerous!
void unhide_envelope (); ///< Dangerous!
-
+
void set_envelope_visible (bool);
void set_waveform_visible (bool yn);
void set_waveform_shape (ARDOUR::WaveformShape);
void set_waveform_scale (ARDOUR::WaveformScale);
-
+
bool waveform_rectified() const { return _flags & WaveformRectified; }
bool waveform_logscaled() const { return _flags & WaveformLogScaled; }
bool waveform_visible() const { return _flags & WaveformVisible; }
bool envelope_visible() const { return _flags & EnvelopeVisible; }
-
+
void show_region_editor ();
-
+
void add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event);
void remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event);
-
+
AudioRegionGainLine* get_gain_line() const { return gain_line; }
-
+
void region_changed (ARDOUR::Change);
void envelope_active_changed ();
-
+
GhostRegion* add_ghost (TimeAxisView&);
-
+
void reset_fade_in_shape_width (nframes_t);
void reset_fade_out_shape_width (nframes_t);
@@ -111,14 +111,14 @@ class AudioRegionView : public RegionView
virtual void entered ();
virtual void exited ();
-
+
protected:
/* this constructor allows derived types
to specify their visibility requirements
to the TimeAxisViewItem parent class
*/
-
+
enum Flags {
EnvelopeVisible = 0x1,
WaveformVisible = 0x4,
@@ -128,20 +128,20 @@ class AudioRegionView : public RegionView
std::vector<ArdourCanvas::WaveView *> waves;
std::vector<ArdourCanvas::WaveView *> tmp_waves; ///< see ::create_waves()
- ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
+ ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
ArdourCanvas::SimpleLine* zero_line;
ArdourCanvas::Polygon* fade_in_shape;
ArdourCanvas::Polygon* fade_out_shape;
ArdourCanvas::SimpleRect* fade_in_handle;
ArdourCanvas::SimpleRect* fade_out_handle;
-
+
AudioRegionGainLine * gain_line;
double _amplitude_above_axis;
uint32_t _flags;
uint32_t fade_color;
-
+
void reset_fade_shapes ();
void reset_fade_in_shape ();
void reset_fade_out_shape ();
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 901828bb4e..6fcca999ce 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001, 2006 Paul Davis
+ Copyright (C) 2001, 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@ AudioStreamView::~AudioStreamView ()
{
}
-int
+int
AudioStreamView::set_samples_per_unit (gdouble spp)
{
StreamView::set_samples_per_unit(spp);
@@ -83,7 +83,7 @@ AudioStreamView::set_samples_per_unit (gdouble spp)
return 0;
}
-int
+int
AudioStreamView::set_amplitude_above_axis (gdouble app)
{
RegionViewList::iterator i;
@@ -114,20 +114,20 @@ AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_
}
switch (_trackview.audio_track()->mode()) {
-
+
case NonLayered:
case Normal:
if (recording) {
- region_view = new AudioRegionView (canvas_group, _trackview, region,
+ region_view = new AudioRegionView (canvas_group, _trackview, region,
_samples_per_unit, region_color, recording, TimeAxisViewItem::Visibility(
TimeAxisViewItem::ShowFrame | TimeAxisViewItem::HideFrameRight));
} else {
- region_view = new AudioRegionView (canvas_group, _trackview, region,
+ region_view = new AudioRegionView (canvas_group, _trackview, region,
_samples_per_unit, region_color);
}
break;
case Destructive:
- region_view = new TapeAudioRegionView (canvas_group, _trackview, region,
+ region_view = new TapeAudioRegionView (canvas_group, _trackview, region,
_samples_per_unit, region_color);
break;
default:
@@ -140,8 +140,8 @@ AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_
region_view->set_amplitude_above_axis(_amplitude_above_axis);
region_view->set_height (child_height ());
- /* if its the special single-sample length that we use for rec-regions, make it
- insensitive to events
+ /* if its the special single-sample length that we use for rec-regions, make it
+ insensitive to events
*/
if (region->length() == 1) {
@@ -152,7 +152,7 @@ AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_
region_view->set_waveform_shape (Config->get_waveform_shape ());
region_view->set_waveform_visible (Config->get_show_waveforms ());
- return region_view;
+ return region_view;
}
RegionView*
@@ -168,7 +168,7 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
// if ((*i)->region() == r) {
// cerr << "audio_streamview in add_region_view_internal region found" << endl;
/* great. we already have a AudioRegionView for this Region. use it again. */
-
+
// (*i)->set_valid (true);
// this might not be necessary
@@ -178,7 +178,7 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
// arv->set_waveform_scale (_waveform_scale);
// arv->set_waveform_shape (_waveform_shape);
// }
-
+
// return NULL;
// }
// }
@@ -209,16 +209,16 @@ AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
CrossfadeViewList::iterator tmp;
-
+
tmp = i;
++tmp;
-
+
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
if (ar && i->second->crossfade->involves (ar)) {
delete i->second;
crossfade_views.erase (i);
}
-
+
i = tmp;
}
}
@@ -254,7 +254,7 @@ AudioStreamView::playlist_modified (boost::shared_ptr<Diskstream> ds)
ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::playlist_modified_weak), ds));
StreamView::playlist_modified (ds);
-
+
/* make sure xfades are on top and all the regionviews are stacked correctly. */
for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
@@ -306,7 +306,7 @@ AudioStreamView::add_crossfade (boost::shared_ptr<Crossfade> crossfade)
AudioRegionView* rview = 0;
/* we do not allow shared_ptr<T> to be bound to slots */
-
+
ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::add_crossfade_weak), boost::weak_ptr<Crossfade> (crossfade)));
/* first see if we already have a CrossfadeView for this Crossfade */
@@ -397,12 +397,12 @@ AudioStreamView::redisplay_diskstream ()
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(
_trackview.get_diskstream()->playlist()
);
-
+
if (apl) {
apl->foreach_crossfade (sigc::mem_fun (*this, &AudioStreamView::add_crossfade));
}
}
-
+
// Remove invalid crossfade views
for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
tmpx = xi;
@@ -439,7 +439,7 @@ AudioStreamView::set_waveform_shape (WaveformShape shape)
if (arv)
arv->set_waveform_shape (shape);
}
-}
+}
void
AudioStreamView::set_waveform_scale (WaveformScale scale)
@@ -450,7 +450,7 @@ AudioStreamView::set_waveform_scale (WaveformScale scale)
arv->set_waveform_scale (scale);
}
}
-}
+}
void
AudioStreamView::setup_rec_box ()
@@ -461,8 +461,8 @@ AudioStreamView::setup_rec_box ()
// cerr << "\trolling\n";
- if (!rec_active &&
- _trackview.session().record_status() == Session::Recording &&
+ if (!rec_active &&
+ _trackview.session().record_status() == Session::Recording &&
_trackview.get_diskstream()->record_enabled()) {
if (_trackview.audio_track()->mode() == Normal && use_rec_regions && rec_regions.size() == rec_rects.size()) {
@@ -474,7 +474,7 @@ AudioStreamView::setup_rec_box ()
(*prc).disconnect();
}
rec_data_ready_connections.clear();
-
+
// FIXME
boost::shared_ptr<AudioDiskstream> ads = boost::dynamic_pointer_cast<AudioDiskstream>(_trackview.get_diskstream());
assert(ads);
@@ -483,19 +483,19 @@ AudioStreamView::setup_rec_box ()
boost::shared_ptr<AudioFileSource> src = boost::static_pointer_cast<AudioFileSource> (ads->write_source (n));
if (src) {
sources.push_back (src);
-
+
rec_data_ready_connections.push_back (src->PeakRangeReady.connect (bind
- (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), boost::weak_ptr<Source>(src))));
+ (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), boost::weak_ptr<Source>(src))));
}
}
// handle multi
-
+
nframes_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
}
-
+
boost::shared_ptr<AudioRegion> region (boost::dynamic_pointer_cast<AudioRegion>
(RegionFactory::create (sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags), false)));
assert(region);
@@ -503,7 +503,7 @@ AudioStreamView::setup_rec_box ()
region->set_position (_trackview.session().transport_frame(), this);
rec_regions.push_back (make_pair(region, (RegionView*)0));
}
-
+
/* start a new rec box */
boost::shared_ptr<AudioTrack> at;
@@ -531,7 +531,7 @@ AudioStreamView::setup_rec_box ()
fill_color = UINT_RGBA_CHANGE_A (fill_color, 120);
break;
}
-
+
ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
rec_rect->property_x1() = xstart;
rec_rect->property_y1() = 1.0;
@@ -541,16 +541,16 @@ AudioStreamView::setup_rec_box ()
rec_rect->property_outline_what() = 0x1 | 0x2 | 0x4 | 0x8;
rec_rect->property_fill_color_rgba() = fill_color;
rec_rect->lower_to_bottom();
-
+
RecBoxInfo recbox;
recbox.rectangle = rec_rect;
recbox.start = _trackview.session().transport_frame();
recbox.length = 0;
-
+
rec_rects.push_back (recbox);
-
+
screen_update_connection.disconnect();
- screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &AudioStreamView::update_rec_box));
+ screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &AudioStreamView::update_rec_box));
rec_updating = true;
rec_active = true;
@@ -561,7 +561,7 @@ AudioStreamView::setup_rec_box ()
rec_active = false;
rec_updating = false;
}
-
+
} else {
// cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
@@ -578,7 +578,7 @@ AudioStreamView::setup_rec_box ()
rec_updating = false;
rec_active = false;
-
+
/* remove temp regions */
for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin(); iter != rec_regions.end(); ) {
@@ -591,7 +591,7 @@ AudioStreamView::setup_rec_box ()
iter = tmp;
}
-
+
rec_regions.clear();
// cerr << "\tclear " << rec_rects.size() << " rec rects\n";
@@ -601,9 +601,9 @@ AudioStreamView::setup_rec_box ()
RecBoxInfo &rect = (*iter);
delete rect.rectangle;
}
-
+
rec_rects.clear();
-
+
}
}
}
@@ -620,21 +620,21 @@ void
AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<Source> weak_src)
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), start, cnt, weak_src));
-
+
boost::shared_ptr<Source> src (weak_src.lock());
if (!src) {
- return;
+ return;
}
// this is called from the peak building thread
-
+
if (rec_data_ready_map.size() == 0 || start+cnt > last_rec_data_frame) {
last_rec_data_frame = start + cnt;
}
-
+
rec_data_ready_map[src] = true;
-
+
if (rec_data_ready_map.size() == _trackview.get_diskstream()->n_channels().n_audio()) {
this->update_rec_regions ();
rec_data_ready_map.clear();
@@ -659,7 +659,7 @@ AudioStreamView::update_rec_regions ()
iter = tmp;
continue;
}
-
+
boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion>(iter->first);
if (!region) {
continue;
@@ -704,12 +704,12 @@ AudioStreamView::update_rec_regions ()
region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
region->set_length (nlen, this);
region->thaw ("updated");
-
+
if (origlen == 1) {
/* our special initial length */
add_region_view_internal (region, false, true);
}
-
+
/* also hide rect */
ArdourCanvas::Item * rect = rec_rects[n].rectangle;
rect->hide();
@@ -785,7 +785,7 @@ AudioStreamView::color_handler ()
//case cAudioTrackBase:
if (_trackview.is_track()) {
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioTrackBase.get();
- }
+ }
//case cAudioBusBase:
if (!_trackview.is_track()) {
@@ -811,25 +811,25 @@ void
AudioStreamView::update_content_height (CrossfadeView* cv)
{
cv->show ();
-
+
if (_layer_display == Overlaid) {
-
+
cv->set_y (0);
cv->set_height (height);
-
+
} else {
-
+
layer_t const inl = cv->crossfade->in()->layer ();
layer_t const outl = cv->crossfade->out()->layer ();
layer_t const high = max (inl, outl);
layer_t const low = min (inl, outl);
-
+
const double h = child_height ();
cv->set_y ((_layers - high - 1) * h);
cv->set_height ((high - low + 1) * h);
-
+
}
}
diff --git a/gtk2_ardour/audio_streamview.h b/gtk2_ardour/audio_streamview.h
index 8173e9bfb7..14c8465179 100644
--- a/gtk2_ardour/audio_streamview.h
+++ b/gtk2_ardour/audio_streamview.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001, 2006 Paul Davis
+ Copyright (C) 2001, 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -79,9 +79,9 @@ class AudioStreamView : public StreamView
private:
void setup_rec_box ();
- void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<ARDOUR::Source> src);
+ void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<ARDOUR::Source> src);
void update_rec_regions ();
-
+
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves, bool recording = false);
void remove_region_view (boost::weak_ptr<ARDOUR::Region> );
void remove_audio_region_view (boost::shared_ptr<ARDOUR::AudioRegion> );
@@ -105,9 +105,9 @@ class AudioStreamView : public StreamView
void parameter_changed (std::string const &);
void set_waveform_shape (ARDOUR::WaveformShape);
void set_waveform_scale (ARDOUR::WaveformScale);
-
+
double _amplitude_above_axis;
-
+
typedef std::map<boost::shared_ptr<ARDOUR::Crossfade>, CrossfadeView*> CrossfadeViewList;
CrossfadeViewList crossfade_views;
bool crossfades_visible;
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index 50f0df74cc..7f239f4e67 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -91,7 +91,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
mute_button->set_active (false);
solo_button->set_active (false);
-
+
if (is_audio_track()) {
controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
} else { // bus
@@ -106,7 +106,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
if (automation_track (GainAutomation) == 0) {
create_automation_child (GainAutomation, false);
}
-
+
if (_route->panner()) {
_route->panner()->Changed.connect (bind (
mem_fun(*this, &AudioTimeAxisView::ensure_pan_views),
@@ -158,7 +158,7 @@ AudioTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
{
ensure_xml_node ();
xml_node->add_property ("shown-editor", "yes");
-
+
return TimeAxisView::show_at (y, nth, parent);
}
@@ -185,7 +185,7 @@ AudioTimeAxisView::append_extra_display_menu_items ()
items.push_back (MenuElem (_("Show all crossfades"), mem_fun(*this, &AudioTimeAxisView::show_all_xfades)));
}
}
-
+
Gtk::Menu*
AudioTimeAxisView::build_mode_menu()
{
@@ -245,7 +245,7 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
return;
}
- boost::shared_ptr<AutomationTimeAxisView>
+ boost::shared_ptr<AutomationTimeAxisView>
gain_track(new AutomationTimeAxisView (_session,
_route, _route->amp(), c,
_editor,
@@ -285,7 +285,7 @@ AudioTimeAxisView::ensure_pan_views (bool show)
boost::shared_ptr<ARDOUR::AutomationControl> pan_control
= boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
_route->panner()->data().control(*p));
-
+
if (pan_control->parameter().type() == NullAutomation) {
error << "Pan control has NULL automation type!" << endmsg;
continue;
@@ -299,13 +299,13 @@ AudioTimeAxisView::ensure_pan_views (bool show)
boost::shared_ptr<AutomationTimeAxisView> pan_track (
new AutomationTimeAxisView (_session,
- _route, _route->panner(), pan_control,
+ _route, _route->panner(), pan_control,
_editor,
*this,
false,
parent_canvas,
name));
-
+
add_automation_child (*p, pan_track, show);
}
}
@@ -329,7 +329,7 @@ AudioTimeAxisView::toggle_gain_track ()
}
/* now trigger a redisplay */
-
+
if (!no_redraw) {
_route->gui_changed (X_("visible_tracks"), (void *) 0); /* EMIT_SIGNAL */
}
@@ -369,7 +369,7 @@ AudioTimeAxisView::toggle_pan_track ()
}
}
#endif
-
+
void
AudioTimeAxisView::show_all_automation ()
{
@@ -419,7 +419,7 @@ void
AudioTimeAxisView::hide_all_xfades ()
{
AudioStreamView* asv = audio_view();
-
+
if (asv) {
asv->hide_all_xfades ();
}
diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h
index 9c66bbfce3..02c7ed4f19 100644
--- a/gtk2_ardour/audio_time_axis.h
+++ b/gtk2_ardour/audio_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
public:
AudioTimeAxisView (PublicEditor&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, ArdourCanvas::Canvas& canvas);
virtual ~AudioTimeAxisView ();
-
+
AudioStreamView* audio_view();
void set_show_waveforms_recording (bool yn);
@@ -76,24 +76,24 @@ class AudioTimeAxisView : public RouteTimeAxisView
void hide_all_xfades ();
void hide_dependent_views (TimeAxisViewItem&);
void reveal_dependent_views (TimeAxisViewItem&);
-
+
/* Overridden from parent to store display state */
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
void hide ();
-
+
void create_automation_child (const Evoral::Parameter& param, bool show);
-
+
void first_idle ();
private:
friend class AudioStreamView;
friend class AudioRegionView;
-
+
void route_active_changed ();
void append_extra_display_menu_items ();
Gtk::Menu* build_mode_menu();
-
+
void show_all_automation ();
void show_existing_automation ();
void hide_all_automation ();
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index 90c6279f17..5d601cd829 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -44,16 +44,16 @@ AutomationController::AutomationController(boost::shared_ptr<AutomationControl>
set_name (X_("PluginSlider")); // FIXME: get yer own name!
set_style (BarController::LeftToRight);
set_use_parent (true);
-
+
StartGesture.connect (mem_fun(*this, &AutomationController::start_touch));
StopGesture.connect (mem_fun(*this, &AutomationController::end_touch));
-
+
_adjustment->signal_value_changed().connect (
mem_fun(*this, &AutomationController::value_adjusted));
-
+
_screen_update_connection = ARDOUR_UI::RapidScreenUpdate.connect (
mem_fun (*this, &AutomationController::display_effective_value));
-
+
ac->Changed.connect (mem_fun(*this, &AutomationController::value_changed));
}
@@ -88,7 +88,7 @@ AutomationController::get_label (int&)
} else {
s << std::fixed << std::setprecision(3) << _controllable->get_value();
}
-
+
return s.str ();
}
@@ -99,9 +99,9 @@ AutomationController::display_effective_value()
// return;
float value = _controllable->get_value();
-
+
if (_adjustment->get_value() != value) {
- _ignore_change = true;
+ _ignore_change = true;
_adjustment->set_value (value);
_ignore_change = false;
}
@@ -133,9 +133,9 @@ AutomationController::automation_state_changed ()
ENSURE_GUI_THREAD(mem_fun(*this, &AutomationController::automation_state_changed));
bool x = (_controllable->automation_state() != Off);
-
+
/* start watching automation so that things move */
-
+
_screen_update_connection.disconnect();
if (x) {
diff --git a/gtk2_ardour/automation_controller.h b/gtk2_ardour/automation_controller.h
index 6217aa10d2..05170b2a6b 100644
--- a/gtk2_ardour/automation_controller.h
+++ b/gtk2_ardour/automation_controller.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -41,18 +41,18 @@ public:
boost::shared_ptr<ARDOUR::AutomationControl> ac);
~AutomationController();
-
+
boost::shared_ptr<ARDOUR::AutomationControl> controllable() { return _controllable; }
Gtk::Adjustment* adjustment() { return _adjustment; }
-
+
void display_effective_value();
void value_adjusted();
private:
AutomationController (boost::shared_ptr<ARDOUR::AutomationControl> ac, Gtk::Adjustment* adj);
std::string get_label (int&);
-
+
void start_touch();
void end_touch();
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 553c23c88e..61687c79dd 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2003 Paul Davis
+ Copyright (C) 2002-2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -120,7 +120,7 @@ AutomationLine::queue_reset ()
}
void
-AutomationLine::show ()
+AutomationLine::show ()
{
if (_interpolation != AutomationList::Discrete) {
line->show();
@@ -136,7 +136,7 @@ AutomationLine::show ()
}
void
-AutomationLine::hide ()
+AutomationLine::hide ()
{
line->hide();
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@ -157,7 +157,7 @@ AutomationLine::control_point_box_size ()
return 8.0;
} else if (_height > (guint32) TimeAxisView::hNormal) {
return 6.0;
- }
+ }
return 4.0;
}
@@ -262,7 +262,7 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
/* x-coord cannot move beyond adjacent points or the start/end, and is
already in frames. it needs to be converted to canvas units.
*/
-
+
x = trackview.editor().frame_to_unit (x);
/* clamp x position using view coordinates */
@@ -280,14 +280,14 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
if (!with_push) {
if (cp.view_index() < control_points.size() - 1) {
-
+
after = nth (cp.view_index() + 1);
-
+
/*if it is a "spike" leave the x alone */
-
+
if (after->get_x() - before->get_x() < 2) {
x = cp.get_x();
-
+
} else {
x = min (x, after->get_x()-1.0);
}
@@ -298,7 +298,7 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
} else {
ControlPoint* after;
-
+
/* find the first point that can't move */
for (uint32_t n = cp.view_index() + 1; (after = nth (n)) != 0; ++n) {
@@ -308,10 +308,10 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
break;
}
}
-
+
delta = x - cp.get_x();
}
-
+
} else {
/* leave the x-coordinate alone */
@@ -328,17 +328,17 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
} else {
uint32_t limit = min (control_points.size(), (size_t)last_movable);
-
+
/* move the current point to wherever the user told it to go, subject
to x_limit.
*/
-
+
cp.move_to (min (x, x_limit), y, ControlPoint::Full);
reset_line_coords (cp);
-
+
/* now move all subsequent control points, to reflect the motion.
*/
-
+
for (uint32_t i = cp.view_index() + 1; i < limit; ++i) {
ControlPoint *p = nth (i);
double new_x;
@@ -354,7 +354,7 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
void
AutomationLine::reset_line_coords (ControlPoint& cp)
-{
+{
if (cp.view_index() < line_points.size()) {
line_points[cp.view_index()].set_x (cp.get_x());
line_points[cp.view_index()].set_y (cp.get_y());
@@ -381,7 +381,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
initial results are in canvas units. ask the
line to convert them to something relevant.
*/
-
+
mr.xval = cp.get_x();
mr.yval = 1.0 - (cp.get_y() / _height);
@@ -395,7 +395,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
/* convert to model units
*/
-
+
view_to_model_coord (mr.xval, mr.yval);
/* part 2: find out where the model point is now
@@ -451,7 +451,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
uint32_t this_rx = 0;
uint32_t prev_rx = 0;
uint32_t this_ry = 0;
- uint32_t prev_ry = 0;
+ uint32_t prev_ry = 0;
double* slope;
uint32_t box_size;
uint32_t cpsize;
@@ -459,7 +459,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
/* hide all existing points, and the line */
cpsize = 0;
-
+
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
(*i)->hide();
++cpsize;
@@ -493,7 +493,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
double tx = points[pi].x;
double ty = points[pi].y;
-
+
if (isnan (tx) || isnan (ty)) {
warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""),
_name) << endmsg;
@@ -518,11 +518,11 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
if (slope[pi] == slope[pi-1]) {
/* no reason to display this point */
-
+
continue;
}
}
-
+
/* need to round here. the ultimate coordinates are integer
pixels, so tiny deltas in the coords will be eliminated
and we end up with "colinear" line segments. since the
@@ -532,14 +532,14 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
*/
this_rx = (uint32_t) rint (tx);
- this_ry = (uint32_t) rint (ty);
-
+ this_ry = (uint32_t) rint (ty);
+
if (view_index && pi != npoints && /* not the first, not the last */
(((this_rx == prev_rx) && (this_ry == prev_ry)) || /* same point */
(((this_rx - prev_rx) < (box_size + 2)) && /* not identical, but still too close horizontally */
(abs ((int)(this_ry - prev_ry)) < (int) (box_size + 2))))) { /* too close vertically */
continue;
- }
+ }
/* ok, we should display this point */
@@ -548,8 +548,8 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
/* make sure we have enough control points */
ControlPoint* ncp = new ControlPoint (*this);
-
- ncp->set_size (box_size);
+
+ ncp->set_size (box_size);
control_points.push_back (ncp);
++cpsize;
@@ -586,7 +586,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
prev_ry = this_ry;
/* finally, control visibility */
-
+
if (_visible && points_visible) {
control_points[view_index]->show ();
control_points[view_index]->set_visible (true);
@@ -598,7 +598,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
view_index++;
}
-
+
/* discard extra CP's to avoid confusing ourselves */
while (control_points.size() > view_index) {
@@ -616,7 +616,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
if (view_index > 1) {
npoints = view_index;
-
+
/* reset the line coordinates */
while (line_points.size() < npoints) {
@@ -631,14 +631,14 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
line_points[view_index].set_x (control_points[view_index]->get_x());
line_points[view_index].set_y (control_points[view_index]->get_y());
}
-
+
line->property_points() = line_points;
if (_visible && _interpolation != AutomationList::Discrete) {
line->show();
}
- }
+ }
set_selected_points (trackview.editor().get_selection().points);
@@ -697,7 +697,7 @@ AutomationLine::string_to_fraction (string const & s) const
double v;
sscanf (s.c_str(), "%lf", &v);
-
+
if (_uses_gain_mapping) {
v = gain_to_slider_position (dB_to_coefficient (v));
} else {
@@ -722,7 +722,7 @@ AutomationLine::invalidate_point (ALPoints& p, uint32_t index)
}
void
-AutomationLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
+AutomationLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
{
if (trackview.editor().current_session() == 0) { /* how? */
return;
@@ -738,7 +738,7 @@ AutomationLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
trackview.editor().current_session()->begin_reversible_command (str);
trackview.editor().current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &get_state(), 0));
-
+
drag_x = x;
drag_distance = 0;
first_drag_fraction = fraction;
@@ -748,7 +748,7 @@ AutomationLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
}
void
-AutomationLine::point_drag (ControlPoint& cp, nframes_t x, float fraction, bool with_push)
+AutomationLine::point_drag (ControlPoint& cp, nframes_t x, float fraction, bool with_push)
{
if (x > drag_x) {
drag_distance += (x - drag_x);
@@ -769,17 +769,17 @@ AutomationLine::point_drag (ControlPoint& cp, nframes_t x, float fraction, bool
}
void
-AutomationLine::line_drag (uint32_t i1, uint32_t i2, float fraction, bool with_push)
+AutomationLine::line_drag (uint32_t i1, uint32_t i2, float fraction, bool with_push)
{
double ydelta = fraction - last_drag_fraction;
did_push = with_push;
-
+
last_drag_fraction = fraction;
line_drag_cp1 = i1;
line_drag_cp2 = i2;
-
+
//check if one of the control points on the line is in a selected range
bool range_found = false;
ControlPoint *cp;
@@ -804,7 +804,7 @@ AutomationLine::line_drag (uint32_t i1, uint32_t i2, float fraction, bool with_p
modify_view_point (*cp, trackview.editor().unit_to_frame (cp->get_x()), ((_height - cp->get_y()) /_height) + ydelta, with_push);
}
}
-
+
if (line_points.size() > 1) {
line->property_points() = line_points;
}
@@ -813,7 +813,7 @@ AutomationLine::line_drag (uint32_t i1, uint32_t i2, float fraction, bool with_p
}
void
-AutomationLine::end_drag (ControlPoint* cp)
+AutomationLine::end_drag (ControlPoint* cp)
{
if (!drags) {
return;
@@ -826,7 +826,7 @@ AutomationLine::end_drag (ControlPoint* cp)
} else {
sync_model_with_view_line (line_drag_cp1, line_drag_cp2);
}
-
+
alist->thaw ();
update_pending = false;
@@ -845,7 +845,7 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp, bool did_push, int
model_representation (cp, mr);
- /* how much are we changing the central point by */
+ /* how much are we changing the central point by */
ydelta = mr.yval - mr.ypos;
@@ -858,13 +858,13 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp, bool did_push, int
/* change all points before the primary point */
for (AutomationList::iterator i = mr.start; i != cp.model(); ++i) {
-
+
double fract = ((*i)->when - mr.xmin) / (mr.xpos - mr.xmin);
double y_delta = ydelta * fract;
double x_delta = distance * fract;
/* interpolate */
-
+
if (y_delta || x_delta) {
alist->modify (i, (*i)->when + x_delta, mr.ymin + y_delta);
}
@@ -877,24 +877,24 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp, bool did_push, int
/* change later points */
-
+
AutomationList::iterator i = cp.model();
-
+
++i;
-
+
while (i != mr.end) {
-
+
double delta = ydelta * (mr.xmax - (*i)->when) / (mr.xmax - mr.xpos);
/* all later points move by the same distance along the x-axis as the main point */
-
+
if (delta) {
alist->modify (i, (*i)->when + distance, (*i)->value + delta);
}
-
+
++i;
}
-
+
if (did_push) {
/* move all points after the range represented by the view by the same distance
@@ -906,7 +906,7 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp, bool did_push, int
}
-bool
+bool
AutomationLine::control_points_adjacent (double xval, uint32_t & before, uint32_t& after)
{
ControlPoint *bcp = 0;
@@ -916,13 +916,13 @@ AutomationLine::control_points_adjacent (double xval, uint32_t & before, uint32_
unit_xval = trackview.editor().frame_to_unit (xval);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
-
+
if ((*i)->get_x() <= unit_xval) {
if (!bcp || (*i)->get_x() > bcp->get_x()) {
bcp = *i;
before = bcp->view_index();
- }
+ }
} else if ((*i)->get_x() > unit_xval) {
acp = *i;
@@ -946,7 +946,7 @@ AutomationLine::is_last_point (ControlPoint& cp)
if (!alist->empty() && mr.end == alist->end()) {
return true;
}
-
+
return false;
}
@@ -962,7 +962,7 @@ AutomationLine::is_first_point (ControlPoint& cp)
if (!alist->empty() && mr.start == alist->begin()) {
return true;
}
-
+
return false;
}
@@ -997,10 +997,10 @@ AutomationLine::get_selectables (nframes_t& start, nframes_t& end,
bool collecting = false;
/* Curse X11 and its inverted coordinate system! */
-
+
bot = (1.0 - topfrac) * _height;
top = (1.0 - botfrac) * _height;
-
+
nstart = max_frames;
nend = 0;
@@ -1008,7 +1008,7 @@ AutomationLine::get_selectables (nframes_t& start, nframes_t& end,
double when = (*(*i)->model())->when;
if (when >= start && when <= end) {
-
+
if ((*i)->get_y() >= bot && (*i)->get_y() <= top) {
(*i)->show();
@@ -1018,7 +1018,7 @@ AutomationLine::get_selectables (nframes_t& start, nframes_t& end,
nend = max (nend, when);
} else {
-
+
if (collecting) {
results.push_back (new AutomationSelectable (nstart, nend, botfrac, topfrac, trackview));
@@ -1054,10 +1054,10 @@ AutomationLine::set_selected_points (PointSelection& points)
if (points.empty()) {
goto out;
- }
-
+ }
+
for (PointSelection::iterator r = points.begin(); r != points.end(); ++r) {
-
+
if (&(*r).track != &trackview) {
continue;
}
@@ -1068,16 +1068,16 @@ AutomationLine::set_selected_points (PointSelection& points)
top = (1.0 - (*r).low_fract) * _height;
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
-
+
double rstart, rend;
-
+
rstart = trackview.editor().frame_to_unit ((*r).start);
rend = trackview.editor().frame_to_unit ((*r).end);
-
+
if ((*i)->get_x() >= rstart && (*i)->get_x() <= rend) {
-
+
if ((*i)->get_y() >= bot && (*i)->get_y() <= top) {
-
+
(*i)->set_selected(true);
}
}
@@ -1105,21 +1105,21 @@ AutomationLine::show_selection ()
TimeSelection& time (trackview.editor().get_selection().time);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
-
+
(*i)->set_selected(false);
for (list<AudioRange>::iterator r = time.begin(); r != time.end(); ++r) {
double rstart, rend;
-
+
rstart = trackview.editor().frame_to_unit ((*r).start);
rend = trackview.editor().frame_to_unit ((*r).end);
-
+
if ((*i)->get_x() >= rstart && (*i)->get_x() <= rend) {
(*i)->set_selected(true);
break;
}
}
-
+
(*i)->show_color (false, !points_visible);
}
}
@@ -1154,14 +1154,14 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
AutomationList::const_iterator ai;
for (ai = events.begin(); ai != events.end(); ++ai) {
-
+
double translated_x = (*ai)->when;
double translated_y = (*ai)->value;
model_to_view_coord (translated_x, translated_y);
add_model_point (tmp_points, (*ai)->when, translated_y);
}
-
+
determine_visible_control_points (tmp_points);
}
@@ -1236,7 +1236,7 @@ AutomationLine::hide_all_but_selected_control_points ()
}
}
}
-
+
void
AutomationLine::track_entered()
{
@@ -1260,7 +1260,7 @@ AutomationLine::get_state (void)
return alist->get_state();
}
-int
+int
AutomationLine::set_state (const XMLNode &node)
{
/* function as a proxy for the model */
@@ -1303,11 +1303,11 @@ AutomationLine::model_to_view_coord (double& x, double& y) const
} else {
y = y / (double)alist->parameter().max(); /* ... like this */
}
-
+
x = _time_converter.to(x);
}
-
+
void
AutomationLine::set_interpolation(AutomationList::InterpolationStyle style)
{
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index 136196cd72..a171be1512 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@
#include "evoral/TimeConverter.hpp"
#include "pbd/undo.h"
-#include "pbd/statefuldestructible.h"
+#include "pbd/statefuldestructible.h"
#include "ardour/automation_list.h"
#include "ardour/types.h"
@@ -66,13 +66,13 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
void set_selected_points (PointSelection&);
void get_selectables (nframes_t& start, nframes_t& end,
- double botfrac, double topfrac,
+ double botfrac, double topfrac,
std::list<Selectable*>& results);
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
virtual void remove_point (ControlPoint&);
bool control_points_adjacent (double xval, uint32_t& before, uint32_t& after);
-
+
/* dragging API */
virtual void start_drag (ControlPoint*, nframes_t x, float fraction);
virtual void point_drag(ControlPoint&, nframes_t x, float, bool with_push);
@@ -129,13 +129,13 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
void set_colors();
void modify_point_y (ControlPoint&, double);
-
+
protected:
std::string _name;
guint32 _height;
uint32_t _line_color;
-
+
boost::shared_ptr<ARDOUR::AutomationList> alist;
bool _visible : 1;
@@ -162,11 +162,11 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
static void invalidate_point (ALPoints&, uint32_t index);
static bool invalid_point (ALPoints&, uint32_t index);
-
+
void determine_visible_control_points (ALPoints&);
void sync_model_with_view_point (ControlPoint&, bool did_push, int64_t distance);
void sync_model_with_view_line (uint32_t, uint32_t);
-
+
virtual void change_model (ARDOUR::AutomationList::iterator, double x, double y);
void reset_callback (const Evoral::ControlList&);
@@ -174,7 +174,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
virtual bool event_handler (GdkEvent*);
virtual void add_model_point (ALPoints& tmp_points, double frame, double yfract);
-
+
private:
uint32_t drags;
double first_drag_fraction;
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index ad10851c73..4d8f61fed5 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -36,12 +36,12 @@ AutomationRegionView::AutomationRegionView(ArdourCanvas::Group*
Gdk::Color const & basic_color)
: RegionView(parent, time_axis, region, spu, basic_color)
, _parameter(param)
-{
+{
if (list) {
assert(list->parameter() == param);
create_line(list);
}
-
+
group->signal_event().connect (mem_fun (this, &AutomationRegionView::canvas_event), false);
}
@@ -49,7 +49,7 @@ void
AutomationRegionView::init (Gdk::Color const & basic_color, bool /*wfd*/)
{
_enable_display = false;
-
+
RegionView::init(basic_color, false);
compute_colors (basic_color);
@@ -149,7 +149,7 @@ void
AutomationRegionView::reset_width_dependent_items (double pixel_width)
{
RegionView::reset_width_dependent_items(pixel_width);
-
+
if (_line)
_line->reset();
}
diff --git a/gtk2_ardour/automation_region_view.h b/gtk2_ardour/automation_region_view.h
index 6ab9118017..5219fd7dc6 100644
--- a/gtk2_ardour/automation_region_view.h
+++ b/gtk2_ardour/automation_region_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -48,18 +48,18 @@ public:
Gdk::Color const & basic_color);
~AutomationRegionView() {}
-
+
void init (Gdk::Color const & basic_color, bool wfd);
-
+
inline AutomationTimeAxisView* automation_view() const
{ return dynamic_cast<AutomationTimeAxisView*>(&trackview); }
-
+
void set_line(boost::shared_ptr<AutomationLine> line) { _line = line; }
boost::shared_ptr<AutomationLine> line() { return _line; }
-
+
// We are a ghost. Meta ghosts? Crazy talk.
virtual GhostRegion* add_ghost(TimeAxisView&) { return NULL; }
-
+
void set_height (double);
void reset_width_dependent_items(double pixel_width);
diff --git a/gtk2_ardour/automation_selectable.h b/gtk2_ardour/automation_selectable.h
index e7139bedf0..851da8bf79 100644
--- a/gtk2_ardour/automation_selectable.h
+++ b/gtk2_ardour/automation_selectable.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/automation_selection.h b/gtk2_ardour/automation_selection.h
index f132ea95d8..f22d4831e2 100644
--- a/gtk2_ardour/automation_selection.h
+++ b/gtk2_ardour/automation_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc
index bed1bac502..273494e29b 100644
--- a/gtk2_ardour/automation_streamview.cc
+++ b/gtk2_ardour/automation_streamview.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2007 Paul Davis
+ Copyright (C) 2001-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -98,7 +98,7 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
for (i = region_views.begin(); i != region_views.end(); ++i) {
if ((*i)->region() == region) {
-
+
/* great. we already have an AutomationRegionView for this Region. use it again. */
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*>(*i);;
@@ -111,14 +111,14 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
return NULL;
}
}
-
+
region_view = new AutomationRegionView (canvas_group, _automation_view, region,
_controller->controllable()->parameter(), list,
_samples_per_unit, region_color);
-
+
region_view->init (region_color, false);
region_views.push_front (region_view);
-
+
/* follow global waveform setting */
if (wfd) {
@@ -130,7 +130,7 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
/* catch regionview going away */
region->GoingAway.connect (bind (mem_fun (*this, &AutomationStreamView::remove_region_view), region));
-
+
RegionViewAdded (region_view);
return region_view;
@@ -170,7 +170,7 @@ AutomationStreamView::redisplay_diskstream ()
sigc::hide_return (sigc::mem_fun (*this, &StreamView::add_region_view))
);
}
-
+
// Stack regions by layer, and remove invalid regions
layer_regions();
}
@@ -190,9 +190,9 @@ void
AutomationStreamView::rec_data_range_ready (jack_nframes_t start, jack_nframes_t dur)
{
// this is called from the butler thread for now
-
+
ENSURE_GUI_THREAD(bind (mem_fun (*this, &AutomationStreamView::rec_data_range_ready), start, dur));
-
+
this->update_rec_regions (start, dur);
}
@@ -201,7 +201,7 @@ AutomationStreamView::color_handler ()
{
/*if (_trackview.is_midi_track()) {
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
- }
+ }
if (!_trackview.is_midi_track()) {
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();;
diff --git a/gtk2_ardour/automation_streamview.h b/gtk2_ardour/automation_streamview.h
index d11de8113b..0ab0086315 100644
--- a/gtk2_ardour/automation_streamview.h
+++ b/gtk2_ardour/automation_streamview.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001, 2007 Paul Davis
+ Copyright (C) 2001, 2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,23 +48,23 @@ class AutomationStreamView : public StreamView
void set_automation_state (ARDOUR::AutoState state);
void redisplay_diskstream ();
-
- inline double contents_height() const {
+
+ inline double contents_height() const {
return (_trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2);
}
-
+
private:
void setup_rec_box ();
- void rec_data_range_ready (jack_nframes_t start, jack_nframes_t dur);
+ void rec_data_range_ready (jack_nframes_t start, jack_nframes_t dur);
void update_rec_regions (jack_nframes_t start, jack_nframes_t dur);
-
+
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_data, bool recording = false);
void display_region(AutomationRegionView* region_view);
-
+
void color_handler ();
-
+
boost::shared_ptr<AutomationController> _controller;
-
+
AutomationTimeAxisView& _automation_view;
};
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 806359e2ab..00bba2ba1b 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
boost::shared_ptr<Automatable> a, boost::shared_ptr<AutomationControl> c,
PublicEditor& e, TimeAxisView& parent, bool show_regions,
ArdourCanvas::Canvas& canvas, const string & nom, const string & nomparent)
- : AxisView (s),
+ : AxisView (s),
TimeAxisView (s, e, &parent, canvas),
_route (r),
_control (c),
@@ -87,17 +87,17 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
ignore_state_request = false;
first_call_to_set_height = true;
-
+
_base_rect = new SimpleRect(*_canvas_display);
_base_rect->property_x1() = 0.0;
_base_rect->property_y1() = 0.0;
_base_rect->property_x2() = LONG_MAX - 2;
_base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_AutomationTrackOutline.get();
-
+
/* outline ends and bottom */
_base_rect->property_outline_what() = (guint32) (0x1|0x2|0x8);
_base_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AutomationTrackFill.get();
-
+
_base_rect->set_data ("trackview", this);
_base_rect->signal_event().connect (bind (
@@ -172,12 +172,12 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
tipname += _name;
ARDOUR_UI::instance()->tooltips().set_tip(controls_ebox, tipname);
}
-
+
/* add the buttons */
controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (auto_button, 5, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
-
+
/* add bar controller */
controls_table.attach (*_controller.get(), 0, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
@@ -195,14 +195,14 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
if (xml_node) {
set_state (*xml_node);
- }
-
+ }
+
/* ask for notifications of any new RegionViews */
if (show_regions) {
assert(_view);
_view->attach ();
-
+
/* no regions, just a single line for the entire track (e.g. bus gain) */
} else {
boost::shared_ptr<AutomationLine> line(new AutomationLine (
@@ -281,7 +281,7 @@ AutomationTimeAxisView::automation_state_changed ()
} else {
state = _control->alist()->automation_state ();
}
-
+
switch (state & (Off|Play|Touch|Write)) {
case Off:
auto_button.set_label (_("Manual"));
@@ -335,9 +335,9 @@ AutomationTimeAxisView::automation_state_changed ()
void
AutomationTimeAxisView::interpolation_changed ()
-{
+{
AutomationList::InterpolationStyle style = _control->list()->interpolation();
-
+
if (mode_line_item && mode_discrete_item) {
if (style == AutomationList::Discrete) {
mode_discrete_item->set_active(true);
@@ -347,7 +347,7 @@ AutomationTimeAxisView::interpolation_changed ()
mode_discrete_item->set_active(false);
}
}
-
+
if (_line) {
_line->set_interpolation(style);
}
@@ -376,7 +376,7 @@ void
AutomationTimeAxisView::set_height (uint32_t h)
{
bool changed = (height != (uint32_t) h) || first_call_to_set_height;
- bool changed_between_small_and_normal = (
+ bool changed_between_small_and_normal = (
(height < hNormal && h >= hNormal)
|| (height >= hNormal || h < hNormal) );
@@ -386,10 +386,10 @@ AutomationTimeAxisView::set_height (uint32_t h)
TimeAxisView::set_height (h);
_base_rect->property_y2() = h;
-
+
if (_line)
_line->set_height(h);
-
+
if (_view) {
_view->set_height(h);
_view->update_contents_height();
@@ -407,7 +407,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
if (h >= hNormal) {
controls_table.remove (name_hbox);
-
+
if (plugname) {
if (plugname_packed) {
controls_table.remove (*plugname);
@@ -422,7 +422,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
hide_name_entry ();
show_name_label ();
name_hbox.show_all ();
-
+
auto_button.show();
hide_button.show_all();
@@ -439,7 +439,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
hide_name_entry ();
show_name_label ();
name_hbox.show_all ();
-
+
auto_button.hide();
hide_button.hide();
}
@@ -460,20 +460,20 @@ AutomationTimeAxisView::set_samples_per_unit (double spu)
if (_line)
_line->reset ();
-
+
if (_view)
_view->set_samples_per_unit (spu);
}
-
+
void
AutomationTimeAxisView::hide_clicked ()
{
// LAME fix for refreshing the hide button
hide_button.set_sensitive(false);
-
+
set_marked_for_display (false);
hide ();
-
+
hide_button.set_sensitive(true);
}
@@ -506,7 +506,7 @@ AutomationTimeAxisView::build_display_menu ()
Menu* auto_state_menu = manage (new Menu);
auto_state_menu->set_name ("ArdourContextMenu");
MenuList& as_items = auto_state_menu->items();
-
+
as_items.push_back (CheckMenuElem (_("Manual"), bind (
mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
(AutoState) Off)));
@@ -528,17 +528,17 @@ AutomationTimeAxisView::build_display_menu ()
auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
items.push_back (MenuElem (_("State"), *auto_state_menu));
-
+
/* mode menu */
if ( EventTypeMap::instance().is_midi_parameter(_control->parameter()) ) {
-
+
Menu* auto_mode_menu = manage (new Menu);
auto_mode_menu->set_name ("ArdourContextMenu");
MenuList& am_items = auto_mode_menu->items();
-
+
RadioMenuItem::Group group;
-
+
am_items.push_back (RadioMenuElem (group, _("Discrete"), bind (
mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
AutomationList::Discrete)));
@@ -661,7 +661,7 @@ AutomationTimeAxisView::reset_objects_one (AutomationLine& line, PointSelection&
if (&(*i).track != this) {
continue;
}
-
+
alist->reset_range ((*i).start, (*i).end);
}
}
@@ -700,7 +700,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
_editor.get_cut_buffer().add (what_we_got);
}
break;
-
+
case Clear:
if ((what_we_got = alist->cut ((*i).start, (*i).end)) != 0) {
_session.add_command (new MementoCommand<AutomationList>(*alist.get(), new XMLNode (before), &alist->get_state()));
@@ -736,7 +736,7 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti
{
AutomationSelection::iterator p;
boost::shared_ptr<AutomationList> alist(line.the_list());
-
+
for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth) {}
if (p == selection.lines.end()) {
@@ -747,7 +747,7 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti
values from view coordinates to model coordinates, and we're
not supposed to modify the points in the selection.
*/
-
+
AutomationList copy (**p);
for (AutomationList::iterator x = copy.begin(); x != copy.end(); ++x) {
@@ -857,7 +857,7 @@ AutomationTimeAxisView::exited ()
}
void
-AutomationTimeAxisView::color_handler ()
+AutomationTimeAxisView::color_handler ()
{
if (_line) {
_line->set_colors();
@@ -877,7 +877,7 @@ AutomationTimeAxisView::set_state (const XMLNode& node)
_canvas_display->show (); /* FIXME: necessary? show_at? */
}
}
-
+
if (!_marked_for_display) {
hide();
}
@@ -910,7 +910,7 @@ guint32
AutomationTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
{
update_extra_xml_shown (true);
-
+
return TimeAxisView::show_at (y, nth, parent);
}
diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h
index 7390ee3d4f..f676034237 100644
--- a/gtk2_ardour/automation_time_axis.h
+++ b/gtk2_ardour/automation_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@ class AutomationTimeAxisView : public TimeAxisView {
const std::string & plug_name = "");
~AutomationTimeAxisView();
-
+
virtual void set_height (uint32_t);
void set_samples_per_unit (double);
std::string name() const { return _name; }
@@ -84,20 +84,20 @@ class AutomationTimeAxisView : public TimeAxisView {
void hide_timestretch () {}
/* editing operations */
-
+
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
bool paste (nframes_t, float times, Selection&, size_t nth);
void reset_objects (PointSelection&);
int set_state (const XMLNode&);
-
+
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
void hide ();
-
+
static const std::string state_node_name;
XMLNode* get_state_node();
-
+
boost::shared_ptr<ARDOUR::AutomationControl> control() { return _control; }
boost::shared_ptr<AutomationController> controller() { return _controller; }
@@ -105,20 +105,20 @@ class AutomationTimeAxisView : public TimeAxisView {
boost::shared_ptr<ARDOUR::Route> _route; ///< Parent route
boost::shared_ptr<ARDOUR::AutomationControl> _control; ///< Control
boost::shared_ptr<ARDOUR::Automatable> _automatable; ///< Control owner, maybe = _route
-
+
boost::shared_ptr<AutomationController> _controller;
-
+
ArdourCanvas::SimpleRect* _base_rect;
boost::shared_ptr<AutomationLine> _line;
AutomationStreamView* _view;
-
+
std::string _name;
bool ignore_toggle;
bool first_call_to_set_height;
Gtk::Button hide_button;
- Gtk::Button auto_button;
+ Gtk::Button auto_button;
Gtk::Menu* automation_menu;
Gtk::Label* plugname;
bool plugname_packed;
@@ -132,7 +132,7 @@ class AutomationTimeAxisView : public TimeAxisView {
Gtk::CheckMenuItem* mode_line_item;
void add_line (boost::shared_ptr<AutomationLine>);
-
+
void clear_clicked ();
void hide_clicked ();
void auto_clicked ();
diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc
index 8e817c435c..bed5e098b0 100644
--- a/gtk2_ardour/axis_view.cc
+++ b/gtk2_ardour/axis_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ Gdk::Color
AxisView::unique_random_color()
{
Gdk::Color newcolor;
-
+
while (1) {
/* avoid neon/glowing tones by limiting them to the
@@ -76,11 +76,11 @@ AxisView::unique_random_color()
used_colors.push_back (newcolor);
return newcolor;
}
-
+
for (list<Gdk::Color>::iterator i = used_colors.begin(); i != used_colors.end(); ++i) {
Gdk::Color c = *i;
float rdelta, bdelta, gdelta;
-
+
rdelta = newcolor.get_red() - c.get_red();
bdelta = newcolor.get_blue() - c.get_blue();
gdelta = newcolor.get_green() - c.get_green();
diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h
index 9bd39eec3e..21220d5439 100644
--- a/gtk2_ardour/axis_view.h
+++ b/gtk2_ardour/axis_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ class AxisView : public virtual Selectable
virtual void set_marked_for_display (bool yn) {
_marked_for_display = yn;
}
-
+
sigc::signal<void> Hiding;
sigc::signal<void> GoingAway;
@@ -66,7 +66,7 @@ class AxisView : public virtual Selectable
AxisView (ARDOUR::Session& sess);
virtual ~AxisView();
-
+
/**
* Generate a new random TrackView color, unique from those colors already used.
diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc
index ba62d73f0e..dd62751453 100644
--- a/gtk2_ardour/bundle_manager.cc
+++ b/gtk2_ardour/bundle_manager.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -98,21 +98,21 @@ void
BundleEditorMatrix::add_channel (boost::shared_ptr<Bundle> b)
{
if (b == _bundle) {
-
+
NameChannelDialog d;
d.set_position (Gtk::WIN_POS_MOUSE);
-
+
if (d.run () != Gtk::RESPONSE_ACCEPT) {
return;
}
-
+
_bundle->add_channel (d.get_name());
setup_ports (OURS);
-
+
} else {
-
+
PortMatrix::add_channel (b);
-
+
}
}
@@ -185,7 +185,7 @@ BundleEditor::BundleEditor (Session& session, boost::shared_ptr<UserBundle> bund
t->attach (*Gtk::manage (a), 1, 2, 1, 2);
_input_or_output.append_text (_("Input"));
_input_or_output.append_text (_("Output"));
-
+
if (bundle->ports_are_inputs()) {
_input_or_output.set_active_text (_("Input"));
} else {
@@ -201,10 +201,10 @@ BundleEditor::BundleEditor (Session& session, boost::shared_ptr<UserBundle> bund
a = new Gtk::Alignment (0, 0.5, 0, 1);
a->add (_type);
t->attach (*Gtk::manage (a), 1, 2, 2, 3);
-
+
_type.append_text (_("Audio"));
_type.append_text (_("MIDI"));
-
+
switch (bundle->type ()) {
case DataType::AUDIO:
_type.set_active_text (_("Audio"));
@@ -215,7 +215,7 @@ BundleEditor::BundleEditor (Session& session, boost::shared_ptr<UserBundle> bund
}
_type.signal_changed().connect (sigc::mem_fun (*this, &BundleEditor::type_changed));
-
+
get_vbox()->pack_start (*Gtk::manage (t), false, false);
get_vbox()->pack_start (_matrix);
get_vbox()->set_spacing (4);
@@ -226,7 +226,7 @@ BundleEditor::BundleEditor (Session& session, boost::shared_ptr<UserBundle> bund
} else {
add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_ACCEPT);
}
-
+
show_all ();
}
@@ -248,7 +248,7 @@ void
BundleEditor::input_or_output_changed ()
{
_bundle->remove_ports_from_channels ();
-
+
if (_input_or_output.get_active_text() == _("Output")) {
_bundle->set_ports_are_outputs ();
} else {
@@ -262,7 +262,7 @@ void
BundleEditor::type_changed ()
{
_bundle->remove_ports_from_channels ();
-
+
DataType const t = _type.get_active_text() == _("Audio") ?
DataType::AUDIO : DataType::MIDI;
@@ -290,7 +290,7 @@ BundleManager::BundleManager (Session& session)
for (BundleList::iterator i = bundles->begin(); i != bundles->end(); ++i) {
add_bundle (*i);
}
-
+
/* New / Edit / Delete buttons */
Gtk::VBox* buttons = new Gtk::VBox;
buttons->set_spacing (8);
@@ -304,7 +304,7 @@ BundleManager::BundleManager (Session& session)
delete_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::DELETE, Gtk::ICON_SIZE_BUTTON)));
delete_button.signal_clicked().connect (sigc::mem_fun (*this, &BundleManager::delete_clicked));
buttons->pack_start (delete_button, false, false);
-
+
Gtk::HBox* h = new Gtk::HBox;
h->set_spacing (8);
h->set_border_width (8);
@@ -395,7 +395,7 @@ BundleManager::bundle_changed (Bundle::Change c, boost::shared_ptr<UserBundle> b
if ((c & Bundle::NameChanged) == 0) {
return;
}
-
+
Gtk::TreeModel::iterator i = _list_model->children().begin ();
while (i != _list_model->children().end()) {
boost::shared_ptr<UserBundle> t = (*i)[_list_model_columns.bundle];
@@ -430,7 +430,7 @@ NameChannelDialog::NameChannelDialog (boost::shared_ptr<Bundle> b, uint32_t c)
void
NameChannelDialog::setup ()
-{
+{
Gtk::HBox* box = Gtk::manage (new Gtk::HBox ());
box->pack_start (*Gtk::manage (new Gtk::Label (_("Name"))));
diff --git a/gtk2_ardour/bundle_manager.h b/gtk2_ardour/bundle_manager.h
index dd4c711d4e..b9709c73ee 100644
--- a/gtk2_ardour/bundle_manager.h
+++ b/gtk2_ardour/bundle_manager.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ class BundleEditorMatrix : public PortMatrix
PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
bool can_add_channel (boost::shared_ptr<ARDOUR::Bundle>) const;
-
+
void add_channel (boost::shared_ptr<ARDOUR::Bundle>);
bool can_remove_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
void remove_channel (ARDOUR::BundleChannel);
@@ -59,7 +59,7 @@ class BundleEditorMatrix : public PortMatrix
OTHER = 0,
OURS = 1
};
-
+
boost::shared_ptr<PortGroup> _port_group;
boost::shared_ptr<ARDOUR::Bundle> _bundle;
};
@@ -77,7 +77,7 @@ class BundleEditor : public ArdourDialog
void input_or_output_changed ();
void type_changed ();
void on_show ();
-
+
BundleEditorMatrix _matrix;
boost::shared_ptr<ARDOUR::UserBundle> _bundle;
Gtk::Entry _name;
@@ -106,11 +106,11 @@ class BundleManager : public ArdourDialog
add (name);
add (bundle);
}
-
+
Gtk::TreeModelColumn<Glib::ustring> name;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::UserBundle> > bundle;
};
-
+
Gtk::TreeView _tree_view;
Glib::RefPtr<Gtk::ListStore> _list_model;
ModelColumns _list_model_columns;
@@ -130,7 +130,7 @@ public:
private:
void setup ();
-
+
boost::shared_ptr<ARDOUR::Bundle> _bundle;
uint32_t _channel;
Gtk::Entry _name;
diff --git a/gtk2_ardour/cairo_widget.cc b/gtk2_ardour/cairo_widget.cc
index 573f3e5ba6..ae18c889c7 100644
--- a/gtk2_ardour/cairo_widget.cc
+++ b/gtk2_ardour/cairo_widget.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ CairoWidget::on_expose_event (GdkEventExpose *event)
Gdk::Rectangle content (0, 0, _width, _height);
bool intersects;
r.intersect (content, intersects);
-
+
if (intersects) {
GdkDrawable* drawable = get_window()->gobj ();
@@ -79,7 +79,7 @@ CairoWidget::on_expose_event (GdkEventExpose *event)
r.get_height()
);
}
-
+
return true;
}
diff --git a/gtk2_ardour/cairo_widget.h b/gtk2_ardour/cairo_widget.h
index c274c0aaeb..8665f66198 100644
--- a/gtk2_ardour/cairo_widget.h
+++ b/gtk2_ardour/cairo_widget.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ protected:
int _width; ///< pixmap width
int _height; ///< pixmap height
-
+
private:
bool _dirty; ///< true if the pixmap requires re-rendering
GdkPixmap* _pixmap; ///< our pixmap
diff --git a/gtk2_ardour/canvas-curve.h b/gtk2_ardour/canvas-curve.h
index 2656330b17..cad9270454 100644
--- a/gtk2_ardour/canvas-curve.h
+++ b/gtk2_ardour/canvas-curve.h
@@ -46,7 +46,7 @@ struct _GnomeCanvasCurve
float* vector;
size_t veclen;
uint32_t color;
-
+
/* cached values set during update/used during render */
unsigned char r, b, g, a;
diff --git a/gtk2_ardour/canvas-flag.cc b/gtk2_ardour/canvas-flag.cc
index 813c0b1468..55bf853b7c 100644
--- a/gtk2_ardour/canvas-flag.cc
+++ b/gtk2_ardour/canvas-flag.cc
@@ -5,7 +5,7 @@
using namespace Gnome::Canvas;
using namespace std;
-void
+void
CanvasFlag::delete_allocated_objects()
{
delete _text;
@@ -18,11 +18,11 @@ CanvasFlag::delete_allocated_objects()
_rect = 0;
}
-void
+void
CanvasFlag::set_text(const string& a_text)
{
delete_allocated_objects();
-
+
_text = new InteractiveText(*this, this, 0.0, 0.0, Glib::ustring(a_text));
_text->property_justification() = Gtk::JUSTIFY_CENTER;
_text->property_fill_color_rgba() = _outline_color_rgba;
@@ -36,7 +36,7 @@ CanvasFlag::set_text(const string& a_text)
_rect = new InteractiveRect(*this, this, 0.0, 0.0, flagwidth, flagheight);
_rect->property_outline_color_rgba() = _outline_color_rgba;
_rect->property_fill_color_rgba() = _fill_color_rgba;
- _text->raise_to_top();
+ _text->raise_to_top();
}
CanvasFlag::~CanvasFlag()
diff --git a/gtk2_ardour/canvas-flag.h b/gtk2_ardour/canvas-flag.h
index a9dbb09175..781430f8e4 100644
--- a/gtk2_ardour/canvas-flag.h
+++ b/gtk2_ardour/canvas-flag.h
@@ -36,9 +36,9 @@ public:
, _line(0)
, _rect(0)
{}
-
+
virtual ~CanvasFlag();
-
+
virtual bool on_event(GdkEvent* ev);
void set_text(const std::string& a_text);
@@ -49,10 +49,10 @@ protected:
guint _outline_color_rgba;
guint _fill_color_rgba;
MidiRegionView& _region;
-
+
private:
void delete_allocated_objects();
-
+
SimpleLine* _line;
InteractiveRect* _rect;
};
diff --git a/gtk2_ardour/canvas-hit.cc b/gtk2_ardour/canvas-hit.cc
index 23a9a19137..9075eaaddd 100644
--- a/gtk2_ardour/canvas-hit.cc
+++ b/gtk2_ardour/canvas-hit.cc
@@ -19,7 +19,7 @@ CanvasHit::on_event(GdkEvent* ev)
}
}
-void
+void
CanvasHit::move_event(double dx, double dy)
{
move_by (dx, dy);
diff --git a/gtk2_ardour/canvas-hit.h b/gtk2_ardour/canvas-hit.h
index 2a94907cd6..387f7c9860 100644
--- a/gtk2_ardour/canvas-hit.h
+++ b/gtk2_ardour/canvas-hit.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -40,7 +40,7 @@ public:
: Diamond(group, size), CanvasNoteEvent(region, this, note)
{
}
-
+
void show() { Diamond::show(); }
void hide() { Diamond::hide(); }
@@ -48,7 +48,7 @@ public:
double y1() { double x1, y1, x2, y2; get_bounds(x1,y1,x2,y2); return y1; }
double x2() { double x1, y1, x2, y2; get_bounds(x1,y1,x2,y2); return x2; }
double y2() { double x1, y1, x2, y2; get_bounds(x1,y1,x2,y2); return y2; }
-
+
void set_outline_color(uint32_t c) { property_outline_color_rgba() = c; }
void set_fill_color(uint32_t c) { property_fill_color_rgba() = c; }
diff --git a/gtk2_ardour/canvas-imageframe.c b/gtk2_ardour/canvas-imageframe.c
index 1f0e7e877b..3654836c79 100644
--- a/gtk2_ardour/canvas-imageframe.c
+++ b/gtk2_ardour/canvas-imageframe.c
@@ -7,8 +7,8 @@
*
* Author: Federico Mena <federico@nuclecu.unam.mx>
*/
-
-
+
+
#include <string.h> /* for memcpy() */
#include <math.h>
#include <stdio.h>
@@ -103,7 +103,7 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
g_param_spec_pointer ("pixbuf",
_("pixbuf"),
_("the pixbuf"),
- G_PARAM_WRITABLE));
+ G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
PROP_X,
g_param_spec_double ("x",
@@ -112,8 +112,8 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_Y,
g_param_spec_double ("y",
@@ -122,7 +122,7 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_WIDTH,
g_param_spec_double ("width",
@@ -131,8 +131,8 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_DRAWWIDTH,
g_param_spec_double ("drawwidth",
@@ -141,7 +141,7 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_HEIGHT,
g_param_spec_double ("height",
@@ -150,7 +150,7 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_ANCHOR,
g_param_spec_enum ("anchor",
@@ -158,7 +158,7 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
_("the anchor"),
GTK_TYPE_ANCHOR_TYPE,
GTK_ANCHOR_NW,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
object_class->destroy = gnome_canvas_imageframe_destroy;
@@ -191,7 +191,7 @@ gnome_canvas_imageframe_destroy (GtkObject *object)
g_return_if_fail (GNOME_CANVAS_IS_CANVAS_IMAGEFRAME (object));
image = GNOME_CANVAS_IMAGEFRAME (object);
-
+
image->cwidth = 0;
image->cheight = 0;
@@ -315,7 +315,7 @@ gnome_canvas_imageframe_set_property (GObject *object,
image->height = fabs (g_value_get_double (value));
update = TRUE;
break;
-
+
case PROP_DRAWWIDTH:
image->drawwidth = fabs (g_value_get_double (value));
update = TRUE;
@@ -357,11 +357,11 @@ gnome_canvas_imageframe_get_property (GObject *object,
case PROP_WIDTH:
g_value_set_double (value, image->width);
break;
-
+
case PROP_HEIGHT:
g_value_set_double (value, image->height);
break;
-
+
case PROP_DRAWWIDTH:
g_value_set_double (value, image->drawwidth);
break;
diff --git a/gtk2_ardour/canvas-imageframe.h b/gtk2_ardour/canvas-imageframe.h
index 7c66c5e1db..8cfb6e273a 100644
--- a/gtk2_ardour/canvas-imageframe.h
+++ b/gtk2_ardour/canvas-imageframe.h
@@ -7,15 +7,15 @@
*
* Author: Federico Mena <federico@nuclecu.unam.mx>
*/
-
-
+
+
#ifndef __GNOME_CANVAS_IMAGEFRAME_H__
#define __GNOME_CANVAS_IMAGEFRAME_H__
#include <stdint.h>
#include <libgnomecanvas/libgnomecanvas.h>
-#include <gtk/gtkenums.h>
+#include <gtk/gtkenums.h>
#ifdef __cplusplus
extern "C" {
diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc
index b3c6b49ee0..958ba3e29a 100644
--- a/gtk2_ardour/canvas-note-event.cc
+++ b/gtk2_ardour/canvas-note-event.cc
@@ -32,9 +32,9 @@ namespace Canvas {
/// dividing the hue circle in 16 parts, hand adjusted for equal look, courtesy Thorsten Wilms
const uint32_t CanvasNoteEvent::midi_channel_colors[16] = {
- 0xd32d2dff, 0xd36b2dff, 0xd3972dff, 0xd3d12dff,
- 0xa0d32dff, 0x7dd32dff, 0x2dd45eff, 0x2dd3c4ff,
- 0x2da5d3ff, 0x2d6fd3ff, 0x432dd3ff, 0x662dd3ff,
+ 0xd32d2dff, 0xd36b2dff, 0xd3972dff, 0xd3d12dff,
+ 0xa0d32dff, 0x7dd32dff, 0x2dd45eff, 0x2dd3c4ff,
+ 0x2da5d3ff, 0x2d6fd3ff, 0x432dd3ff, 0x662dd3ff,
0x832dd3ff, 0xa92dd3ff, 0xd32dbfff, 0xd32d67ff
};
@@ -51,13 +51,13 @@ CanvasNoteEvent::CanvasNoteEvent(MidiRegionView& region, Item* item,
{
}
-CanvasNoteEvent::~CanvasNoteEvent()
-{
+CanvasNoteEvent::~CanvasNoteEvent()
+{
if (_text) {
_text->hide();
delete _text;
}
-
+
delete _channel_selector_widget;
}
@@ -100,7 +100,7 @@ CanvasNoteEvent::hide_velocity()
}
}
-void
+void
CanvasNoteEvent::on_channel_selection_change(uint16_t selection)
{
// make note change its color if its channel is not marked active
@@ -116,7 +116,7 @@ CanvasNoteEvent::on_channel_selection_change(uint16_t selection)
_item->show();
}
-void
+void
CanvasNoteEvent::on_channel_change(uint8_t channel)
{
_region.note_selected(this, true);
@@ -134,11 +134,11 @@ CanvasNoteEvent::show_channel_selector(void)
_channel_selector->channel_selected.connect(
sigc::mem_fun(this, &CanvasNoteEvent::on_channel_change));
- _channel_selector_widget = new Widget(*(_item->property_parent()),
- x1(),
- y2() + 2,
+ _channel_selector_widget = new Widget(*(_item->property_parent()),
+ x1(),
+ y2() + 2,
(Gtk::Widget &) *_channel_selector);
-
+
_channel_selector_widget->hide();
_channel_selector_widget->property_height() = 100;
_channel_selector_widget->property_width() = 100;
@@ -179,35 +179,35 @@ CanvasNoteEvent::selected(bool selected)
#define SCALE_USHORT_TO_UINT8_T(x) ((x) / 257)
-uint32_t
+uint32_t
CanvasNoteEvent::base_color()
{
using namespace ARDOUR;
-
+
ColorMode mode = _region.color_mode();
-
+
const uint8_t min_opacity = 15;
uint8_t opacity = std::max(min_opacity, uint8_t(_note->velocity() + _note->velocity()));
-
+
switch (mode) {
case TrackColor:
{
Gdk::Color color = _region.midi_stream_view()->get_region_color();
return RGBA_TO_UINT(
- SCALE_USHORT_TO_UINT8_T(color.get_red()),
- SCALE_USHORT_TO_UINT8_T(color.get_green()),
- SCALE_USHORT_TO_UINT8_T(color.get_blue()),
+ SCALE_USHORT_TO_UINT8_T(color.get_red()),
+ SCALE_USHORT_TO_UINT8_T(color.get_green()),
+ SCALE_USHORT_TO_UINT8_T(color.get_blue()),
opacity);
}
-
+
case ChannelColors:
- return UINT_RGBA_CHANGE_A(CanvasNoteEvent::midi_channel_colors[_note->channel()],
+ return UINT_RGBA_CHANGE_A(CanvasNoteEvent::midi_channel_colors[_note->channel()],
opacity);
-
+
default:
return meter_style_fill_color(_note->velocity());
};
-
+
return 0;
}
diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h
index a9fa6ccb2d..9546141d8b 100644
--- a/gtk2_ardour/canvas-note-event.h
+++ b/gtk2_ardour/canvas-note-event.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -74,24 +74,24 @@ public:
void selected(bool yn);
virtual void move_event(double dx, double dy) = 0;
-
+
uint32_t base_color();
-
+
void show_velocity();
void hide_velocity();
-
+
/** Channel changed for this specific event */
void on_channel_change(uint8_t channel);
/** Channel selection changed */
void on_channel_selection_change(uint16_t selection);
-
+
void show_channel_selector();
void hide_channel_selector();
virtual void set_outline_color(uint32_t c) = 0;
virtual void set_fill_color(uint32_t c) = 0;
-
+
virtual double x1() = 0;
virtual double y1() = 0;
virtual double x2() = 0;
@@ -99,7 +99,7 @@ public:
const boost::shared_ptr<NoteType> note() const { return _note; }
MidiRegionView& region_view() const { return _region; }
-
+
inline static uint32_t meter_style_fill_color(uint8_t vel) {
if (vel < 64) {
return UINT_INTERPOLATE(
@@ -113,12 +113,12 @@ public:
((vel-64) / (double)63.0));
}
}
-
+
/// calculate outline colors from fill colors of notes
inline static uint32_t calculate_outline(uint32_t color) {
return UINT_INTERPOLATE(color, 0x000000ff, 0.5);
}
-
+
/// hue circle divided into 16 equal-looking parts, courtesy Thorsten Wilms
static const uint32_t midi_channel_colors[16];
diff --git a/gtk2_ardour/canvas-note.cc b/gtk2_ardour/canvas-note.cc
index 4686a80df9..a3aa6ed8ac 100644
--- a/gtk2_ardour/canvas-note.cc
+++ b/gtk2_ardour/canvas-note.cc
@@ -18,7 +18,7 @@ CanvasNote::on_event(GdkEvent* ev)
}
}
-void
+void
CanvasNote::move_event(double dx, double dy)
{
property_x1() = property_x1() + dx;
diff --git a/gtk2_ardour/canvas-program-change.cc b/gtk2_ardour/canvas-program-change.cc
index 94e367b345..27a163ef7c 100644
--- a/gtk2_ardour/canvas-program-change.cc
+++ b/gtk2_ardour/canvas-program-change.cc
@@ -24,10 +24,10 @@ CanvasProgramChange::CanvasProgramChange(
uint8_t channel,
uint8_t program)
: CanvasFlag(
- region,
- parent,
- height,
- ARDOUR_UI::config()->canvasvar_MidiProgramChangeOutline.get(),
+ region,
+ parent,
+ height,
+ ARDOUR_UI::config()->canvasvar_MidiProgramChangeOutline.get(),
ARDOUR_UI::config()->canvasvar_MidiProgramChangeFill.get(),
x,
y)
@@ -45,57 +45,57 @@ CanvasProgramChange::~CanvasProgramChange()
{
}
-void
+void
CanvasProgramChange::initialize_popup_menus()
{
- boost::shared_ptr<ChannelNameSet> channel_name_set =
+ boost::shared_ptr<ChannelNameSet> channel_name_set =
MidiPatchManager::instance()
.find_channel_name_set(_model_name, _custom_device_mode, _channel);
if (!channel_name_set) {
return;
}
-
+
const ChannelNameSet::PatchBanks& patch_banks = channel_name_set->patch_banks();
-
+
// fill popup menu:
Gtk::Menu::MenuList& patch_bank_menus = _popup.items();
-
+
for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin();
bank != patch_banks.end();
++bank) {
Glib::RefPtr<Glib::Regex> underscores = Glib::Regex::create("_");
Glib::ustring replacement(" ");
-
+
Gtk::Menu& patch_bank_menu = *manage(new Gtk::Menu());
-
+
const PatchBank::PatchNameList& patches = (*bank)->patch_name_list();
Gtk::Menu::MenuList& patch_menus = patch_bank_menu.items();
-
+
for (PatchBank::PatchNameList::const_iterator patch = patches.begin();
patch != patches.end();
++patch) {
Glib::ustring name = underscores->replace((*patch)->name().c_str(), -1, 0, replacement);
-
+
patch_menus.push_back(
Gtk::Menu_Helpers::MenuElem(
- name,
+ name,
sigc::bind(
- sigc::mem_fun(*this, &CanvasProgramChange::on_patch_menu_selected),
- (*patch)->patch_primary_key())) );
+ sigc::mem_fun(*this, &CanvasProgramChange::on_patch_menu_selected),
+ (*patch)->patch_primary_key())) );
}
Glib::ustring name = underscores->replace((*bank)->name().c_str(), -1, 0, replacement);
-
- patch_bank_menus.push_back(
+
+ patch_bank_menus.push_back(
Gtk::Menu_Helpers::MenuElem(
- name,
- patch_bank_menu) );
+ name,
+ patch_bank_menu) );
}
}
-void
+void
CanvasProgramChange::on_patch_menu_selected(const PatchPrimaryKey& key)
{
cerr << " got patch program number " << key.program_number << endl;
@@ -117,7 +117,7 @@ CanvasProgramChange::on_event(GdkEvent* ev)
return true;
}
break;
-
+
case GDK_SCROLL:
if (ev->scroll.direction == GDK_SCROLL_UP) {
_region.previous_program(*this);
@@ -125,12 +125,12 @@ CanvasProgramChange::on_event(GdkEvent* ev)
} else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
_region.next_program(*this);
return true;
- }
+ }
break;
-
+
default:
break;
}
-
+
return false;
}
diff --git a/gtk2_ardour/canvas-program-change.h b/gtk2_ardour/canvas-program-change.h
index ef69089f93..cddd78059b 100644
--- a/gtk2_ardour/canvas-program-change.h
+++ b/gtk2_ardour/canvas-program-change.h
@@ -30,14 +30,14 @@ public:
uint8_t channel,
uint8_t program
);
-
+
virtual ~CanvasProgramChange();
-
+
virtual bool on_event(GdkEvent* ev);
-
+
string model_name() const { return _model_name; }
void set_model_name(string model_name) { _model_name = model_name; }
-
+
string custom_device_mode() const { return _custom_device_mode; }
void set_custom_device_mode(string custom_device_mode) { _custom_device_mode = custom_device_mode; }
@@ -49,14 +49,14 @@ public:
uint8_t channel() const { return _channel; }
void set_channel(uint8_t new_channel) { _channel = new_channel; };
-
+
void initialize_popup_menus();
-
+
void on_patch_menu_selected(const MIDI::Name::PatchPrimaryKey& key);
private:
string _model_name;
- string _custom_device_mode;
+ string _custom_device_mode;
nframes_t _event_time;
uint8_t _channel;
uint8_t _program;
diff --git a/gtk2_ardour/canvas-simpleline.c b/gtk2_ardour/canvas-simpleline.c
index 9a046230d4..7bff05487e 100644
--- a/gtk2_ardour/canvas-simpleline.c
+++ b/gtk2_ardour/canvas-simpleline.c
@@ -104,7 +104,7 @@ gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
gobject_class->set_property = gnome_canvas_simpleline_set_property;
gobject_class->get_property = gnome_canvas_simpleline_get_property;
-
+
g_object_class_install_property (gobject_class,
PROP_X1,
g_param_spec_double ("x1",
@@ -113,8 +113,8 @@ gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_Y1,
g_param_spec_double ("y1",
@@ -123,8 +123,8 @@ gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_X2,
@@ -134,8 +134,8 @@ gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_Y2,
g_param_spec_double ("y2",
@@ -144,7 +144,7 @@ gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_COLOR_RGBA,
g_param_spec_uint ("color_rgba",
@@ -153,8 +153,8 @@ gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
0,
G_MAXUINT,
0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
object_class->destroy = gnome_canvas_simpleline_destroy;
item_class->update = gnome_canvas_simpleline_update;
@@ -204,7 +204,7 @@ gnome_canvas_simpleline_bounds_world (GnomeCanvasItem *item, int* ix1, int* iy1,
i1.y = y1;
i2.x = x2;
i2.y = y2;
-
+
gnome_canvas_item_i2w_affine (item, i2w);
art_affine_point (&w1, &i1, i2w);
art_affine_point (&w2, &i2, i2w);
@@ -225,7 +225,7 @@ gnome_canvas_simpleline_bounds_world (GnomeCanvasItem *item, int* ix1, int* iy1,
}
}
-static void
+static void
gnome_canvas_simpleline_reset_bounds (GnomeCanvasItem *item)
{
int Ix1, Ix2, Iy1, Iy2;
@@ -234,8 +234,8 @@ gnome_canvas_simpleline_reset_bounds (GnomeCanvasItem *item)
gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
}
-/*
- * CANVAS CALLBACKS
+/*
+ * CANVAS CALLBACKS
*/
static void
@@ -246,7 +246,7 @@ gnome_canvas_simpleline_set_property (GObject *object,
{
(void) pspec;
-
+
GnomeCanvasSimpleLine *simpleline;
int update = FALSE;
int bounds_changed = FALSE;
@@ -284,7 +284,7 @@ gnome_canvas_simpleline_set_property (GObject *object,
bounds_changed = TRUE;
}
break;
-
+
case PROP_COLOR_RGBA:
if (simpleline->color != g_value_get_uint(value)) {
simpleline->color = g_value_get_uint(value);
@@ -309,7 +309,7 @@ gnome_canvas_simpleline_get_property (GObject *object,
{
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_SIMPLELINE (object));
-
+
GnomeCanvasSimpleLine *line = GNOME_CANVAS_SIMPLELINE (object);
switch (prop_id) {
@@ -381,13 +381,13 @@ gnome_canvas_simpleline_render (GnomeCanvasItem *item,
//begin = MAX(simpleline->bbox_ulx,buf->rect.x0);
//end = MIN(simpleline->bbox_lrx,buf->rect.x1);
-
+
begin = simpleline->bbox_ulx;
end = simpleline->bbox_lrx;
if (simpleline->color != 0) {
if (simpleline->horizontal) {
- PAINT_HORIZA(buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
+ PAINT_HORIZA(buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
begin, end, simpleline->bbox_uly);
} else {
PAINT_VERTA(buf, simpleline->r, simpleline->g, simpleline->b, simpleline->a,
@@ -442,10 +442,10 @@ gnome_canvas_simpleline_draw (GnomeCanvasItem *item,
lrx -= x;
lry -= y;
- cairo_set_source_rgba (cr,
- simpleline->r/255.0,
- simpleline->g/255.0,
- simpleline->b/255.0,
+ cairo_set_source_rgba (cr,
+ simpleline->r/255.0,
+ simpleline->g/255.0,
+ simpleline->b/255.0,
simpleline->a/255.0);
cairo_set_line_width (cr, 1);
cairo_move_to (cr, ulx+0.5, uly+0.5);
@@ -469,7 +469,7 @@ gnome_canvas_simpleline_point (GnomeCanvasItem *item, double x, double y, int cx
{
(void) cx;
(void) cy;
-
+
GnomeCanvasSimpleLine *simpleline;
double x1, y1, x2, y2;
double dx, dy;
@@ -483,7 +483,7 @@ gnome_canvas_simpleline_point (GnomeCanvasItem *item, double x, double y, int cx
gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
/* Is point inside line */
-
+
if ((x >= x1) && (y >= y1) && (x <= x2) && (y <= y2)) {
return 0.0;
}
diff --git a/gtk2_ardour/canvas-simplerect.c b/gtk2_ardour/canvas-simplerect.c
index 6ad0c791f8..a3894b0790 100644
--- a/gtk2_ardour/canvas-simplerect.c
+++ b/gtk2_ardour/canvas-simplerect.c
@@ -20,7 +20,7 @@ enum {
PROP_FILL_COLOR_RGBA,
PROP_OUTLINE_COLOR_RGBA,
PROP_DRAW
-
+
};
static void gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class);
@@ -95,12 +95,12 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
gobject_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
-
+
parent_class = g_type_class_peek_parent (class);
gobject_class->set_property = gnome_canvas_simplerect_set_property;
gobject_class->get_property = gnome_canvas_simplerect_get_property;
-
+
g_object_class_install_property (gobject_class,
PROP_X1,
g_param_spec_double ("x1",
@@ -109,8 +109,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_Y1,
g_param_spec_double ("y1",
@@ -119,8 +119,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_X2,
@@ -130,8 +130,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_Y2,
g_param_spec_double ("y2",
@@ -140,8 +140,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_OUTLINE_PIXELS,
@@ -151,8 +151,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
0,
G_MAXUINT,
0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_OUTLINE_WHAT,
@@ -162,8 +162,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
0,
G_MAXUINT,
0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
@@ -172,16 +172,16 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
_("fill"),
_("fill rectangle"),
TRUE,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_DRAW,
g_param_spec_boolean ("draw",
_("draw"),
_("draw rectangle"),
TRUE,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_OUTLINE_COLOR_RGBA,
@@ -191,8 +191,8 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
0,
G_MAXUINT,
0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_FILL_COLOR_RGBA,
@@ -202,7 +202,7 @@ gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
0,
G_MAXUINT,
0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
object_class->destroy = gnome_canvas_simplerect_destroy;
@@ -234,7 +234,7 @@ static void
gnome_canvas_simplerect_destroy (GtkObject *object)
{
GnomeCanvasSimpleRect *rect;
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_SIMPLERECT (object));
@@ -259,7 +259,7 @@ gnome_canvas_simplerect_bounds (GnomeCanvasItem *item, double *x1, double *y1, d
}
-static void
+static void
gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
{
GnomeCanvasSimpleRect* simplerect;
@@ -271,7 +271,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
old_y1 = item->y1;
old_x2 = item->x2;
old_y2 = item->y2;
-
+
gnome_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
gnome_canvas_item_i2w (item, &x1, &y1);
gnome_canvas_item_i2w (item, &x2, &y2);
@@ -331,7 +331,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
} else if (item->x2 == old_x2) {
/* end didn't change, so just draw at the start */
-
+
double start_x = MIN (item->x1, old_x1);
double end_x = MAX (item->x1, old_x1);
@@ -339,7 +339,7 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
return;
}
- }
+ }
new.x0 = x1;
new.y0 = y1;
@@ -352,15 +352,15 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
old.y1 = old_y2;
art_drect_union (&unionrect, &old, &new);
- gnome_canvas_request_redraw (item->canvas,
+ gnome_canvas_request_redraw (item->canvas,
unionrect.x0 - 0.5,
unionrect.y0 - 0.5,
unionrect.x1 + 1.5,
unionrect.y1 + 1.5);
}
-/*
- * CANVAS CALLBACKS
+/*
+ * CANVAS CALLBACKS
*/
static void
@@ -371,7 +371,7 @@ gnome_canvas_simplerect_set_property (GObject *object,
{
(void) pspec;
-
+
GnomeCanvasSimpleRect *simplerect;
int update = FALSE;
int bounds_changed = FALSE;
@@ -470,7 +470,7 @@ gnome_canvas_simplerect_get_property (GObject *object,
GParamSpec *pspec)
{
GnomeCanvasSimpleRect *rect = GNOME_CANVAS_SIMPLERECT (object);
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_SIMPLERECT (object));
@@ -505,7 +505,7 @@ gnome_canvas_simplerect_get_property (GObject *object,
case PROP_DRAW:
g_value_set_boolean (value, rect->draw);
break;
-
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -527,7 +527,7 @@ gnome_canvas_simplerect_update (GnomeCanvasItem *item, double *affine, ArtSVP *c
gnome_canvas_simplerect_reset_bounds (item);
if (simplerect->full_draw_on_update) {
- gnome_canvas_request_redraw (item->canvas,
+ gnome_canvas_request_redraw (item->canvas,
simplerect->bbox_ulx,
simplerect->bbox_uly,
simplerect->bbox_lrx+0.5,
@@ -563,7 +563,7 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
if (parent_class->render) {
(*parent_class->render) (item, buf);
}
-
+
if (buf->is_bg) {
#ifdef HARLEQUIN_DEBUGGING
@@ -580,7 +580,7 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
if (!simplerect->draw) {
return;
}
-
+
self.x0 = simplerect->bbox_ulx;
self.y0 = simplerect->bbox_uly;
self.x1 = simplerect->bbox_lrx;
@@ -595,7 +595,7 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
ey = simplerect->bbox_lry-1;
if (simplerect->fill) {
-
+
// this can be useful for debugging/understanding how the canvas redraws
// stuff.
@@ -605,12 +605,12 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
randg = random() % 255;
randb = random() % 255;
PAINT_BOX(buf, randr, randg, randb, simplerect->fill_a, begin, sy, end, ey);
-#else
- PAINT_BOX (buf, simplerect->fill_r, simplerect->fill_g, simplerect->fill_b, simplerect->fill_a,
+#else
+ PAINT_BOX (buf, simplerect->fill_r, simplerect->fill_g, simplerect->fill_b, simplerect->fill_a,
intersection.x0, intersection.y0,
intersection.x1, intersection.y1);
#endif
-
+
}
for (i = 0; i < simplerect->outline_pixels; ++i) {
@@ -630,7 +630,7 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
if (simplerect->outline_what & 0x4) {
PAINT_HORIZ(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, begin, end, sy+i);
}
-
+
if (simplerect->outline_what & 0x8) {
PAINT_HORIZ(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, begin, end + 1, ey-i);
}
@@ -678,14 +678,14 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
ey = simplerect->bbox_lry-1;
if (simplerect->fill) {
-
+
#ifdef HARLEQUIN_DEBUGGING
gint randr, randg, randb;
randr = random() % 255;
randg = random() % 255;
randb = random() % 255;
PAINT_BOX(buf, randr, randg, randb, simplerect->fill_a, begin, sy, end, ey);
-#else
+#else
PAINT_BOX(buf, simplerect->fill_r, simplerect->fill_g, simplerect->fill_b, simplerect->fill_a, begin, sy, end, ey);
#endif
}
@@ -707,7 +707,7 @@ gnome_canvas_simplerect_render (GnomeCanvasItem *item,
if (simplerect->outline_what & 0x4) {
PAINT_HORIZ(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, begin, end, sy+i);
}
-
+
if (simplerect->outline_what & 0x8) {
PAINT_HORIZ(buf, simplerect->outline_r, simplerect->outline_g, simplerect->outline_b, begin, end + 1, ey-i);
}
@@ -730,7 +730,7 @@ gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
simplerect = GNOME_CANVAS_SIMPLERECT (item);
- cr = gdk_cairo_create (drawable);
+ cr = gdk_cairo_create (drawable);
if (x > simplerect->bbox_ulx) {
ulx = x;
@@ -765,23 +765,23 @@ gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
if (simplerect->fill) {
cairo_set_source_rgba (cr,
- simplerect->fill_r/255.0,
- simplerect->fill_g/255.0,
- simplerect->fill_b/255.0,
+ simplerect->fill_r/255.0,
+ simplerect->fill_g/255.0,
+ simplerect->fill_b/255.0,
simplerect->fill_a/255.0);
cairo_fill (cr);
}
-
+
if (simplerect->outline_what && simplerect->outline_pixels) {
#define x_in_range(a) (x <= (a) && (a) < x + width)
#define y_in_range(a) (y <= (a) && (a) < y + height)
cairo_set_line_width (cr, simplerect->outline_pixels);
-
+
cairo_set_source_rgb (cr,
- simplerect->outline_r/255.0,
- simplerect->outline_g/255.0,
+ simplerect->outline_r/255.0,
+ simplerect->outline_g/255.0,
simplerect->outline_b/255.0);
if (simplerect->outline_what & 0x1) {
@@ -792,7 +792,7 @@ gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
cairo_stroke (cr);
}
}
-
+
if (simplerect->outline_what & 0x2) {
/* right edge, if visible */
if (x_in_range (simplerect->bbox_lrx)) {
@@ -801,7 +801,7 @@ gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
cairo_stroke (cr);
}
}
-
+
if (simplerect->outline_what & 0x4) {
/* top edge */
if (y_in_range (simplerect->bbox_uly)) {
@@ -810,7 +810,7 @@ gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
cairo_stroke (cr);
}
}
-
+
if (simplerect->outline_what & 0x8) {
/* bottom edge */
if (y_in_range (simplerect->bbox_lry)) {
@@ -829,7 +829,7 @@ gnome_canvas_simplerect_point (GnomeCanvasItem *item, double x, double y, int cx
{
(void) cx;
(void) cy;
-
+
GnomeCanvasSimpleRect *simplerect;
double x1, y1, x2, y2;
double dx, dy;
@@ -843,7 +843,7 @@ gnome_canvas_simplerect_point (GnomeCanvasItem *item, double x, double y, int cx
gnome_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
/* Is point inside rectangle */
-
+
if ((x >= x1) && (y >= y1) && (x <= x2) && (y <= y2)) {
return 0.0;
}
diff --git a/gtk2_ardour/canvas-sysex.cc b/gtk2_ardour/canvas-sysex.cc
index db93b61050..667b493d5c 100644
--- a/gtk2_ardour/canvas-sysex.cc
+++ b/gtk2_ardour/canvas-sysex.cc
@@ -34,10 +34,10 @@ CanvasSysEx::CanvasSysEx(
double x,
double y)
: CanvasFlag(
- region,
- parent,
- height,
- ARDOUR_UI::config()->canvasvar_MidiSysExOutline.get(),
+ region,
+ parent,
+ height,
+ ARDOUR_UI::config()->canvasvar_MidiSysExOutline.get(),
ARDOUR_UI::config()->canvasvar_MidiSysExFill.get(),
x,
y)
@@ -58,19 +58,19 @@ CanvasSysEx::on_event(GdkEvent* ev)
return true;
}
break;
-
+
case GDK_SCROLL:
if (ev->scroll.direction == GDK_SCROLL_UP) {
return true;
} else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
return true;
- }
+ }
break;
-
+
default:
break;
}
-
+
return false;
}
diff --git a/gtk2_ardour/canvas-sysex.h b/gtk2_ardour/canvas-sysex.h
index e69581a061..281cbb557a 100644
--- a/gtk2_ardour/canvas-sysex.h
+++ b/gtk2_ardour/canvas-sysex.h
@@ -37,9 +37,9 @@ public:
double height,
double x,
double y);
-
+
virtual ~CanvasSysEx();
-
+
virtual bool on_event(GdkEvent* ev);
};
diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c
index e41fe5944f..439bddc035 100644
--- a/gtk2_ardour/canvas-waveview.c
+++ b/gtk2_ardour/canvas-waveview.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2002 Paul Davis
+ Copyright (C) 2000-2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -163,106 +163,106 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *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_PARAM_READABLE | G_PARAM_WRITABLE)));
-
+
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_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_PARAM_READABLE | G_PARAM_WRITABLE)));
-
+
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_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_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,
@@ -283,7 +283,7 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
g_param_spec_boolean ("filled", NULL, NULL,
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
+
g_object_class_install_property
(gobject_class,
PROP_RECTIFIED,
@@ -304,16 +304,16 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
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)));
-
+
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;
@@ -418,12 +418,12 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
#if DEBUG_CACHE
// printf("waveview->region_start == %lu\n",waveview->region_start);
// c_stacktrace ();
- printf ("\n\n=> 0x%x cache @ 0x%x range: %lu - %lu request: %lu - %lu (%lu frames)\n",
+ printf ("\n\n=> 0x%x cache @ 0x%x range: %lu - %lu request: %lu - %lu (%lu frames)\n",
waveview, cache,
cache->start, cache->end,
start_sample, end_sample, end_sample - start_sample);
#endif
-
+
if (cache->start <= start_sample && cache->end >= end_sample) {
#if DEBUG_CACHE
// printf ("0x%x: cache hit for %lu-%lu (cache holds: %lu-%lu\n",
@@ -433,11 +433,11 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
}
/* make sure the cache is at least twice as wide as the screen width, and put the start sample
- in the middle, ensuring that we cover the end_sample.
+ in the middle, ensuring that we cover the end_sample.
*/
/* Note the assumption that we have a 1:1 units:pixel ratio for the canvas. Its everywhere ... */
-
+
half_width = (gulong) floor ((waveview->screen_width * waveview->samples_per_unit)/2.0 + 0.5);
if (start_sample < half_width) {
@@ -462,7 +462,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
}
#if DEBUG_CACHE
- fprintf (stderr, "AVAILABLE FRAMES = %lu of %lu, start = %lu, sstart = %lu, cstart = %lu\n",
+ fprintf (stderr, "AVAILABLE FRAMES = %lu of %lu, start = %lu, sstart = %lu, cstart = %lu\n",
rf3, waveview->sourcefile_length_function (waveview->data_src, waveview->samples_per_unit),
waveview->region_start, start_sample, new_cache_start);
#endif
@@ -489,7 +489,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
ostart = new_cache_start;
#ifdef CACHE_MEMMOVE_OPTIMIZATION
-
+
/* data is not entirely in the cache, so go fetch it, making sure to fill the cache */
/* some of the required cache entries are in the cache, but in the wrong
@@ -497,24 +497,24 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
*/
if (cache->start < new_cache_start && new_cache_start < cache->end) {
-
- /* case one: the common area is at the end of the existing cache. move it
+
+ /* case one: the common area is at the end of the existing cache. move it
to the beginning of the cache, and set up to refill whatever remains.
-
-
+
+
wv->cache_start wv->cache_end
|-------------------------------------------------------| cache
|--------------------------------| requested
<------------------->
"present"
- new_cache_start new_cache_end
+ new_cache_start new_cache_end
*/
-
+
present_frames = cache->end - new_cache_start;
present_entries = (gulong) floor (present_frames / waveview->samples_per_unit);
-#if DEBUG_CACHE
+#if DEBUG_CACHE
fprintf (stderr, "existing material at end of current cache, move to start of new cache\n"
"\tcopy from %lu to start\n", cache->data_size - present_entries);
#endif
@@ -522,7 +522,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
memmove (&cache->data[0],
&cache->data[cache->data_size - present_entries],
present_entries * sizeof (GnomeCanvasWaveViewCacheEntry));
-
+
#if DEBUG_CACHE
fprintf (stderr, "satisfied %lu of %lu frames, offset = %lu, will start at %lu (ptr = 0x%x)\n",
present_frames, required_frames, present_entries, new_cache_start + present_entries,
@@ -536,8 +536,8 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
} else if (new_cache_end > cache->start && new_cache_end < cache->end) {
- /* case two: the common area lives at the beginning of the existing cache.
-
+ /* case two: the common area lives at the beginning of the existing cache.
+
wv->cache_start wv->cache_end
|-----------------------------------------------------|
|--------------------------------|
@@ -546,15 +546,15 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
new_cache_start new_cache_end
*/
-
+
present_frames = new_cache_end - cache->start;
present_entries = (gulong) floor (present_frames / waveview->samples_per_unit);
memmove (&cache->data[cache->data_size - present_entries],
&cache->data[0],
present_entries * sizeof (GnomeCanvasWaveViewCacheEntry));
-
-#if DEBUG_CACHE
+
+#if DEBUG_CACHE
fprintf (stderr, "existing material at start of current cache, move to start of end cache\n");
#endif
@@ -568,7 +568,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
offset = 0;
required_frames -= present_frames;
-
+
} else {
copied = 0;
offset = 0;
@@ -605,7 +605,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
waveview->peak_function (waveview->data_src, npeaks, new_cache_start, required_frames, cache->data + offset, waveview->channel,waveview->samples_per_unit);
/* take into account any copied peaks */
-
+
npeaks += copied;
} else {
npeaks = copied;
@@ -634,15 +634,15 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
}
free (gain);
-
+
}
/* do optional log scaling. this implementation is not particularly efficient */
-
+
if (waveview->logscaled) {
guint32 n;
GnomeCanvasWaveViewCacheEntry* buf = cache->data;
-
+
for (n = 0; n < cache->data_size; ++n) {
if (buf[n].max > 0.0f) {
@@ -650,7 +650,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
} else if (buf[n].max < 0.0f) {
buf[n].max = -alt_log_meter(fast_coefficient_to_dB(-buf[n].max));
}
-
+
if (buf[n].min > 0.0f) {
buf[n].min = alt_log_meter(fast_coefficient_to_dB(buf[n].min));
} else if (buf[n].min < 0.0f) {
@@ -664,7 +664,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
out:
#if DEBUG_CACHE
- fprintf (stderr, "return cache index = %d\n",
+ fprintf (stderr, "return cache index = %d\n",
(guint32) floor ((((double) (start_sample - cache->start)) / waveview->samples_per_unit) + 0.5));
#endif
return (guint32) floor ((((double) (start_sample - cache->start)) / waveview->samples_per_unit) + 0.5);
@@ -680,7 +680,7 @@ gnome_canvas_waveview_set_data_src (GnomeCanvasWaveView *waveview, void *data_sr
waveview->reload_cache_in_render = TRUE;
return;
}
-
+
waveview->cache->start = 0;
waveview->cache->end = 0;
}
@@ -694,11 +694,11 @@ gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *waveview, guint32 chan)
if (waveview->channel == chan) {
return;
}
-
+
waveview->channel = chan;
}
-static void
+static void
gnome_canvas_waveview_reset_bounds (GnomeCanvasItem *item)
{
@@ -727,8 +727,8 @@ gnome_canvas_waveview_reset_bounds (GnomeCanvasItem *item)
gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
}
-/*
- * CANVAS CALLBACKS
+/*
+ * CANVAS CALLBACKS
*/
static void
@@ -739,7 +739,7 @@ gnome_canvas_waveview_set_property (GObject *object,
{
(void) pspec;
-
+
GnomeCanvasItem *item;
GnomeCanvasWaveView *waveview;
int redraw = FALSE;
@@ -929,8 +929,8 @@ gnome_canvas_waveview_get_property (
GValue *value,
GParamSpec *pspec)
{
-
-
+
+
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_WAVEVIEW (object));
@@ -1083,7 +1083,7 @@ gnome_canvas_waveview_update (GnomeCanvasItem *item, double *affine, ArtSVP *cli
&waveview->fill_a);
// check_cache (waveview, "end of update");
-}
+}
static void
gnome_canvas_waveview_render (GnomeCanvasItem *item,
@@ -1186,7 +1186,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
clip_length = MIN(5,(waveview->height/4));
- /*
+ /*
Now draw each line, clipping it appropriately. The clipping
is done by the macros PAINT_FOO().
*/
@@ -1240,40 +1240,40 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
guint index = cache_index + (end - begin);
if (index >= waveview->cache->data_size) {
-
+
/* the data we want is off the end of the cache, which must mean its beyond
the end of the region's source; hence the peak values are 0 */
last_pymax = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
last_pymin = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
-
+
} else {
-
+
last_pymax = (int) rint ((item->y1 + origin - MIN(waveview->cache->data[index].max, 1.0) * half_height) * item->canvas->pixels_per_unit);
last_pymin = (int) rint ((item->y1 + origin - MAX(waveview->cache->data[index].min, -1.0) * half_height) * item->canvas->pixels_per_unit);
-
+
}
-
+
}
- /*
+ /*
* initialize NEXT* variables for the first run, duplicated in the loop for speed
*/
max = waveview->cache->data[cache_index].max;
min = waveview->cache->data[cache_index].min;
-
+
if (max >= 1.0) {
max = 1.0;
next_clip_max = 1;
}
-
+
if (min <= -1.0) {
min = -1.0;
next_clip_min = 1;
}
-
+
max *= half_height;
min *= half_height;
-
+
next_pymax = (int) rint ((item->y1 + origin - max) * item->canvas->pixels_per_unit);
next_pymin = (int) rint ((item->y1 + origin - min) * item->canvas->pixels_per_unit);
@@ -1311,7 +1311,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
max = 1.0;
next_clip_max = 1;
}
-
+
if (min <= -1.0) {
min = -1.0;
next_clip_min = 1;
@@ -1319,11 +1319,11 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
max *= half_height;
min *= half_height;
-
+
next_pymax = (int) rint ((item->y1 + origin - max) * item->canvas->pixels_per_unit);
next_pymin = (int) rint ((item->y1 + origin - min) * item->canvas->pixels_per_unit);
}
-
+
/* render */
if (pymax == pymin) {
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin);
@@ -1370,7 +1370,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
if (clip_max) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
}
-
+
if (clip_min) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymin-clip_length, pymin);
}
@@ -1426,7 +1426,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
if(last_pymax < 0) {
/* take the index of one sample right of what we render */
int index = cache_index + (end - begin);
-
+
max = MIN(waveview->cache->data[index].max, 1.0);
min = MAX(waveview->cache->data[index].min, -1.0);
@@ -1437,26 +1437,26 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
last_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
}
- /*
+ /*
* initialize NEXT* variables for the first run, duplicated in the loop for speed
*/
max = waveview->cache->data[cache_index].max;
min = waveview->cache->data[cache_index].min;
-
+
if (max >= 1.0) {
max = 1.0;
next_clip_max = 1;
}
-
+
if (min <= -1.0) {
min = -1.0;
next_clip_min = 1;
}
-
+
if (fabs (min) > fabs (max)) {
max = fabs (min);
- }
-
+ }
+
next_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
/*
@@ -1479,24 +1479,24 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
max = waveview->cache->data[cache_index].max;
min = waveview->cache->data[cache_index].min;
-
+
if (max >= 1.0) {
max = 1.0;
next_clip_max = 1;
}
-
+
if (min <= -1.0) {
min = -1.0;
next_clip_min = 1;
}
-
+
if (fabs (min) > fabs (max)) {
max = fabs (min);
- }
-
+ }
+
next_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
}
-
+
/* render */
if (pymax == pymin) {
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin);
@@ -1528,7 +1528,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
if (clip_max) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
}
-
+
if (clip_min) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymin-clip_length, pymin);
}
@@ -1540,68 +1540,68 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
for (x = begin; x < end; x++) {
-
+
double max, min;
int clip_max, clip_min;
-
+
clip_max = 0;
clip_min = 0;
-
+
max = waveview->cache->data[cache_index].max;
min = waveview->cache->data[cache_index].min;
-
+
if (max >= 1.0) {
max = 1.0;
clip_max = 1;
}
-
+
if (min <= -1.0) {
min = -1.0;
clip_min = 1;
}
-
+
if (rectify) {
-
+
if (fabs (min) > fabs (max)) {
max = fabs (min);
- }
-
+ }
+
max = max * waveview->height;
-
+
pymax = (int) rint ((item->y1 + waveview->height - max) * item->canvas->pixels_per_unit);
pymin = (int) rint ((item->y1 + waveview->height) * item->canvas->pixels_per_unit);
-
+
} else {
-
+
max = max * half_height;
min = min * half_height;
-
+
pymax = (int) rint ((item->y1 + origin - max) * item->canvas->pixels_per_unit);
pymin = (int) rint ((item->y1 + origin - min) * item->canvas->pixels_per_unit);
}
-
+
/* OK, now fill the RGB buffer at x=i with a line between pymin and pymax,
or, if samples_per_unit == 1, then a dot at each location.
*/
-
+
if (pymax == pymin) {
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin);
} else {
PAINT_VERTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax, pymin);
}
-
+
/* show clipped waveforms with small red lines */
-
+
if (clip_max) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
}
-
+
if (clip_min) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymin-clip_length, pymin);
}
/* presto, we're done */
-
+
cache_index++;
}
}
@@ -1609,7 +1609,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
if (!waveview->rectified && waveview->zero_line) {
// Paint zeroline.
//PAINT_HORIZA(buf, waveview->zero_r, waveview->zero_g, waveview->zero_b, waveview->zero_a, begin, endi-1, origin );
-
+
unsigned char zero_r, zero_g, zero_b, zero_a;
UINT_TO_RGBA( waveview->zero_color, &zero_r, &zero_g, &zero_b, &zero_a );
int zeroline_y = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
@@ -1718,7 +1718,7 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
printf ("%p r (%d,%d)(%d,%d)[%d x %d] bbox (%d,%d)(%d,%d)[%d x %d]"
" draw (%.1f,%.1f)(%.1f,%.1f)[%.1f x %.1f] s= %lu..%lu\n",
waveview,
- x, y,
+ x, y,
x + width,
y + height,
width,
@@ -1737,7 +1737,7 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
#endif
/* draw the top half */
-
+
for (xoff = ulx; xoff < lrx; xoff++) {
double max, min;
@@ -1747,19 +1747,19 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
if (min <= -1.0) {
min = -1.0;
}
-
+
if (max >= 1.0) {
max = 1.0;
}
-
+
if (rectify) {
if (fabs (min) > fabs (max)) {
max = fabs (min);
- }
- }
-
+ }
+ }
+
yoff = origin - (waveview->half_height * max) + 0.5;
-
+
if (xoff == ulx) {
/* first point */
cairo_move_to (cr, xoff+0.5, yoff);
@@ -1771,9 +1771,9 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
}
/* from the final top point, move out of the clip zone */
-
+
cairo_line_to (cr, xoff + 10, yoff);
-
+
/* now draw the bottom half */
for (--xoff, --cache_index; xoff >= ulx; --xoff) {
@@ -1794,23 +1794,23 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
/* from the final lower point, move out of the clip zone */
cairo_line_to (cr, xoff - 10, yoff);
-
+
/* close path to fill */
cairo_close_path (cr);
/* fill and stroke */
- cairo_set_source_rgba (cr,
- (waveview->fill_r/255.0),
- (waveview->fill_g/255.0),
- (waveview->fill_b/255.0),
+ cairo_set_source_rgba (cr,
+ (waveview->fill_r/255.0),
+ (waveview->fill_g/255.0),
+ (waveview->fill_b/255.0),
(waveview->fill_a/255.0));
cairo_fill_preserve (cr);
- cairo_set_source_rgba (cr,
- (waveview->wave_r/255.0),
- (waveview->wave_g/255.0),
- (waveview->wave_b/255.0),
+ cairo_set_source_rgba (cr,
+ (waveview->wave_r/255.0),
+ (waveview->wave_g/255.0),
+ (waveview->wave_b/255.0),
(waveview->wave_a/255.0));
cairo_stroke (cr);
@@ -1827,13 +1827,13 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
cairo_line_to (cr, xoff, yoff1 + clip_length);
cairo_stroke (cr);
}
-
+
if (clip_min) {
cairo_move_to (cr, xoff, yoff2);
cairo_line_to (cr, xoff, yoff2 - clip_length);
cairo_stroke (cr);
}
-
+
#endif
static void
@@ -1856,7 +1856,7 @@ gnome_canvas_waveview_bounds (GnomeCanvasItem *item, double *x1, double *y1, dou
gnome_canvas_item_i2w (item, &x, &y);
gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x, y, &c, &d);
printf ("item bounds now (%g,%g),(%g,%g)\n", a, b, c, d);
-#endif
+#endif
}
@@ -1869,8 +1869,8 @@ gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx,
(void) cx;
(void) cy;
(void) actual_item;
-
- /* XXX for now, point is never inside the wave
+
+ /* XXX for now, point is never inside the wave
GnomeCanvasWaveView *waveview;
double x1, y1, x2, y2;
double dx, dy;
@@ -1888,7 +1888,7 @@ gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx,
gnome_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
/* Is point inside rectangle */
-
+
if ((x >= x1) && (y >= y1) && (x <= x2) && (y <= y2)) {
return 0.0;
}
diff --git a/gtk2_ardour/canvas-waveview.h b/gtk2_ardour/canvas-waveview.h
index 520e9b3e17..89c193a440 100644
--- a/gtk2_ardour/canvas-waveview.h
+++ b/gtk2_ardour/canvas-waveview.h
@@ -59,7 +59,7 @@ struct _GnomeCanvasWaveViewCache
guint64 data_size;
gulong start;
gulong end;
-};
+};
GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new ();
void gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache*);
@@ -67,7 +67,7 @@ void gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveView
struct _GnomeCanvasWaveView
{
GnomeCanvasItem item;
-
+
GnomeCanvasWaveViewCache *cache;
gboolean cache_updater;
gint screen_width;
@@ -82,9 +82,9 @@ struct _GnomeCanvasWaveView
/** 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.
*
@@ -107,7 +107,7 @@ struct _GnomeCanvasWaveView
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().
diff --git a/gtk2_ardour/canvas.h b/gtk2_ardour/canvas.h
index 3c5b17d999..1bf3be96d2 100644
--- a/gtk2_ardour/canvas.h
+++ b/gtk2_ardour/canvas.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/canvas_impl.h b/gtk2_ardour/canvas_impl.h
index 377ac02998..d8f9a63ad5 100644
--- a/gtk2_ardour/canvas_impl.h
+++ b/gtk2_ardour/canvas_impl.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/control_point.cc b/gtk2_ardour/control_point.cc
index 5893c29e28..047417d82a 100644
--- a/gtk2_ardour/control_point.cc
+++ b/gtk2_ardour/control_point.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2007 Paul Davis
+ Copyright (C) 2002-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force
_item->property_fill() = false;
_item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get();
_item->property_outline_pixels() = 1;
-
+
/* NOTE: no event handling in copied ControlPoints */
hide ();
@@ -111,7 +111,7 @@ ControlPoint::set_visible (bool yn)
{
_item->property_draw() = (gboolean) yn;
}
-
+
void
ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t vi, ShapeType shape)
{
@@ -157,7 +157,7 @@ ControlPoint::set_size (double sz)
{
_size = sz;
-#if 0
+#if 0
if (_size > 6.0) {
item->property_fill() = (gboolean) TRUE;
} else {
diff --git a/gtk2_ardour/control_point.h b/gtk2_ardour/control_point.h
index d8c18f10b3..f2ff37ea6d 100644
--- a/gtk2_ardour/control_point.h
+++ b/gtk2_ardour/control_point.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2007 Paul Davis
+ Copyright (C) 2002-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ namespace Gnome {
}
}
-class ControlPoint
+class ControlPoint
{
public:
ControlPoint (AutomationLine& al);
@@ -54,13 +54,13 @@ class ControlPoint
Start,
End
};
-
+
void move_to (double x, double y, ShapeType);
void reset (double x, double y, ARDOUR::AutomationList::iterator, uint32_t, ShapeType);
double get_x() const { return _x; }
double get_y() const { return _y; }
- void hide ();
+ void hide ();
void show ();
void show_color (bool entered, bool hide_too);
@@ -73,7 +73,7 @@ class ControlPoint
void set_selected(bool yn) { _selected = yn; }
uint32_t view_index() const { return _view_index; }
void set_view_index(uint32_t i) { _view_index = i; }
-
+
ARDOUR::AutomationList::iterator model() const { return _model; }
AutomationLine& line() const { return _line; }
ArdourCanvas::Item* item() const { return _item; }
diff --git a/gtk2_ardour/control_point_dialog.cc b/gtk2_ardour/control_point_dialog.cc
index e61be312a3..178b2f5feb 100644
--- a/gtk2_ardour/control_point_dialog.cc
+++ b/gtk2_ardour/control_point_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2008 Paul Davis
+ Copyright (C) 2000-2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,9 +36,9 @@ ControlPointDialog::ControlPointDialog (ControlPoint* p)
assert (point_);
double const y_fraction = 1.0 - (p->get_y () / p->line().height ());
-
+
value_.set_text (p->line().fraction_to_string (y_fraction));
-
+
Gtk::HBox* b = Gtk::manage (new Gtk::HBox ());
b->pack_start (*Gtk::manage (new Gtk::Label (_("Value"))));
@@ -47,7 +47,7 @@ ControlPointDialog::ControlPointDialog (ControlPoint* p)
if (p->line ().get_uses_gain_mapping ()) {
b->pack_start (*Gtk::manage (new Gtk::Label (_("dB"))));
}
-
+
get_vbox ()->pack_end (*b);
b->show_all ();
diff --git a/gtk2_ardour/control_point_dialog.h b/gtk2_ardour/control_point_dialog.h
index 8bb58883db..6fc337926d 100644
--- a/gtk2_ardour/control_point_dialog.h
+++ b/gtk2_ardour/control_point_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2008 Paul Davis
+ Copyright (C) 2000-2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc
index 19723b6241..cc8d487185 100644
--- a/gtk2_ardour/crossfade_edit.cc
+++ b/gtk2_ardour/crossfade_edit.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -85,7 +85,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
preroll_button (_("With Pre-roll")),
postroll_button (_("With Post-roll")),
-
+
miny (my),
maxy (mxy),
@@ -124,7 +124,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
canvas = new ArdourCanvas::CanvasAA ();
canvas->signal_size_allocate().connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation));
canvas->set_size_request (425, 200);
-
+
toplevel = new ArdourCanvas::SimpleRect (*(canvas->root()));
toplevel->property_x1() = 0.0;
toplevel->property_y1() = 0.0;
@@ -134,21 +134,21 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
toplevel->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorBase.get();
toplevel->property_outline_pixels() = 0;
toplevel->signal_event().connect (mem_fun (*this, &CrossfadeEditor::canvas_event));
-
+
fade[Out].line = new ArdourCanvas::Line (*(canvas->root()));
fade[Out].line->property_width_pixels() = 1;
fade[Out].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLine.get();
-
+
fade[Out].shading = new ArdourCanvas::Polygon (*(canvas->root()));
fade[Out].shading->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLineShading.get();
fade[In].line = new ArdourCanvas::Line (*(canvas->root()));
fade[In].line->property_width_pixels() = 1;
fade[In].line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLine.get();
-
+
fade[In].shading = new ArdourCanvas::Polygon (*(canvas->root()));
fade[In].shading->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeEditorLineShading.get();
-
+
fade[In].shading->signal_event().connect (mem_fun (*this, &CrossfadeEditor::canvas_event));
fade[In].line->signal_event().connect (mem_fun (*this, &CrossfadeEditor::curve_event));
fade[Out].shading->signal_event().connect (mem_fun (*this, &CrossfadeEditor::canvas_event));
@@ -161,7 +161,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
select_out_button.signal_clicked().connect (bind (mem_fun (*this, &CrossfadeEditor::curve_select_clicked), Out));
HBox* acbox = manage (new HBox);
-
+
audition_box.set_border_width (7);
audition_box.set_spacing (5);
audition_box.set_homogeneous (false);
@@ -172,7 +172,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
audition_box.pack_start (audition_right_dry_button, false, false);
Frame* audition_frame = manage (new Frame (_("Audition")));
-
+
audition_frame->set_name (X_("CrossfadeEditFrame"));
audition_frame->add (audition_box);
@@ -271,7 +271,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
curve_button_box.pack_start (fade_out_table, false, false, 12);
curve_button_box.pack_start (*vpacker2, false, false, 12);
curve_button_box.pack_start (fade_in_table, false, false, 12);
-
+
get_vbox()->pack_start (*canvas_frame, true, true);
get_vbox()->pack_start (curve_button_box, false, false);
@@ -339,7 +339,7 @@ CrossfadeEditor::set (const ARDOUR::AutomationList& curve, WhichFade which)
for (list<Point*>::iterator i = fade[which].points.begin(); i != fade[which].points.end(); ++i) {
delete *i;
}
-
+
fade[which].points.clear ();
fade[which].gain_curve.clear ();
fade[which].normative_curve.clear ();
@@ -347,30 +347,30 @@ CrossfadeEditor::set (const ARDOUR::AutomationList& curve, WhichFade which)
if (curve.empty()) {
goto out;
}
-
+
the_end = curve.end();
--the_end;
-
+
firstx = (*curve.begin())->when;
endx = (*the_end)->when;
for (ARDOUR::AutomationList::const_iterator i = curve.begin(); i != curve.end(); ++i) {
-
+
double xfract = ((*i)->when - firstx) / (endx - firstx);
double yfract = ((*i)->value - miny) / (maxy - miny);
-
+
Point* p = make_point ();
p->move_to (x_coordinate (xfract), y_coordinate (yfract),
xfract, yfract);
-
+
fade[which].points.push_back (p);
}
/* no need to sort because curve is already time-ordered */
out:
-
+
swap (which, current);
redraw ();
swap (which, current);
@@ -402,7 +402,7 @@ CrossfadeEditor::point_event (GdkEvent* event, Point* point)
if (Keyboard::is_delete_event (&event->button)) {
fade[current].points.remove (point);
delete point;
- }
+ }
redraw ();
break;
@@ -420,7 +420,7 @@ CrossfadeEditor::point_event (GdkEvent* event, Point* point)
}
new_y = 1.0 - ((event->motion.y - canvas_border)/effective_height());
- point->move_to (x_coordinate (new_x), y_coordinate (new_y),
+ point->move_to (x_coordinate (new_x), y_coordinate (new_y),
new_x, new_y);
redraw ();
}
@@ -465,7 +465,7 @@ CrossfadeEditor::make_point ()
p->curve = fade[current].line;
p->box->signal_event().connect (bind (mem_fun (*this, &CrossfadeEditor::point_event), p));
-
+
return p;
}
@@ -475,12 +475,12 @@ CrossfadeEditor::add_control_point (double x, double y)
PointSorter cmp;
/* enforce end point x location */
-
+
if (fade[current].points.empty()) {
x = 0.0;
} else if (fade[current].points.size() == 1) {
x = 1.0;
- }
+ }
Point* p = make_point ();
@@ -518,9 +518,9 @@ CrossfadeEditor::canvas_allocation (Gtk::Allocation& /*alloc*/)
toplevel->property_x2() = (double) canvas->get_allocation().get_width() + canvas_border;
toplevel->property_y2() = (double) canvas->get_allocation().get_height() + canvas_border;
}
-
- canvas->set_scroll_region (0.0, 0.0,
- canvas->get_allocation().get_width(),
+
+ canvas->set_scroll_region (0.0, 0.0,
+ canvas->get_allocation().get_width(),
canvas->get_allocation().get_height());
Point* end = make_point ();
@@ -547,9 +547,9 @@ CrossfadeEditor::canvas_allocation (Gtk::Allocation& /*alloc*/)
(*i)->move_to (x_coordinate((*i)->x), y_coordinate((*i)->y),
(*i)->x, (*i)->y);
}
-
+
end = make_point ();
-
+
if (fade[Out].points.size() > 1) {
Point* old_end = fade[Out].points.back();
fade[Out].points.pop_back ();
@@ -572,7 +572,7 @@ CrossfadeEditor::canvas_allocation (Gtk::Allocation& /*alloc*/)
y_coordinate ((*i)->y),
(*i)->x, (*i)->y);
}
-
+
WhichFade old_current = current;
current = In;
redraw ();
@@ -655,7 +655,7 @@ CrossfadeEditor::redraw ()
float vec[npoints];
fade[current].normative_curve.curve().get_vector (0, 1.0, vec, npoints);
-
+
ArdourCanvas::Points pts;
ArdourCanvas::Points spts;
@@ -687,11 +687,11 @@ CrossfadeEditor::redraw ()
spts[2].set_x (effective_width() + canvas_border);
spts[2].set_y (canvas_border);
-
+
} else {
/* upper left */
-
+
spts[0].set_x (canvas_border);
spts[0].set_y (canvas_border);
@@ -712,7 +712,7 @@ CrossfadeEditor::redraw ()
for (size_t i = 0; i < npoints; ++i) {
double y = vec[i];
-
+
pts[i].set_x (canvas_border + i);
pts[i].set_y (y_coordinate (y));
@@ -731,20 +731,20 @@ CrossfadeEditor::redraw ()
void
CrossfadeEditor::apply_preset (Preset *preset)
{
-
+
WhichFade wf = find(fade_in_presets->begin(), fade_in_presets->end(), preset) != fade_in_presets->end() ? In : Out;
-
+
if (current != wf) {
-
+
if (wf == In) {
select_in_button.clicked();
} else {
select_out_button.clicked();
}
-
+
curve_select_clicked (wf);
- }
-
+ }
+
for (list<Point*>::iterator i = fade[current].points.begin(); i != fade[current].points.end(); ++i) {
delete *i;
}
@@ -910,7 +910,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.976959, 0.697222));
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
-
+
p = new Preset ("Slow cut", "crossfade-in-slow-cut");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.304147, 0.0694444));
@@ -920,7 +920,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.919355, 0.730556));
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
-
+
p = new Preset ("Fast cut", "crossfade-in-fast-cut");
p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.0737327, 0.308333));
@@ -942,7 +942,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p);
}
-
+
/* FADE OUT */
// p = new Preset ("regout.xpm");
@@ -985,7 +985,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.833333, 0.282192));
p->push_back (PresetPoint (1.000000, 0.000000));
fade_out_presets->push_back (p);
-
+
if (!Profile->get_sae()) {
// p = new Preset ("hiout.xpm");
p = new Preset ("Short cut", "crossfade-out-short-cut");
@@ -997,7 +997,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.976852, 0.22865));
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
-
+
p = new Preset ("Slow cut", "crossfade-out-slow-cut");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.228111, 0.988889));
@@ -1007,7 +1007,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.9262673, 0.308333));
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
-
+
p = new Preset ("Fast cut", "crossfade-out-fast-cut");
p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.080645, 0.730556));
@@ -1016,7 +1016,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.695853, 0.0694444));
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
-
+
// p = new Preset ("loout.xpm");
p = new Preset ("Long cut", "crossfade-out-long-cut");
p->push_back (PresetPoint (0, 1));
@@ -1027,7 +1027,7 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (0.610599, 0.0333333));
p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p);
-
+
}
}
@@ -1035,9 +1035,9 @@ void
CrossfadeEditor::curve_select_clicked (WhichFade wf)
{
current = wf;
-
+
if (wf == In) {
-
+
for (vector<ArdourCanvas::WaveView*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
(*i)->property_wave_color() = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorWave.get();
(*i)->property_fill_color() = ARDOUR_UI::config()->canvasvar_SelectedCrossfadeEditorWave.get();
@@ -1081,7 +1081,7 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
(*i)->box->hide();
}
-
+
for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
(*i)->box->show();
}
@@ -1089,7 +1089,7 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
}
}
-double
+double
CrossfadeEditor::x_coordinate (double& xfract) const
{
xfract = min (1.0, xfract);
@@ -1125,9 +1125,9 @@ CrossfadeEditor::make_waves (boost::shared_ptr<AudioRegion> region, WhichFade wh
spu = xfade->length() / (double) effective_width();
for (uint32_t n = 0; n < nchans; ++n) {
-
+
gdouble yoff = n * ht;
-
+
if (region->audio_source(n)->peaks_ready (bind (mem_fun(*this, &CrossfadeEditor::peaks_ready), region, which), peaks_ready_connection)) {
WaveView* waveview = new WaveView (*(canvas->root()));
@@ -1147,7 +1147,7 @@ CrossfadeEditor::make_waves (boost::shared_ptr<AudioRegion> region, WhichFade wh
waveview->property_amplitude_above_axis() = 2.0;
waveview->property_wave_color() = color;
waveview->property_fill_color() = color;
-
+
if (which==In)
waveview->property_region_start() = region->start();
else
@@ -1212,11 +1212,11 @@ CrossfadeEditor::audition (Audition which)
right_length = xfade->in()->length();
}
- boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->out(), left_start_offset, left_length, "xfade out",
+ boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->out(), left_start_offset, left_length, "xfade out",
0, Region::DefaultFlags, false)));
- boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->in(), 0, right_length, "xfade in",
+ boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->in(), 0, right_length, "xfade in",
0, Region::DefaultFlags, false)));
-
+
//apply a 20ms declicking fade at the start and end of auditioning
left->set_fade_in_active(true);
left->set_fade_in_length(session.frame_rate() / 50);
@@ -1225,7 +1225,7 @@ CrossfadeEditor::audition (Audition which)
pl.add_region (left, 0);
pl.add_region (right, 1 + preroll);
-
+
if (which == Left) {
right->set_scale_amplitude (0.0);
} else if (which == Right) {
@@ -1247,9 +1247,9 @@ CrossfadeEditor::audition_both ()
void
CrossfadeEditor::audition_left_dry ()
{
- boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->out(), xfade->out()->length() - xfade->length(), xfade->length(), "xfade left",
+ boost::shared_ptr<AudioRegion> left (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->out(), xfade->out()->length() - xfade->length(), xfade->length(), "xfade left",
0, Region::DefaultFlags, false)));
-
+
session.audition_region (left);
}
@@ -1262,7 +1262,7 @@ CrossfadeEditor::audition_left ()
void
CrossfadeEditor::audition_right_dry ()
{
- boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->in(), 0, xfade->length(), "xfade in",
+ boost::shared_ptr<AudioRegion> right (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (xfade->in(), 0, xfade->length(), "xfade in",
0, Region::DefaultFlags, false)));
session.audition_region (right);
}
@@ -1272,7 +1272,7 @@ CrossfadeEditor::audition_right ()
{
audition (Right);
}
-
+
void
CrossfadeEditor::cancel_audition ()
{
@@ -1298,7 +1298,7 @@ void
CrossfadeEditor::audition_right_toggled ()
{
bool x;
-
+
if ((x = audition_right_button.get_active ()) != session.is_auditioning()) {
if (x) {
@@ -1345,7 +1345,7 @@ CrossfadeEditor::audition_left_dry_toggled ()
bool x;
if ((x = audition_left_dry_button.get_active ()) != session.is_auditioning()) {
-
+
if (x) {
audition_left_dry ();
} else {
diff --git a/gtk2_ardour/crossfade_edit.h b/gtk2_ardour/crossfade_edit.h
index 694625a9b5..f2ec1a125b 100644
--- a/gtk2_ardour/crossfade_edit.h
+++ b/gtk2_ardour/crossfade_edit.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,69 +42,69 @@ class CrossfadeEditor : public ArdourDialog
public:
CrossfadeEditor (ARDOUR::Session&, boost::shared_ptr<ARDOUR::Crossfade>, double miny, double maxy);
~CrossfadeEditor ();
-
+
void apply ();
-
+
static const double canvas_border;
-
+
/* these are public so that a caller/subclass can make them do the right thing.
*/
-
+
Gtk::Button* cancel_button;
Gtk::Button* ok_button;
-
+
struct PresetPoint {
double x;
double y;
-
- PresetPoint (double a, double b)
+
+ PresetPoint (double a, double b)
: x (a), y (b) {}
};
-
+
struct Preset : public std::list<PresetPoint> {
const char* name;
const char* image_name;
Preset (const char* n, const char* x) : name (n), image_name (x) {}
};
-
+
typedef std::list<Preset*> Presets;
-
+
static Presets* fade_in_presets;
static Presets* fade_out_presets;
protected:
bool on_key_press_event (GdkEventKey*);
bool on_key_release_event (GdkEventKey*);
-
+
private:
boost::shared_ptr<ARDOUR::Crossfade> xfade;
ARDOUR::Session& session;
-
+
Gtk::VBox vpacker;
-
+
struct Point {
~Point();
-
+
ArdourCanvas::SimpleRect* box;
ArdourCanvas::Line* curve;
double x;
double y;
-
+
static const int32_t size;
-
+
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;
}
};
-
+
ArdourCanvas::SimpleRect* toplevel;
ArdourCanvas::Canvas* canvas;
-
+
struct Half {
ArdourCanvas::Line* line;
ArdourCanvas::Polygon* shading;
@@ -112,18 +112,18 @@ class CrossfadeEditor : public ArdourDialog
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 {
In = 0,
Out = 1
};
-
+
Half fade[2];
WhichFade current;
-
+
bool point_grabbed;
std::vector<Gtk::Button*> fade_out_buttons;
std::vector<Gtk::Button*> fade_in_buttons;
@@ -154,7 +154,7 @@ class CrossfadeEditor : public ArdourDialog
void add_control_point (double x, double y);
Point* make_point ();
void redraw ();
-
+
double effective_width () const { return canvas->get_allocation().get_width() - (2.0 * canvas_border); }
double effective_height () const { return canvas->get_allocation().get_height() - (2.0 * canvas_border); }
@@ -169,7 +169,7 @@ class CrossfadeEditor : public ArdourDialog
void build_presets ();
void apply_preset (Preset*);
-
+
Gtk::RadioButton select_in_button;
Gtk::RadioButton select_out_button;
Gtk::HBox curve_button_box;
@@ -179,25 +179,25 @@ class CrossfadeEditor : public ArdourDialog
double x_coordinate (double& xfract) const;
double y_coordinate (double& yfract) const;
-
+
void set (const ARDOUR::AutomationList& alist, WhichFade);
sigc::connection peaks_ready_connection;
void make_waves (boost::shared_ptr<ARDOUR::AudioRegion>, WhichFade);
void peaks_ready (boost::shared_ptr<ARDOUR::AudioRegion> r, WhichFade);
-
+
void _apply_to (boost::shared_ptr<ARDOUR::Crossfade> xf);
void setup (boost::shared_ptr<ARDOUR::Crossfade>);
void cancel_audition ();
void audition_state_changed (bool);
-
+
enum Audition {
Both,
Left,
Right
};
-
+
void audition_toggled ();
void audition_right_toggled ();
void audition_right_dry_toggled ();
diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc
index 152e1bf5c0..e03c8ed478 100644
--- a/gtk2_ardour/crossfade_view.cc
+++ b/gtk2_ardour/crossfade_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,21 +42,21 @@ using namespace Canvas;
sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway;
-CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
- RouteTimeAxisView &tv,
- boost::shared_ptr<Crossfade> xf,
+CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
+ RouteTimeAxisView &tv,
+ boost::shared_ptr<Crossfade> xf,
double spu,
Gdk::Color& basic_color,
AudioRegionView& lview,
AudioRegionView& rview)
-
- : TimeAxisViewItem ("xfade" /*xf.name()*/, *parent, tv, spu, basic_color, xf->position(),
+
+ : TimeAxisViewItem ("xfade" /*xf.name()*/, *parent, tv, spu, basic_color, xf->position(),
xf->length(), false, TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowFrame)),
crossfade (xf),
left_view (lview),
right_view (rview)
-
+
{
_valid = true;
_visible = true;
@@ -68,7 +68,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
fade_out = new Line (*group);
fade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeLine.get();
fade_out->property_width_pixels() = 1;
-
+
set_height (get_time_axis_view().current_height());
/* no frame around the xfade or overlap rects */
@@ -79,9 +79,9 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
vestigial_frame->hide();
show_vestigial = false;
-
+
group->signal_event().connect (bind (mem_fun (tv.editor(), &PublicEditor::canvas_crossfade_view_event), group, this));
-
+
crossfade_changed (Change (~0));
crossfade->StateChanged.connect (mem_fun(*this, &CrossfadeView::crossfade_changed));
@@ -139,7 +139,7 @@ CrossfadeView::crossfade_changed (Change what_changed)
if (what_changed & Crossfade::FollowOverlapChanged) {
need_redraw_curves = true;
}
-
+
if (what_changed & Crossfade::ActiveChanged) {
/* calls redraw_curves */
active_changed ();
@@ -151,7 +151,7 @@ CrossfadeView::crossfade_changed (Change what_changed)
void
CrossfadeView::redraw_curves ()
{
- Points* points;
+ Points* points;
int32_t npoints;
float* vec;
@@ -177,7 +177,7 @@ CrossfadeView::redraw_curves ()
} else {
fade_in->show();
fade_out->show();
- }
+ }
points = get_canvas_points ("xfade edit redraw", npoints);
vec = new float[npoints];
diff --git a/gtk2_ardour/crossfade_view.h b/gtk2_ardour/crossfade_view.h
index 2d9c5e4b2d..3e4021742e 100644
--- a/gtk2_ardour/crossfade_view.h
+++ b/gtk2_ardour/crossfade_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,10 +32,10 @@ class AudioRegionView;
struct CrossfadeView : public TimeAxisViewItem
{
- CrossfadeView (ArdourCanvas::Group*,
+ CrossfadeView (ArdourCanvas::Group*,
RouteTimeAxisView&,
boost::shared_ptr<ARDOUR::Crossfade>,
- double initial_samples_per_unit,
+ double initial_samples_per_unit,
Gdk::Color& basic_color,
AudioRegionView& leftview,
AudioRegionView& rightview);
@@ -59,7 +59,7 @@ struct CrossfadeView : public TimeAxisViewItem
void fake_hide ();
void hide ();
void show ();
-
+
protected:
void reset_width_dependent_items (double pixel_width);
diff --git a/gtk2_ardour/crossfade_xpms.h b/gtk2_ardour/crossfade_xpms.h
index e353dcb38b..f32d84e369 100644
--- a/gtk2_ardour/crossfade_xpms.h
+++ b/gtk2_ardour/crossfade_xpms.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/curvetest.cc b/gtk2_ardour/curvetest.cc
index d93d75504f..498ed45eba 100644
--- a/gtk2_ardour/curvetest.cc
+++ b/gtk2_ardour/curvetest.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ curvetest (string filename)
in >> x;
in >> y;
-
+
if (!in) {
break;
}
@@ -58,11 +58,11 @@ curvetest (string filename)
if (x < minx) {
minx = x;
}
-
+
if (x > maxx) {
maxx = x;
}
-
+
al.add (x, y);
}
@@ -70,10 +70,10 @@ curvetest (string filename)
float foo[1024];
al.curve().get_vector (minx, maxx, foo, 1024);
-
+
for (int i = 0; i < 1024; ++i) {
cout << minx + (((double) i / 1024.0) * (maxx - minx)) << ' ' << foo[i] << endl;
}
-
+
return 0;
}
diff --git a/gtk2_ardour/diamond.cc b/gtk2_ardour/diamond.cc
index 48c0dd4b68..57b86250f9 100644
--- a/gtk2_ardour/diamond.cc
+++ b/gtk2_ardour/diamond.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -59,7 +59,7 @@ Diamond::move_to (double x, double y)
points->coords[4] = _x;
points->coords[5] = _y;
-
+
points->coords[6] = _x - _h;
points->coords[7] = _y + _h;
diff --git a/gtk2_ardour/diamond.h b/gtk2_ardour/diamond.h
index d9bcf3cff8..a8169becb9 100644
--- a/gtk2_ardour/diamond.h
+++ b/gtk2_ardour/diamond.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@ namespace Gnome {
namespace Canvas {
-class Diamond : public Polygon
+class Diamond : public Polygon
{
public:
Diamond(Group& group, double height);
diff --git a/gtk2_ardour/editing.cc b/gtk2_ardour/editing.cc
index cd1c820d61..486808065e 100644
--- a/gtk2_ardour/editing.cc
+++ b/gtk2_ardour/editing.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editing.h b/gtk2_ardour/editing.h
index 19a3d13370..6bc575116b 100644
--- a/gtk2_ardour/editing.h
+++ b/gtk2_ardour/editing.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editing_syms.h b/gtk2_ardour/editing_syms.h
index 7b3e87db16..56cd91f691 100644
--- a/gtk2_ardour/editing_syms.h
+++ b/gtk2_ardour/editing_syms.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 5aec06170e..a68f51af49 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -227,28 +227,28 @@ Editor::Editor ()
/* the values here don't matter: layout widgets
reset them as needed.
*/
-
+
, vertical_adjustment (0.0, 0.0, 10.0, 400.0)
, horizontal_adjustment (0.0, 0.0, 20.0, 1200.0)
-
+
/* tool bar related */
, edit_point_clock (X_("editpoint"), false, X_("EditPointClock"), true)
, zoom_range_clock (X_("zoomrange"), false, X_("ZoomRangeClock"), true, true)
-
+
, toolbar_selection_clock_table (2,3)
-
+
, automation_mode_button (_("mode"))
, global_automation_button (_("automation"))
-
+
, midi_panic_button (_("Panic"))
-
+
#ifdef WITH_CMT
, image_socket_listener(0)
#endif
-
+
/* nudge */
-
+
, nudge_clock (X_("nudge"), false, X_("NudgeClock"), true, true)
, meters_running(false)
, _pending_locate_request (false)
@@ -276,7 +276,7 @@ Editor::Editor ()
current_mixer_strip = 0;
current_bbt_points = 0;
tempo_lines = 0;
-
+
snap_type_strings = I18N (_snap_type_strings);
snap_mode_strings = I18N (_snap_mode_strings);
zoom_focus_strings = I18N (_zoom_focus_strings);
@@ -284,7 +284,7 @@ Editor::Editor ()
#ifdef USE_RUBBERBAND
rb_opt_strings = I18N (_rb_opt_strings);
#endif
-
+
snap_threshold = 5.0;
bbt_beat_subdivision = 4;
_canvas_width = 0;
@@ -364,7 +364,7 @@ Editor::Editor ()
frames_per_unit = 2048; /* too early to use reset_zoom () */
reset_hscrollbar_stepping ();
-
+
zoom_focus = ZoomFocusLeft;
set_zoom_focus (ZoomFocusLeft);
zoom_range_clock.ValueChanged.connect (mem_fun(*this, &Editor::zoom_adjustment_changed));
@@ -451,11 +451,11 @@ Editor::Editor ()
h->pack_start (*_group_tabs, PACK_SHRINK);
h->pack_start (edit_controls_vbox);
controls_layout.add (*h);
-
+
controls_layout.set_name ("EditControlsBase");
controls_layout.add_events (Gdk::SCROLL_MASK);
controls_layout.signal_scroll_event().connect (mem_fun(*this, &Editor::control_layout_scroll), false);
-
+
controls_layout.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
controls_layout.signal_button_release_event().connect (mem_fun(*this, &Editor::edit_controls_button_release));
controls_layout_size_request_connection = controls_layout.signal_size_request().connect (mem_fun (*this, &Editor::controls_layout_size_request));
@@ -472,7 +472,7 @@ Editor::Editor ()
build_cursors ();
edit_point_clock.ValueChanged.connect (mem_fun(*this, &Editor::edit_point_clock_changed));
-
+
ArdourCanvas::Canvas* time_pad = manage(new ArdourCanvas::Canvas());
ArdourCanvas::SimpleLine* pad_line_1 = manage(new ArdourCanvas::SimpleLine(*time_pad->root(),
0.0, 1.0, 100.0, 1.0));
@@ -483,7 +483,7 @@ Editor::Editor ()
time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars) + 2);
time_canvas_vbox.set_size_request (-1, -1);
- ruler_label_event_box.add (ruler_label_vbox);
+ ruler_label_event_box.add (ruler_label_vbox);
ruler_label_event_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
ruler_label_event_box.signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_label_button_release));
@@ -491,7 +491,7 @@ Editor::Editor ()
time_button_event_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
time_button_event_box.signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_label_button_release));
- /* these enable us to have a dedicated window (for cursor setting, etc.)
+ /* these enable us to have a dedicated window (for cursor setting, etc.)
for the canvas areas.
*/
@@ -535,7 +535,7 @@ Editor::Editor ()
named_selection_display.set_headers_visible (false);
named_selection_display.set_size_request (100, -1);
named_selection_display.set_name ("NamedSelectionDisplay");
-
+
named_selection_display.get_selection()->set_mode (SELECTION_SINGLE);
named_selection_display.set_size_request (100, -1);
named_selection_display.signal_button_release_event().connect (mem_fun(*this, &Editor::named_selection_display_button_release), false);
@@ -556,7 +556,7 @@ Editor::Editor ()
nlabel = manage (new Label (_("Route Groups")));
nlabel->set_angle (-90);
the_notebook.append_page (_route_groups->widget (), *nlabel);
-
+
if (!Profile->get_sae()) {
nlabel = manage (new Label (_("Chunks")));
nlabel->set_angle (-90);
@@ -578,7 +578,7 @@ Editor::Editor ()
edit_pane.pack1 (*editor_summary_pane, true, true);
edit_pane.pack2 (the_notebook, false, true);
-
+
edit_pane.signal_size_allocate().connect (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast<Paned*> (&edit_pane)));
top_hbox.pack_start (toolbar_frame, false, true);
@@ -600,7 +600,7 @@ Editor::Editor ()
vpacker.pack_end (global_hpacker, true, true);
/* register actions now so that set_state() can find them and set toggles/checks etc */
-
+
register_actions ();
setup_toolbar ();
@@ -691,7 +691,7 @@ Editor::~Editor()
{
image_socket_listener->close_connection() ;
}
-
+
delete image_socket_listener ;
image_socket_listener = 0 ;
}
@@ -779,7 +779,7 @@ Editor::show_window ()
*/
TimeAxisView *tv;
-
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
tv = (static_cast<TimeAxisView*>(*i));
tv->reset_height ();
@@ -840,7 +840,7 @@ Editor::zoom_adjustment_changed ()
fpu = session->current_end_frame() / _canvas_width;
zoom_range_clock.set ((nframes64_t) floor (fpu * _canvas_width));
}
-
+
temporal_zoom (fpu);
}
@@ -857,7 +857,7 @@ Editor::control_scroll (float fraction)
/*
_control_scroll_target is an optional<T>
-
+
it acts like a pointer to an nframes64_t, with
a operator conversion to boolean to check
that it has a value could possibly use
@@ -883,7 +883,7 @@ Editor::control_scroll (float fraction)
playhead_cursor->set_position (*_control_scroll_target);
UpdateAllTransportClocks (*_control_scroll_target);
-
+
if (*_control_scroll_target > (current_page_frames() / 2)) {
/* try to center PH in window */
reset_x_origin (*_control_scroll_target - (current_page_frames()/2));
@@ -931,7 +931,7 @@ Editor::access_action (std::string action_group, std::string action_item)
if (act) {
act->activate();
}
-
+
}
@@ -945,7 +945,7 @@ Editor::on_realize ()
void
Editor::start_scrolling ()
{
- scroll_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect
+ scroll_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect
(mem_fun(*this, &Editor::update_current_screen));
}
@@ -967,7 +967,7 @@ Editor::map_position_change (nframes64_t frame)
center_screen (frame);
playhead_cursor->set_position (frame);
-}
+}
void
Editor::center_screen (nframes64_t frame)
@@ -976,7 +976,7 @@ Editor::center_screen (nframes64_t frame)
/* if we're off the page, then scroll.
*/
-
+
if (frame < leftmost_frame || frame >= leftmost_frame + page) {
center_screen_internal (frame, page);
}
@@ -986,7 +986,7 @@ void
Editor::center_screen_internal (nframes64_t frame, float page)
{
page /= 2;
-
+
if (frame > page) {
frame -= (nframes64_t) page;
} else {
@@ -1019,7 +1019,7 @@ void
Editor::update_title_s (const string & snap_name)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::update_title_s), snap_name));
-
+
update_title ();
}
@@ -1107,7 +1107,7 @@ Editor::connect_to_session (Session *t)
nframes_t pos = session->tempo_map().bbt_duration_at (0, bbt, 1);
nudge_clock.set_mode(AudioClock::BBT);
nudge_clock.set (pos, true, 0, AudioClock::BBT);
-
+
} else {
nudge_clock.set (session->frame_rate() * 5, true, 0, AudioClock::SMPTE); // default of 5 seconds
}
@@ -1133,7 +1133,7 @@ Editor::connect_to_session (Session *t)
// force name
loc->set_name (_("Loop"));
}
-
+
loc = session->locations()->auto_punch_location();
if (loc == 0) {
loc = new Location (0, session->current_end_frame(), _("Punch"), (Location::Flags) (Location::IsAutoPunch | Location::IsHidden));
@@ -1149,9 +1149,9 @@ Editor::connect_to_session (Session *t)
Config->map_parameters (mem_fun (*this, &Editor::parameter_changed));
session->config.map_parameters (mem_fun (*this, &Editor::parameter_changed));
-
+
session->StateSaved.connect (mem_fun(*this, &Editor::session_state_saved));
-
+
refresh_location_display ();
session->locations()->added.connect (mem_fun(*this, &Editor::add_new_location));
session->locations()->removed.connect (mem_fun(*this, &Editor::location_gone));
@@ -1198,7 +1198,7 @@ Editor::connect_to_session (Session *t)
_regions->connect_to_session (session);
_snapshots->connect_to_session (session);
_routes->connect_to_session (session);
-
+
start_updating ();
}
@@ -1206,7 +1206,7 @@ void
Editor::build_cursors ()
{
using namespace Gdk;
-
+
Gdk::Color mbg ("#000000" ); /* Black */
Gdk::Color mfg ("#0000ff" ); /* Blue. */
@@ -1219,23 +1219,23 @@ Editor::build_cursors ()
Gdk::Color fbg ("#ffffff" );
Gdk::Color ffg ("#000000" );
-
+
{
RefPtr<Bitmap> source, mask;
-
+
source = Bitmap::create (fader_cursor_bits, fader_cursor_width, fader_cursor_height);
mask = Bitmap::create (fader_cursor_mask_bits, fader_cursor_width, fader_cursor_height);
fader_cursor = new Gdk::Cursor (source, mask, ffg, fbg, fader_cursor_x_hot, fader_cursor_y_hot);
}
-
- {
+
+ {
RefPtr<Bitmap> source, mask;
source = Bitmap::create (speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
mask = Bitmap::create (speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
speaker_cursor = new Gdk::Cursor (source, mask, ffg, fbg, speaker_cursor_x_hot, speaker_cursor_y_hot);
}
-
- {
+
+ {
RefPtr<Bitmap> bits;
char pix[4] = { 0, 0, 0, 0 };
bits = Bitmap::create (pix, 2, 2);
@@ -1243,17 +1243,17 @@ Editor::build_cursors ()
transparent_cursor = new Gdk::Cursor (bits, bits, c, c, 0, 0);
}
- {
+ {
RefPtr<Bitmap> bits;
char pix[4] = { 0, 0, 0, 0 };
bits = Bitmap::create (pix, 2, 2);
Gdk::Color c;
transparent_cursor = new Gdk::Cursor (bits, bits, c, c, 0, 0);
}
-
+
grabber_cursor = new Gdk::Cursor (HAND2);
-
+
{
Glib::RefPtr<Gdk::Pixbuf> grabber_edit_point_pixbuf (::get_icon ("grabber_edit_point"));
grabber_edit_point_cursor = new Gdk::Cursor (Gdk::Display::get_default(), grabber_edit_point_pixbuf, 5, 17);
@@ -1295,7 +1295,7 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
} else {
items.push_back (MenuElem (_("Activate"), bind (mem_fun (*this, &Editor::set_fade_in_active), true)));
}
-
+
items.push_back (SeparatorElem());
if (Profile->get_sae()) {
@@ -1318,9 +1318,9 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
} else {
items.push_back (MenuElem (_("Activate"), bind (mem_fun (*this, &Editor::set_fade_out_active), true)));
}
-
+
items.push_back (SeparatorElem());
-
+
if (Profile->get_sae()) {
items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Linear)));
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Slow)));
@@ -1389,7 +1389,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
menu = (this->*build_menu_function)(frame);
menu->set_name ("ArdourContextMenu");
-
+
/* now handle specific situations */
switch (item_type) {
@@ -1434,10 +1434,10 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
if (item_type != SelectionItem && clicked_routeview && clicked_routeview->audio_track()) {
/* Bounce to disk */
-
+
using namespace Menu_Helpers;
MenuList& edit_items = menu->items();
-
+
edit_items.push_back (SeparatorElem());
switch (clicked_routeview->audio_track()->freeze_state()) {
@@ -1448,7 +1448,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
case AudioTrack::Frozen:
edit_items.push_back (MenuElem (_("Unfreeze"), mem_fun(*this, &Editor::unfreeze_route)));
break;
-
+
case AudioTrack::UnFrozen:
edit_items.push_back (MenuElem (_("Freeze"), mem_fun(*this, &Editor::freeze_route)));
break;
@@ -1499,16 +1499,16 @@ Editor::build_track_region_context_menu (nframes64_t frame)
if (rtv) {
boost::shared_ptr<Diskstream> ds;
boost::shared_ptr<Playlist> pl;
-
+
if ((ds = rtv->get_diskstream()) && ((pl = ds->playlist()))) {
Playlist::RegionList* regions = pl->regions_at ((nframes64_t) floor ( (double)frame * ds->speed()));
if (selection->regions.size() > 1) {
- // there's already a multiple selection: just add a
- // single region context menu that will act on all
+ // there's already a multiple selection: just add a
+ // single region context menu that will act on all
// selected regions
- boost::shared_ptr<Region> dummy_region; // = NULL
- add_region_context_items (rtv->view(), dummy_region, edit_items);
+ boost::shared_ptr<Region> dummy_region; // = NULL
+ add_region_context_items (rtv->view(), dummy_region, edit_items);
} else {
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
add_region_context_items (rtv->view(), (*i), edit_items);
@@ -1552,11 +1552,11 @@ Editor::build_track_crossfade_context_menu (nframes64_t frame)
}
if (selection->regions.size() > 1) {
- // there's already a multiple selection: just add a
- // single region context menu that will act on all
+ // there's already a multiple selection: just add a
+ // single region context menu that will act on all
// selected regions
- boost::shared_ptr<Region> dummy_region; // = NULL
- add_region_context_items (atv->audio_view(), dummy_region, edit_items);
+ boost::shared_ptr<Region> dummy_region; // = NULL
+ add_region_context_items (atv->audio_view(), dummy_region, edit_items);
} else {
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
add_region_context_items (atv->audio_view(), (*i), edit_items);
@@ -1585,7 +1585,7 @@ Editor::analyze_region_selection()
analysis_window->set_regionmode();
analysis_window->analyze();
-
+
analysis_window->present();
}
@@ -1603,7 +1603,7 @@ Editor::analyze_range_selection()
analysis_window->set_rangemode();
analysis_window->analyze();
-
+
analysis_window->present();
}
@@ -1635,7 +1635,7 @@ Editor::add_crossfade_context_items (AudioStreamView* /*view*/, boost::shared_pt
if (xfade->active()) {
str = _("Mute");
- } else {
+ } else {
str = _("Unmute");
}
@@ -1697,13 +1697,13 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
ar = boost::dynamic_pointer_cast<AudioRegion> (region);
mr = boost::dynamic_pointer_cast<MidiRegion> (region);
- /* when this particular menu pops up, make the relevant region
+ /* when this particular menu pops up, make the relevant region
become selected.
*/
region_menu->signal_map_event().connect (
bind (mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, boost::weak_ptr<Region>(region)));
-
+
items.push_back (MenuElem (_("Rename"), mem_fun(*this, &Editor::rename_region)));
if (mr && internal_editing()) {
items.push_back (MenuElem (_("Popup list editor"), mem_fun(*this, &Editor::show_midi_list_editor)));
@@ -1744,10 +1744,10 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
region_lock_item->set_active();
}
region_lock_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_region_lock));
-
+
items.push_back (CheckMenuElem (_("Glue to Bars&Beats")));
CheckMenuItem* bbt_glue_item = static_cast<CheckMenuItem*>(&items.back());
-
+
switch (region_to_check->positional_lock_style()) {
case Region::MusicTime:
bbt_glue_item->set_active (true);
@@ -1756,9 +1756,9 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
bbt_glue_item->set_active (false);
break;
}
-
+
bbt_glue_item->signal_activate().connect (bind (mem_fun (*this, &Editor::set_region_lock_style), Region::MusicTime));
-
+
items.push_back (CheckMenuElem (_("Mute")));
CheckMenuItem* region_mute_item = static_cast<CheckMenuItem*>(&items.back());
fooc = region_mute_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_region_mute));
@@ -1767,7 +1767,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
region_mute_item->set_active();
fooc.block (false);
}
-
+
if (!Profile->get_sae()) {
items.push_back (CheckMenuElem (_("Opaque")));
CheckMenuItem* region_opaque_item = static_cast<CheckMenuItem*>(&items.back());
@@ -1778,19 +1778,19 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
fooc.block (false);
}
}
-
+
items.push_back (CheckMenuElem (_("Original position"), mem_fun(*this, &Editor::naturalize)));
if (region_to_check->at_natural_position()) {
items.back().set_sensitive (false);
}
-
+
items.push_back (SeparatorElem());
-
+
if (ar) {
-
+
RegionView* rv = sv->find_view (ar);
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(rv);
-
+
if (!Profile->get_sae()) {
items.push_back (MenuElem (_("Reset Envelope"), mem_fun(*this, &Editor::reset_region_gain_envelopes)));
@@ -1802,11 +1802,11 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
region_envelope_visible_item->set_active (true);
fooc.block (false);
}
-
+
items.push_back (CheckMenuElem (_("Envelope Active")));
CheckMenuItem* region_envelope_active_item = static_cast<CheckMenuItem*> (&items.back());
fooc = region_envelope_active_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_gain_envelope_active));
-
+
if (ar->envelope_active()) {
fooc.block (true);
region_envelope_active_item->set_active (true);
@@ -1840,13 +1840,13 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
items.push_back (MenuElem (_("Set Range Selection"), mem_fun (*this, &Editor::set_selection_from_region)));
items.push_back (SeparatorElem());
-
+
/* Nudge region */
Menu *nudge_menu = manage (new Menu());
MenuList& nudge_items = nudge_menu->items();
nudge_menu->set_name ("ArdourContextMenu");
-
+
nudge_items.push_back (MenuElem (_("Nudge fwd"), (bind (mem_fun(*this, &Editor::nudge_forward), false, false))));
nudge_items.push_back (MenuElem (_("Nudge bwd"), (bind (mem_fun(*this, &Editor::nudge_backward), false, false))));
nudge_items.push_back (MenuElem (_("Nudge fwd by capture offset"), (mem_fun(*this, &Editor::nudge_forward_capture_offset))));
@@ -1858,7 +1858,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
Menu *trim_menu = manage (new Menu);
MenuList& trim_items = trim_menu->items();
trim_menu->set_name ("ArdourContextMenu");
-
+
trim_items.push_back (MenuElem (_("Start to edit point"), mem_fun(*this, &Editor::trim_region_from_edit_point)));
foo_item = &trim_items.back();
if (_edit_point == EditAtMouse) {
@@ -1871,13 +1871,13 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
}
trim_items.push_back (MenuElem (_("Trim To Loop"), mem_fun(*this, &Editor::trim_region_to_loop)));
trim_items.push_back (MenuElem (_("Trim To Punch"), mem_fun(*this, &Editor::trim_region_to_punch)));
-
+
items.push_back (MenuElem (_("Trim"), *trim_menu));
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Split"), (mem_fun(*this, &Editor::split))));
region_edit_menu_split_item = &items.back();
-
+
if (_edit_point == EditAtMouse) {
region_edit_menu_split_item->set_sensitive (false);
}
@@ -1906,7 +1906,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
menu_item_name.replace (pos, 1, "__");
pos += 2;
}
-
+
edit_items.push_back (MenuElem (menu_item_name, *region_menu));
edit_items.push_back (SeparatorElem());
}
@@ -1934,23 +1934,23 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Silence Range"), mem_fun(*this, &Editor::separate_region_from_selection)));
edit_items.push_back (MenuElem (_("Convert to Region in Region List"), mem_fun(*this, &Editor::new_region_from_selection)));
-
+
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::select_all_selectables_using_time_selection)));
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Set Loop from Range"), bind (mem_fun(*this, &Editor::set_loop_from_selection), false)));
edit_items.push_back (MenuElem (_("Set Punch from Range"), mem_fun(*this, &Editor::set_punch_from_selection)));
-
+
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Add Range Markers"), mem_fun (*this, &Editor::add_location_from_selection)));
-
+
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Crop Region to Range"), mem_fun(*this, &Editor::crop_region_to_selection)));
edit_items.push_back (MenuElem (_("Fill Range with Region"), mem_fun(*this, &Editor::region_fill_selection)));
edit_items.push_back (MenuElem (_("Duplicate Range"), bind (mem_fun(*this, &Editor::duplicate_dialog), false)));
edit_items.push_back (MenuElem (_("Create Chunk from Range"), mem_fun(*this, &Editor::create_named_selection)));
-
+
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Consolidate Range"), bind (mem_fun(*this, &Editor::bounce_range_selection), true, false)));
edit_items.push_back (MenuElem (_("Consolidate Range With Processing"), bind (mem_fun(*this, &Editor::bounce_range_selection), true, true)));
@@ -1959,7 +1959,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
edit_items.push_back (MenuElem (_("Export Range"), mem_fun(*this, &Editor::export_range)));
}
-
+
void
Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
{
@@ -1970,13 +1970,13 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
Menu *play_menu = manage (new Menu);
MenuList& play_items = play_menu->items();
play_menu->set_name ("ArdourContextMenu");
-
+
play_items.push_back (MenuElem (_("Play from edit point"), mem_fun(*this, &Editor::play_from_edit_point)));
play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start)));
play_items.push_back (MenuElem (_("Play region"), mem_fun(*this, &Editor::play_selected_region)));
play_items.push_back (SeparatorElem());
play_items.push_back (MenuElem (_("Loop Region"), mem_fun(*this, &Editor::loop_selected_region)));
-
+
edit_items.push_back (MenuElem (_("Play"), *play_menu));
/* Selection */
@@ -1984,7 +1984,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
Menu *select_menu = manage (new Menu);
MenuList& select_items = select_menu->items();
select_menu->set_name ("ArdourContextMenu");
-
+
select_items.push_back (MenuElem (_("Select All in track"), bind (mem_fun(*this, &Editor::select_all_in_track), Selection::Set)));
select_items.push_back (MenuElem (_("Select All"), bind (mem_fun(*this, &Editor::select_all), Selection::Set)));
select_items.push_back (MenuElem (_("Invert selection in track"), mem_fun(*this, &Editor::invert_selection_in_track)));
@@ -2008,7 +2008,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
Menu *cutnpaste_menu = manage (new Menu);
MenuList& cutnpaste_items = cutnpaste_menu->items();
cutnpaste_menu->set_name ("ArdourContextMenu");
-
+
cutnpaste_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut)));
cutnpaste_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy)));
cutnpaste_items.push_back (MenuElem (_("Paste"), bind (mem_fun(*this, &Editor::paste), 1.0f)));
@@ -2025,7 +2025,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
edit_items.push_back (MenuElem (_("Edit"), *cutnpaste_menu));
/* Adding new material */
-
+
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Insert Selected Region"), bind (mem_fun(*this, &Editor::insert_region_list_selection), 1.0f)));
edit_items.push_back (MenuElem (_("Insert Existing Media"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportToTrack)));
@@ -2035,7 +2035,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
Menu *nudge_menu = manage (new Menu());
MenuList& nudge_items = nudge_menu->items();
nudge_menu->set_name ("ArdourContextMenu");
-
+
edit_items.push_back (SeparatorElem());
nudge_items.push_back (MenuElem (_("Nudge entire track fwd"), (bind (mem_fun(*this, &Editor::nudge_track), false, true))));
nudge_items.push_back (MenuElem (_("Nudge track after edit point fwd"), (bind (mem_fun(*this, &Editor::nudge_track), true, true))));
@@ -2055,7 +2055,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
Menu *play_menu = manage (new Menu);
MenuList& play_items = play_menu->items();
play_menu->set_name ("ArdourContextMenu");
-
+
play_items.push_back (MenuElem (_("Play from edit point"), mem_fun(*this, &Editor::play_from_edit_point)));
play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start)));
edit_items.push_back (MenuElem (_("Play"), *play_menu));
@@ -2065,7 +2065,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
Menu *select_menu = manage (new Menu);
MenuList& select_items = select_menu->items();
select_menu->set_name ("ArdourContextMenu");
-
+
select_items.push_back (MenuElem (_("Select All in track"), bind (mem_fun(*this, &Editor::select_all_in_track), Selection::Set)));
select_items.push_back (MenuElem (_("Select All"), bind (mem_fun(*this, &Editor::select_all), Selection::Set)));
select_items.push_back (MenuElem (_("Invert selection in track"), mem_fun(*this, &Editor::invert_selection_in_track)));
@@ -2083,7 +2083,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
Menu *cutnpaste_menu = manage (new Menu);
MenuList& cutnpaste_items = cutnpaste_menu->items();
cutnpaste_menu->set_name ("ArdourContextMenu");
-
+
cutnpaste_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut)));
cutnpaste_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy)));
cutnpaste_items.push_back (MenuElem (_("Paste"), bind (mem_fun(*this, &Editor::paste), 1.0f)));
@@ -2091,7 +2091,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
Menu *nudge_menu = manage (new Menu());
MenuList& nudge_items = nudge_menu->items();
nudge_menu->set_name ("ArdourContextMenu");
-
+
edit_items.push_back (SeparatorElem());
nudge_items.push_back (MenuElem (_("Nudge entire track fwd"), (bind (mem_fun(*this, &Editor::nudge_track), false, true))));
nudge_items.push_back (MenuElem (_("Nudge track after edit point fwd"), (bind (mem_fun(*this, &Editor::nudge_track), true, true))));
@@ -2107,12 +2107,12 @@ Editor::set_snap_to (SnapType st)
unsigned int snap_ind = (unsigned int)st;
snap_type = st;
-
+
if (snap_ind > snap_type_strings.size() - 1) {
snap_ind = 0;
snap_type = (SnapType)snap_ind;
}
-
+
string str = snap_type_strings[snap_ind];
if (str != snap_type_selector.get_active_text()) {
@@ -2302,7 +2302,7 @@ Editor::set_state (const XMLNode& node)
position may be zero already, and it does nothing in such
circumstances.
*/
-
+
leftmost_frame = 0;
horizontal_adjustment.set_value (0);
}
@@ -2361,7 +2361,7 @@ Editor::set_state (const XMLNode& node)
tact->set_active (yn);
}
}
-
+
if ((prop = node.property ("show-measures"))) {
bool yn = string_is_affirmative (prop->value());
_show_measures = !yn;
@@ -2405,12 +2405,12 @@ Editor::set_state (const XMLNode& node)
bool yn = string_is_affirmative (prop->value());
/* do it twice to force the change */
-
+
tact->set_active (!yn);
tact->set_active (yn);
}
}
-
+
if ((prop = node.property ("show-editor-list"))) {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
@@ -2421,7 +2421,7 @@ Editor::set_state (const XMLNode& node)
bool yn = string_is_affirmative (prop->value());
/* do it twice to force the change */
-
+
tact->set_active (!yn);
tact->set_active (yn);
}
@@ -2439,15 +2439,15 @@ Editor::get_state ()
_id.print (buf, sizeof (buf));
node->add_property ("id", buf);
-
+
if (is_realized()) {
Glib::RefPtr<Gdk::Window> win = get_window();
-
+
int x, y, xoff, yoff, width, height;
win->get_root_origin(x, y);
win->get_position(xoff, yoff);
win->get_size(width, height);
-
+
XMLNode* geometry = new XMLNode ("geometry");
snprintf(buf, sizeof(buf), "%d", width);
@@ -2469,7 +2469,7 @@ Editor::get_state ()
}
maybe_add_mixer_strip_width (*node);
-
+
snprintf (buf, sizeof(buf), "%d", (int) zoom_focus);
node->add_property ("zoom-focus", buf);
snprintf (buf, sizeof(buf), "%f", frames_per_unit);
@@ -2491,13 +2491,13 @@ Editor::get_state ()
node->add_property ("region-list-sort-type", enum2str (_regions->sort_type ()));
node->add_property ("mouse-mode", enum2str(mouse_mode));
node->add_property ("internal-edit", _internal_editing ? "yes" : "no");
-
+
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
node->add_property (X_("show-editor-mixer"), tact->get_active() ? "yes" : "no");
}
-
+
act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
@@ -2596,13 +2596,13 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
start += session->smpte_offset ();
} else {
start -= session->smpte_offset ();
- }
+ }
if (((direction == 0) && (start % one_smpte_second > one_smpte_second / 2)) || direction > 0) {
start = (nframes64_t) ceil ((double) start / one_smpte_second) * one_smpte_second;
} else {
start = (nframes64_t) floor ((double) start / one_smpte_second) * one_smpte_second;
}
-
+
if (session->smpte_offset_negative())
{
start -= session->smpte_offset ();
@@ -2610,7 +2610,7 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
start += session->smpte_offset ();
}
break;
-
+
case SnapToSMPTEMinutes:
if (session->smpte_offset_negative())
{
@@ -2630,7 +2630,7 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
start += session->smpte_offset ();
}
break;
-
+
case SnapToSeconds:
if (((direction == 0) && (start % one_second > one_second / 2)) || (direction > 0)) {
start = (nframes64_t) ceil ((double) start / one_second) * one_second;
@@ -2638,7 +2638,7 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
start = (nframes64_t) floor ((double) start / one_second) * one_second;
}
break;
-
+
case SnapToMinutes:
if (((direction == 0) && (start % one_minute > one_minute / 2)) || (direction > 0)) {
start = (nframes64_t) ceil ((double) start / one_minute) * one_minute;
@@ -2723,13 +2723,13 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
vector<nframes64_t>::iterator prev = region_boundary_cache.end ();
vector<nframes64_t>::iterator next = region_boundary_cache.end ();
-
+
if (direction > 0) {
next = std::upper_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
} else {
next = std::lower_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
}
-
+
if (next != region_boundary_cache.begin ()) {
prev = next;
prev--;
@@ -2743,31 +2743,31 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
} else {
start = p;
}
- }
+ }
break;
}
switch (snap_mode) {
case SnapNormal:
- return;
-
+ return;
+
case SnapMagnetic:
-
+
if (presnap > start) {
if (presnap > (start + unit_to_frame(snap_threshold))) {
start = presnap;
}
-
+
} else if (presnap < start) {
if (presnap < (start - unit_to_frame(snap_threshold))) {
start = presnap;
}
}
-
+
default:
/* handled at entry */
return;
-
+
}
}
@@ -2817,7 +2817,7 @@ Editor::setup_toolbar ()
mode_box->pack_start(edit_mode_selector);
mode_box->pack_start(mouse_mode_button_box);
-
+
mouse_mode_tearoff = manage (new TearOff (*mode_box));
mouse_mode_tearoff->set_name ("MouseModeBase");
mouse_mode_tearoff->tearoff_window().signal_key_press_event().connect (bind (sigc::ptr_fun (relay_key_press), &mouse_mode_tearoff->tearoff_window()), false);
@@ -2826,13 +2826,13 @@ Editor::setup_toolbar ()
mouse_mode_tearoff->set_can_be_torn_off (false);
}
- mouse_mode_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
+ mouse_mode_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&mouse_mode_tearoff->tearoff_window()));
- mouse_mode_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
+ mouse_mode_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&mouse_mode_tearoff->tearoff_window(), 1));
- mouse_mode_tearoff->Hidden.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
+ mouse_mode_tearoff->Hidden.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&mouse_mode_tearoff->tearoff_window()));
- mouse_mode_tearoff->Visible.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
+ mouse_mode_tearoff->Visible.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&mouse_mode_tearoff->tearoff_window(), 1));
mouse_move_button.set_mode (false);
@@ -2860,7 +2860,7 @@ Editor::setup_toolbar ()
internal_edit_button.unset_flags (CAN_FOCUS);
/* Zoom */
-
+
zoom_box.set_spacing (1);
zoom_box.set_border_width (0);
@@ -2869,7 +2869,7 @@ Editor::setup_toolbar ()
zoom_in_button.add (*(manage (new Image (::get_icon("zoom_in")))));
zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_in_button, _("Zoom In"));
-
+
zoom_out_button.set_name ("EditorTimeButton");
zoom_out_button.set_size_request(-1,16);
zoom_out_button.add (*(manage (new Image (::get_icon("zoom_out")))));
@@ -2890,14 +2890,14 @@ Editor::setup_toolbar ()
zoom_box.pack_start (zoom_out_button, false, false);
zoom_box.pack_start (zoom_in_button, false, false);
zoom_box.pack_start (zoom_out_full_button, false, false);
-
+
/* Track zoom buttons */
tav_expand_button.set_name ("TrackHeightButton");
tav_expand_button.set_size_request(-1,20);
tav_expand_button.add (*(manage (new Image (::get_icon("tav_exp")))));
tav_expand_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), true));
ARDOUR_UI::instance()->tooltips().set_tip (tav_expand_button, _("Expand Tracks"));
-
+
tav_shrink_button.set_name ("TrackHeightButton");
tav_shrink_button.set_size_request(-1,20);
tav_shrink_button.add (*(manage (new Image (::get_icon("tav_shrink")))));
@@ -2907,9 +2907,9 @@ Editor::setup_toolbar ()
track_zoom_box.set_spacing (1);
track_zoom_box.set_border_width (0);
- track_zoom_box.pack_start (tav_shrink_button, false, false);
+ track_zoom_box.pack_start (tav_shrink_button, false, false);
track_zoom_box.pack_start (tav_expand_button, false, false);
-
+
HBox* zbc = manage (new HBox);
zbc->pack_start (zoom_focus_selector, PACK_SHRINK);
zoom_vbox.pack_start (*zbc, PACK_SHRINK);
@@ -2966,13 +2966,13 @@ Editor::setup_toolbar ()
tools_tearoff->set_can_be_torn_off (false);
}
- tools_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
+ tools_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&tools_tearoff->tearoff_window()));
- tools_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
+ tools_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&tools_tearoff->tearoff_window(), 0));
- tools_tearoff->Hidden.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
+ tools_tearoff->Hidden.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&tools_tearoff->tearoff_window()));
- tools_tearoff->Visible.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
+ tools_tearoff->Visible.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&tools_tearoff->tearoff_window(), 0));
toolbar_hbox.set_spacing (10);
@@ -2980,13 +2980,13 @@ Editor::setup_toolbar ()
toolbar_hbox.pack_start (*mouse_mode_tearoff, false, false);
toolbar_hbox.pack_start (*tools_tearoff, false, false);
-
+
hbox->pack_start (snap_box, false, false);
hbox->pack_start (*nudge_box, false, false);
hbox->pack_start (panic_box, false, false);
hbox->show_all ();
-
+
toolbar_base.set_name ("ToolBarBase");
toolbar_base.add (toolbar_hbox);
@@ -3015,9 +3015,9 @@ Editor::setup_midi_toolbar ()
midi_sound_notes.set_relief(Gtk::RELIEF_NONE);
ARDOUR_UI::instance()->tooltips().set_tip (midi_sound_notes, _("Sound Notes"));
midi_sound_notes.unset_flags (CAN_FOCUS);
-
+
/* Panic */
-
+
act = ActionManager::get_action (X_("MIDI"), X_("panic"));
midi_panic_button.set_name("MidiPanicButton");
act->connect_proxy (midi_panic_button);
@@ -3028,14 +3028,14 @@ Editor::setup_midi_toolbar ()
int
Editor::convert_drop_to_paths (
- vector<ustring>& paths,
+ vector<ustring>& paths,
const RefPtr<Gdk::DragContext>& /*context*/,
gint /*x*/,
gint /*y*/,
const SelectionData& data,
guint /*info*/,
guint /*time*/)
-{
+{
if (session == 0) {
return -1;
}
@@ -3051,8 +3051,8 @@ Editor::convert_drop_to_paths (
if (data.get_target() != "text/plain") {
return -1;
}
-
- /* Parse the "uri-list" format that Nautilus provides,
+
+ /* Parse the "uri-list" format that Nautilus provides,
where each pathname is delimited by \r\n.
THERE MAY BE NO NULL TERMINATING CHAR!!!
@@ -3072,18 +3072,18 @@ Editor::convert_drop_to_paths (
{
while (g_ascii_isspace (*p))
p++;
-
+
q = p;
while (*q && (*q != '\n') && (*q != '\r')) {
q++;
}
-
+
if (q > p)
{
q--;
while (q > p && g_ascii_isspace (*q))
q--;
-
+
if (q > p)
{
uris.push_back (ustring (p, q - p + 1));
@@ -3096,21 +3096,21 @@ Editor::convert_drop_to_paths (
}
free ((void*)p);
-
+
if (uris.empty()) {
return -1;
}
}
-
+
for (vector<ustring>::iterator i = uris.begin(); i != uris.end(); ++i) {
if ((*i).substr (0,7) == "file://") {
-
+
ustring p = *i;
PBD::url_decode (p);
// scan forward past three slashes
-
+
ustring::size_type slashcnt = 0;
ustring::size_type n = 0;
ustring::iterator x = p.begin();
@@ -3227,7 +3227,7 @@ Editor::set_route_group_mute (Route& route, bool yn)
route.set_mute (yn, this);
}
}
-
+
void
Editor::history_changed ()
{
@@ -3265,7 +3265,7 @@ Editor::duplicate_dialog (bool with_dialog)
RegionSelection rs;
get_regions_for_action (rs);
-
+
if (mouse_mode != MouseRange) {
if (rs.empty()) {
@@ -3280,16 +3280,16 @@ Editor::duplicate_dialog (bool with_dialog)
Adjustment adjustment (1.0, 1.0, 1000000.0, 1.0, 5.0);
SpinButton spinner (adjustment, 0.0, 1);
HBox hbox;
-
+
win.get_vbox()->set_spacing (12);
win.get_vbox()->pack_start (hbox);
hbox.set_border_width (6);
hbox.pack_start (label, PACK_EXPAND_PADDING, 12);
-
+
/* dialogs have ::add_action_widget() but that puts the spinner in the wrong
place, visually. so do this by hand.
*/
-
+
hbox.pack_start (spinner, PACK_EXPAND_PADDING, 12);
spinner.signal_activate().connect (sigc::bind (mem_fun (win, &ArdourDialog::response), RESPONSE_ACCEPT));
spinner.grab_focus();
@@ -3297,22 +3297,22 @@ Editor::duplicate_dialog (bool with_dialog)
hbox.show ();
label.show ();
spinner.show ();
-
+
win.add_button (Stock::CANCEL, RESPONSE_CANCEL);
win.add_button (_("Duplicate"), RESPONSE_ACCEPT);
win.set_default_response (RESPONSE_ACCEPT);
-
+
win.set_position (WIN_POS_MOUSE);
-
+
spinner.grab_focus ();
-
+
switch (win.run ()) {
case RESPONSE_ACCEPT:
break;
default:
return;
}
-
+
times = adjustment.get_value();
}
@@ -3445,7 +3445,7 @@ Editor::edit_mode_selection_done ()
}
Config->set_edit_mode (mode);
-}
+}
void
Editor::snap_type_selection_done ()
@@ -3495,7 +3495,7 @@ Editor::snap_type_selection_done ()
if (ract) {
ract->set_active ();
}
-}
+}
void
Editor::snap_mode_selection_done ()
@@ -3581,14 +3581,14 @@ Editor::zoom_focus_selection_done ()
focus_type = ZoomFocusEdit;
} else {
focus_type = ZoomFocusMouse;
- }
-
+ }
+
RefPtr<RadioAction> ract = zoom_focus_action (focus_type);
if (ract) {
ract->set_active ();
}
-}
+}
gint
Editor::edit_controls_button_release (GdkEventButton* ev)
@@ -3627,16 +3627,16 @@ Editor::get_valid_views (TimeAxisView* track, RouteGroup* group)
}
} else if ((track != 0 && group == 0) || (track != 0 && group != 0 && !group->active_property (RouteGroup::Select))) {
-
+
/* just the view for this track
*/
v->push_back (track);
} else {
-
+
/* views for all tracks in the route group */
-
+
for (i = track_views.begin(); i != track_views.end (); ++i) {
if (group == 0 || ((*i)->route_group() == group && group->active_property (RouteGroup::Select))) {
@@ -3644,7 +3644,7 @@ Editor::get_valid_views (TimeAxisView* track, RouteGroup* group)
}
}
}
-
+
return v;
}
@@ -3656,7 +3656,7 @@ Editor::set_zoom_focus (ZoomFocus f)
if (str != zoom_focus_selector.get_active_text()) {
zoom_focus_selector.set_active_text (str);
}
-
+
if (zoom_focus != f) {
zoom_focus = f;
@@ -3672,7 +3672,7 @@ Editor::ensure_float (Window& win)
win.set_transient_for (*this);
}
-void
+void
Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
{
/* recover or initialize pane positions. do this here rather than earlier because
@@ -3732,7 +3732,7 @@ Editor::detach_tearoff (Box* /*b*/, Window* /*w*/)
{
cerr << "remove tearoff\n";
- if (tools_tearoff->torn_off() &&
+ if (tools_tearoff->torn_off() &&
mouse_mode_tearoff->torn_off()) {
top_hbox.remove (toolbar_frame);
}
@@ -3812,16 +3812,16 @@ Editor::edit_xfade (boost::weak_ptr<Crossfade> wxfade)
}
CrossfadeEditor cew (*session, xfade, xfade->fade_in().get_min_y(), 1.0);
-
+
ensure_float (cew);
-
+
switch (cew.run ()) {
case RESPONSE_ACCEPT:
break;
default:
return;
}
-
+
cew.apply ();
xfade->StateChanged (Change (~0));
}
@@ -3843,7 +3843,7 @@ Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
break;
case SnapToAThirtysecondBeat:
- return 1.0/32.0;
+ return 1.0/32.0;
break;
case SnapToASixteenthBeat:
@@ -3861,7 +3861,7 @@ Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
case SnapToAThirdBeat:
return 1.0/3.0;
break;
-
+
case SnapToBar:
if (session) {
return session->tempo_map().meter_at (position).beats_per_bar();
@@ -3914,7 +3914,7 @@ Editor::playlist_deletion_dialog (boost::shared_ptr<Playlist> pl)
"If left alone, no audio files used by it will be cleaned.\n"
"If deleted, audio files used by it alone by will cleaned."),
pl->name()));
-
+
dialog.set_position (WIN_POS_CENTER);
dialog.get_vbox()->pack_start (label);
@@ -4004,7 +4004,7 @@ Editor::control_layout_scroll (GdkEventScroll* ev)
case GDK_SCROLL_DOWN:
scroll_tracks_down_line ();
return true;
-
+
default:
/* no left/right handling yet */
break;
@@ -4017,7 +4017,7 @@ void
Editor::session_state_saved (string snap_name)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::session_state_saved), snap_name));
-
+
_snapshots->redisplay ();
}
@@ -4037,7 +4037,7 @@ Editor::maximise_editing_space ()
fullscreen();
if(post_maximal_editor_width) {
- edit_pane.set_position (post_maximal_pane_position -
+ edit_pane.set_position (post_maximal_pane_position -
abs(post_maximal_editor_width - pre_maximal_editor_width));
} else {
edit_pane.set_position (post_maximal_pane_position);
@@ -4068,7 +4068,7 @@ Editor::restore_editing_space ()
* @param v Track.
*/
-void
+void
Editor::new_playlists (TimeAxisView* v)
{
begin_reversible_command (_("new playlists"));
@@ -4099,7 +4099,7 @@ Editor::copy_playlists (TimeAxisView* v)
* @param v Track.
*/
-void
+void
Editor::clear_playlists (TimeAxisView* v)
{
begin_reversible_command (_("clear playlists"));
@@ -4109,7 +4109,7 @@ Editor::clear_playlists (TimeAxisView* v)
commit_reversible_command ();
}
-void
+void
Editor::mapped_use_new_playlist (RouteTimeAxisView& atv, uint32_t sz, vector<boost::shared_ptr<ARDOUR::Playlist> > const & playlists)
{
atv.use_new_playlist (sz > 1 ? false : true, playlists);
@@ -4121,7 +4121,7 @@ Editor::mapped_use_copy_playlist (RouteTimeAxisView& atv, uint32_t sz, vector<bo
atv.use_copy_playlist (sz > 1 ? false : true, playlists);
}
-void
+void
Editor::mapped_clear_playlist (RouteTimeAxisView& atv, uint32_t /*sz*/)
{
atv.clear_playlist ();
@@ -4186,7 +4186,7 @@ Editor::current_visual_state (bool with_tracks)
vs->track_states.push_back (TAVState ((*i), &(*i)->get_state()));
}
}
-
+
return vs;
}
@@ -4238,7 +4238,7 @@ Editor::use_visual_state (VisualState& vs)
set_zoom_focus (vs.zoom_focus);
reposition_and_zoom (vs.leftmost_frame, vs.frames_per_unit);
zoomed_to_region = vs.zoomed_to_region;
-
+
for (list<TAVState>::iterator i = vs.track_states.begin(); i != vs.track_states.end(); ++i) {
TrackViewList::iterator t;
@@ -4252,7 +4252,7 @@ Editor::use_visual_state (VisualState& vs)
if (!vs.track_states.empty()) {
_routes->update_visibility ();
- }
+ }
_routes->resume_redisplay ();
@@ -4274,7 +4274,7 @@ Editor::set_frames_per_unit (double fpu)
fpu = 2.0;
}
-
+
/* don't allow zooms that fit more than the maximum number
of frames into an 800 pixel wide space.
*/
@@ -4282,7 +4282,7 @@ Editor::set_frames_per_unit (double fpu)
if (max_frames / fpu < 800.0) {
return;
}
-
+
if (tempo_lines)
tempo_lines->tempo_map_changed();
@@ -4342,17 +4342,17 @@ void
Editor::queue_visual_change (nframes64_t where)
{
pending_visual_change.add (VisualChange::TimeOrigin);
-
+
/* if we're moving beyond the end, make sure the upper limit of the horizontal adjustment
can reach.
*/
-
+
if (where > session->current_end_frame()) {
horizontal_adjustment.set_upper ((where + current_page_frames()) / frames_per_unit);
}
-
+
pending_visual_change.time_origin = where;
-
+
ensure_visual_change_idle_handler ();
}
@@ -4363,7 +4363,7 @@ Editor::queue_visual_change (double fpu)
pending_visual_change.frames_per_unit = fpu;
ensure_visual_change_idle_handler ();
-
+
}
void
@@ -4413,15 +4413,15 @@ Editor::idle_visual_changer ()
if (p & VisualChange::YOrigin) {
vertical_adjustment.set_value (pending_visual_change.y_origin);
}
-
+
nframes64_t csf=0, cef=0;
nframes64_t current_time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
-
+
if (session) {
csf = session->current_start_frame();
cef = session->current_end_frame();
}
-
+
/* if we seek beyond the current end of the canvas, move the end */
#ifdef FIX_THIS_FOR_V3
@@ -4431,7 +4431,7 @@ Editor::idle_visual_changer ()
redisplay_tempo (true);
}
#endif
-
+
if (current_time_origin != pending_visual_change.time_origin) {
cef += current_page_frames() / 10; // Add a little extra so we can see the end marker
horizontal_adjustment.set_upper (cef / frames_per_unit);
@@ -4442,7 +4442,7 @@ Editor::idle_visual_changer ()
}
_summary->set_overlays_dirty ();
-
+
//cerr << "Editor::idle_visual_changer () called ha v:l:u:ps:fpu = " << horizontal_adjustment.get_value() << ":" << horizontal_adjustment.get_lower() << ":" << horizontal_adjustment.get_upper() << ":" << horizontal_adjustment.get_page_size() << ":" << frames_per_unit << endl;//DEBUG
pending_visual_change.idle_handler_id = -1;
return 0; /* this is always a one-shot call */
@@ -4453,7 +4453,7 @@ struct EditorOrderTimeAxisSorter {
return a->order () < b->order ();
}
};
-
+
void
Editor::sort_track_selection (TrackSelection* sel)
{
@@ -4485,7 +4485,7 @@ Editor::get_preferred_edit_position (bool ignore_playhead)
case EditAtPlayhead:
where = session->audible_frame();
break;
-
+
case EditAtSelectedMarker:
if (!selection->markers.empty()) {
bool is_start;
@@ -4498,9 +4498,9 @@ Editor::get_preferred_edit_position (bool ignore_playhead)
}
break;
}
- }
+ }
/* fallthru */
-
+
default:
case EditAtMouse:
if (!mouse_frame (where, ignored)) {
@@ -4520,7 +4520,7 @@ Editor::set_loop_range (nframes64_t start, nframes64_t end, string cmd)
if (!session) return;
begin_reversible_command (cmd);
-
+
Location* tll;
if ((tll = transport_loop_location()) == 0) {
@@ -4537,7 +4537,7 @@ Editor::set_loop_range (nframes64_t start, nframes64_t end, string cmd)
XMLNode &after = tll->get_state();
session->add_command (new MementoCommand<Location>(*tll, &before, &after));
}
-
+
commit_reversible_command ();
}
@@ -4547,7 +4547,7 @@ Editor::set_punch_range (nframes64_t start, nframes64_t end, string cmd)
if (!session) return;
begin_reversible_command (cmd);
-
+
Location* tpl;
if ((tpl = transport_punch_location()) == 0) {
@@ -4565,7 +4565,7 @@ Editor::set_punch_range (nframes64_t start, nframes64_t end, string cmd)
XMLNode &after = tpl->get_state();
session->add_command (new MementoCommand<Location>(*tpl, &before, &after));
}
-
+
commit_reversible_command ();
}
@@ -4590,7 +4590,7 @@ Editor::get_regions_at (RegionSelection& rs, nframes64_t where, const TrackSelec
if (rtv) {
boost::shared_ptr<Diskstream> ds;
boost::shared_ptr<Playlist> pl;
-
+
if ((ds = rtv->get_diskstream()) && ((pl = ds->playlist()))) {
Playlist::RegionList* regions = pl->regions_at (
@@ -4625,7 +4625,7 @@ Editor::get_regions_after (RegionSelection& rs, nframes64_t where, const TrackSe
if (rtv) {
boost::shared_ptr<Diskstream> ds;
boost::shared_ptr<Playlist> pl;
-
+
if ((ds = rtv->get_diskstream()) && ((pl = ds->playlist()))) {
Playlist::RegionList* regions = pl->regions_touched (
@@ -4666,14 +4666,14 @@ Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered, bool al
}
if (allow_edit_position) {
-
+
TrackSelection tracks = selection->tracks;
-
+
/* tracks is currently the set of selected tracks; add any other tracks that
* have regions that are in the same edit-activated route group as one of
* our regions */
for (RegionSelection::iterator i = rs.begin (); i != rs.end(); ++i) {
-
+
RouteGroup* g = (*i)->get_time_axis_view().route_group ();
if (g && g->active_property (RouteGroup::Edit)) {
tracks.add (axis_views_from_routes (g->route_list()));
@@ -4690,34 +4690,34 @@ void
Editor::get_regions_corresponding_to (boost::shared_ptr<Region> region, vector<RegionView*>& regions)
{
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
-
+
RouteTimeAxisView* tatv;
-
+
if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
-
+
boost::shared_ptr<Playlist> pl;
vector<boost::shared_ptr<Region> > results;
RegionView* marv;
boost::shared_ptr<Diskstream> ds;
-
+
if ((ds = tatv->get_diskstream()) == 0) {
/* bus */
continue;
}
-
+
if ((pl = (ds->playlist())) != 0) {
pl->get_region_list_equivalent_regions (region, results);
}
-
+
for (vector<boost::shared_ptr<Region> >::iterator ir = results.begin(); ir != results.end(); ++ir) {
if ((marv = tatv->view()->find_view (*ir)) != 0) {
regions.push_back (marv);
}
}
-
+
}
}
-}
+}
void
Editor::show_rhythm_ferret ()
@@ -4756,8 +4756,8 @@ Editor::first_idle ()
{
MessageDialog* dialog = 0;
- if (track_views.size() > 1) {
- dialog = new MessageDialog (*this,
+ if (track_views.size() > 1) {
+ dialog = new MessageDialog (*this,
_("Please wait while Ardour loads visual data"),
true,
Gtk::MESSAGE_INFO,
@@ -4772,7 +4772,7 @@ Editor::first_idle ()
// first idle adds route children (automation tracks), so we need to redisplay here
_routes->redisplay ();
-
+
delete dialog;
_have_idled = true;
@@ -4826,18 +4826,18 @@ Editor::idle_resize ()
if (dynamic_cast<AutomationTimeAxisView*> (_pending_resize_view) == 0 &&
selection->tracks.contains (_pending_resize_view)) {
-
+
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
if (*i != _pending_resize_view) {
(*i)->idle_resize ((*i)->current_height() + _pending_resize_amount);
}
}
}
-
+
flush_canvas ();
_group_tabs->set_dirty ();
resize_idle_id = -1;
-
+
return false;
}
@@ -4881,7 +4881,7 @@ TrackSelection
Editor::axis_views_from_routes (list<Route*> r) const
{
TrackSelection t;
-
+
for (list<Route*>::const_iterator i = r.begin(); i != r.end(); ++i) {
TimeAxisView* tv = axis_view_from_route (*i);
if (tv) {
@@ -4897,7 +4897,7 @@ void
Editor::handle_new_route (RouteList& routes)
{
ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_route), routes));
-
+
RouteTimeAxisView *rtv;
list<RouteTimeAxisView*> new_views;
@@ -4920,12 +4920,12 @@ Editor::handle_new_route (RouteList& routes)
new_views.push_back (rtv);
track_views.push_back (rtv);
-
+
rtv->effective_gain_display ();
-
+
rtv->view()->RegionViewAdded.connect (mem_fun (*this, &Editor::region_view_added));
rtv->view()->HeightChanged.connect (mem_fun (*this, &Editor::streamview_height_changed));
-
+
rtv->GoingAway.connect (bind (mem_fun(*this, &Editor::remove_route), rtv));
}
@@ -4965,7 +4965,7 @@ Editor::remove_route (TimeAxisView *tv)
next_tv = (*i);
}
}
-
+
if (current_mixer_strip && current_mixer_strip->route() == route) {
if (next_tv) {
@@ -4977,7 +4977,7 @@ Editor::remove_route (TimeAxisView *tv)
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
}
- }
+ }
}
void
@@ -4997,10 +4997,10 @@ bool
Editor::sync_track_view_list_and_routes ()
{
track_views = TrackSelection (_routes->views ());
-
+
_summary->set_dirty ();
_group_tabs->set_dirty ();
-
+
return false; // do not call again (until needed)
}
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 76830f4474..bd092d2640 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2003 Paul Davis
+ Copyright (C) 2000-2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -138,10 +138,10 @@ struct EditorCursor {
ArdourCanvas::Line canvas_item;
nframes64_t current_frame;
double length;
-
+
EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~EditorCursor ();
-
+
void set_position (nframes64_t);
void set_length (double units);
void set_y_axis (double position);
@@ -154,7 +154,7 @@ class Editor : public PublicEditor
public:
Editor ();
~Editor ();
-
+
void connect_to_session (ARDOUR::Session *);
ARDOUR::Session* current_session() const { return session; }
void first_idle ();
@@ -165,7 +165,7 @@ class Editor : public PublicEditor
nframes64_t current_page_frames() const {
return (nframes64_t) floor (_canvas_width * frames_per_unit);
}
-
+
double canvas_height () const {
return _canvas_height;
}
@@ -215,7 +215,7 @@ class Editor : public PublicEditor
void set_show_waveforms_recording (bool yn);
bool show_waveforms_recording() const { return _show_waveforms_recording; }
-
+
/* things that need to be public to be used in the main menubar */
void new_region_from_selection ();
@@ -232,7 +232,7 @@ class Editor : public PublicEditor
nframes64_t unit_to_frame (double unit) const {
return (nframes64_t) rint (unit * frames_per_unit);
}
-
+
double frame_to_unit (nframes64_t frame) const {
return rint ((double) frame / (double) frames_per_unit);
}
@@ -245,11 +245,11 @@ class Editor : public PublicEditor
the result of using the world->canvas affine transform on a
world coordinate. These coordinates already take into
account any scrolling carried out by adjusting the
- xscroll_adjustment.
+ xscroll_adjustment.
*/
nframes64_t pixel_to_frame (double pixel) const {
-
+
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
affine, that means that the location *really* is "off
@@ -282,7 +282,7 @@ class Editor : public PublicEditor
void invert_selection_in_track ();
void invert_selection ();
void deselect_all ();
-
+
void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
/* tempo */
@@ -296,7 +296,7 @@ class Editor : public PublicEditor
void analyze_range_selection();
/* export */
-
+
void export_audio ();
void export_selection ();
void export_range ();
@@ -346,7 +346,7 @@ class Editor : public PublicEditor
void nudge_backward_capture_offset ();
/* playhead/screen stuff */
-
+
void set_follow_playhead (bool yn);
void toggle_follow_playhead ();
bool follow_playhead() const { return _follow_playhead; }
@@ -422,7 +422,7 @@ class Editor : public PublicEditor
void show_verbose_canvas_cursor_with (const std::string& txt);
void hide_verbose_canvas_cursor();
-
+
protected:
void map_transport_state ();
void map_position_change (nframes64_t);
@@ -432,13 +432,13 @@ class Editor : public PublicEditor
private:
void color_handler ();
-
+
ARDOUR::Session *session; ///< The session that we are editing, or 0
bool constructed;
// to keep track of the playhead position for control_scroll
boost::optional<nframes64_t> _control_scroll_target;
-
+
PlaylistSelector* _playlist_selector;
typedef std::pair<TimeAxisView*,XMLNode*> TAVState;
@@ -451,7 +451,7 @@ class Editor : public PublicEditor
bool zoomed_to_region;
std::list<TAVState> track_states;
};
-
+
std::list<VisualState*> undo_visual_stack;
std::list<VisualState*> redo_visual_stack;
VisualState* current_visual_state (bool with_tracks = true);
@@ -460,7 +460,7 @@ class Editor : public PublicEditor
void use_visual_state (VisualState&);
bool no_save_visual;
void swap_visual_state ();
-
+
std::vector<VisualState*> visual_states;
sigc::connection visual_state_op_connection;
void start_visual_state_op (uint32_t n);
@@ -476,7 +476,7 @@ class Editor : public PublicEditor
Editing::MouseMode mouse_mode;
bool _internal_editing;
-
+
int post_maximal_editor_width;
int post_maximal_pane_position;
int pre_maximal_pane_position;
@@ -515,7 +515,7 @@ class Editor : public PublicEditor
bool valid;
LocationMarkers () : start(0), end(0), valid (true) {}
-
+
~LocationMarkers ();
void hide();
@@ -575,7 +575,7 @@ class Editor : public PublicEditor
void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
void select_all_tracks ();
-
+
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
void set_selected_track_as_side_effect (bool force = false);
@@ -584,7 +584,7 @@ class Editor : public PublicEditor
bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::weak_ptr<ARDOUR::Region>);
void collect_new_region_view (RegionView *);
void collect_and_select_new_region_view (RegionView *);
-
+
Gtk::Menu track_context_menu;
Gtk::Menu track_region_context_menu;
Gtk::Menu track_selection_context_menu;
@@ -626,7 +626,7 @@ class Editor : public PublicEditor
bool verbose_cursor_visible;
void parameter_changed (std::string);
-
+
bool track_canvas_motion (GdkEvent*);
void set_verbose_canvas_cursor (const std::string &, double x, double y);
@@ -664,20 +664,20 @@ class Editor : public PublicEditor
/** The group containing all items that require horizontal scrolling. */
ArdourCanvas::Group* _background_group;
- /*
+ /*
The _master_group is the group containing all items
that require horizontal scrolling..
- It is primarily used to separate canvas items
- that require horizontal scrolling from those that do not.
+ It is primarily used to separate canvas items
+ that require horizontal scrolling from those that do not.
*/
ArdourCanvas::Group* _master_group;
/* The group containing all trackviews. Only scrolled vertically. */
ArdourCanvas::Group* _trackview_group;
-
+
/* The group used for region motion. Sits on top of _trackview_group */
ArdourCanvas::Group* _region_motion_group;
-
+
enum RulerType {
ruler_metric_smpte = 0,
ruler_metric_bbt = 1,
@@ -704,19 +704,19 @@ class Editor : public PublicEditor
Glib::RefPtr<Gtk::ToggleAction> ruler_loop_punch_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
bool no_ruler_shown_update;
-
+
gint ruler_button_press (GdkEventButton*);
gint ruler_button_release (GdkEventButton*);
gint ruler_mouse_motion (GdkEventMotion*);
bool ruler_scroll (GdkEventScroll* event);
Gtk::Widget * ruler_grabbed_widget;
-
+
void initialize_rulers ();
void update_just_smpte ();
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
void update_fixed_rulers ();
- void update_tempo_based_rulers ();
+ void update_tempo_based_rulers ();
void popup_ruler_menu (nframes64_t where = 0, ItemType type = RegionItem);
void update_ruler_visibility ();
void set_ruler_visible (RulerType, bool);
@@ -725,12 +725,12 @@ class Editor : public PublicEditor
gint ruler_label_button_release (GdkEventButton*);
void store_ruler_visibility ();
void restore_ruler_visibility ();
-
+
static gint _metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
-
+
enum MinsecRulerScale {
minsec_show_seconds,
minsec_show_minutes,
@@ -801,14 +801,14 @@ class Editor : public PublicEditor
gdouble canvas_timebars_vsize;
gdouble get_canvas_timebars_vsize () const { return canvas_timebars_vsize; }
Gtk::Menu *editor_ruler_menu;
-
+
ArdourCanvas::SimpleRect* tempo_bar;
ArdourCanvas::SimpleRect* meter_bar;
ArdourCanvas::SimpleRect* marker_bar;
ArdourCanvas::SimpleRect* range_marker_bar;
ArdourCanvas::SimpleRect* transport_marker_bar;
ArdourCanvas::SimpleRect* cd_marker_bar;
-
+
Gtk::Label minsec_label;
Gtk::Label bbt_label;
Gtk::Label smpte_label;
@@ -824,7 +824,7 @@ class Editor : public PublicEditor
Gtk::HBox time_button_hbox;
friend class EditorCursor;
-
+
EditorCursor* playhead_cursor;
ArdourCanvas::Group* cursor_group;
@@ -861,7 +861,7 @@ class Editor : public PublicEditor
Gtk::HBox top_hbox;
Gtk::HBox bottom_hbox;
-
+
Gtk::Table edit_packer;
Gtk::VScrollbar edit_vscrollbar;
@@ -877,7 +877,7 @@ class Editor : public PublicEditor
bool _dragging_hscrollbar;
void reset_hscrollbar_stepping ();
-
+
bool hscrollbar_button_press (GdkEventButton*);
bool hscrollbar_button_release (GdkEventButton*);
void hscrollbar_allocate (Gtk::Allocation &alloc);
@@ -904,7 +904,7 @@ class Editor : public PublicEditor
sigc::connection control_scroll_connection;
gdouble get_trackview_group_vertical_offset () const { return vertical_adjustment.get_value () - canvas_timebars_vsize;}
-
+
ArdourCanvas::Group* get_background_group () const { return _background_group; }
ArdourCanvas::Group* get_trackview_group () const { return _trackview_group; }
double last_trackview_group_vertical_offset;
@@ -913,19 +913,19 @@ class Editor : public PublicEditor
void scroll_canvas_vertically ();
struct VisualChange {
- enum Type {
+ enum Type {
TimeOrigin = 0x1,
ZoomLevel = 0x2,
YOrigin = 0x4
};
-
+
Type pending;
nframes64_t time_origin;
double frames_per_unit;
double y_origin;
-
+
int idle_handler_id;
-
+
VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {}
void add (Type t) {
pending = Type (pending | t);
@@ -948,7 +948,7 @@ class Editor : public PublicEditor
/* named selections */
struct NamedSelectionDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
- NamedSelectionDisplayModelColumns() {
+ NamedSelectionDisplayModelColumns() {
add (text);
add (selection);
}
@@ -1005,9 +1005,9 @@ class Editor : public PublicEditor
nframes64_t last_update_frame;
void center_screen (nframes64_t);
void center_screen_internal (nframes64_t, float);
-
+
void update_current_screen ();
-
+
void session_going_away ();
nframes64_t cut_buffer_start;
@@ -1021,7 +1021,7 @@ class Editor : public PublicEditor
bool motion_handler (ArdourCanvas::Item*, GdkEvent*, bool from_autoscroll = false);
bool enter_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool leave_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
-
+
/* KEYMAP HANDLING */
void register_actions ();
@@ -1039,7 +1039,7 @@ class Editor : public PublicEditor
void paste_internal (nframes64_t position, float times);
/* EDITING OPERATIONS */
-
+
void reset_point_selection ();
void toggle_region_mute ();
void toggle_region_lock ();
@@ -1143,7 +1143,7 @@ class Editor : public PublicEditor
void insert_route_list_drag (boost::shared_ptr<ARDOUR::Route>, int x, int y);
/* import & embed */
-
+
void add_external_audio_action (Editing::ImportMode);
void external_audio_dialog ();
void session_import_dialog ();
@@ -1152,15 +1152,15 @@ class Editor : public PublicEditor
bool check_multichannel_status (const std::vector<Glib::ustring>& paths);
SoundFileOmega* sfbrowser;
-
+
void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos);
bool idle_drop_paths (std::vector<Glib::ustring> paths, nframes64_t frame, double ypos);
void drop_paths_part_two (const std::vector<Glib::ustring>& paths, nframes64_t frame, double ypos);
-
+
int import_sndfiles (std::vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos,
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>, bool, uint32_t total);
- int embed_sndfiles (std::vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
+ int embed_sndfiles (std::vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
int add_sources (std::vector<Glib::ustring> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode,
@@ -1172,7 +1172,7 @@ class Editor : public PublicEditor
boost::shared_ptr<ARDOUR::MidiTrack> get_nth_selected_midi_track (int nth) const;
/* generic interthread progress window */
-
+
ArdourDialog* interthread_progress_window;
Gtk::Label interthread_progress_label;
Gtk::VBox interthread_progress_vbox;
@@ -1304,12 +1304,12 @@ class Editor : public PublicEditor
void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
-
+
void set_fade_length (bool in);
void toggle_fade_active (bool in);
void set_fade_in_active (bool);
void set_fade_out_active (bool);
-
+
std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
RegionSelection pre_drag_region_selection;
@@ -1352,7 +1352,7 @@ class Editor : public PublicEditor
bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_out_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
-
+
// These variables are used to detect a feedback loop and break it to avoid a gui hang
private:
@@ -1416,15 +1416,15 @@ public:
void initialize_canvas ();
/* display control */
-
+
bool _show_measures;
/// true if the editor should follow the playhead, otherwise false
bool _follow_playhead;
/// true if waveforms should be shown while recording audio tracks, otherwise false
bool _show_waveforms_recording;
-
+
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
-
+
TempoLines* tempo_lines;
ArdourCanvas::Group* time_line_group;
@@ -1442,13 +1442,13 @@ public:
void remove_meter_marker (ArdourCanvas::Item*);
gint real_remove_tempo_marker (ARDOUR::TempoSection*);
gint real_remove_meter_marker (ARDOUR::MeterSection*);
-
+
void edit_tempo_section (ARDOUR::TempoSection*);
void edit_meter_section (ARDOUR::MeterSection*);
void edit_tempo_marker (ArdourCanvas::Item*);
void edit_meter_marker (ArdourCanvas::Item*);
void edit_control_point (ArdourCanvas::Item*);
-
+
void marker_menu_edit ();
void marker_menu_remove ();
void marker_menu_rename ();
@@ -1496,7 +1496,7 @@ public:
void compute_current_bbt_points (nframes_t left, nframes_t right);
void tempo_map_changed (ARDOUR::Change);
void redisplay_tempo (bool immediate_redraw);
-
+
void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
void snap_to_with_modifier (nframes64_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
void snap_to (nframes64_t& first, nframes64_t& last, int32_t direction = 0, bool for_mark = false);
@@ -1519,12 +1519,12 @@ public:
Gtk::Button tav_expand_button;
Gtk::Button tav_shrink_button;
-
+
Gtk::VBox toolbar_clock_vbox;
- Gtk::VBox toolbar_selection_clock_vbox;
+ Gtk::VBox toolbar_selection_clock_vbox;
Gtk::Table toolbar_selection_clock_table;
Gtk::Label toolbar_selection_cursor_label;
-
+
Gtk::HBox mouse_mode_button_box;
Gtkmm2ext::TearOff* mouse_mode_tearoff;
Gtk::ToggleButton mouse_select_button;
@@ -1572,7 +1572,7 @@ public:
Gtk::VBox zoom_focus_box;
std::vector<std::string> zoom_focus_strings;
-
+
void zoom_focus_selection_done ();
void zoom_focus_chosen (Editing::ZoomFocus);
@@ -1585,7 +1585,7 @@ public:
void zoom_adjustment_changed();
void edit_point_clock_changed();
-
+
void setup_toolbar ();
Gtkmm2ext::TearOff* tools_tearoff;
@@ -1600,7 +1600,7 @@ public:
Gtk::ToggleButton midi_sound_notes;
void midi_panic ();
bool sound_notes () const { return midi_sound_notes.get_active(); }
-
+
void setup_midi_toolbar ();
/* selection process */
@@ -1647,13 +1647,13 @@ public:
ARDOUR::Location* transport_punch_location();
ARDOUR::Location *temp_location;
-
+
/* object rubberband select process */
-
+
bool select_all_within (nframes64_t start, nframes64_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
-
+
ArdourCanvas::SimpleRect *rubberband_rect;
-
+
/* mouse zoom process */
ArdourCanvas::SimpleRect *zoom_rect;
@@ -1663,7 +1663,7 @@ public:
EditorRoutes* _routes;
EditorRegions* _regions;
EditorSnapshots* _snapshots;
-
+
/* diskstream/route display management */
Glib::RefPtr<Gdk::Pixbuf> rec_enabled_icon;
Glib::RefPtr<Gdk::Pixbuf> rec_disabled_icon;
@@ -1778,7 +1778,7 @@ public:
void begin_reversible_command (std::string cmd_name);
void commit_reversible_command ();
- void update_title ();
+ void update_title ();
void update_title_s (const std::string & snapshot_name);
struct State {
@@ -1795,7 +1795,7 @@ public:
void instant_save ();
boost::shared_ptr<ARDOUR::AudioRegion> last_audition_region;
-
+
/* freeze operations */
ARDOUR::InterThreadInfo freeze_status;
@@ -1814,7 +1814,7 @@ public:
/* duplication */
void duplicate_dialog (bool with_dialog);
-
+
nframes64_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
/* returns false if mouse pointer is not in track or marker canvas
@@ -1855,7 +1855,7 @@ public:
/* xfades */
bool _xfade_visibility;
-
+
#ifdef WITH_CMT
void handle_new_imageframe_time_axis_view(const std::string & track_name, void* src) ;
void handle_new_imageframe_marker_time_axis_view(const std::string & track_name, TimeAxisView* marked_track) ;
@@ -1883,7 +1883,7 @@ public:
void imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
void imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
void imageframe_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
-
+
void markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
void markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
void markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
@@ -1916,7 +1916,7 @@ public:
bool nudge_forward_release (GdkEventButton*);
bool nudge_backward_release (GdkEventButton*);
-
+
/* audio filters */
void apply_filter (ARDOUR::Filter&, std::string cmd);
@@ -1989,7 +1989,7 @@ public:
void get_regions_at (RegionSelection&, nframes64_t where, const TrackSelection& ts) const;
void get_regions_after (RegionSelection&, nframes64_t where, const TrackSelection& ts) const;
-
+
void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
sigc::connection fast_screen_update_connection;
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 0418942164..dea84f4789 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ Editor::register_actions ()
RefPtr<Action> act;
editor_actions = ActionGroup::create (X_("Editor"));
-
+
/* non-operative menu items for menu bar */
ActionManager::register_action (editor_actions, X_("AlignMenu"), _("Align"));
@@ -199,12 +199,12 @@ Editor::register_actions ()
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "select-all-in-loop-range", _("Select All in Loop Range"), mem_fun(*this, &Editor::select_all_selectables_using_loop));
ActionManager::session_sensitive_actions.push_back (act);
-
+
act = ActionManager::register_action (editor_actions, "select-next-route", _("Select Next Track/Bus"), mem_fun(*this, &Editor::select_next_route));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "select-prev-route", _("Select Previous Track/Bus"), mem_fun(*this, &Editor::select_prev_route));
ActionManager::session_sensitive_actions.push_back (act);
-
+
act = ActionManager::register_action (editor_actions, "track-record-enable-toggle", _("Toggle Record Enable"), mem_fun(*this, &Editor::toggle_record_enable));
ActionManager::session_sensitive_actions.push_back (act);
@@ -404,7 +404,7 @@ Editor::register_actions ()
act = ActionManager::register_action (editor_actions, "add-range-markers-from-region", _("Add Range Marker(s)"), mem_fun(*this, &Editor::add_locations_from_audio_region));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act);
-
+
act = ActionManager::register_action (editor_actions, "set-fade-in-length", _("Set Fade In Length"), bind (mem_fun(*this, &Editor::set_fade_length), true));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "toggle-fade-in-active", _("Toggle Fade In Active"), bind (mem_fun(*this, &Editor::toggle_fade_active), true));
@@ -553,7 +553,7 @@ Editor::register_actions ()
act = ActionManager::register_action (editor_actions, "quantize-region", _("Quantize Region"), mem_fun(*this, &Editor::quantize_region));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act);
-
+
act = ActionManager::register_action (editor_actions, "set-tempo-from-region", _("Set Tempo from Region=Bar"), mem_fun(*this, &Editor::use_region_as_bar));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::region_selection_sensitive_actions.push_back (act);
@@ -705,9 +705,9 @@ Editor::register_actions ()
mouse_timefx_button.set_image (*(manage (new Image (::get_icon("tool_stretch")))));
mouse_timefx_button.set_label ("");
mouse_timefx_button.set_name ("MouseModeButton");
-
+
ActionManager::register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), bind (mem_fun(*this, &Editor::step_mouse_mode), true));
-
+
act = ActionManager::register_toggle_action (mouse_mode_actions, "toggle-internal-edit", _("Edit MIDI"), mem_fun(*this, &Editor::toggle_internal_editing));
act->connect_proxy (internal_edit_button);
internal_edit_button.set_image (*(manage (new Image (::get_icon("tool_note")))));
@@ -762,7 +762,7 @@ Editor::register_actions ()
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to Region Boundary"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionBoundary)));
/* RULERS */
-
+
Glib::RefPtr<ActionGroup> ruler_actions = ActionGroup::create (X_("Rulers"));
ruler_tempo_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_tempo)));
ruler_meter_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Meter"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_meter)));
@@ -797,7 +797,7 @@ Editor::register_actions ()
}
ruler_samples_action->set_active (false);
no_ruler_shown_update = false;
-
+
/* REGION LIST */
Glib::RefPtr<ActionGroup> rl_actions = ActionGroup::create (X_("RegionList"));
@@ -820,7 +820,7 @@ Editor::register_actions ()
bind (mem_fun (*_regions, &EditorRegions::reset_sort_direction), true));
ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortDescending"), _("Descending"),
bind (mem_fun (*_regions, &EditorRegions::reset_sort_direction), false));
-
+
ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionName"), _("By Region Name"),
bind (mem_fun (*_regions, &EditorRegions::reset_sort_type), ByName, false));
ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionLength"), _("By Region Length"),
@@ -841,7 +841,7 @@ Editor::register_actions ()
bind (mem_fun (*_regions, &EditorRegions::reset_sort_type), BySourceFileCreationDate, false));
ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"), _("By Source Filesystem"),
bind (mem_fun (*_regions, &EditorRegions::reset_sort_type), BySourceFileFS, false));
-
+
/* the next two are duplicate items with different names for use in two different contexts */
@@ -861,9 +861,9 @@ Editor::register_actions ()
ActionManager::register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), mem_fun (*this, &Editor::set_summary));
ActionManager::register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), mem_fun (*this, &Editor::set_group_tabs));
-
+
ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measures"), mem_fun (*this, &Editor::toggle_measure_visibility));
-
+
/* if there is a logo in the editor canvas, its always visible at startup */
act = ActionManager::register_toggle_action (editor_actions, X_("ToggleLogoVisibility"), _("Show Logo"), mem_fun (*this, &Editor::toggle_logo_visibility));
@@ -997,7 +997,7 @@ Editor::snap_type_action (SnapType type)
const char* action = 0;
RefPtr<Action> act;
-
+
switch (type) {
case Editing::SnapToCDFrame:
action = "snap-to-cd-frame";
@@ -1151,7 +1151,7 @@ Editor::snap_mode_action (SnapMode mode)
{
const char* action = 0;
RefPtr<Action> act;
-
+
switch (mode) {
case Editing::SnapOff:
action = X_("snap-off");
@@ -1166,13 +1166,13 @@ Editor::snap_mode_action (SnapMode mode)
fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap mode type", (int) mode) << endmsg;
/*NOTREACHED*/
}
-
+
act = ActionManager::get_action (X_("Editor"), action);
-
+
if (act) {
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
return ract;
-
+
} else {
error << string_compose (_("programming error: %1: %2"), "Editor::snap_mode_chosen could not find action to match mode.", action) << endmsg;
return RefPtr<RadioAction> ();
@@ -1215,7 +1215,7 @@ Editor::edit_point_action (EditPoint ep)
{
const char* action = 0;
RefPtr<Action> act;
-
+
switch (ep) {
case Editing::EditAtPlayhead:
action = X_("edit-at-playhead");
@@ -1230,13 +1230,13 @@ Editor::edit_point_action (EditPoint ep)
fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible edit point type", (int) ep) << endmsg;
/*NOTREACHED*/
}
-
+
act = ActionManager::get_action (X_("Editor"), action);
-
+
if (act) {
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
return ract;
-
+
} else {
error << string_compose (_("programming error: %1: %2"), "Editor::edit_point_action could not find action to match edit point.", action) << endmsg;
return RefPtr<RadioAction> ();
@@ -1264,7 +1264,7 @@ Editor::zoom_focus_action (ZoomFocus focus)
{
const char* action = 0;
RefPtr<Action> act;
-
+
switch (focus) {
case ZoomFocusLeft:
action = X_("zoom-focus-left");
@@ -1288,9 +1288,9 @@ Editor::zoom_focus_action (ZoomFocus focus)
fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible focus type", (int) focus) << endmsg;
/*NOTREACHED*/
}
-
+
act = ActionManager::get_action (X_("Zoom"), action);
-
+
if (act) {
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
return ract;
@@ -1343,7 +1343,7 @@ Editor::parameter_changed (std::string p)
} else if (p == "show-track-meters") {
toggle_meter_updating();
} else if (p == "show-summary") {
-
+
bool const s = session->config.get_show_summary ();
if (s) {
_summary->show ();
@@ -1390,7 +1390,7 @@ Editor::reset_canvas_action_sensitivity (bool onoff)
onoff = true;
}
- for (vector<Glib::RefPtr<Action> >::iterator x = ActionManager::mouse_edit_point_requires_canvas_actions.begin();
+ for (vector<Glib::RefPtr<Action> >::iterator x = ActionManager::mouse_edit_point_requires_canvas_actions.begin();
x != ActionManager::mouse_edit_point_requires_canvas_actions.end(); ++x) {
(*x)->set_sensitive (onoff);
}
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index 8459ccba6e..53438b9dcb 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ Editor::add_external_audio_action (ImportMode mode_hint)
msg.run ();
return;
}
-
+
if (sfbrowser == 0) {
sfbrowser = new SoundFileOmega (*this, _("Add existing media"), session, 0, true, mode_hint);
} else {
@@ -101,12 +101,12 @@ Editor::external_audio_dialog ()
msg.run ();
return;
}
-
+
track_cnt = 0;
for (TrackSelection::iterator x = selection->tracks.begin(); x != selection->tracks.end(); ++x) {
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*>(*x);
-
+
if (!atv) {
continue;
} else if (atv->is_audio_track()) {
@@ -247,7 +247,7 @@ Editor::check_whether_and_how_to_import(string path, bool all_or_nothing)
dialog.add_button("Import", 1);
dialog.add_button("Cancel", 2);
}
-
+
//dialog.add_button("Skip all", 4); // All or rest?
dialog.show();
@@ -265,60 +265,60 @@ Editor::get_nth_selected_audio_track (int nth) const
{
AudioTimeAxisView* atv;
TrackSelection::iterator x;
-
+
for (x = selection->tracks.begin(); nth > 0 && x != selection->tracks.end(); ++x) {
atv = dynamic_cast<AudioTimeAxisView*>(*x);
-
+
if (!atv) {
continue;
} else if (atv->is_audio_track()) {
--nth;
}
}
-
+
if (x == selection->tracks.end()) {
atv = dynamic_cast<AudioTimeAxisView*>(selection->tracks.back());
} else {
atv = dynamic_cast<AudioTimeAxisView*>(*x);
}
-
+
if (!atv || !atv->is_audio_track()) {
return boost::shared_ptr<AudioTrack>();
}
-
+
return atv->audio_track();
-}
+}
boost::shared_ptr<MidiTrack>
Editor::get_nth_selected_midi_track (int nth) const
{
MidiTimeAxisView* mtv;
TrackSelection::iterator x;
-
+
for (x = selection->tracks.begin(); nth > 0 && x != selection->tracks.end(); ++x) {
mtv = dynamic_cast<MidiTimeAxisView*>(*x);
-
+
if (!mtv) {
continue;
} else if (mtv->is_midi_track()) {
--nth;
}
}
-
+
if (x == selection->tracks.end()) {
mtv = dynamic_cast<MidiTimeAxisView*>(selection->tracks.back());
} else {
mtv = dynamic_cast<MidiTimeAxisView*>(*x);
}
-
+
if (!mtv || !mtv->is_midi_track()) {
return boost::shared_ptr<MidiTrack>();
}
-
+
return mtv->midi_track();
-}
+}
void
Editor::do_import (vector<ustring> paths, ImportDisposition chns, ImportMode mode, SrcQuality quality, nframes64_t& pos)
@@ -360,23 +360,23 @@ Editor::do_import (vector<ustring> paths, ImportDisposition chns, ImportMode mod
to_import.push_back (*a);
}
}
-
+
bool ok = true;
switch (chns) {
case Editing::ImportDistinctFiles:
-
+
if (mode == Editing::ImportToTrack) {
track = get_nth_selected_audio_track (nth++);
}
-
+
ok = (import_sndfiles (to_import, mode, quality, pos, 1, -1, track, false, to_import.size()) == 0);
break;
-
+
case Editing::ImportDistinctChannels:
ok = (import_sndfiles (to_import, mode, quality, pos, -1, -1, track, false, to_import.size()) == 0);
break;
-
+
case Editing::ImportSerializeFiles:
ok = (import_sndfiles (to_import, mode, quality, pos, 1, 1, track, false, to_import.size()) == 0);
break;
@@ -416,7 +416,7 @@ Editor::do_embed (vector<ustring> paths, ImportDisposition chns, ImportMode mode
}
}
break;
-
+
case Editing::ImportDistinctChannels:
for (vector<ustring>::iterator a = paths.begin(); a != paths.end(); ++a) {
@@ -449,15 +449,15 @@ Editor::do_embed (vector<ustring> paths, ImportDisposition chns, ImportMode mode
}
ok = true;
-
- out:
+
+ out:
if (ok) {
session->save_state ("");
}
}
int
-Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality quality, nframes64_t& pos,
+Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality quality, nframes64_t& pos,
int target_regions, int target_tracks, boost::shared_ptr<Track> track, bool replace, uint32_t total)
{
WindowTitle title = string_compose (_("importing %1"), paths.front());
@@ -483,9 +483,9 @@ Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality qual
import_status.target_regions = target_regions;
import_status.track = track;
import_status.replace = replace;
- interthread_progress_connection = Glib::signal_timeout().connect
+ interthread_progress_connection = Glib::signal_timeout().connect
(bind (mem_fun(*this, &Editor::import_progress_timeout), (gpointer) 0), 500);
-
+
track_canvas->get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH));
gdk_flush ();
@@ -496,7 +496,7 @@ Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality qual
pthread_create_and_store ("import", &import_status.thread, 0, _import_thread, this);
pthread_detach (import_status.thread);
-
+
while (!import_status.done && !import_status.cancel) {
gtk_main_iteration ();
}
@@ -504,20 +504,20 @@ Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality qual
interthread_progress_window->hide ();
import_status.done = true;
interthread_progress_connection.disconnect ();
-
+
if (!import_status.cancel && !import_status.sources.empty()) {
- if (add_sources (import_status.paths,
- import_status.sources,
- import_status.pos,
- import_status.mode,
- import_status.target_regions,
- import_status.target_tracks,
+ if (add_sources (import_status.paths,
+ import_status.sources,
+ import_status.pos,
+ import_status.mode,
+ import_status.target_regions,
+ import_status.target_tracks,
import_status.track, false) == 0) {
session->save_state ("");
}
-
+
/* update position from results */
-
+
pos = import_status.pos;
}
@@ -546,12 +546,12 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
ustring path = *p;
/* lets see if we can link it into the session */
-
+
sys::path tmp = session->session_directory().sound_path() / Glib::path_get_basename(path);
linked_path = tmp.to_string();
path_to_use = linked_path;
-
+
if (link (path.c_str(), linked_path.c_str()) == 0) {
/* there are many reasons why link(2) might have failed.
@@ -559,7 +559,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
session sound dir that will protect against
unlinking of the original path. nice.
*/
-
+
path = linked_path;
path_to_use = Glib::path_get_basename (path);
@@ -578,31 +578,31 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
}
}
}
-
+
/* note that we temporarily truncated _id at the colon */
-
+
string error_msg;
if (!AudioFileSource::get_soundfile_info (path, finfo, error_msg)) {
error << string_compose(_("Editor: cannot open file \"%1\", (%2)"), path, error_msg ) << endmsg;
goto out;
}
-
+
if (check_sample_rate && (finfo.samplerate != (int) session->frame_rate())) {
vector<string> choices;
-
+
if (multifile) {
choices.push_back (_("Cancel entire import"));
choices.push_back (_("Don't embed it"));
choices.push_back (_("Embed all without questions"));
-
+
Gtkmm2ext::Choice rate_choice (
- string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"),
+ string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"),
short_path (path, 40)),
choices, false);
-
+
int resx = rate_choice.run ();
-
+
switch (resx) {
case 0: /* stop a multi-file import */
ret = -2;
@@ -622,13 +622,13 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
} else {
choices.push_back (_("Cancel"));
choices.push_back (_("Embed it anyway"));
-
+
Gtkmm2ext::Choice rate_choice (
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path),
choices, false);
-
+
int resx = rate_choice.run ();
-
+
switch (resx) {
case 0: /* don't import */
ret = -1;
@@ -641,7 +641,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
}
}
}
-
+
track_canvas->get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH));
for (int n = 0; n < finfo.channels; ++n) {
@@ -665,13 +665,13 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
}
sources.push_back(source);
- }
-
+ }
+
catch (failed_constructor& err) {
error << string_compose(_("could not open %1"), path) << endmsg;
goto out;
}
-
+
ARDOUR_UI::instance()->flush_pending ();
}
}
@@ -688,7 +688,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
}
int
-Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64_t& pos, ImportMode mode,
+Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64_t& pos, ImportMode mode,
int target_regions, int target_tracks, boost::shared_ptr<Track>& track, bool /*add_channel_suffix*/)
{
vector<boost::shared_ptr<Region> > regions;
@@ -696,7 +696,7 @@ Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64
uint32_t input_chan = 0;
uint32_t output_chan = 0;
bool use_timestamp;
-
+
use_timestamp = (pos == -1);
if (use_timestamp) {
@@ -716,17 +716,17 @@ Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64
/* take all the sources we have and package them up as a region */
region_name = region_name_from_path (paths.front(), (sources.size() > 1), false);
-
+
boost::shared_ptr<Region> r = RegionFactory::create (sources, 0, sources[0]->length(pos), region_name, 0,
Region::Flag (Region::DefaultFlags|Region::WholeFile|Region::External));
if (use_timestamp && boost::dynamic_pointer_cast<AudioRegion>(r)) {
boost::dynamic_pointer_cast<AudioRegion>(r)->special_set_position(sources[0]->natural_position());
}
-
+
regions.push_back (r);
-
+
} else if (target_regions == -1 || target_regions > 1) {
/* take each source and create a region for each one */
@@ -739,16 +739,16 @@ Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64
just_one.clear ();
just_one.push_back (*x);
-
+
region_name = region_name_from_path ((*x)->path(), false, false, sources.size(), n);
boost::shared_ptr<Region> r = RegionFactory::create (just_one, 0, (*x)->length(pos), region_name, 0,
Region::Flag (Region::DefaultFlags|Region::WholeFile|Region::External));
-
+
if (use_timestamp && boost::dynamic_pointer_cast<AudioRegion>(r)) {
boost::dynamic_pointer_cast<AudioRegion>(r)->special_set_position((*x)->natural_position());
}
-
+
regions.push_back (r);
}
}
@@ -779,7 +779,7 @@ Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64
track.reset ();
} else {
pos += (*r)->length();
- }
+ }
}
/* setup peak file building in another thread */
@@ -790,9 +790,9 @@ Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64
return 0;
}
-
+
int
-Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t in_chans, uint32_t out_chans, nframes64_t& pos,
+Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t in_chans, uint32_t out_chans, nframes64_t& pos,
ImportMode mode, boost::shared_ptr<Track>& existing_track)
{
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(region);
@@ -802,7 +802,7 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t
case ImportAsRegion:
/* relax, its been done */
break;
-
+
case ImportToTrack:
{
if (!existing_track) {
@@ -829,7 +829,7 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t
}
case ImportAsTrack:
- {
+ {
if (!existing_track) {
if (ar) {
list<boost::shared_ptr<AudioTrack> > at (session->new_audio_track (in_chans, out_chans, Normal, 0, 1));
@@ -923,9 +923,9 @@ Editor::import_progress_timeout (void */*arg*/)
if (reset) {
/* the window is now visible, speed up the updates */
-
+
interthread_progress_connection.disconnect ();
- interthread_progress_connection = Glib::signal_timeout().connect
+ interthread_progress_connection = Glib::signal_timeout().connect
(bind (mem_fun(*this, &Editor::import_progress_timeout), (gpointer) 0), 100);
return false;
} else {
diff --git a/gtk2_ardour/editor_audiotrack.cc b/gtk2_ardour/editor_audiotrack.cc
index 997bf41a3f..084a7f9984 100644
--- a/gtk2_ardour/editor_audiotrack.cc
+++ b/gtk2_ardour/editor_audiotrack.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -73,7 +73,7 @@ gint
Editor::stop_updating ()
{
RouteTimeAxisView* rtv;
-
+
meters_running = false;
fast_screen_update_connection.disconnect();
//cerr << "Editor::stop_updating () called" << endl;//DEBUG
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index b99189218a..cd3ee76116 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2005 Paul Davis
+ Copyright (C) 2005 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -69,22 +69,22 @@ GType gnome_canvas_imageframe_get_type(void);
}
-static void ardour_canvas_type_init()
+static void ardour_canvas_type_init()
{
// Map gtypes to gtkmm wrapper-creation functions:
-
+
Glib::wrap_register(gnome_canvas_simpleline_get_type(), &Gnome::Canvas::SimpleLine_Class::wrap_new);
Glib::wrap_register(gnome_canvas_simplerect_get_type(), &Gnome::Canvas::SimpleRect_Class::wrap_new);
Glib::wrap_register(gnome_canvas_waveview_get_type(), &Gnome::Canvas::WaveView_Class::wrap_new);
// Glib::wrap_register(gnome_canvas_imageframe_get_type(), &Gnome::Canvas::ImageFrame_Class::wrap_new);
-
+
// Register the gtkmm gtypes:
(void) Gnome::Canvas::WaveView::get_type();
(void) Gnome::Canvas::SimpleLine::get_type();
(void) Gnome::Canvas::SimpleRect::get_type();
(void) Gnome::Canvas::ImageFrame::get_type();
-}
+}
void
Editor::initialize_canvas ()
@@ -94,7 +94,7 @@ Editor::initialize_canvas ()
} else {
track_canvas = new ArdourCanvas::CanvasAA ();
}
-
+
ArdourCanvas::init ();
ardour_canvas_type_init ();
@@ -120,11 +120,11 @@ Editor::initialize_canvas ()
verbose_canvas_cursor->property_anchor() = ANCHOR_NW;
delete font;
-
+
verbose_cursor_visible = false;
/* on the bottom, an image */
-
+
if (Profile->get_sae()) {
Image img (::get_icon (X_("saelogo")));
logo_item = new ArdourCanvas::Pixbuf (*track_canvas->root(), 0.0, 0.0, img.get_pixbuf());
@@ -135,7 +135,7 @@ Editor::initialize_canvas ()
logo_item->show ();
}
- /* a group to hold time (measure) lines */
+ /* a group to hold time (measure) lines */
time_line_group = new ArdourCanvas::Group (*track_canvas->root());
#ifdef GTKOSX
@@ -186,7 +186,7 @@ Editor::initialize_canvas ()
range_marker_bar->property_outline_pixels() = 0;
}
range_marker_bar->property_outline_what() = (0x1 | 0x8);
-
+
transport_marker_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
if (Profile->get_sae()) {
transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height - 1));
@@ -206,7 +206,7 @@ Editor::initialize_canvas ()
marker_bar->property_outline_pixels() = 0;
}
marker_bar->property_outline_what() = (0x1 | 0x8);
-
+
cd_marker_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
if (Profile->get_sae()) {
cd_marker_bar = new ArdourCanvas::SimpleRect (*cd_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height - 1));
@@ -245,27 +245,27 @@ Editor::initialize_canvas ()
transport_punchin_line->property_x2() = 0.0;
transport_punchin_line->property_y2() = physical_screen_height;
transport_punchin_line->hide ();
-
+
transport_punchout_line = new ArdourCanvas::SimpleLine (*_master_group);
transport_punchout_line->property_x1() = 0.0;
transport_punchout_line->property_y1() = 0.0;
transport_punchout_line->property_x2() = 0.0;
transport_punchout_line->property_y2() = physical_screen_height;
transport_punchout_line->hide();
-
+
// used to show zoom mode active zooming
zoom_rect = new ArdourCanvas::SimpleRect (*_master_group, 0.0, 0.0, 0.0, 0.0);
zoom_rect->property_outline_pixels() = 1;
zoom_rect->hide();
-
+
zoom_rect->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_zoom_rect_event), (ArdourCanvas::Item*) 0));
-
+
// used as rubberband rect
rubberband_rect = new ArdourCanvas::SimpleRect (*_trackview_group, 0.0, 0.0, 0.0, 0.0);
rubberband_rect->property_outline_pixels() = 1;
rubberband_rect->hide();
-
+
tempo_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_tempo_bar_event), tempo_bar));
meter_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_meter_bar_event), meter_bar));
marker_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_marker_bar_event), marker_bar));
@@ -295,7 +295,7 @@ Editor::initialize_canvas ()
/* set up drag-n-drop */
vector<TargetEntry> target_table;
-
+
// Drag-N-Drop from the region list can generate this target
target_table.push_back (TargetEntry ("regions"));
@@ -336,7 +336,7 @@ Editor::track_canvas_size_allocated ()
height += (*i)->effective_height ();
(*i)->clip_to_viewport ();
}
-
+
full_canvas_height = height + canvas_timebars_vsize;
}
@@ -344,7 +344,7 @@ Editor::track_canvas_size_allocated ()
if (playhead_cursor) {
playhead_cursor->set_length (_canvas_height);
}
-
+
for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
(*x)->set_line_vpos (0, _canvas_height);
}
@@ -352,7 +352,7 @@ Editor::track_canvas_size_allocated ()
vertical_adjustment.set_page_size (_canvas_height);
last_trackview_group_vertical_offset = get_trackview_group_vertical_offset ();
if ((vertical_adjustment.get_value() + _canvas_height) >= vertical_adjustment.get_upper()) {
- /*
+ /*
We're increasing the size of the canvas while the bottom is visible.
We scroll down to keep in step with the controls layout.
*/
@@ -381,14 +381,14 @@ Editor::controls_layout_size_request (Requisition* req)
}
gint height = min ((gint) pos, (gint) (physical_screen_height - 600));
-
+
bool changed = false;
gint w = edit_controls_vbox.get_width();
if (_group_tabs->is_mapped()) {
w += _group_tabs->get_width ();
}
-
+
gint width = max (w, controls_layout.get_width());
/* don't get too big. the fudge factors here are just guesses */
@@ -407,7 +407,7 @@ Editor::controls_layout_size_request (Requisition* req)
}
req->width = width;
- /* this one is important: it determines how big the layout thinks it really is, as
+ /* this one is important: it determines how big the layout thinks it really is, as
opposed to what it displays on the screen
*/
controls_layout.property_width () = vbox_width;
@@ -426,7 +426,7 @@ Editor::controls_layout_size_request (Requisition* req)
if (changed) {
controls_layout_size_request_connection = controls_layout.signal_size_request().connect (mem_fun (*this, &Editor::controls_layout_size_request));
}
- //cerr << "sizes = " << req->width << " " << edit_controls_vbox.get_width() << " " << controls_layout.get_width() << " " << zoom_box.get_width() << " " << time_button_frame.get_width() << endl;//DEBUG
+ //cerr << "sizes = " << req->width << " " << edit_controls_vbox.get_width() << " " << controls_layout.get_width() << " " << zoom_box.get_width() << " " << time_button_frame.get_width() << endl;//DEBUG
}
bool
@@ -438,9 +438,9 @@ Editor::track_canvas_map_handler (GdkEventAny* /*ev*/)
return false;
}
-void
+void
Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context,
- int x, int y,
+ int x, int y,
const SelectionData& data,
guint info, guint time)
{
@@ -471,21 +471,21 @@ Editor::drop_paths_part_two (const vector<ustring>& paths, nframes64_t frame, do
frame = 0;
if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
- do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, SrcBest, frame);
+ do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, SrcBest, frame);
} else {
do_embed (paths, Editing::ImportDistinctFiles, ImportAsTrack, frame);
}
-
+
} else if ((tv = dynamic_cast<RouteTimeAxisView*> (tvp.first)) != 0) {
/* check that its an audio track, not a bus */
-
+
if (tv->get_diskstream()) {
/* select the track, then embed/import */
selection->set (tv);
if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
- do_import (paths, Editing::ImportSerializeFiles, Editing::ImportToTrack, SrcBest, frame);
+ do_import (paths, Editing::ImportSerializeFiles, Editing::ImportToTrack, SrcBest, frame);
} else {
do_embed (paths, Editing::ImportSerializeFiles, ImportToTrack, frame);
}
@@ -495,7 +495,7 @@ Editor::drop_paths_part_two (const vector<ustring>& paths, nframes64_t frame, do
void
Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
- int x, int y,
+ int x, int y,
const SelectionData& data,
guint info, guint time)
{
@@ -507,20 +507,20 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
double cy;
if (convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
-
+
/* D-n-D coordinates are window-relative, so convert to "world" coordinates
*/
track_canvas->window_to_world (x, y, wx, wy);
-
+
ev.type = GDK_BUTTON_RELEASE;
ev.button.x = wx;
ev.button.y = wy;
-
+
frame = event_frame (&ev, 0, &cy);
-
+
snap_to (frame);
-
+
#ifdef GTKOSX
/* We are not allowed to call recursive main event loops from within
the main event loop with GTK/Quartz. Since import/embed wants
@@ -537,7 +537,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
void
Editor::drop_regions (const RefPtr<Gdk::DragContext>& /*context*/,
- int /*x*/, int /*y*/,
+ int /*x*/, int /*y*/,
const SelectionData& /*data*/,
guint /*info*/, guint /*time*/)
{
@@ -586,7 +586,7 @@ Editor::maybe_autoscroll (GdkEventMotion* event, bool allow_vert)
if ((autoscroll_x != last_autoscroll_x) || (autoscroll_y != last_autoscroll_y) || (autoscroll_x == 0 && autoscroll_y == 0)) {
stop_canvas_autoscroll ();
}
-
+
if (startit && autoscroll_timeout_tag < 0) {
start_canvas_autoscroll (autoscroll_x, autoscroll_y);
}
@@ -672,13 +672,13 @@ Editor::autoscroll_canvas ()
new_pixel = min (top_of_bottom_of_canvas, new_pixel);
target_pixel = _drag->current_pointer_y() + autoscroll_y_distance;
-
+
/* don't move to the full canvas height because the item will be invisible
(its top edge will line up with the bottom of the visible canvas.
*/
target_pixel = min (target_pixel, full_canvas_height - 10);
-
+
} else {
target_pixel = _drag->current_pointer_y();
new_pixel = vertical_pos;
@@ -717,7 +717,7 @@ Editor::autoscroll_canvas ()
autoscroll_timeout_tag = g_idle_add ( _autoscroll_canvas, this);
return false;
- }
+ }
return true;
}
@@ -737,7 +737,7 @@ Editor::start_canvas_autoscroll (int dx, int dy)
autoscroll_x_distance = (nframes64_t) floor (current_page_frames()/50.0);
autoscroll_y_distance = fabs (dy * 5); /* pixels */
autoscroll_cnt = 0;
-
+
/* do it right now, which will start the repeated callbacks */
autoscroll_canvas ();
@@ -921,7 +921,7 @@ Editor::update_canvas_now ()
and need_redraw to FALSE without checking to see if an idle handler is scheduled.
If one is scheduled, GC should probably remove it.
*/
-
+
GnomeCanvas* c = track_canvas->gobj ();
if (c->need_update || c->need_redraw) {
track_canvas->update_now ();
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index 2ea0a476fb..c176652547 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
double wx, wy;
nframes64_t xdelta;
int direction = ev->direction;
-
+
Gnome::Canvas::Item* item = track_canvas->get_item_at(ev->x, ev->y);
InteractiveItem* interactive_item = dynamic_cast<InteractiveItem*>(item);
if (interactive_item) {
@@ -77,9 +77,9 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
case GDK_SCROLL_UP:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
//if (ev->state == GDK_CONTROL_MASK) {
- /* XXX
+ /* XXX
the ev->x will be out of step with the canvas
- if we're in mid zoom, so we have to get the damn mouse
+ if we're in mid zoom, so we have to get the damn mouse
pointer again
*/
track_canvas->get_pointer (x, y);
@@ -89,7 +89,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.type = GDK_BUTTON_RELEASE;
event.button.x = wx;
event.button.y = wy;
-
+
nframes64_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (false, where);
return true;
@@ -124,7 +124,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.type = GDK_BUTTON_RELEASE;
event.button.x = wx;
event.button.y = wy;
-
+
nframes64_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (true, where);
return true;
@@ -147,7 +147,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
scroll_tracks_down_line ();
return true;
}
- break;
+ break;
case GDK_SCROLL_LEFT:
xdelta = (current_page_frames() / 8);
@@ -226,7 +226,7 @@ bool
Editor::typed_event (ArdourCanvas::Item* item, GdkEvent *event, ItemType type)
{
gint ret = FALSE;
-
+
switch (event->type) {
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
@@ -304,7 +304,7 @@ bool
Editor::canvas_stream_view_event (GdkEvent *event, ArdourCanvas::Item* item, RouteTimeAxisView *tv)
{
bool ret = FALSE;
-
+
switch (event->type) {
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
@@ -406,11 +406,11 @@ Editor::canvas_fade_in_event (GdkEvent *event, ArdourCanvas::Item* item, AudioRe
default:
break;
-
+
}
/* proxy for the regionview */
-
+
return canvas_region_view_event (event, rv->get_canvas_group(), rv);
}
@@ -418,7 +418,7 @@ bool
Editor::canvas_fade_in_handle_event (GdkEvent *event, ArdourCanvas::Item* item, AudioRegionView *rv)
{
bool ret = false;
-
+
if (!rv->sensitive()) {
return false;
}
@@ -485,11 +485,11 @@ Editor::canvas_fade_out_event (GdkEvent *event, ArdourCanvas::Item* item, AudioR
default:
break;
-
+
}
/* proxy for the regionview */
-
+
return canvas_region_view_event (event, rv->get_canvas_group(), rv);
}
@@ -497,7 +497,7 @@ bool
Editor::canvas_fade_out_handle_event (GdkEvent *event, ArdourCanvas::Item* item, AudioRegionView *rv)
{
bool ret = false;
-
+
if (!rv->sensitive()) {
return false;
}
@@ -553,7 +553,7 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
clicked_axisview = &clicked_crossfadeview->get_time_axis_view();
if (event->button.button == 3) {
return button_press_handler (item, event, CrossfadeViewItem);
- }
+ }
break;
case GDK_BUTTON_RELEASE:
@@ -565,7 +565,7 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
default:
break;
-
+
}
/* XXX do not forward double clicks */
@@ -573,13 +573,13 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
if (event->type == GDK_2BUTTON_PRESS) {
return false;
}
-
+
/* proxy for an underlying regionview */
/* XXX really need to check if we are in the name highlight,
and proxy to that when required.
*/
-
+
TimeAxisView& tv (xfv->get_time_axis_view());
AudioTimeAxisView* atv;
@@ -589,26 +589,26 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
boost::shared_ptr<AudioPlaylist> pl;
if ((pl = boost::dynamic_pointer_cast<AudioPlaylist> (atv->get_diskstream()->playlist())) != 0) {
-
+
Playlist::RegionList* rl = pl->regions_at (event_frame (event));
if (!rl->empty()) {
-
+
if (atv->layer_display() == Overlaid) {
-
+
/* we're in overlaid mode; proxy to the uppermost region view */
-
+
DescendingRegionLayerSorter cmp;
rl->sort (cmp);
-
+
RegionView* rv = atv->view()->find_view (rl->front());
-
+
delete rl;
-
+
/* proxy */
return canvas_region_view_event (event, rv->get_canvas_group(), rv);
} else {
-
+
/* we're in stacked mode; proxy to the region view under the mouse */
/* XXX: FIXME: this is an evil hack; it assumes that any event for which
@@ -692,7 +692,7 @@ bool
Editor::canvas_selection_rect_event (GdkEvent *event, ArdourCanvas::Item* item, SelectionRect* rect)
{
bool ret = false;
-
+
switch (event->type) {
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
@@ -718,7 +718,7 @@ Editor::canvas_selection_rect_event (GdkEvent *event, ArdourCanvas::Item* item,
default:
break;
}
-
+
return ret;
}
@@ -751,7 +751,7 @@ Editor::canvas_selection_start_trim_event (GdkEvent *event, ArdourCanvas::Item*
default:
break;
}
-
+
return ret;
}
@@ -784,7 +784,7 @@ Editor::canvas_selection_end_trim_event (GdkEvent *event, ArdourCanvas::Item* it
default:
break;
}
-
+
return ret;
}
@@ -1012,7 +1012,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const & /*c*/,
double px;
double py;
nframes64_t const pos = event_frame (&event, &px, &py);
-
+
std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py);
if (tv.first == 0) {
return true;
@@ -1027,20 +1027,20 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const & /*c*/,
boost::shared_ptr<Region> region_copy = RegionFactory::create (region);
- if (boost::dynamic_pointer_cast<AudioRegion> (region_copy) != 0 &&
+ if (boost::dynamic_pointer_cast<AudioRegion> (region_copy) != 0 &&
dynamic_cast<AudioTimeAxisView*> (tv.first) == 0) {
/* audio -> non-audio */
return true;
}
- if (boost::dynamic_pointer_cast<MidiRegion> (region_copy) == 0 &&
+ if (boost::dynamic_pointer_cast<MidiRegion> (region_copy) == 0 &&
dynamic_cast<MidiTimeAxisView*> (tv.first) != 0) {
/* MIDI -> non-MIDI */
return true;
}
-
+
_drag = new RegionInsertDrag (this, region_copy, rtav, pos);
_drag->start_grab (&event);
}
diff --git a/gtk2_ardour/editor_component.cc b/gtk2_ardour/editor_component.cc
index e78f7804f1..3265caca74 100644
--- a/gtk2_ardour/editor_component.cc
+++ b/gtk2_ardour/editor_component.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ EditorComponent::EditorComponent (Editor* e)
{
}
-
+
void
EditorComponent::connect_to_session (Session* s)
{
diff --git a/gtk2_ardour/editor_component.h b/gtk2_ardour/editor_component.h
index 328bfb15b2..e5ec1259dc 100644
--- a/gtk2_ardour/editor_component.h
+++ b/gtk2_ardour/editor_component.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ protected:
private:
void session_going_away ();
-
+
};
#endif
diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc
index bedff56701..0d5c3da667 100644
--- a/gtk2_ardour/editor_cursors.cc
+++ b/gtk2_ardour/editor_cursors.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ void
EditorCursor::set_position (nframes64_t frame)
{
PositionChanged (frame);
-
+
double new_pos = editor.frame_to_unit (frame);
if (new_pos != points.front().get_x()) {
@@ -76,12 +76,12 @@ EditorCursor::set_position (nframes64_t frame)
void
EditorCursor::set_length (double units)
{
- length = units;
+ length = units;
points.back().set_y (points.front().get_y() + length);
canvas_item.property_points() = points;
}
-void
+void
EditorCursor::set_y_axis (double position)
{
points.front().set_y (position);
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 5aef521608..c2e30b9aab 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -138,7 +138,7 @@ bool
Drag::end_grab (GdkEvent* event)
{
_ending = true;
-
+
_editor->stop_canvas_autoscroll ();
_item->ungrab (event ? event->button.time : 0);
@@ -158,13 +158,13 @@ nframes64_t
Drag::adjusted_current_frame (GdkEvent* event) const
{
nframes64_t pos = 0;
-
+
if (_current_pointer_frame > _pointer_frame_offset) {
pos = _current_pointer_frame - _pointer_frame_offset;
}
_editor->snap_to_with_modifier (pos, event);
-
+
return pos;
}
@@ -176,20 +176,20 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
_current_pointer_frame = _editor->event_frame (event, &_current_pointer_x, &_current_pointer_y);
if (!from_autoscroll && !_move_threshold_passed) {
-
+
bool const xp = (::llabs ((nframes64_t) (_current_pointer_x - _grab_x)) > 4LL);
bool const yp = (::llabs ((nframes64_t) (_current_pointer_y - _grab_y)) > 4LL);
-
+
_move_threshold_passed = (xp || yp);
if (apply_move_threshold() && _move_threshold_passed) {
-
+
_grab_frame = _current_pointer_frame;
_grab_x = _current_pointer_x;
_grab_y = _current_pointer_y;
_last_pointer_frame = _grab_frame;
_pointer_frame_offset = _grab_frame - _last_frame_position;
-
+
}
}
@@ -259,7 +259,7 @@ RegionMotionDrag::RegionMotionDrag (Editor* e, ArdourCanvas::Item* i, RegionView
_dest_layer (0),
_brushing (b)
{
-
+
}
@@ -267,7 +267,7 @@ void
RegionMotionDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
{
Drag::start_grab (event);
-
+
_editor->show_verbose_time_cursor (_last_frame_position, 10);
}
@@ -278,30 +278,30 @@ RegionMotionDrag::get_time_axis_view_summary ()
TimeAxisViewSummary sum;
_editor->visible_order_range (&sum.visible_y_low, &sum.visible_y_high);
-
+
/* get a bitmask representing the visible tracks */
for (Editor::TrackViewList::iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
TimeAxisView::Children children_list;
-
+
/* zeroes are audio/MIDI tracks. ones are other types. */
-
+
if (!rtv->hidden()) {
-
+
if (!rtv->is_track()) {
/* not an audio nor MIDI track */
sum.tracks = sum.tracks |= (0x01 << rtv->order());
}
-
+
sum.height_list[rtv->order()] = (*i)->current_height();
children = 1;
if ((children_list = rtv->get_child_list()).size() > 0) {
- for (TimeAxisView::Children::iterator j = children_list.begin(); j != children_list.end(); ++j) {
+ for (TimeAxisView::Children::iterator j = children_list.begin(); j != children_list.end(); ++j) {
sum.tracks = sum.tracks |= (0x01 << (rtv->order() + children));
sum.height_list[rtv->order() + children] = (*j)->current_height();
- children++;
+ children++;
}
}
}
@@ -326,7 +326,7 @@ RegionMotionDrag::compute_y_delta (
}
bool clamp_y_axis = false;
-
+
/* the change in track order between this callback and the last */
*pointer_order_span = last_pointer_view->order() - current_pointer_view->order();
/* the change in layer between this callback and the last;
@@ -355,7 +355,7 @@ RegionMotionDrag::compute_y_delta (
}
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
-
+
RegionView* rv = (*i);
if (rv->region()->locked()) {
@@ -374,7 +374,7 @@ RegionMotionDrag::compute_y_delta (
/* XXX: not sure that we should be passing canvas_pointer_order_span in here,
as surely this is a per-region thing... */
-
+
clamp_y_axis = y_movement_disallowed (
rtv->order(), last_pointer_view->order(), *canvas_pointer_order_span, tavs
);
@@ -389,7 +389,7 @@ RegionMotionDrag::compute_y_delta (
if (current_pointer_layer == last_pointer_layer) {
/* No movement; clamp */
clamp_y_axis = true;
- }
+ }
}
if (!clamp_y_axis) {
@@ -405,7 +405,7 @@ double
RegionMotionDrag::compute_x_delta (GdkEvent const * event, nframes64_t* pending_region_position)
{
*pending_region_position = 0;
-
+
/* compute the amount of pointer motion in frames, and where
the region would be if we moved it by that much.
*/
@@ -414,62 +414,62 @@ RegionMotionDrag::compute_x_delta (GdkEvent const * event, nframes64_t* pending_
nframes64_t sync_frame;
nframes64_t sync_offset;
int32_t sync_dir;
-
+
*pending_region_position = _current_pointer_frame - _pointer_frame_offset;
-
+
sync_offset = _primary->region()->sync_offset (sync_dir);
-
+
/* we don't handle a sync point that lies before zero.
*/
if (sync_dir >= 0 || (sync_dir < 0 && *pending_region_position >= sync_offset)) {
-
+
sync_frame = *pending_region_position + (sync_dir*sync_offset);
-
+
_editor->snap_to_with_modifier (sync_frame, event);
-
+
*pending_region_position = _primary->region()->adjust_to_sync (sync_frame);
-
+
} else {
*pending_region_position = _last_frame_position;
}
-
+
}
-
+
if (*pending_region_position > max_frames - _primary->region()->length()) {
*pending_region_position = _last_frame_position;
}
double x_delta = 0;
-
+
if ((*pending_region_position != _last_frame_position) && x_move_allowed ()) {
-
+
/* now compute the canvas unit distance we need to move the regionview
to make it appear at the new location.
*/
x_delta = (static_cast<double> (*pending_region_position) - _last_frame_position) / _editor->frames_per_unit;
-
+
if (*pending_region_position <= _last_frame_position) {
-
+
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
-
+
RegionView* rv = (*i);
-
+
// If any regionview is at zero, we need to know so we can stop further leftward motion.
-
+
double ix1, ix2, iy1, iy2;
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
rv->get_canvas_frame()->i2w (ix1, iy1);
-
+
if (-x_delta > ix1 + _editor->horizontal_adjustment.get_value()) {
x_delta = 0;
*pending_region_position = _last_frame_position;
break;
}
}
-
+
}
-
+
_last_frame_position = *pending_region_position;
}
@@ -508,7 +508,7 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
int32_t pointer_order_span;
int32_t pointer_layer_span;
int32_t canvas_pointer_order_span;
-
+
bool const clamp_y_axis = compute_y_delta (
last_pointer_view, current_pointer_view,
last_pointer_layer, current_pointer_layer, tavs,
@@ -531,68 +531,68 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
}
/*************************************************************
- MOTION
+ MOTION
************************************************************/
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
-
+
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
-
+
RegionView* rv = (*i);
-
+
if (rv->region()->locked()) {
continue;
}
-
+
/* here we are calculating the y distance from the
top of the first track view to the top of the region
area of the track view that we're working on */
-
+
/* this x value is just a dummy value so that we have something
to pass to i2w () */
-
+
double ix1 = 0;
-
+
/* distance from the top of this track view to the region area
of our track view is always 1 */
-
+
double iy1 = 1;
-
+
/* convert to world coordinates, ie distance from the top of
the ruler section */
-
+
rv->get_canvas_frame()->i2w (ix1, iy1);
-
+
/* compensate for the ruler section and the vertical scrollbar position */
iy1 += _editor->get_trackview_group_vertical_offset ();
-
+
if (first_move) {
-
- // hide any dependent views
-
+
+ // hide any dependent views
+
rv->get_time_axis_view().hide_dependent_views (*rv);
-
- /*
- reparent to a non scrolling group so that we can keep the
+
+ /*
+ reparent to a non scrolling group so that we can keep the
region selection above all time axis views.
- reparenting means we have to move the rv as the two
+ reparenting means we have to move the rv as the two
parent groups have different coordinates.
*/
-
+
rv->get_canvas_group()->property_y() = iy1 - 1;
rv->get_canvas_group()->reparent(*(_editor->_region_motion_group));
-
+
rv->fake_set_opaque (true);
}
-
+
/* current view for this particular region */
pair<TimeAxisView*, int> pos = _editor->trackview_by_y_position (iy1);
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (pos.first);
-
+
if (pointer_order_span != 0 && !clamp_y_axis) {
-
+
/* INTER-TRACK MOVEMENT */
-
+
/* move through the height list to the track that the region is currently on */
vector<int32_t>::iterator j = tavs.height_list.begin ();
int32_t x = 0;
@@ -600,25 +600,25 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
++x;
++j;
}
-
+
y_delta = 0;
int32_t temp_pointer_order_span = canvas_pointer_order_span;
-
+
if (j != tavs.height_list.end ()) {
-
+
/* Account for layers in the original and
destination tracks. If we're moving around in layers we assume
that only one track is involved, so it's ok to use *pointer*
variables here. */
-
+
StreamView* lv = last_pointer_view->view ();
assert (lv);
-
+
/* move to the top of the last trackview */
if (lv->layer_display () == Stacked) {
y_delta -= (lv->layers() - last_pointer_layer - 1) * lv->child_height ();
}
-
+
StreamView* cv = current_pointer_view->view ();
assert (cv);
@@ -626,75 +626,75 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
if (cv->layer_display () == Stacked) {
y_delta += (cv->layers() - current_pointer_layer - 1) * cv->child_height ();
}
-
+
/* And for being on a non-topmost layer on the new
track */
-
+
while (temp_pointer_order_span > 0) {
/* we're moving up canvas-wise,
so we need to find the next track height
*/
- if (j != tavs.height_list.begin()) {
+ if (j != tavs.height_list.begin()) {
j--;
}
-
+
if (x != last_pointer_order) {
if ((*j) == 0) {
++temp_pointer_order_span;
}
}
-
+
y_delta -= (*j);
temp_pointer_order_span--;
}
-
+
while (temp_pointer_order_span < 0) {
-
+
y_delta += (*j);
-
+
if (x != last_pointer_order) {
if ((*j) == 0) {
--temp_pointer_order_span;
}
}
-
- if (j != tavs.height_list.end()) {
+
+ if (j != tavs.height_list.end()) {
j++;
}
-
+
temp_pointer_order_span++;
}
-
-
+
+
/* find out where we'll be when we move and set height accordingly */
-
+
pair<TimeAxisView*, int> const pos = _editor->trackview_by_y_position (iy1 + y_delta);
RouteTimeAxisView const * temp_rtv = dynamic_cast<RouteTimeAxisView*> (pos.first);
rv->set_height (temp_rtv->view()->child_height());
-
+
/* if you un-comment the following, the region colours will follow
the track colours whilst dragging; personally
i think this can confuse things, but never mind.
*/
-
+
//const GdkColor& col (temp_rtv->view->get_region_color());
//rv->set_color (const_cast<GdkColor&>(col));
}
}
-
+
if (pointer_order_span == 0 && pointer_layer_span != 0 && !clamp_y_axis) {
-
+
/* INTER-LAYER MOVEMENT in the same track */
y_delta = rtv->view()->child_height () * pointer_layer_span;
}
-
-
+
+
if (_brushing) {
_editor->mouse_brush_insert_region (rv, pending_region_position);
} else {
rv->move (x_delta, y_delta);
}
-
+
} /* foreach region */
if (first_move) {
@@ -745,7 +745,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
if (_brushing) {
/* all changes were made during motion event handlers */
-
+
if (_copy) {
for (list<RegionView*>::iterator i = _views.begin(); i != _views.end(); ++i) {
copies.push_back (*i);
@@ -758,7 +758,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
/* reverse this here so that we have the correct logic to finalize
the drag.
*/
-
+
if (Config->get_edit_mode() == Lock && !_copy) {
_x_constrained = !_x_constrained;
}
@@ -768,7 +768,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
_editor->begin_reversible_command (_("fixed time region copy"));
} else {
_editor->begin_reversible_command (_("region copy"));
- }
+ }
} else {
if (_x_constrained) {
_editor->begin_reversible_command (_("fixed time region drag"));
@@ -805,7 +805,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
} else {
where = rv->region()->position();
}
-
+
boost::shared_ptr<Region> new_region;
if (_copy) {
@@ -813,11 +813,11 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
new_region = rv->region();
/* undo the previous hide_dependent_views so that xfades don't
- disappear on copying regions
+ disappear on copying regions
*/
-
+
//rv->get_time_axis_view().reveal_dependent_views (*rv);
-
+
} else if (changed_tracks && dest_rtv->playlist()) {
new_region = RegionFactory::create (rv->region());
}
@@ -825,7 +825,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
if (changed_tracks || _copy) {
boost::shared_ptr<Playlist> to_playlist = dest_rtv->playlist();
-
+
if (!to_playlist) {
++i;
continue;
@@ -834,9 +834,9 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
_editor->latest_regionviews.clear ();
sigc::connection c = dest_rtv->view()->RegionViewAdded.connect (mem_fun(*_editor, &Editor::collect_new_region_view));
-
+
insert_result = modified_playlists.insert (to_playlist);
-
+
if (insert_result.second) {
_editor->session->add_command (new MementoCommand<Playlist>(*to_playlist, &to_playlist->get_state(), 0));
}
@@ -848,7 +848,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
}
c.disconnect ();
-
+
if (!_editor->latest_regionviews.empty()) {
// XXX why just the first one ? we only expect one
// commented out in nick_m's canvas reworking. is that intended?
@@ -857,32 +857,32 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
}
} else {
- /*
- motion on the same track. plonk the previously reparented region
+ /*
+ motion on the same track. plonk the previously reparented region
back to its original canvas group (its streamview).
No need to do anything for copies as they are fake regions which will be deleted.
*/
rv->get_canvas_group()->reparent (*dest_rtv->view()->canvas_item());
rv->get_canvas_group()->property_y() = 0;
-
+
/* just change the model */
-
+
boost::shared_ptr<Playlist> playlist = dest_rtv->playlist();
if (dest_rtv->view()->layer_display() == Stacked) {
rv->region()->set_layer (dest_layer);
rv->region()->set_pending_explicit_relayer (true);
}
-
+
insert_result = modified_playlists.insert (playlist);
-
+
if (insert_result.second) {
_editor->session->add_command (new MementoCommand<Playlist>(*playlist, &playlist->get_state(), 0));
}
/* freeze to avoid lots of relayering in the case of a multi-region drag */
frozen_insert_result = frozen_playlists.insert(playlist);
-
+
if (frozen_insert_result.second) {
playlist->freeze();
}
@@ -895,7 +895,7 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
/* get the playlist where this drag started. we can't use rv->region()->playlist()
because we may have copied the region and it has not been attached to a playlist.
*/
-
+
source_tv = dynamic_cast<RouteTimeAxisView*> (&rv->get_time_axis_view());
ds = source_tv->get_diskstream();
from_playlist = ds->playlist();
@@ -910,21 +910,21 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
moved to the new one - we use a copy of it. as a result,
any existing editor for the region should no longer be
visible.
- */
-
+ */
+
rv->hide_region_editor();
rv->fake_set_opaque (false);
-
+
/* remove the region from the old playlist */
insert_result = modified_playlists.insert (from_playlist);
-
+
if (insert_result.second) {
_editor->session->add_command (new MementoCommand<Playlist>(*from_playlist, &from_playlist->get_state(), 0));
}
-
+
from_playlist->remove_region (rv->region());
-
+
/* OK, this is where it gets tricky. If the playlist was being used by >1 tracks, and the region
was selected in all of them, then removing it from a playlist will have removed all
trace of it from the selection (i.e. there were N regions selected, we removed 1,
@@ -944,14 +944,14 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
if (_views.empty()) {
break;
- } else {
+ } else {
i = _views.begin();
}
} else {
++i;
}
-
+
if (_copy) {
copies.push_back (rv);
}
@@ -962,12 +962,12 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
for (set<boost::shared_ptr<Playlist> >::iterator p = frozen_playlists.begin(); p != frozen_playlists.end(); ++p) {
(*p)->thaw();
}
-
+
out:
for (set<boost::shared_ptr<Playlist> >::iterator p = modified_playlists.begin(); p != modified_playlists.end(); ++p) {
- _editor->session->add_command (new MementoCommand<Playlist>(*(*p), 0, &(*p)->get_state()));
+ _editor->session->add_command (new MementoCommand<Playlist>(*(*p), 0, &(*p)->get_state()));
}
-
+
_editor->commit_reversible_command ();
for (vector<RegionView*>::iterator x = copies.begin(); x != copies.end(); ++x) {
@@ -987,7 +987,7 @@ RegionMoveDrag::x_move_allowed () const
return _x_constrained;
}
}
-
+
return !_x_constrained;
}
@@ -1007,13 +1007,13 @@ RegionMotionDrag::copy_regions (GdkEvent* event)
/* duplicate the regionview(s) and region(s) */
list<RegionView*> new_regionviews;
-
+
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
-
+
RegionView* rv = (*i);
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(rv);
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(rv);
-
+
const boost::shared_ptr<const Region> original = rv->region();
boost::shared_ptr<Region> region_copy = RegionFactory::create (original);
@@ -1029,27 +1029,27 @@ RegionMotionDrag::copy_regions (GdkEvent* event)
} else {
continue;
}
-
+
nrv->get_canvas_group()->show ();
new_regionviews.push_back (nrv);
}
-
+
if (new_regionviews.empty()) {
return;
}
-
+
/* reflect the fact that we are dragging the copies */
-
+
_primary = new_regionviews.front();
_views = new_regionviews;
-
+
swap_grab (new_regionviews.front()->get_canvas_group (), 0, event ? event->motion.time : 0);
-
- /*
- sync the canvas to what we think is its current state
- without it, the canvas seems to
- "forget" to update properly after the upcoming reparent()
- ..only if the mouse is in rapid motion at the time of the grab.
+
+ /*
+ sync the canvas to what we think is its current state
+ without it, the canvas seems to
+ "forget" to update properly after the upcoming reparent()
+ ..only if the mouse is in rapid motion at the time of the grab.
something to do with regionview creation raking so long?
*/
_editor->update_canvas_now();
@@ -1071,10 +1071,10 @@ RegionMotionDrag::check_possible (RouteTimeAxisView** tv, layer_t* layer)
/* The region motion is only processed if the pointer is over
an audio track.
*/
-
+
if (!(*tv) || !(*tv)->is_track()) {
- /* To make sure we hide the verbose canvas cursor when the mouse is
- not held over and audiotrack.
+ /* To make sure we hide the verbose canvas cursor when the mouse is
+ not held over and audiotrack.
*/
_editor->hide_verbose_canvas_cursor ();
return false;
@@ -1093,7 +1093,7 @@ RegionMotionDrag::y_movement_disallowed (int new_order, int old_order, int y_spa
{
if (new_order != old_order) {
- /* this isn't the pointer track */
+ /* this isn't the pointer track */
if (y_span > 0) {
@@ -1109,20 +1109,20 @@ RegionMotionDrag::y_movement_disallowed (int new_order, int old_order, int y_spa
while (tavs.height_list[new_order - (visible_tracks - n)] == 0) {
/* passing through a hidden track */
n--;
- }
+ }
}
-
+
if (tavs.tracks[new_order - (y_span - n)] != 0x00) {
/* moving to a non-track; disallow */
return true;
}
-
+
} else {
/* moving beyond the lowest visible track; disallow */
return true;
- }
-
+ }
+
} else if (y_span < 0) {
/* moving down the canvas */
@@ -1132,30 +1132,30 @@ RegionMotionDrag::y_movement_disallowed (int new_order, int old_order, int y_spa
int32_t n = 0;
while (visible_tracks > y_span ) {
visible_tracks--;
-
+
while (tavs.height_list[new_order - (visible_tracks - n)] == 0) {
/* passing through a hidden track */
n++;
- }
+ }
}
-
+
if (tavs.tracks[new_order - (y_span - n)] != 0x00) {
/* moving to a non-track; disallow */
return true;
}
-
+
} else {
/* moving beyond the highest visible track; disallow */
return true;
}
- }
-
+ }
+
} else {
-
+
/* this is the pointer's track */
-
+
if ((new_order - y_span) > tavs.visible_y_high) {
/* we will overflow */
return true;
@@ -1174,7 +1174,7 @@ RegionMoveDrag::RegionMoveDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p,
_copy (c)
{
TimeAxisView* const tv = &_primary->get_time_axis_view ();
-
+
_dest_trackview = tv;
if (tv->layer_display() == Overlaid) {
_dest_layer = 0;
@@ -1195,7 +1195,7 @@ void
RegionMoveDrag::start_grab (GdkEvent* event, Gdk::Cursor* c)
{
RegionMotionDrag::start_grab (event, c);
-
+
_pointer_frame_offset = _grab_frame - _last_frame_position;
}
@@ -1206,7 +1206,7 @@ RegionInsertDrag::RegionInsertDrag (Editor* e, boost::shared_ptr<Region> r, Rout
(boost::dynamic_pointer_cast<MidiRegion> (r) && dynamic_cast<MidiTimeAxisView*> (v)));
_primary = v->view()->create_region_view (r, false, false);
-
+
_primary->get_canvas_group()->show ();
_primary->set_position (pos, 0);
_views.push_back (_primary);
@@ -1222,7 +1222,7 @@ map<RegionView*, pair<RouteTimeAxisView*, int> >
RegionMotionDrag::find_time_axis_views_and_layers ()
{
map<RegionView*, pair<RouteTimeAxisView*, int> > tav;
-
+
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
double ix1, ix2, iy1, iy2;
@@ -1244,7 +1244,7 @@ RegionInsertDrag::finished (GdkEvent* /*event*/, bool /*movement_occurred*/)
_editor->update_canvas_now ();
map<RegionView*, pair<RouteTimeAxisView*, int> > final = find_time_axis_views_and_layers ();
-
+
RouteTimeAxisView* dest_rtv = final[_primary].first;
_primary->get_canvas_group()->reparent (*dest_rtv->view()->canvas_item());
@@ -1280,7 +1280,7 @@ RegionSpliceDrag::motion (GdkEvent* /*event*/, bool)
{
RouteTimeAxisView* tv;
layer_t layer;
-
+
if (!check_possible (&tv, &layer)) {
return;
}
@@ -1314,7 +1314,7 @@ RegionSpliceDrag::motion (GdkEvent* /*event*/, bool)
if (!playlist->region_is_shuffle_constrained ((*i)->region())) {
continue;
- }
+ }
if (dir > 0) {
if (_current_pointer_frame < (*i)->region()->last_frame() + 1) {
@@ -1326,7 +1326,7 @@ RegionSpliceDrag::motion (GdkEvent* /*event*/, bool)
}
}
-
+
playlist->shuffle ((*i)->region(), dir);
_grab_x = _current_pointer_x;
@@ -1336,7 +1336,7 @@ RegionSpliceDrag::motion (GdkEvent* /*event*/, bool)
void
RegionSpliceDrag::finished (GdkEvent* /*event*/, bool)
{
-
+
}
@@ -1344,14 +1344,14 @@ RegionCreateDrag::RegionCreateDrag (Editor* e, ArdourCanvas::Item* i, TimeAxisVi
: Drag (e, i),
_view (v)
{
-
+
}
void
RegionCreateDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
{
_dest_trackview = _view;
-
+
Drag::start_grab (event);
}
@@ -1364,7 +1364,7 @@ RegionCreateDrag::motion (GdkEvent* /*event*/, bool first_move)
}
// TODO: resize region-create-drag region view here
-}
+}
void
RegionCreateDrag::finished (GdkEvent* event, bool movement_occurred)
@@ -1387,7 +1387,7 @@ NoteResizeDrag::NoteResizeDrag (Editor* e, ArdourCanvas::Item* i)
: Drag (e, i)
, region (0)
{
-
+
}
void
@@ -1395,14 +1395,14 @@ NoteResizeDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
{
Gdk::Cursor cursor;
ArdourCanvas::CanvasNote* cnote = dynamic_cast<ArdourCanvas::CanvasNote*>(_item);
-
+
Drag::start_grab (event);
region = &cnote->region_view();
double region_start = region->get_position_pixels();
double middle_point = region_start + cnote->x1() + (cnote->x2() - cnote->x1()) / 2.0L;
-
+
if (_grab_x <= middle_point) {
cursor = Gdk::Cursor(Gdk::LEFT_SIDE);
at_front = true;
@@ -1410,9 +1410,9 @@ NoteResizeDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
cursor = Gdk::Cursor(Gdk::RIGHT_SIDE);
at_front = false;
}
-
+
_item->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, cursor, event->motion.time);
-
+
if (event->motion.state & Keyboard::PrimaryModifier) {
relative = false;
} else {
@@ -1425,7 +1425,7 @@ NoteResizeDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
/* has to be relative, may make no sense otherwise */
relative = true;
}
-
+
region->note_selected (cnote, true);
for (MidiRegionSelection::iterator r = ms.begin(); r != ms.end(); ) {
@@ -1444,7 +1444,7 @@ NoteResizeDrag::motion (GdkEvent* /*event*/, bool /*first_move*/)
for (MidiRegionSelection::iterator r = ms.begin(); r != ms.end(); ++r) {
(*r)->update_resizing (at_front, _current_pointer_x - _grab_x, relative);
}
-}
+}
void
NoteResizeDrag::finished (GdkEvent*, bool /*movement_occurred*/)
@@ -1458,7 +1458,7 @@ NoteResizeDrag::finished (GdkEvent*, bool /*movement_occurred*/)
void
RegionGainDrag::motion (GdkEvent* /*event*/, bool)
{
-
+
}
void
@@ -1483,13 +1483,13 @@ TrimDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
if (tv && tv->is_track()) {
speed = tv->get_diskstream()->speed();
}
-
+
nframes64_t region_start = (nframes64_t) (_primary->region()->position() / speed);
nframes64_t region_end = (nframes64_t) (_primary->region()->last_frame() / speed);
nframes64_t region_length = (nframes64_t) (_primary->region()->length() / speed);
Drag::start_grab (event, _editor->trimmer_cursor);
-
+
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
_operation = ContentsTrim;
} else {
@@ -1505,13 +1505,13 @@ TrimDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
switch (_operation) {
case StartTrim:
- _editor->show_verbose_time_cursor (region_start, 10);
+ _editor->show_verbose_time_cursor (region_start, 10);
break;
case EndTrim:
- _editor->show_verbose_time_cursor (region_end, 10);
+ _editor->show_verbose_time_cursor (region_end, 10);
break;
case ContentsTrim:
- _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
+ _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
break;
}
}
@@ -1526,9 +1526,9 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
bool obey_snap = !Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier());
/* snap modifier works differently here..
- its' current state has to be passed to the
- various trim functions in order to work properly
- */
+ its' current state has to be passed to the
+ various trim functions in order to work properly
+ */
double speed = 1.0;
TimeAxisView* tvp = &_primary->get_time_axis_view ();
@@ -1538,7 +1538,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
if (tv && tv->is_track()) {
speed = tv->get_diskstream()->speed();
}
-
+
if (_last_pointer_frame > _current_pointer_frame) {
left_direction = true;
} else {
@@ -1568,7 +1568,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
(*i)->fake_set_opaque(false);
(*i)->region()->freeze ();
-
+
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
if (arv){
@@ -1601,7 +1601,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
non_overlap_trim = true;
}
- switch (_operation) {
+ switch (_operation) {
case StartTrim:
if ((left_direction == false) && (_current_pointer_frame <= rv->region()->first_frame()/speed)) {
break;
@@ -1612,7 +1612,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
}
break;
}
-
+
case EndTrim:
if ((left_direction == true) && (_current_pointer_frame > (nframes64_t) (rv->region()->last_frame()/speed))) {
break;
@@ -1623,7 +1623,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
}
break;
}
-
+
case ContentsTrim:
{
bool swap_direction = false;
@@ -1631,7 +1631,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
swap_direction = true;
}
-
+
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i)
{
_editor->single_contents_trim (**i, frame_delta, left_direction, swap_direction, obey_snap);
@@ -1642,13 +1642,13 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
switch (_operation) {
case StartTrim:
- _editor->show_verbose_time_cursor((nframes64_t) (rv->region()->position()/speed), 10);
+ _editor->show_verbose_time_cursor((nframes64_t) (rv->region()->position()/speed), 10);
break;
case EndTrim:
- _editor->show_verbose_time_cursor((nframes64_t) (rv->region()->last_frame()/speed), 10);
+ _editor->show_verbose_time_cursor((nframes64_t) (rv->region()->last_frame()/speed), 10);
break;
case ContentsTrim:
- _editor->show_verbose_time_cursor(_current_pointer_frame, 10);
+ _editor->show_verbose_time_cursor(_current_pointer_frame, 10);
break;
}
@@ -1661,22 +1661,22 @@ TrimDrag::finished (GdkEvent* event, bool movement_occurred)
{
if (movement_occurred) {
motion (event, false);
-
+
if (!_editor->selection->selected (_primary)) {
- _editor->thaw_region_after_trim (*_primary);
+ _editor->thaw_region_after_trim (*_primary);
} else {
-
+
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
_editor->thaw_region_after_trim (**i);
(*i)->fake_set_opaque (true);
}
}
-
+
for (set<boost::shared_ptr<Playlist> >::iterator p = _editor->motion_frozen_playlists.begin(); p != _editor->motion_frozen_playlists.end(); ++p) {
(*p)->thaw ();
_editor->session->add_command (new MementoCommand<Playlist>(*(*p).get(), 0, &(*p)->get_state()));
}
-
+
_editor->motion_frozen_playlists.clear ();
_editor->commit_reversible_command();
@@ -1702,25 +1702,25 @@ MeterMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
// The actual copying is not done before we reach the finish callback.
char name[64];
snprintf (name, sizeof(name), "%g/%g", _marker->meter().beats_per_bar(), _marker->meter().note_divisor ());
- MeterMarker* new_marker = new MeterMarker(*_editor, *_editor->meter_group, ARDOUR_UI::config()->canvasvar_MeterMarker.get(), name,
+ MeterMarker* new_marker = new MeterMarker(*_editor, *_editor->meter_group, ARDOUR_UI::config()->canvasvar_MeterMarker.get(), name,
*new MeterSection (_marker->meter()));
_item = &new_marker->the_item ();
_marker = new_marker;
-
+
} else {
MetricSection& section (_marker->meter());
-
+
if (!section.movable()) {
return;
}
-
+
}
Drag::start_grab (event, cursor);
-
- _pointer_frame_offset = _grab_frame - _marker->meter().frame();
+
+ _pointer_frame_offset = _grab_frame - _marker->meter().frame();
_editor->show_verbose_time_cursor (_current_pointer_frame, 10);
}
@@ -1729,13 +1729,13 @@ void
MeterMarkerDrag::motion (GdkEvent* event, bool)
{
nframes64_t const adjusted_frame = adjusted_current_frame (event);
-
+
if (adjusted_frame == _last_pointer_frame) {
return;
}
_marker->set_position (adjusted_frame);
-
+
_last_pointer_frame = adjusted_frame;
_editor->show_verbose_time_cursor (adjusted_frame, 10);
@@ -1749,12 +1749,12 @@ MeterMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
}
motion (event, false);
-
+
BBT_Time when;
-
+
TempoMap& map (_editor->session->tempo_map());
map.bbt_time (_last_pointer_frame, when);
-
+
if (_copy == true) {
_editor->begin_reversible_command (_("copy meter mark"));
XMLNode &before = map.get_state();
@@ -1789,12 +1789,12 @@ TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
{
if (_copy) {
-
+
// create a dummy marker for visual representation of moving the copy.
// The actual copying is not done before we reach the finish callback.
char name[64];
snprintf (name, sizeof (name), "%.2f", _marker->tempo().beats_per_minute());
- TempoMarker* new_marker = new TempoMarker(*_editor, *_editor->tempo_group, ARDOUR_UI::config()->canvasvar_TempoMarker.get(), name,
+ TempoMarker* new_marker = new TempoMarker(*_editor, *_editor->tempo_group, ARDOUR_UI::config()->canvasvar_TempoMarker.get(), name,
*new TempoSection (_marker->tempo()));
_item = &new_marker->the_item ();
@@ -1803,7 +1803,7 @@ TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
} else {
MetricSection& section (_marker->tempo());
-
+
if (!section.movable()) {
return;
}
@@ -1811,7 +1811,7 @@ TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
Drag::start_grab (event, cursor);
- _pointer_frame_offset = _grab_frame - _marker->tempo().frame();
+ _pointer_frame_offset = _grab_frame - _marker->tempo().frame();
_editor->show_verbose_time_cursor (_current_pointer_frame, 10);
}
@@ -1819,15 +1819,15 @@ void
TempoMarkerDrag::motion (GdkEvent* event, bool)
{
nframes64_t const adjusted_frame = adjusted_current_frame (event);
-
+
if (adjusted_frame == _last_pointer_frame) {
return;
}
/* OK, we've moved far enough to make it worth actually move the thing. */
-
+
_marker->set_position (adjusted_frame);
-
+
_editor->show_verbose_time_cursor (adjusted_frame, 10);
_last_pointer_frame = adjusted_frame;
@@ -1839,11 +1839,11 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
if (!movement_occurred) {
return;
}
-
+
motion (event, false);
-
+
BBT_Time when;
-
+
TempoMap& map (_editor->session->tempo_map());
map.bbt_time (_last_pointer_frame, when);
@@ -1854,7 +1854,7 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
XMLNode &after = map.get_state();
_editor->session->add_command (new MementoCommand<TempoMap>(map, &before, &after));
_editor->commit_reversible_command ();
-
+
// delete the dummy marker we used for visual representation of copying.
// a new visual marker will show up automatically.
delete _marker;
@@ -1883,7 +1883,7 @@ CursorDrag::start_grab (GdkEvent* event, Gdk::Cursor* c)
Drag::start_grab (event, c);
if (!_stop) {
-
+
nframes64_t where = _editor->event_frame (event, 0, 0);
_editor->snap_to_with_modifier (where, event);
@@ -1935,21 +1935,21 @@ CursorDrag::finished (GdkEvent* event, bool movement_occurred)
if (!movement_occurred && _stop) {
return;
}
-
+
motion (event, false);
-
+
if (_item == &_editor->playhead_cursor->canvas_item) {
if (_editor->session) {
_editor->session->request_locate (_editor->playhead_cursor->current_frame, _was_rolling);
_editor->_pending_locate_request = true;
}
- }
+ }
}
FadeInDrag::FadeInDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<RegionView*> const & v)
: RegionDrag (e, i, p, v)
{
-
+
}
void
@@ -1959,8 +1959,8 @@ FadeInDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
AudioRegionView* a = dynamic_cast<AudioRegionView*> (_primary);
boost::shared_ptr<AudioRegion> const r = a->audio_region ();
-
- _pointer_frame_offset = _grab_frame - ((nframes64_t) r->fade_in()->back()->when + r->position());
+
+ _pointer_frame_offset = _grab_frame - ((nframes64_t) r->fade_in()->back()->when + r->position());
}
void
@@ -1969,7 +1969,7 @@ FadeInDrag::motion (GdkEvent* event, bool)
nframes64_t fade_length;
nframes64_t const pos = adjusted_current_frame (event);
-
+
boost::shared_ptr<Region> region = _primary->region ();
if (pos < (region->position() + 64)) {
@@ -1978,16 +1978,16 @@ FadeInDrag::motion (GdkEvent* event, bool)
fade_length = region->length();
} else {
fade_length = pos - region->position();
- }
+ }
for (RegionSelection::iterator i = _views.begin(); i != _views.end(); ++i) {
AudioRegionView* tmp = dynamic_cast<AudioRegionView*> (*i);
-
+
if (!tmp) {
continue;
}
-
+
tmp->reset_fade_in_shape_width (fade_length);
}
@@ -2004,7 +2004,7 @@ FadeInDrag::finished (GdkEvent* event, bool movement_occurred)
nframes64_t fade_length;
nframes64_t const pos = adjusted_current_frame (event);
-
+
boost::shared_ptr<Region> region = _primary->region ();
if (pos < (region->position() + 64)) {
@@ -2014,23 +2014,23 @@ FadeInDrag::finished (GdkEvent* event, bool movement_occurred)
} else {
fade_length = pos - region->position();
}
-
+
_editor->begin_reversible_command (_("change fade in length"));
for (RegionSelection::iterator i = _views.begin(); i != _views.end(); ++i) {
AudioRegionView* tmp = dynamic_cast<AudioRegionView*> (*i);
-
+
if (!tmp) {
continue;
}
-
+
boost::shared_ptr<AutomationList> alist = tmp->audio_region()->fade_in();
XMLNode &before = alist->get_state();
tmp->audio_region()->set_fade_in_length (fade_length);
tmp->audio_region()->set_fade_in_active (true);
-
+
XMLNode &after = alist->get_state();
_editor->session->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &after));
}
@@ -2041,7 +2041,7 @@ FadeInDrag::finished (GdkEvent* event, bool movement_occurred)
FadeOutDrag::FadeOutDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<RegionView*> const & v)
: RegionDrag (e, i, p, v)
{
-
+
}
void
@@ -2051,7 +2051,7 @@ FadeOutDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
AudioRegionView* a = dynamic_cast<AudioRegionView*> (_primary);
boost::shared_ptr<AudioRegion> r = a->audio_region ();
-
+
_pointer_frame_offset = _grab_frame - (r->length() - (nframes64_t) r->fade_out()->back()->when + r->position());
}
@@ -2063,7 +2063,7 @@ FadeOutDrag::motion (GdkEvent* event, bool)
nframes64_t const pos = adjusted_current_frame (event);
boost::shared_ptr<Region> region = _primary->region ();
-
+
if (pos > (region->last_frame() - 64)) {
fade_length = 64; // this should really be a minimum fade defined somewhere
}
@@ -2073,15 +2073,15 @@ FadeOutDrag::motion (GdkEvent* event, bool)
else {
fade_length = region->last_frame() - pos;
}
-
+
for (RegionSelection::iterator i = _views.begin(); i != _views.end(); ++i) {
AudioRegionView* tmp = dynamic_cast<AudioRegionView*> (*i);
-
+
if (!tmp) {
continue;
}
-
+
tmp->reset_fade_out_shape_width (fade_length);
}
@@ -2116,14 +2116,14 @@ FadeOutDrag::finished (GdkEvent* event, bool movement_occurred)
for (RegionSelection::iterator i = _views.begin(); i != _views.end(); ++i) {
AudioRegionView* tmp = dynamic_cast<AudioRegionView*> (*i);
-
+
if (!tmp) {
continue;
}
-
+
boost::shared_ptr<AutomationList> alist = tmp->audio_region()->fade_out();
XMLNode &before = alist->get_state();
-
+
tmp->audio_region()->set_fade_out_length (fade_length);
tmp->audio_region()->set_fade_out_active (true);
@@ -2162,13 +2162,13 @@ void
MarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
{
Drag::start_grab (event, cursor);
-
+
bool is_start;
Location *location = _editor->find_location_from_marker (_marker, is_start);
_editor->_dragging_edit_point = true;
- _pointer_frame_offset = _grab_frame - (is_start ? location->start() : location->end());
+ _pointer_frame_offset = _grab_frame - (is_start ? location->start() : location->end());
update_item (location);
@@ -2248,8 +2248,8 @@ MarkerDrag::motion (GdkEvent* event, bool)
nframes64_t const newframe = adjusted_current_frame (event);
nframes64_t next = newframe;
-
- if (_current_pointer_frame == _last_pointer_frame) {
+
+ if (_current_pointer_frame == _last_pointer_frame) {
return;
}
@@ -2262,8 +2262,8 @@ MarkerDrag::motion (GdkEvent* event, bool)
/* find the marker we're dragging, and compute the delta */
- for (i = _editor->selection->markers.begin(), x = _copied_locations.begin();
- x != _copied_locations.end() && i != _editor->selection->markers.end();
+ for (i = _editor->selection->markers.begin(), x = _copied_locations.begin();
+ x != _copied_locations.end() && i != _editor->selection->markers.end();
++i, ++x) {
copy_location = *x;
@@ -2309,19 +2309,19 @@ MarkerDrag::motion (GdkEvent* event, bool)
/* now move them all */
- for (i = _editor->selection->markers.begin(), x = _copied_locations.begin();
- x != _copied_locations.end() && i != _editor->selection->markers.end();
+ for (i = _editor->selection->markers.begin(), x = _copied_locations.begin();
+ x != _copied_locations.end() && i != _editor->selection->markers.end();
++i, ++x) {
copy_location = *x;
marker = *i;
/* call this to find out if its the start or end */
-
+
if ((real_location = _editor->find_location_from_marker (marker, is_start)) == 0) {
continue;
}
-
+
if (real_location->locked()) {
continue;
}
@@ -2329,29 +2329,29 @@ MarkerDrag::motion (GdkEvent* event, bool)
if (copy_location->is_mark()) {
/* just move it */
-
+
copy_location->set_start (copy_location->start() + f_delta);
} else {
-
+
nframes64_t new_start = copy_location->start() + f_delta;
nframes64_t new_end = copy_location->end() + f_delta;
-
+
if (is_start) { // start-of-range marker
-
+
if (move_both) {
copy_location->set_start (new_start);
copy_location->set_end (new_end);
} else if (new_start < copy_location->end()) {
copy_location->set_start (new_start);
- } else {
+ } else {
_editor->snap_to (next, 1, true);
copy_location->set_end (next);
copy_location->set_start (newframe);
}
-
+
} else { // end marker
-
+
if (move_both) {
copy_location->set_end (new_end);
copy_location->set_start (new_start);
@@ -2410,12 +2410,12 @@ MarkerDrag::finished (GdkEvent* event, bool movement_occurred)
case Selection::Add:
break;
}
-
+
return;
}
_editor->_dragging_edit_point = false;
-
+
_editor->begin_reversible_command ( _("move marker") );
XMLNode &before = _editor->session->locations()->get_state();
@@ -2423,18 +2423,18 @@ MarkerDrag::finished (GdkEvent* event, bool movement_occurred)
list<Location*>::iterator x;
bool is_start;
- for (i = _editor->selection->markers.begin(), x = _copied_locations.begin();
- x != _copied_locations.end() && i != _editor->selection->markers.end();
+ for (i = _editor->selection->markers.begin(), x = _copied_locations.begin();
+ x != _copied_locations.end() && i != _editor->selection->markers.end();
++i, ++x) {
-
+
Location * location = _editor->find_location_from_marker (*i, is_start);
-
+
if (location) {
-
+
if (location->locked()) {
return;
}
-
+
if (location->is_mark()) {
location->set_start ((*x)->start());
} else {
@@ -2446,7 +2446,7 @@ MarkerDrag::finished (GdkEvent* event, bool movement_occurred)
XMLNode &after = _editor->session->locations()->get_state();
_editor->session->add_command(new MementoCommand<Locations>(*(_editor->session->locations()), &before, &after));
_editor->commit_reversible_command ();
-
+
_line->hide();
}
@@ -2488,7 +2488,7 @@ ControlPointDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
_point->line().start_drag (_point, _grab_frame, 0);
float fraction = 1.0 - (_point->get_y() / _point->line().height());
- _editor->set_verbose_canvas_cursor (_point->line().get_verbose_cursor_string (fraction),
+ _editor->set_verbose_canvas_cursor (_point->line().get_verbose_cursor_string (fraction),
_current_pointer_x + 10, _current_pointer_y + 10);
_editor->show_verbose_canvas_cursor ();
@@ -2548,7 +2548,7 @@ ControlPointDrag::motion (GdkEvent* event, bool)
bool const push = Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier);
_point->line().point_drag (*_point, cx_frames, fraction, push);
-
+
_editor->set_verbose_canvas_cursor_text (_point->line().get_verbose_cursor_string (fraction));
}
@@ -2558,7 +2558,7 @@ ControlPointDrag::finished (GdkEvent* event, bool movement_occurred)
if (!movement_occurred) {
/* just a click */
-
+
if ((event->type == GDK_BUTTON_RELEASE) && (event->button.button == 1) && Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
_editor->reset_point_selection ();
}
@@ -2622,10 +2622,10 @@ LineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
double fraction = 1.0 - (cy / _line->height());
_line->start_drag (0, _grab_frame, fraction);
-
+
_editor->set_verbose_canvas_cursor (_line->get_verbose_cursor_string (fraction),
_current_pointer_x + 10, _current_pointer_y + 10);
-
+
_editor->show_verbose_canvas_cursor ();
}
@@ -2633,7 +2633,7 @@ void
LineDrag::motion (GdkEvent* event, bool)
{
double dy = _current_pointer_y - _last_pointer_y;
-
+
if (event->button.state & Keyboard::SecondaryModifier) {
dy *= 0.1;
}
@@ -2656,7 +2656,7 @@ LineDrag::motion (GdkEvent* event, bool)
}
_line->line_drag (_before, _after, fraction, push);
-
+
_editor->set_verbose_canvas_cursor_text (_line->get_verbose_cursor_string (fraction));
}
@@ -2691,7 +2691,7 @@ RubberbandSelectDrag::motion (GdkEvent* event, bool first_move)
if (Config->get_rubberbanding_snaps_to_grid()) {
if (first_move) {
_editor->snap_to_with_modifier (_grab_frame, event);
- }
+ }
_editor->snap_to_with_modifier (_current_pointer_frame, event);
}
@@ -2713,12 +2713,12 @@ RubberbandSelectDrag::motion (GdkEvent* event, bool first_move)
y1 = _grab_y;
}
-
+
if (start != end || y1 != y2) {
double x1 = _editor->frame_to_pixel (start);
double x2 = _editor->frame_to_pixel (end);
-
+
_editor->rubberband_rect->property_x1() = x1;
_editor->rubberband_rect->property_y1() = y1;
_editor->rubberband_rect->property_x2() = x2;
@@ -2726,7 +2726,7 @@ RubberbandSelectDrag::motion (GdkEvent* event, bool first_move)
_editor->rubberband_rect->show();
_editor->rubberband_rect->raise_to_top();
-
+
_last_pointer_frame = _current_pointer_frame;
_editor->show_verbose_time_cursor (_current_pointer_frame, 10);
@@ -2759,12 +2759,12 @@ RubberbandSelectDrag::finished (GdkEvent* event, bool movement_occurred)
committed = _editor->select_all_within (_grab_frame, _last_pointer_frame - 1, y1, y2, _editor->track_views, op);
} else {
committed = _editor->select_all_within (_last_pointer_frame, _grab_frame - 1, y1, y2, _editor->track_views, op);
- }
+ }
if (!committed) {
_editor->commit_reversible_command ();
}
-
+
} else {
if (!getenv("ARDOUR_SAE")) {
_editor->selection->clear_tracks();
@@ -2781,7 +2781,7 @@ void
TimeFXDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
{
Drag::start_grab (event);
-
+
_editor->show_verbose_time_cursor (_current_pointer_frame, 10);
}
@@ -2818,22 +2818,22 @@ TimeFXDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
/* backwards drag of the left edge - not usable */
return;
}
-
+
nframes64_t newlen = _last_pointer_frame - _primary->region()->position();
float percentage = (double) newlen / (double) _primary->region()->length();
-
+
#ifndef USE_RUBBERBAND
- // Soundtouch uses percentage / 100 instead of normal (/ 1)
+ // Soundtouch uses percentage / 100 instead of normal (/ 1)
if (_primary->region()->data_type() == DataType::AUDIO) {
percentage = (float) ((double) newlen - (double) _primary->region()->length()) / ((double) newlen) * 100.0f;
}
-#endif
-
+#endif
+
_editor->begin_reversible_command (_("timestretch"));
-
+
// XXX how do timeFX on multiple regions ?
-
+
RegionSelection rs;
rs.add (_primary);
@@ -2860,7 +2860,7 @@ ScrubDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
if (movement_occurred && _editor->session) {
/* make sure we stop */
_editor->session->request_transport_speed (0.0);
- }
+ }
}
SelectionDrag::SelectionDrag (Editor* e, ArdourCanvas::Item* i, Operation o)
@@ -2897,13 +2897,13 @@ SelectionDrag::start_grab (GdkEvent* event, Gdk::Cursor*)
case SelectionStartTrim:
if (_editor->clicked_axisview) {
_editor->clicked_axisview->order_selection_trims (_item, true);
- }
+ }
Drag::start_grab (event, cursor);
cursor = _editor->trimmer_cursor;
start = _editor->selection->time[_editor->clicked_selection].start;
- _pointer_frame_offset = _grab_frame - start;
+ _pointer_frame_offset = _grab_frame - start;
break;
-
+
case SelectionEndTrim:
if (_editor->clicked_axisview) {
_editor->clicked_axisview->order_selection_trims (_item, false);
@@ -2911,20 +2911,20 @@ SelectionDrag::start_grab (GdkEvent* event, Gdk::Cursor*)
Drag::start_grab (event, cursor);
cursor = _editor->trimmer_cursor;
end = _editor->selection->time[_editor->clicked_selection].end;
- _pointer_frame_offset = _grab_frame - end;
+ _pointer_frame_offset = _grab_frame - end;
break;
case SelectionMove:
start = _editor->selection->time[_editor->clicked_selection].start;
Drag::start_grab (event, cursor);
- _pointer_frame_offset = _grab_frame - start;
+ _pointer_frame_offset = _grab_frame - start;
break;
}
if (_operation == SelectionMove) {
- _editor->show_verbose_time_cursor (start, 10);
+ _editor->show_verbose_time_cursor (start, 10);
} else {
- _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
+ _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
}
}
@@ -2936,22 +2936,22 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
nframes64_t length;
nframes64_t const pending_position = adjusted_current_frame (event);
-
- /* only alter selection if the current frame is
+
+ /* only alter selection if the current frame is
different from the last frame position (adjusted)
*/
-
+
if (pending_position == _last_pointer_frame) {
return;
}
-
+
switch (_operation) {
case CreateSelection:
-
+
if (first_move) {
_editor->snap_to (_grab_frame);
}
-
+
if (pending_position < _grab_frame) {
start = pending_position;
end = _grab_frame;
@@ -2959,15 +2959,15 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
end = pending_position;
start = _grab_frame;
}
-
+
/* first drag: Either add to the selection
or create a new selection->
*/
-
+
if (first_move) {
-
+
_editor->begin_reversible_command (_("range selection"));
-
+
if (_copy) {
/* adding to the selection */
_editor->clicked_selection = _editor->selection->add (start, end);
@@ -2976,15 +2976,15 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
/* new selection-> */
_editor->clicked_selection = _editor->selection->set (_editor->clicked_axisview, start, end);
}
- }
+ }
break;
-
+
case SelectionStartTrim:
-
+
if (first_move) {
_editor->begin_reversible_command (_("trim selection start"));
}
-
+
start = _editor->selection->time[_editor->clicked_selection].start;
end = _editor->selection->time[_editor->clicked_selection].end;
@@ -2994,13 +2994,13 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
start = pending_position;
}
break;
-
+
case SelectionEndTrim:
-
+
if (first_move) {
_editor->begin_reversible_command (_("trim selection end"));
}
-
+
start = _editor->selection->time[_editor->clicked_selection].start;
end = _editor->selection->time[_editor->clicked_selection].end;
@@ -3009,28 +3009,28 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
} else {
end = pending_position;
}
-
+
break;
-
+
case SelectionMove:
-
+
if (first_move) {
_editor->begin_reversible_command (_("move selection"));
}
-
+
start = _editor->selection->time[_editor->clicked_selection].start;
end = _editor->selection->time[_editor->clicked_selection].end;
-
+
length = end - start;
-
+
start = pending_position;
_editor->snap_to (start);
-
+
end = start + length;
-
+
break;
}
-
+
if (event->button.x >= _editor->horizontal_adjustment.get_value() + _editor->_canvas_width) {
_editor->start_canvas_autoscroll (1, 0);
}
@@ -3042,9 +3042,9 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
_last_pointer_frame = pending_position;
if (_operation == SelectionMove) {
- _editor->show_verbose_time_cursor(start, 10);
+ _editor->show_verbose_time_cursor(start, 10);
} else {
- _editor->show_verbose_time_cursor(pending_position, 10);
+ _editor->show_verbose_time_cursor(pending_position, 10);
}
}
@@ -3065,7 +3065,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
_editor->selection->clear_time();
- }
+ }
}
/* XXX what happens if its a music selection? */
@@ -3097,12 +3097,12 @@ RangeMarkerBarDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
if (!_editor->temp_location) {
_editor->temp_location = new Location;
}
-
+
switch (_operation) {
case CreateRangeMarker:
case CreateTransportMarker:
case CreateCDMarker:
-
+
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
_copy = true;
} else {
@@ -3114,7 +3114,7 @@ RangeMarkerBarDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
Drag::start_grab (event, cursor);
- _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
+ _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
}
void
@@ -3139,17 +3139,17 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
return;
break;
}
-
+
_editor->snap_to_with_modifier (_current_pointer_frame, event);
- /* only alter selection if the current frame is
+ /* only alter selection if the current frame is
different from the last frame position.
*/
-
+
if (_current_pointer_frame == _last_pointer_frame) {
return;
}
-
+
switch (_operation) {
case CreateRangeMarker:
case CreateTransportMarker:
@@ -3157,7 +3157,7 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
if (first_move) {
_editor->snap_to (_grab_frame);
}
-
+
if (_current_pointer_frame < _grab_frame) {
start = _current_pointer_frame;
end = _grab_frame;
@@ -3165,29 +3165,29 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
end = _current_pointer_frame;
start = _grab_frame;
}
-
+
/* first drag: Either add to the selection
or create a new selection.
*/
-
+
if (first_move) {
-
+
_editor->temp_location->set (start, end);
-
+
crect->show ();
update_item (_editor->temp_location);
_drag_rect->show();
//_drag_rect->raise_to_top();
-
- }
- break;
+
+ }
+ break;
}
-
+
if (event->button.x >= _editor->horizontal_adjustment.get_value() + _editor->_canvas_width) {
_editor->start_canvas_autoscroll (1, 0);
}
-
+
if (start != end) {
_editor->temp_location->set (start, end);
@@ -3201,8 +3201,8 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
_last_pointer_frame = _current_pointer_frame;
- _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
-
+ _editor->show_verbose_time_cursor (_current_pointer_frame, 10);
+
}
void
@@ -3211,7 +3211,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
Location * newloc = 0;
string rangename;
int flags;
-
+
if (movement_occurred) {
motion (event, false);
_drag_rect->hide();
@@ -3254,7 +3254,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
start = _editor->session->locations()->first_mark_before (_grab_frame);
end = _editor->session->locations()->first_mark_after (_grab_frame);
-
+
if (end == max_frames) {
end = _editor->session->current_end_frame ();
}
@@ -3277,7 +3277,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
default:
break;
}
- }
+ }
}
_editor->stop_canvas_autoscroll ();
@@ -3309,11 +3309,11 @@ MouseZoomDrag::motion (GdkEvent* event, bool first_move)
nframes64_t end;
_editor->snap_to_with_modifier (_current_pointer_frame, event);
-
+
if (first_move) {
_editor->snap_to_with_modifier (_grab_frame, event);
}
-
+
if (_current_pointer_frame == _last_pointer_frame) {
return;
}
@@ -3326,7 +3326,7 @@ MouseZoomDrag::motion (GdkEvent* event, bool first_move)
end = _current_pointer_frame;
start = _grab_frame;
}
-
+
if (start != end) {
if (first_move) {
@@ -3347,12 +3347,12 @@ MouseZoomDrag::finished (GdkEvent* event, bool movement_occurred)
{
if (movement_occurred) {
motion (event, false);
-
+
if (_grab_frame < _last_pointer_frame) {
_editor->temporal_zoom_by_frame (_grab_frame, _last_pointer_frame, "mouse zoom");
} else {
_editor->temporal_zoom_by_frame (_last_pointer_frame, _grab_frame, "mouse zoom");
- }
+ }
} else {
_editor->temporal_zoom_to_frame (false, _grab_frame);
/*
@@ -3367,7 +3367,7 @@ MouseZoomDrag::finished (GdkEvent* event, bool movement_occurred)
NoteDrag::NoteDrag (Editor* e, ArdourCanvas::Item* i)
: Drag (e, i)
{
- CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item);
+ CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item);
region = &cnote->region_view();
}
@@ -3387,10 +3387,10 @@ NoteDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
_item->property_parent().get_value()->w2i(event_x, event_y);
- last_x = region->snap_to_pixel(event_x);
+ last_x = region->snap_to_pixel(event_x);
last_y = event_y;
- CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item);
+ CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item);
if (!(was_selected = cnote->selected())) {
@@ -3425,12 +3425,12 @@ NoteDrag::motion (GdkEvent*, bool)
_item->property_parent().get_value()->w2i(event_x, event_y);
- event_x = region->snap_to_pixel(event_x);
+ event_x = region->snap_to_pixel(event_x);
double dx = event_x - last_x;
double dy = event_y - last_y;
last_x = event_x;
-
+
drag_delta_x += dx;
// Snap to note rows
@@ -3451,7 +3451,7 @@ NoteDrag::motion (GdkEvent*, bool)
if (dx || dy) {
region->move_selection (dx, dy);
-
+
CanvasNoteEvent* cnote = dynamic_cast<CanvasNoteEvent*>(_item);
char buf[4];
snprintf (buf, sizeof (buf), "%g", (int) cnote->note()->note() + drag_delta_note);
@@ -3459,7 +3459,7 @@ NoteDrag::motion (GdkEvent*, bool)
_editor->show_verbose_canvas_cursor_with (buf);
}
}
-
+
void
NoteDrag::finished (GdkEvent* ev, bool moved)
{
@@ -3467,7 +3467,7 @@ NoteDrag::finished (GdkEvent* ev, bool moved)
if (!moved) {
if (_editor->current_mouse_mode() == Editing::MouseObject) {
-
+
if (was_selected) {
bool add = Keyboard::modifier_state_equals (ev->button.state, Keyboard::PrimaryModifier);
if (add) {
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index c10034c835..ae504dbef5 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ class TimeAxisView;
/** Abstract base class for dragging of things within the editor */
class Drag
{
-
+
public:
Drag (Editor *, ArdourCanvas::Item *);
virtual ~Drag () {}
@@ -116,7 +116,7 @@ public:
protected:
nframes64_t adjusted_current_frame (GdkEvent *) const;
-
+
Editor* _editor; ///< our editor
ArdourCanvas::Item* _item; ///< our item
nframes64_t _pointer_frame_offset; ///< offset from the mouse's position for the drag
@@ -138,7 +138,7 @@ protected:
bool _was_rolling; ///< true if the session was rolling before the drag started, otherwise false
private:
-
+
bool _ending; ///< true if end_grab is in progress, otherwise false
bool _had_movement; ///< true if movement has occurred, otherwise false
bool _move_threshold_passed; ///< true if the move threshold has been passed, otherwise false
@@ -153,7 +153,7 @@ public:
virtual ~RegionDrag () {}
protected:
-
+
RegionView* _primary; ///< the view that was clicked on (or whatever) to start the drag
std::list<RegionView*> _views; ///< all views that are being dragged
@@ -166,7 +166,7 @@ private:
class RegionMotionDrag : public RegionDrag
{
public:
-
+
RegionMotionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, bool);
virtual ~RegionMotionDrag () {}
@@ -177,13 +177,13 @@ public:
protected:
struct TimeAxisViewSummary {
TimeAxisViewSummary () : height_list(512) {}
-
+
std::bitset<512> tracks;
std::vector<int32_t> height_list;
int visible_y_low;
int visible_y_high;
};
-
+
void copy_regions (GdkEvent *);
bool y_movement_disallowed (int, int, int, TimeAxisViewSummary const &) const;
std::map<RegionView*, std::pair<RouteTimeAxisView*, int> > find_time_axis_views_and_layers ();
@@ -195,7 +195,7 @@ protected:
TimeAxisViewSummary get_time_axis_view_summary ();
virtual bool x_move_allowed () const = 0;
-
+
TimeAxisView* _dest_trackview;
ARDOUR::layer_t _dest_layer;
bool check_possible (RouteTimeAxisView **, ARDOUR::layer_t *);
@@ -215,7 +215,7 @@ public:
virtual void start_grab (GdkEvent *, Gdk::Cursor *);
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);
-
+
bool apply_move_threshold () const {
return true;
}
@@ -233,7 +233,7 @@ public:
RegionInsertDrag (Editor *, boost::shared_ptr<ARDOUR::Region>, RouteTimeAxisView*, nframes64_t);
void finished (GdkEvent *, bool);
-
+
private:
bool x_move_allowed () const;
};
@@ -281,7 +281,7 @@ private:
class NoteDrag : public Drag
{
- public:
+ public:
NoteDrag (Editor*, ArdourCanvas::Item*);
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
@@ -383,7 +383,7 @@ public:
private:
EditorCursor* _cursor; ///< cursor being dragged
bool _stop; ///< true to stop the transport on starting the drag, otherwise false
-
+
};
/** Region fade-in drag */
@@ -421,7 +421,7 @@ public:
private:
void update_item (ARDOUR::Location *);
-
+
Marker* _marker; ///< marker being dragged
std::list<ARDOUR::Location*> _copied_locations;
ArdourCanvas::Line* _line;
@@ -441,7 +441,7 @@ public:
bool active (Editing::MouseMode m);
private:
-
+
ControlPoint* _point;
double _cumulative_x_drag;
double _cumulative_y_drag;
@@ -457,7 +457,7 @@ public:
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);
-
+
bool active (Editing::MouseMode) {
return true;
}
@@ -497,7 +497,7 @@ class ScrubDrag : public Drag
{
public:
ScrubDrag (Editor *e, ArdourCanvas::Item *i) : Drag (e, i) {}
-
+
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);
diff --git a/gtk2_ardour/editor_enums.h b/gtk2_ardour/editor_enums.h
index d665e8ea11..fe3b3b909a 100644
--- a/gtk2_ardour/editor_enums.h
+++ b/gtk2_ardour/editor_enums.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index ca73c4d8b0..82b98c7650 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -94,18 +94,18 @@ Editor::export_region ()
if (selection->regions.empty()) {
return;
}
-
+
try {
boost::shared_ptr<Region> r = selection->regions.front()->region();
AudioRegion & region (dynamic_cast<AudioRegion &> (*r));
-
+
RouteTimeAxisView & rtv (dynamic_cast<RouteTimeAxisView &> (selection->regions.front()->get_time_axis_view()));
AudioTrack & track (dynamic_cast<AudioTrack &> (*rtv.route()));
-
+
ExportRegionDialog dialog (*this, region, track);
dialog.set_session (session);
dialog.run();
-
+
} catch (std::bad_cast & e) {
error << "Exporting Region failed!" << endmsg;
return;
@@ -130,7 +130,7 @@ void
Editor::bounce_region_selection ()
{
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
-
+
boost::shared_ptr<Region> region ((*i)->region());
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
Track* track = dynamic_cast<Track*>(rtv->route().get());
@@ -167,7 +167,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
const string sound_directory = session->session_directory().sound_path().to_string();
nchans = region->n_channels();
-
+
/* don't do duplicate of the entire source if that's what is going on here */
if (region->start() == 0 && region->length() == region->source_length(0)) {
@@ -178,7 +178,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
if (path.length() == 0) {
for (uint32_t n=0; n < nchans; ++n) {
-
+
for (cnt = 0; cnt < 999999; ++cnt) {
if (nchans == 1) {
snprintf (s, sizeof(s), "%s/%s_%" PRIu32 ".wav", sound_directory.c_str(),
@@ -190,26 +190,26 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
}
path = s;
-
+
if (::access (path.c_str(), F_OK) != 0) {
break;
}
}
-
+
if (cnt == 999999) {
error << "" << endmsg;
goto error_out;
}
-
-
-
+
+
+
try {
fs = boost::dynamic_pointer_cast<AudioFileSource> (
SourceFactory::createWritable (DataType::AUDIO, *session,
path, true,
false, session->frame_rate()));
}
-
+
catch (failed_constructor& err) {
goto error_out;
}
@@ -221,7 +221,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
/* TODO: make filesources based on passed path */
}
-
+
to_read = region->length();
pos = region->position();
@@ -231,13 +231,13 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
this_time = min (to_read, chunk_size);
for (vector<boost::shared_ptr<AudioFileSource> >::iterator src=sources.begin(); src != sources.end(); ++src) {
-
+
fs = (*src);
if (region->read_at (buf, buf, gain_buffer, pos, this_time) != this_time) {
break;
}
-
+
if (fs->write (buf, this_time) != this_time) {
error << "" << endmsg;
goto error_out;
@@ -252,7 +252,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
struct tm* now;
time (&tnow);
now = localtime (&tnow);
-
+
for (vector<boost::shared_ptr<AudioFileSource> >::iterator src = sources.begin(); src != sources.end(); ++src) {
(*src)->update_header (0, *now, tnow);
(*src)->mark_immutable ();
@@ -289,7 +289,7 @@ Editor::write_audio_selection (TimeSelection& ts)
if (atv->is_audio_track()) {
boost::shared_ptr<AudioPlaylist> playlist = boost::dynamic_pointer_cast<AudioPlaylist>(atv->get_diskstream()->playlist());
-
+
if (playlist && write_audio_range (*playlist, atv->get_diskstream()->n_channels(), ts) == 0) {
ret = -1;
break;
@@ -319,7 +319,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
uint32_t channels = count.n_audio();
for (uint32_t n=0; n < channels; ++n) {
-
+
for (cnt = 0; cnt < 999999; ++cnt) {
if (channels == 1) {
snprintf (s, sizeof(s), "%s/%s_%" PRIu32 ".wav", sound_directory.c_str(),
@@ -329,69 +329,69 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
snprintf (s, sizeof(s), "%s/%s_%" PRIu32 "-%" PRId32 ".wav", sound_directory.c_str(),
legalize_for_path(playlist.name()).c_str(), cnt, n);
}
-
+
if (::access (s, F_OK) != 0) {
break;
}
}
-
+
if (cnt == 999999) {
error << "" << endmsg;
goto error_out;
}
path = s;
-
+
try {
fs = boost::dynamic_pointer_cast<AudioFileSource> (
SourceFactory::createWritable (DataType::AUDIO, *session,
path, true,
false, session->frame_rate()));
}
-
+
catch (failed_constructor& err) {
goto error_out;
}
-
+
sources.push_back (fs);
}
-
+
for (list<AudioRange>::iterator i = range.begin(); i != range.end();) {
-
+
nframes = (*i).length();
pos = (*i).start;
-
+
while (nframes) {
nframes64_t this_time;
-
+
this_time = min (nframes, chunk_size);
for (uint32_t n=0; n < channels; ++n) {
fs = sources[n];
-
+
if (playlist.read (buf, buf, gain_buffer, pos, this_time, n) != this_time) {
break;
}
-
+
if (fs->write (buf, this_time) != this_time) {
goto error_out;
}
}
-
+
nframes -= this_time;
pos += this_time;
}
-
+
list<AudioRange>::iterator tmp = i;
++tmp;
if (tmp != range.end()) {
-
+
/* fill gaps with silence */
-
+
nframes = (*tmp).start - (*i).end;
while (nframes) {
@@ -424,7 +424,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
(*s)->mark_immutable ();
// do we need to ref it again?
}
-
+
return true;
error_out:
diff --git a/gtk2_ardour/editor_group_tabs.cc b/gtk2_ardour/editor_group_tabs.cc
index 7007c37a05..61f3c50735 100644
--- a/gtk2_ardour/editor_group_tabs.cc
+++ b/gtk2_ardour/editor_group_tabs.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ using namespace ARDOUR;
EditorGroupTabs::EditorGroupTabs (Editor* e)
: GroupTabs (e)
{
-
+
}
list<GroupTabs::Tab>
@@ -48,7 +48,7 @@ EditorGroupTabs::compute_tabs () const
if ((*i)->marked_for_display() == false) {
continue;
}
-
+
RouteGroup* g = (*i)->route_group ();
if (g != tab.group) {
@@ -85,7 +85,7 @@ EditorGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
} else {
cairo_set_source_rgba (cr, 1, 1, 1, 0.2);
}
-
+
cairo_move_to (cr, 0, tab.from + arc_radius);
cairo_arc (cr, _width, tab.from + arc_radius, arc_radius, M_PI, 3 * M_PI / 2);
cairo_line_to (cr, _width, tab.to);
@@ -116,7 +116,7 @@ void
EditorGroupTabs::reflect_tabs (list<Tab> const & tabs)
{
list<Tab>::const_iterator j = tabs.begin ();
-
+
int32_t y = 0;
for (Editor::TrackViewList::iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
@@ -128,12 +128,12 @@ EditorGroupTabs::reflect_tabs (list<Tab> const & tabs)
if (rtv) {
if (j == tabs.end()) {
-
+
/* already run out of tabs, so no edit group */
rtv->route()->set_route_group (0, this);
-
+
} else {
-
+
if (y >= j->to) {
/* this tab finishes before this track starts, so onto the next tab */
++j;
@@ -146,7 +146,7 @@ EditorGroupTabs::reflect_tabs (list<Tab> const & tabs)
} else {
rtv->route()->set_route_group (0, this);
}
-
+
}
}
diff --git a/gtk2_ardour/editor_group_tabs.h b/gtk2_ardour/editor_group_tabs.h
index 9e37992902..2d1abcf46f 100644
--- a/gtk2_ardour/editor_group_tabs.h
+++ b/gtk2_ardour/editor_group_tabs.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor_hscroller.cc b/gtk2_ardour/editor_hscroller.cc
index f97b4610b6..802d635b2a 100644
--- a/gtk2_ardour/editor_hscroller.cc
+++ b/gtk2_ardour/editor_hscroller.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor_imageframe.cc b/gtk2_ardour/editor_imageframe.cc
index 4fee0c7062..d5d9481b5d 100644
--- a/gtk2_ardour/editor_imageframe.cc
+++ b/gtk2_ardour/editor_imageframe.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2003 Paul Davis
+ Copyright (C) 2000-2003 Paul Davis
Written by Colin Law, CMT, Glasgow
This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@ TimeAxisView*
Editor::get_named_time_axis(const string & name)
{
TimeAxisView* tav = 0 ;
-
+
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i)
{
if (((TimeAxisView*)*i)->name() == name)
@@ -85,7 +85,7 @@ Editor::connect_to_image_compositor()
{
image_socket_listener = ImageFrameSocketHandler::create_instance(*this) ;
}
-
+
if(image_socket_listener->is_connected() == true)
{
return ;
@@ -93,16 +93,16 @@ Editor::connect_to_image_compositor()
// XXX should really put this somewhere safe
const char * host_ip = "127.0.0.1" ;
-
+
bool retcode = image_socket_listener->connect(host_ip, ardourvis::DEFAULT_PORT) ;
-
+
if(retcode == false)
{
// XXX need to get some return status here
warning << "Image Compositor Connection attempt failed" << std::endl ;
return ;
}
-
+
// add the socket to the gui loop, and keep the retuned tag value of the input
gint tag = gdk_input_add(image_socket_listener->get_socket_descriptor(), GDK_INPUT_READ,ImageFrameSocketHandler::image_socket_callback,image_socket_listener) ;
image_socket_listener->set_gdk_input_tag(tag) ;
@@ -122,7 +122,7 @@ Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
} else {
x_pos = item->get_position() - offset + (item->get_duration() / 2);
}
-
+
reset_x_origin (x_pos);
}
@@ -139,11 +139,11 @@ void
Editor::popup_imageframe_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_item)
{
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_axisview) ;
-
+
if(ifta)
{
ImageFrameTimeAxisGroup* iftag = ifta->get_view()->get_selected_imageframe_group() ;
-
+
if(iftag)
{
ImageFrameView* selected_ifv = ifta->get_view()->get_selected_imageframe_view() ;
@@ -156,7 +156,7 @@ void
Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_item)
{
MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_axisview) ;
-
+
if(mta)
{
MarkerView* selected_mv = mta->get_view()->get_selected_time_axis_item() ;
@@ -179,7 +179,7 @@ Editor::canvas_imageframe_item_view_event (GdkEvent *event, ArdourCanvas::Item*
{
gint ret = FALSE ;
ImageFrameTimeAxisGroup* iftag = 0 ;
-
+
switch (event->type)
{
case GDK_BUTTON_PRESS:
@@ -207,7 +207,7 @@ Editor::canvas_imageframe_start_handle_event (GdkEvent *event, ArdourCanvas::Ite
{
gint ret = FALSE ;
ImageFrameTimeAxisGroup* iftag = 0 ;
-
+
switch (event->type)
{
case GDK_BUTTON_PRESS:
@@ -216,7 +216,7 @@ Editor::canvas_imageframe_start_handle_event (GdkEvent *event, ArdourCanvas::Ite
clicked_axisview = &ifv->get_time_axis_view() ;
iftag = ifv->get_time_axis_group() ;
dynamic_cast<ImageFrameTimeAxis*>(clicked_axisview)->get_view()->set_selected_imageframe_view(iftag, ifv);
-
+
ret = button_press_handler (item, event, ImageFrameHandleStartItem) ;
break ;
case GDK_BUTTON_RELEASE:
@@ -242,7 +242,7 @@ Editor::canvas_imageframe_end_handle_event (GdkEvent *event, ArdourCanvas::Item*
{
gint ret = FALSE ;
ImageFrameTimeAxisGroup* iftag = 0 ;
-
+
switch (event->type)
{
case GDK_BUTTON_PRESS:
@@ -251,7 +251,7 @@ Editor::canvas_imageframe_end_handle_event (GdkEvent *event, ArdourCanvas::Item*
clicked_axisview = &ifv->get_time_axis_view() ;
iftag = ifv->get_time_axis_group() ;
dynamic_cast<ImageFrameTimeAxis*>(clicked_axisview)->get_view()->set_selected_imageframe_view(iftag, ifv);
-
+
ret = button_press_handler (item, event, ImageFrameHandleEndItem) ;
break ;
case GDK_BUTTON_RELEASE:
@@ -429,10 +429,10 @@ Editor::start_imageframe_grab(ArdourCanvas::Item* item, GdkEvent* event)
drag_info.motion_callback = &Editor::imageframe_drag_motion_callback;
drag_info.finished_callback = &Editor::timeaxis_item_drag_finished_callback;
drag_info.last_frame_position = ifv->get_position() ;
-
+
drag_info.source_trackview = &ifv->get_time_axis_view() ;
drag_info.dest_trackview = drag_info.source_trackview;
-
+
/* this is subtle. raising the regionview itself won't help,
because raise_to_top() just puts the item on the top of
its parent's stack. so, we need to put the trackview canvas_display group
@@ -482,7 +482,7 @@ Editor::start_markerview_grab(ArdourCanvas::Item* item, GdkEvent* event)
cursor_group->raise_to_top ();
start_grab(event) ;
-
+
drag_info.pointer_frame_offset = pixel_to_frame(drag_info.grab_x) - drag_info.last_frame_position ;
}
@@ -504,14 +504,14 @@ Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
-
+
// we dont allow marker items to extend beyond, or in front of the marked items so
// cap the value to the marked items position and duration
- if((pending_region_position + mv->get_duration()) >= ((mv->get_marked_item()->get_position()) + (mv->get_marked_item()->get_duration())))
+ if((pending_region_position + mv->get_duration()) >= ((mv->get_marked_item()->get_position()) + (mv->get_marked_item()->get_duration())))
{
pending_region_position = (mv->get_marked_item()->get_position() + mv->get_marked_item()->get_duration()) - (mv->get_duration()) ;
}
- else if(pending_region_position <= mv->get_marked_item()->get_position())
+ else if(pending_region_position <= mv->get_marked_item()->get_position())
{
pending_region_position = mv->get_marked_item()->get_position() ;
}
@@ -522,7 +522,7 @@ Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
}
drag_info.last_frame_position = pending_region_position ;
-
+
// we treat this as a special case, usually we want to send the identitiy of the caller
// but in this case, that would trigger our socket handler to handle the event, sending
// notification to the image compositor. This would be fine, except that we have not
@@ -538,9 +538,9 @@ void
Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
{
double cx, cy ;
-
+
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
-
+
nframes64_t pending_region_position;
nframes64_t pointer_frame;
@@ -561,7 +561,7 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
drag_info.grab_x = cx;
//drag_info.last_frame_position = pending_region_position ;
drag_info.current_pointer_frame = pending_region_position ;
-
+
// we treat this as a special case, usually we want to send the identitiy of the caller
// but in this case, that would trigger our socket handler to handle the event, sending
// notification to the image compositor. This would be fine, except that we have not
@@ -569,7 +569,7 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
// completed the drag, only then do we want the image compositor notofied.
// We therefore set the caller identity to the special case of 0
ifv->set_position(pending_region_position, 0) ;
-
+
show_verbose_time_cursor(pending_region_position) ;
}
@@ -598,7 +598,7 @@ Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* even
{
/* base the new region position on the current position of the regionview.*/
where = drag_info.current_pointer_frame ;
-
+
// final call to set position after the motion to tell interested parties of the new position
tavi->set_position(where, this) ;
}
@@ -606,7 +606,7 @@ Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* even
{
//where = tavi->get_position() ;
}
-
+
}
@@ -632,9 +632,9 @@ Editor::imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
drag_info.cumulative_x_drag = 0;
drag_info.motion_callback = &Editor::imageframe_start_handle_trim_motion ;
drag_info.finished_callback = &Editor::imageframe_start_handle_end_trim ;
-
+
start_grab(event) ;
-
+
show_verbose_time_cursor(ifv->get_position(), 10) ;
}
}
@@ -648,14 +648,14 @@ Editor::imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
if(ifta)
{
ImageFrameView* ifv = ifta->get_view()->get_selected_imageframe_view() ;
-
+
if (ifv == 0)
{
fatal << _("programming error: no ImageFrameView selected") << endmsg ;
/*NOTREACHED*/
return ;
}
-
+
drag_info.item = ifv->get_canvas_frame() ;
drag_info.data = ifv ;
drag_info.grab_x = event->motion.x ;
@@ -673,11 +673,11 @@ void
Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
-
+
nframes64_t start = 0 ;
nframes64_t end = 0 ;
nframes64_t pointer_frame = event_frame(event) ;
-
+
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
snap_to(pointer_frame) ;
@@ -685,18 +685,18 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
if(pointer_frame != drag_info.last_pointer_frame) {
start = ifv->get_position() ;
end = ifv->get_position() + ifv->get_duration() ;
-
+
if (pointer_frame > end) {
start = end ;
} else {
start = pointer_frame ;
}
-
+
// are we getting bigger or smaller?
nframes64_t new_dur_val = end - start ;
-
+
// start handle, so a smaller pointer frame increases our component size
- if(pointer_frame <= drag_info.grab_frame)
+ if(pointer_frame <= drag_info.grab_frame)
{
if(ifv->get_max_duration_active() && (new_dur_val > ifv->get_max_duration()))
{
@@ -720,9 +720,9 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
// current values are ok
}
}
-
+
drag_info.last_pointer_frame = pointer_frame ;
-
+
/* re-calculatethe duration and position of the imageframeview */
drag_info.cumulative_x_drag = new_dur_val ;
@@ -736,7 +736,7 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
ifv->set_position(start, 0) ;
}
}
-
+
show_verbose_time_cursor(start, 10) ;
}
@@ -744,7 +744,7 @@ void
Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event)
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
-
+
if (drag_info.cumulative_x_drag == 0)
{
/* just a click */
@@ -752,7 +752,7 @@ Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
else
{
nframes64_t temp = ifv->get_position() + ifv->get_duration() ;
-
+
ifv->set_position((nframes64_t) (temp - drag_info.cumulative_x_drag), this) ;
ifv->set_duration((nframes64_t) drag_info.cumulative_x_drag, this) ;
}
@@ -762,14 +762,14 @@ void
Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
-
+
nframes64_t start = 0 ;
nframes64_t end = 0 ;
nframes64_t pointer_frame = event_frame(event) ;
nframes64_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
-
+
if (pointer_frame != drag_info.last_pointer_frame)
{
start = ifv->get_position() ;
@@ -782,9 +782,9 @@ Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
end = pointer_frame ;
}
-
+
new_dur_val = end - start ;
-
+
// are we getting bigger or smaller?
if(pointer_frame >= drag_info.last_pointer_frame)
{
@@ -800,10 +800,10 @@ Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
new_dur_val = ifv->get_min_duration() ;
}
}
-
+
drag_info.last_pointer_frame = pointer_frame ;
drag_info.cumulative_x_drag = new_dur_val ;
-
+
// we treat this as a special case, usually we want to send the identitiy of the caller
// but in this case, that would trigger our socket handler to handle the event, sending
// notification to the image compositor. This would be fine, except that we have not
@@ -812,7 +812,7 @@ Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
// We therefore set the caller identity to the special case of 0
ifv->set_duration(new_dur_val, 0) ;
}
-
+
show_verbose_time_cursor(new_dur_val, 10) ;
}
@@ -870,15 +870,15 @@ Editor::markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
/*NOTREACHED*/
return ;
}
-
+
drag_info.item = mv->get_canvas_frame() ;
drag_info.data = mv ;
drag_info.grab_x = event->motion.x ;
drag_info.cumulative_x_drag = 0 ;
-
+
drag_info.motion_callback = &Editor::markerview_end_handle_trim_motion ;
drag_info.finished_callback = &Editor::markerview_end_handle_end_trim ;
-
+
start_grab(event, trimmer_cursor) ;
}
@@ -887,11 +887,11 @@ void
Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
+
nframes64_t start = 0 ;
nframes64_t end = 0 ;
nframes64_t pointer_frame = event_frame(event) ;
-
+
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
{
@@ -900,7 +900,7 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
start = mv->get_position() ;
end = mv->get_position() + mv->get_duration() ;
-
+
if (pointer_frame > end)
{
start = end ;
@@ -909,10 +909,10 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
start = pointer_frame ;
}
-
+
// are we getting bigger or smaller?
nframes64_t new_dur_val = end - start ;
-
+
if(pointer_frame <= drag_info.grab_frame)
{
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
@@ -937,12 +937,12 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
// current values are ok
}
}
-
+
drag_info.last_pointer_frame = pointer_frame ;
-
+
/* re-calculatethe duration and position of the imageframeview */
drag_info.cumulative_x_drag = new_dur_val ;
-
+
// we treat this as a special case, usually we want to send the identitiy of the caller
// but in this case, that would trigger our socket handler to handle the event, sending
// notification to the image compositor. This would be fine, except that we have not
@@ -953,7 +953,7 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
mv->set_position(start, 0) ;
}
}
-
+
show_verbose_time_cursor(start, 10) ;
}
@@ -961,7 +961,7 @@ void
Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event)
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
+
if (drag_info.cumulative_x_drag == 0)
{
/* just a click */
@@ -969,7 +969,7 @@ Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
else
{
nframes64_t temp = mv->get_position() + mv->get_duration() ;
-
+
mv->set_position((nframes64_t) (temp - drag_info.cumulative_x_drag), this) ;
mv->set_duration((nframes64_t) drag_info.cumulative_x_drag, this) ;
}
@@ -979,19 +979,19 @@ void
Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
+
nframes64_t start = 0 ;
nframes64_t end = 0 ;
nframes64_t pointer_frame = event_frame(event) ;
nframes64_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
-
+
if (pointer_frame != drag_info.last_pointer_frame)
{
start = mv->get_position() ;
end = mv->get_position() + mv->get_duration() ;
-
+
if(pointer_frame < start)
{
end = start ;
@@ -1000,16 +1000,16 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
end = pointer_frame ;
}
-
+
new_dur_val = end - start ;
-
+
// are we getting bigger or smaller?
if(pointer_frame >= drag_info.last_pointer_frame)
{
// we cant extend beyond the item we are marking
ImageFrameView* marked_item = mv->get_marked_item() ;
nframes64_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
-
+
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
if((start + mv->get_max_duration()) > marked_end)
@@ -1037,7 +1037,7 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
drag_info.last_pointer_frame = pointer_frame ;
drag_info.cumulative_x_drag = new_dur_val ;
-
+
// we treat this as a special case, usually we want to send the identitiy of the caller
// but in this case, that would trigger our socket handler to handle the event, sending
// notification to the image compositor. This would be fine, except that we have not
@@ -1046,7 +1046,7 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
// We therefore set the caller identity to the special case of 0
mv->set_duration(new_dur_val, 0) ;
}
-
+
show_verbose_time_cursor(new_dur_val, 10) ;
}
diff --git a/gtk2_ardour/editor_items.h b/gtk2_ardour/editor_items.h
index 15e56a3313..44765ffe91 100644
--- a/gtk2_ardour/editor_items.h
+++ b/gtk2_ardour/editor_items.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -60,9 +60,9 @@ enum ItemType {
#endif
CrossfadeViewItem,
-
+
/* don't remove this */
-
+
NoItem
};
diff --git a/gtk2_ardour/editor_keyboard.cc b/gtk2_ardour/editor_keyboard.cc
index 69bfb3ba8a..977a7ec10c 100644
--- a/gtk2_ardour/editor_keyboard.cc
+++ b/gtk2_ardour/editor_keyboard.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ Editor::kbd_driver (sigc::slot<void,GdkEvent*> theslot, bool use_track_canvas, b
/* any use of "keyboard mouse buttons" invalidates an existing grab
*/
-
+
if (_drag) {
_drag->item()->ungrab (GDK_CURRENT_TIME);
delete _drag;
@@ -101,16 +101,16 @@ Editor::kbd_mute_unmute_region ()
commit_reversible_command ();
} else if (entered_regionview) {
-
+
begin_reversible_command (_("mute region"));
XMLNode &before = entered_regionview->region()->playlist()->get_state();
-
+
entered_regionview->region()->set_muted (!entered_regionview->region()->muted());
-
+
XMLNode &after = entered_regionview->region()->playlist()->get_state();
session->add_command (new MementoCommand<ARDOUR::Playlist>(*(entered_regionview->region()->playlist()), &before, &after));
commit_reversible_command();
-
+
}
}
diff --git a/gtk2_ardour/editor_keys.cc b/gtk2_ardour/editor_keys.cc
index f5ca92deb3..a31711a4d0 100644
--- a/gtk2_ardour/editor_keys.cc
+++ b/gtk2_ardour/editor_keys.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ Editor::keyboard_selection_begin ()
pending_keyboard_selection_start = where;
have_pending_keyboard_selection = true;
}
-
+
}
}
}
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 83a3beabc5..a83d30cb7b 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -86,34 +86,34 @@ Editor::add_new_location (Location *location)
lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
}
lam->end = 0;
-
+
} else if (location->is_auto_loop()) {
// transport marker
- lam->start = new Marker (*this, *transport_marker_group, color,
+ lam->start = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::LoopStart, location->start());
- lam->end = new Marker (*this, *transport_marker_group, color,
+ lam->end = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::LoopEnd, location->end());
-
+
} else if (location->is_auto_punch()) {
// transport marker
- lam->start = new Marker (*this, *transport_marker_group, color,
+ lam->start = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::PunchIn, location->start());
- lam->end = new Marker (*this, *transport_marker_group, color,
+ lam->end = new Marker (*this, *transport_marker_group, color,
location->name(), Marker::PunchOut, location->end());
-
+
} else {
// range marker
if (location->is_cd_marker() && ruler_cd_marker_action->get_active()) {
- lam->start = new Marker (*this, *cd_marker_group, color,
+ lam->start = new Marker (*this, *cd_marker_group, color,
location->name(), Marker::Start, location->start());
- lam->end = new Marker (*this, *cd_marker_group, color,
+ lam->end = new Marker (*this, *cd_marker_group, color,
location->name(), Marker::End, location->end());
}
else {
-
- lam->start = new Marker (*this, *range_marker_group, color,
+
+ lam->start = new Marker (*this, *range_marker_group, color,
location->name(), Marker::Start, location->start());
- lam->end = new Marker (*this, *range_marker_group, color,
+ lam->end = new Marker (*this, *range_marker_group, color,
location->name(), Marker::End, location->end());
}
}
@@ -154,7 +154,7 @@ Editor::location_changed (Location *location)
/* a location that isn't "marked" with markers */
return;
}
-
+
lam->set_name (location->name());
lam->set_position (location->start(), location->end());
@@ -169,9 +169,9 @@ void
Editor::location_flags_changed (Location *location, void *src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_flags_changed), location, src));
-
+
LocationMarkers *lam = find_location_markers (location);
-
+
if (lam == 0) {
/* a location that isn't "marked" with markers */
return;
@@ -191,7 +191,7 @@ Editor::location_flags_changed (Location *location, void *src)
} else {
lam->set_color_rgba (location_range_color);
}
-
+
if (location->is_hidden()) {
lam->hide();
} else {
@@ -222,8 +222,8 @@ void Editor::ensure_cd_marker_updated (LocationMarkers * lam, Location * locatio
lam->end->reparent (*cd_marker_group);
}
}
- else if ( (!location->is_cd_marker() || !ruler_cd_marker_action->get_active())
- && (lam->start->get_parent() == cd_marker_group))
+ else if ( (!location->is_cd_marker() || !ruler_cd_marker_action->get_active())
+ && (lam->start->get_parent() == cd_marker_group))
{
//cerr << "reparenting non-cd marker so it can be relocated: " << location->name() << endl;
if (location->is_mark()) {
@@ -292,7 +292,7 @@ Editor::refresh_location_display_internal (Locations::LocationList& locations)
for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
i->second->valid = false;
}
-
+
/* add new ones */
for (Locations::LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
@@ -319,7 +319,7 @@ Editor::refresh_location_display_internal (Locations::LocationList& locations)
if (!i->second->valid) {
delete i->second;
location_markers.erase (i);
- }
+ }
i = tmp;
}
@@ -332,7 +332,7 @@ void
Editor::refresh_location_display ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &Editor::refresh_location_display));
-
+
if (session) {
session->locations()->apply (*this, &Editor::refresh_location_display_internal);
}
@@ -349,36 +349,36 @@ Editor::refresh_location_display_s (Change ignored)
}
void
-Editor::LocationMarkers::hide()
+Editor::LocationMarkers::hide()
{
start->hide ();
if (end) { end->hide(); }
}
void
-Editor::LocationMarkers::show()
+Editor::LocationMarkers::show()
{
start->show ();
if (end) { end->show(); }
}
void
-Editor::LocationMarkers::set_name (const string& str)
+Editor::LocationMarkers::set_name (const string& str)
{
start->set_name (str);
if (end) { end->set_name (str); }
}
void
-Editor::LocationMarkers::set_position (nframes64_t startf,
- nframes64_t endf)
+Editor::LocationMarkers::set_position (nframes64_t startf,
+ nframes64_t endf)
{
start->set_position (startf);
if (end) { end->set_position (endf); }
}
void
-Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
+Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
{
start->set_color_rgba (rgba);
if (end) { end->set_color_rgba (rgba); }
@@ -401,7 +401,7 @@ Editor::mouse_add_new_marker (nframes64_t where, bool is_cd, bool is_xrun)
session->locations()->next_available_name(markername, markerprefix);
if (!is_xrun && !choose_new_marker_name(markername)) {
return;
- }
+ }
Location *location = new Location (where, where, markername, (Location::Flags) flags);
session->begin_reversible_command (_("add marker"));
XMLNode &before = session->locations()->get_state();
@@ -458,7 +458,7 @@ void
Editor::location_gone (Location *location)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_gone), location));
-
+
LocationMarkerMap::iterator i;
if (location == transport_loop_location()) {
@@ -468,7 +468,7 @@ Editor::location_gone (Location *location)
if (location == transport_punch_location()) {
update_punch_range_view (true);
}
-
+
for (i = location_markers.begin(); i != location_markers.end(); ++i) {
if ((*i).first == location) {
delete (*i).second;
@@ -498,7 +498,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
/*NOTREACHED*/
}
-
+
bool is_start;
Location * loc = find_location_from_marker (marker, is_start);
if (loc == transport_loop_location() || loc == transport_punch_location()) {
@@ -536,7 +536,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
}
}
}
-#endif
+#endif
marker_menu_item = item;
markerMenu->popup (1, ev->time);
}
@@ -673,7 +673,7 @@ Editor::build_new_transport_marker_menu ()
items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop)));
items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch)));
- new_transport_marker_menu->signal_unmap().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
+ new_transport_marker_menu->signal_unmap().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
}
void
@@ -688,7 +688,7 @@ Editor::marker_menu_hide ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
l->set_hidden (true, this);
}
@@ -728,7 +728,7 @@ Editor::marker_menu_select_all_selectables_using_range ()
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);
}
-
+
}
void
@@ -747,7 +747,7 @@ Editor::marker_menu_separate_regions_using_location ()
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
separate_regions_using_location (*l);
}
-
+
}
void
@@ -762,7 +762,7 @@ Editor::marker_menu_play_from ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
@@ -770,7 +770,7 @@ Editor::marker_menu_play_from ()
}
else {
//session->request_bounded_roll (l->start(), l->end());
-
+
if (is_start) {
session->request_locate (l->start(), true);
} else {
@@ -792,7 +792,7 @@ Editor::marker_menu_set_playhead ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
@@ -827,7 +827,7 @@ Editor::marker_menu_range_to_next ()
if ((l = find_location_from_marker (marker, is_start)) == 0) {
return;
}
-
+
nframes_t end = session->locations()->first_mark_after (marker->position());
if (end != max_frames) {
@@ -851,7 +851,7 @@ Editor::marker_menu_set_from_playhead ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
@@ -879,7 +879,7 @@ Editor::marker_menu_set_from_selection ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
@@ -918,7 +918,7 @@ Editor::marker_menu_play_range ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
@@ -926,7 +926,7 @@ Editor::marker_menu_play_range ()
}
else {
session->request_bounded_roll (l->start(), l->end());
-
+
}
}
}
@@ -943,12 +943,12 @@ Editor::marker_menu_loop_range ()
Location* l;
bool is_start;
-
+
if ((l = find_location_from_marker (marker, is_start)) != 0) {
Location* l2;
if ((l2 = transport_loop_location()) != 0) {
l2->set (l->start(), l->end());
-
+
// enable looping, reposition and start rolling
session->request_play_loop(true);
session->request_locate (l2->start(), true);
@@ -1118,10 +1118,10 @@ Editor::update_loop_range_view (bool visibility)
double x1 = frame_to_pixel (tll->start());
double x2 = frame_to_pixel (tll->end());
-
+
transport_loop_range_rect->property_x1() = x1;
transport_loop_range_rect->property_x2() = x2;
-
+
if (visibility) {
transport_loop_range_rect->show();
}
@@ -1150,7 +1150,7 @@ Editor::update_punch_range_view (bool visibility)
transport_punch_range_rect->property_x1() = 0;
transport_punch_range_rect->property_x2() = (session->config.get_punch_out() ? frame_to_pixel (tpl->end()) : track_canvas_width);
}
-
+
if (visibility) {
transport_punch_range_rect->show();
}
@@ -1171,7 +1171,7 @@ Editor::marker_selection_changed ()
if (lam->start) {
lam->start->hide_line();
- }
+ }
if (lam->end) {
lam->end->hide_line();
@@ -1208,7 +1208,7 @@ Editor::selected_marker_moved (Location* loc)
edit_point_clock.set (loc->start());
}
-struct SortLocationsByPosition {
+struct SortLocationsByPosition {
bool operator() (Location* a, Location* b) {
return a->start() < b->start();
}
@@ -1226,7 +1226,7 @@ Editor::goto_nth_marker (int n)
SortLocationsByPosition cmp;
ordered.sort (cmp);
-
+
for (Locations::LocationList::iterator i = ordered.begin(); n >= 0 && i != ordered.end(); ++i) {
if ((*i)->is_mark() && !(*i)->is_hidden() && !(*i)->is_start()) {
if (n == 0) {
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index 46b05a20f4..0903de68ff 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003-2004 Paul Davis
+ Copyright (C) 2003-2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -83,14 +83,14 @@ Editor::show_editor_mixer (bool yn)
if (selection->tracks.empty()) {
- if (track_views.empty()) {
+ if (track_views.empty()) {
show_editor_mixer_when_tracks_arrive = true;
return;
- }
+ }
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
RouteTimeAxisView* atv;
-
+
if ((atv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
r = atv->route();
break;
@@ -99,10 +99,10 @@ Editor::show_editor_mixer (bool yn)
} else {
sort_track_selection ();
-
+
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
RouteTimeAxisView* atv;
-
+
if ((atv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
r = atv->route();
break;
@@ -126,7 +126,7 @@ Editor::show_editor_mixer (bool yn)
current_mixer_strip->set_width_enum (editor_mixer_strip_width, (void*) this);
}
}
-
+
if (current_mixer_strip->get_parent() == 0) {
global_hpacker.pack_start (*current_mixer_strip, Gtk::PACK_SHRINK );
global_hpacker.reorder_child (*current_mixer_strip, 0);
@@ -180,7 +180,7 @@ Editor::create_editor_mixer ()
current_mixer_strip->WidthChanged.connect (mem_fun(*this, &Editor::ensure_all_elements_drawn));
#endif
current_mixer_strip->set_embedded (true);
-}
+}
void
Editor::set_selected_mixer_strip (TimeAxisView& view)
@@ -193,7 +193,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
}
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
-
+
if (act) {
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
if (!tact || !tact->get_active()) {
@@ -210,11 +210,11 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
}
/* might be nothing to do */
-
+
if (current_mixer_strip->route() == at->route()) {
return;
}
-
+
if (created) {
current_mixer_strip->set_width_enum (editor_mixer_strip_width, (void*) this);
}
@@ -234,7 +234,7 @@ Editor::update_current_screen ()
a visual glitch. */
return;
}
-
+
if (session && session->engine().running()) {
nframes64_t const frame = session->audible_frame();
@@ -255,7 +255,7 @@ Editor::update_current_screen ()
#undef CONTINUOUS_SCROLL
#ifndef CONTINUOUS_SCROLL
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
-
+
if (session->transport_speed() < 0) {
if (frame > (current_page_frames()/2)) {
center_screen (frame-(current_page_frames()/2));
@@ -270,11 +270,11 @@ Editor::update_current_screen ()
playhead_cursor->set_position (frame);
#else // CONTINUOUS_SCROLL
-
- /* don't do continuous scroll till the new position is in the rightmost quarter of the
+
+ /* don't do continuous scroll till the new position is in the rightmost quarter of the
editor canvas
*/
-
+
if (session->transport_speed()) {
double target = ((double)frame - (double)current_page_frames()/2.0) / frames_per_unit;
if (target <= 0.0) target = 0.0;
@@ -287,7 +287,7 @@ Editor::update_current_screen ()
current = target;
horizontal_adjustment.set_value ( current );
}
-
+
playhead_cursor->set_position (frame);
#endif // CONTINUOUS_SCROLL
@@ -305,7 +305,7 @@ Editor::update_current_screen ()
if (current_mixer_strip) {
current_mixer_strip->fast_update ();
}
-
+
}
}
@@ -322,9 +322,9 @@ void
Editor::current_mixer_strip_hidden ()
{
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
-
+
RouteTimeAxisView* tmp;
-
+
if ((tmp = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
if (tmp->route() == current_mixer_strip->route()) {
(*i)->set_selected (false);
@@ -344,7 +344,7 @@ void
Editor::session_going_away ()
{
_have_idled = false;
-
+
for (vector<sigc::connection>::iterator i = session_connections.begin(); i != session_connections.end(); ++i) {
(*i).disconnect ();
}
@@ -387,7 +387,7 @@ Editor::session_going_away ()
editor_list_button.set_active(false);
editor_list_button.set_sensitive(false);
-
+
/* clear tempo/meter rulers */
remove_metric_marks ();
hide_measures ();
@@ -395,9 +395,9 @@ Editor::session_going_away ()
delete current_bbt_points;
current_bbt_points = 0;
-
+
/* get rid of any existing editor mixer strip */
-
+
if (current_mixer_strip) {
if (current_mixer_strip->get_parent() != 0) {
global_hpacker.remove (*current_mixer_strip);
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 78947ea808..0a715e3fd4 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2001 Paul Davis
+ Copyright (C) 2000-2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -91,7 +91,7 @@ Editor::mouse_frame (nframes64_t& where, bool& in_track_canvas) const
if (!canvas_window) {
return false;
}
-
+
pointer_window = canvas_window->get_pointer (x, y, mask);
if (pointer_window == track_canvas->get_bin_window()) {
@@ -108,7 +108,7 @@ Editor::mouse_frame (nframes64_t& where, bool& in_track_canvas) const
event.type = GDK_BUTTON_RELEASE;
event.button.x = wx;
event.button.y = wy;
-
+
where = event_frame (&event, 0, 0);
return true;
}
@@ -139,7 +139,7 @@ Editor::event_frame (GdkEvent const * event, double* pcx, double* pcy) const
_trackview_group->w2i(*pcx, *pcy);
break;
case GDK_MOTION_NOTIFY:
-
+
*pcx = event->motion.x;
*pcy = event->motion.y;
_trackview_group->w2i(*pcx, *pcy);
@@ -161,7 +161,7 @@ Editor::event_frame (GdkEvent const * event, double* pcx, double* pcy) const
position is negative (as can be the case with motion events in particular),
the frame location is always positive.
*/
-
+
return pixel_to_frame (*pcx);
}
@@ -175,11 +175,11 @@ Editor::which_grabber_cursor ()
case MouseRange:
c = midi_pencil_cursor;
break;
-
+
case MouseObject:
c = grabber_cursor;
break;
-
+
case MouseTimeFX:
c = midi_resize_cursor;
break;
@@ -211,11 +211,11 @@ Editor::set_canvas_cursor ()
case MouseRange:
current_canvas_cursor = midi_pencil_cursor;
break;
-
+
case MouseObject:
current_canvas_cursor = which_grabber_cursor();
break;
-
+
case MouseTimeFX:
current_canvas_cursor = midi_resize_cursor;
break;
@@ -230,23 +230,23 @@ Editor::set_canvas_cursor ()
case MouseRange:
current_canvas_cursor = selector_cursor;
break;
-
+
case MouseObject:
current_canvas_cursor = which_grabber_cursor();
break;
-
+
case MouseGain:
current_canvas_cursor = cross_hair_cursor;
break;
-
+
case MouseZoom:
current_canvas_cursor = zoom_cursor;
break;
-
+
case MouseTimeFX:
current_canvas_cursor = time_fx_cursor; // just use playhead
break;
-
+
case MouseAudition:
current_canvas_cursor = speaker_cursor;
break;
@@ -329,7 +329,7 @@ Editor::mouse_mode_toggled (MouseMode m)
} else {
- /*
+ /*
in range mode,show the range selection.
*/
@@ -379,12 +379,12 @@ Editor::step_mouse_mode (bool next)
}
}
break;
-
+
case MouseGain:
if (next) set_mouse_mode (MouseTimeFX);
else set_mouse_mode (MouseZoom);
break;
-
+
case MouseTimeFX:
if (next) {
set_mouse_mode (MouseAudition);
@@ -423,16 +423,16 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
(mouse_mode != MouseRange)) ||
((event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE) || event->button.button > 3)) {
-
+
return;
}
if (event->type == GDK_BUTTON_PRESS || event->type == GDK_BUTTON_RELEASE) {
if ((event->button.state & Keyboard::RelevantModifierKeyMask) && event->button.button != 1) {
-
+
/* almost no selection action on modified button-2 or button-3 events */
-
+
if (item_type != RegionItem && event->button.button != 2) {
return;
}
@@ -443,7 +443,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
bool press = (event->type == GDK_BUTTON_PRESS);
// begin_reversible_command (_("select on click"));
-
+
switch (item_type) {
case RegionItem:
if (mouse_mode != MouseRange) {
@@ -452,7 +452,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
set_selected_track_as_side_effect ();
}
break;
-
+
case RegionViewNameHighlight:
case RegionViewName:
if (mouse_mode != MouseRange) {
@@ -480,7 +480,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
set_selected_control_point_from_click (op, false);
}
break;
-
+
case StreamItem:
/* for context click or range selection, select track */
if (event->button.button == 3) {
@@ -489,11 +489,11 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
set_selected_track_as_side_effect ();
}
break;
-
+
case AutomationTrackItem:
set_selected_track_as_side_effect (true);
break;
-
+
default:
break;
}
@@ -505,20 +505,20 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
if (_drag) {
_drag->item()->ungrab (event->button.time);
}
-
+
/* single mouse clicks on any of these item types operate
independent of mouse mode, mostly because they are
not on the main track canvas or because we want
them to be modeless.
*/
-
+
switch (item_type) {
case PlayheadCursorItem:
assert (_drag == 0);
_drag = new CursorDrag (this, item, true);
_drag->start_grab (event);
return true;
-
+
case MarkerItem:
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::ModifierMask(Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
hide_marker (item, event);
@@ -528,7 +528,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
}
return true;
-
+
case TempoMarkerItem:
assert (_drag == 0);
_drag = new TempoMarkerDrag (
@@ -538,17 +538,17 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
);
_drag->start_grab (event);
return true;
-
+
case MeterMarkerItem:
assert (_drag == 0);
_drag = new MeterMarkerDrag (
this,
- item,
+ item,
Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)
);
_drag->start_grab (event);
return true;
-
+
case MarkerBarItem:
case TempoBarItem:
case MeterBarItem:
@@ -560,18 +560,18 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
return true;
break;
-
+
case RangeMarkerBarItem:
assert (_drag == 0);
if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
_drag = new CursorDrag (this, &playhead_cursor->canvas_item, false);
} else {
- _drag = new RangeMarkerBarDrag (this, item, RangeMarkerBarDrag::CreateRangeMarker);
- }
+ _drag = new RangeMarkerBarDrag (this, item, RangeMarkerBarDrag::CreateRangeMarker);
+ }
_drag->start_grab (event);
return true;
break;
-
+
case CdMarkerBarItem:
assert (_drag == 0);
if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
@@ -582,7 +582,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
return true;
break;
-
+
case TransportMarkerBarItem:
assert (_drag == 0);
if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
@@ -593,11 +593,11 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
return true;
break;
-
+
default:
break;
}
-
+
if (internal_editing()) {
switch (item_type) {
case StreamItem:
@@ -633,15 +633,15 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag = new SelectionDrag (this, item, SelectionDrag::SelectionStartTrim);
_drag->start_grab (event);
break;
-
+
case EndSelectionTrimItem:
assert (_drag == 0);
_drag = new SelectionDrag (this, item, SelectionDrag::SelectionEndTrim);
_drag->start_grab (event);
break;
-
+
case SelectionItem:
- if (Keyboard::modifier_state_contains
+ if (Keyboard::modifier_state_contains
(event->button.state, Keyboard::ModifierMask(Keyboard::SecondaryModifier))) {
// contains and not equals because I can't use alt as a modifier alone.
start_selection_grab (item, event);
@@ -658,7 +658,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
}
break;
-
+
default:
assert (_drag == 0);
_drag = new SelectionDrag (this, item, SelectionDrag::CreateSelection);
@@ -666,17 +666,17 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
return true;
break;
-
+
case MouseObject:
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::ModifierMask(Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) &&
event->type == GDK_BUTTON_PRESS) {
-
+
assert (_drag == 0);
_drag = new RubberbandSelectDrag (this, item);
_drag->start_grab (event);
-
+
} else if (event->type == GDK_BUTTON_PRESS) {
-
+
switch (item_type) {
case FadeInHandleItem:
{
@@ -686,7 +686,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
return true;
}
-
+
case FadeOutHandleItem:
{
assert (_drag == 0);
@@ -695,7 +695,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
return true;
}
-
+
case RegionItem:
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
start_region_copy_grab (item, event, clicked_regionview);
@@ -705,7 +705,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
start_region_grab (item, event, clicked_regionview);
}
break;
-
+
case RegionViewNameHighlight:
{
assert (_drag == 0);
@@ -715,7 +715,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
return true;
break;
}
-
+
case RegionViewName:
{
/* rename happens on edit clicks */
@@ -726,14 +726,14 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
return true;
break;
}
-
+
case ControlPointItem:
assert (_drag == 0);
_drag = new ControlPointDrag (this, item);
_drag->start_grab (event);
return true;
break;
-
+
case AutomationLineItem:
assert (_drag == 0);
_drag = new LineDrag (this, item);
@@ -747,7 +747,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag = new RubberbandSelectDrag (this, item);
_drag->start_grab (event);
break;
-
+
#ifdef WITH_CMT
case ImageFrameHandleStartItem:
imageframe_start_handle_op(item, event) ;
@@ -772,18 +772,18 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
start_imageframe_grab(item, event) ;
break ;
#endif
-
+
case MarkerBarItem:
-
+
break;
-
+
default:
break;
}
}
return true;
break;
-
+
case MouseGain:
switch (item_type) {
case RegionItem:
@@ -794,61 +794,61 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag = new RegionGainDrag (this, item);
_drag->start_grab (event, current_canvas_cursor);
break;
-
+
case GainLineItem:
assert (_drag == 0);
_drag = new LineDrag (this, item);
_drag->start_grab (event);
return true;
-
+
case ControlPointItem:
assert (_drag == 0);
_drag = new ControlPointDrag (this, item);
_drag->start_grab (event);
return true;
break;
-
+
default:
break;
}
return true;
break;
-
+
switch (item_type) {
case ControlPointItem:
assert (_drag == 0);
_drag = new ControlPointDrag (this, item);
_drag->start_grab (event);
break;
-
+
case AutomationLineItem:
assert (_drag == 0);
_drag = new LineDrag (this, item);
_drag->start_grab (event);
break;
-
+
case RegionItem:
// XXX need automation mode to identify which
// line to use
// start_line_grab_from_regionview (item, event);
break;
-
+
default:
break;
}
return true;
break;
-
+
case MouseZoom:
if (event->type == GDK_BUTTON_PRESS) {
assert (_drag == 0);
_drag = new MouseZoomDrag (this, item);
_drag->start_grab (event);
}
-
+
return true;
break;
-
+
case MouseTimeFX:
if (item_type == RegionItem) {
assert (_drag == 0);
@@ -856,7 +856,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
}
break;
-
+
case MouseAudition:
_drag = new ScrubDrag (this, item);
_drag->start_grab (event);
@@ -866,7 +866,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
scrubbing_direction = 0;
track_canvas->get_window()->set_cursor (*transparent_cursor);
break;
-
+
default:
break;
}
@@ -895,11 +895,11 @@ Editor::button_press_handler_2 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
return true;
break;
-
+
default:
break;
}
-
+
switch (item_type) {
case RegionViewNameHighlight:
assert (_drag == 0);
@@ -907,26 +907,26 @@ Editor::button_press_handler_2 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
_drag->start_grab (event);
return true;
break;
-
+
case RegionViewName:
assert (_drag == 0);
_drag = new TrimDrag (this, clicked_regionview->get_name_highlight(), clicked_regionview, selection->regions.by_layer());
_drag->start_grab (event);
return true;
break;
-
+
default:
break;
}
-
+
break;
case MouseRange:
/* relax till release */
return true;
break;
-
-
+
+
case MouseZoom:
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
temporal_zoom_session();
@@ -935,7 +935,7 @@ Editor::button_press_handler_2 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
return true;
break;
-
+
default:
break;
}
@@ -949,7 +949,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
if (event->type != GDK_BUTTON_PRESS) {
return false;
}
-
+
Glib::RefPtr<Gdk::Window> canvas_window = const_cast<Editor*>(this)->track_canvas->get_window();
if (canvas_window) {
@@ -959,7 +959,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
Gdk::ModifierType mask;
pointer_window = canvas_window->get_pointer (x, y, mask);
-
+
if (pointer_window == track_canvas->get_bin_window()) {
track_canvas->window_to_world (x, y, wx, wy);
allow_vertical_scroll = true;
@@ -980,7 +980,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
(Keyboard::is_delete_event (&event->button) ||
Keyboard::is_context_menu_event (&event->button) ||
Keyboard::is_edit_event (&event->button))) {
-
+
/* handled by button release */
return true;
}
@@ -1010,9 +1010,9 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
{
nframes64_t where = event_frame (event, 0, 0);
AutomationTimeAxisView* atv = 0;
-
+
/* no action if we're recording */
-
+
if (session && session->actively_recording()) {
return true;
}
@@ -1031,7 +1031,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
were_dragging = true;
}
-
+
button_selection (item, event, item_type);
/* edit events get handled here */
@@ -1045,11 +1045,11 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case TempoMarkerItem:
edit_tempo_marker (item);
break;
-
+
case MeterMarkerItem:
edit_meter_marker (item);
break;
-
+
case RegionViewName:
if (clicked_regionview->name_active()) {
return mouse_rename_region (item, event);
@@ -1083,17 +1083,17 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case FadeOutHandleItem:
popup_fade_context_menu (1, event->button.time, item, item_type);
break;
-
+
case StreamItem:
popup_track_context_menu (1, event->button.time, item_type, false, where);
break;
-
+
case RegionItem:
case RegionViewNameHighlight:
case RegionViewName:
popup_track_context_menu (1, event->button.time, item_type, false, where);
break;
-
+
case SelectionItem:
popup_track_context_menu (1, event->button.time, item_type, true, where);
break;
@@ -1102,8 +1102,8 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
popup_track_context_menu (1, event->button.time, item_type, false, where);
break;
- case MarkerBarItem:
- case RangeMarkerBarItem:
+ case MarkerBarItem:
+ case RangeMarkerBarItem:
case TransportMarkerBarItem:
case CdMarkerBarItem:
case TempoBarItem:
@@ -1118,11 +1118,11 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case TempoMarkerItem:
tm_marker_context_menu (&event->button, item);
break;
-
+
case MeterMarkerItem:
tm_marker_context_menu (&event->button, item);
break;
-
+
case CrossfadeViewItem:
popup_track_context_menu (1, event->button.time, item_type, false, where);
break;
@@ -1141,7 +1141,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
popup_marker_time_axis_edit_menu(1, event->button.time, item, false) ;
break ;
#endif
-
+
default:
break;
}
@@ -1158,7 +1158,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case TempoMarkerItem:
remove_tempo_marker (item);
break;
-
+
case MeterMarkerItem:
remove_meter_marker (item);
break;
@@ -1172,7 +1172,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
remove_clicked_region ();
}
break;
-
+
case ControlPointItem:
if (mouse_mode == MouseGain) {
remove_gain_control_point (item, event);
@@ -1221,18 +1221,18 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
mouse_add_new_tempo_event (where);
}
return true;
-
+
case MeterBarItem:
if (!_dragging_playhead) {
mouse_add_new_meter_event (pixel_to_frame (event->button.x));
- }
+ }
return true;
break;
default:
break;
}
-
+
switch (mouse_mode) {
case MouseObject:
switch (item_type) {
@@ -1240,11 +1240,11 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
atv = dynamic_cast<AutomationTimeAxisView*>(clicked_axisview);
if (atv) {
atv->add_automation_event (item, event, where, event->button.y);
- }
+ }
return true;
-
+
break;
-
+
default:
break;
}
@@ -1268,7 +1268,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
return true;
break;
-
+
case AutomationTrackItem:
dynamic_cast<AutomationTimeAxisView*>(clicked_axisview)->
add_automation_event (item, event, where, event->button.y);
@@ -1278,7 +1278,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
break;
}
break;
-
+
case MouseAudition:
track_canvas->get_window()->set_cursor (*current_canvas_cursor);
if (scrubbing_direction == 0) {
@@ -1295,7 +1295,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
session->request_transport_speed (0.0);
}
break;
-
+
default:
break;
@@ -1307,7 +1307,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case 2:
switch (mouse_mode) {
-
+
case MouseObject:
switch (item_type) {
case RegionItem:
@@ -1319,29 +1319,29 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
// Button2 click is unused
}
return true;
-
+
break;
-
+
default:
break;
}
break;
-
+
case MouseRange:
-
+
// x_style_paste (where, 1.0);
return true;
break;
-
+
default:
break;
}
break;
-
+
case 3:
break;
-
+
default:
break;
}
@@ -1354,7 +1354,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
ControlPoint* cp;
Marker * marker;
double fraction;
-
+
if (last_item_entered != item) {
last_item_entered = item;
last_item_entered_n = 0;
@@ -1397,7 +1397,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
}
}
break;
-
+
case AutomationLineItem:
if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
{
@@ -1410,7 +1410,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
}
}
break;
-
+
case RegionViewNameHighlight:
if (is_drawable() && mouse_mode == MouseObject) {
track_canvas->get_window()->set_cursor (*trimmer_cursor);
@@ -1446,14 +1446,14 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
break;
case RegionViewName:
-
+
/* when the name is not an active item, the entire name highlight is for trimming */
if (!reinterpret_cast<RegionView *> (item->get_data ("regionview"))->name_active()) {
if (mouse_mode == MouseObject && is_drawable()) {
track_canvas->get_window()->set_cursor (*trimmer_cursor);
}
- }
+ }
break;
@@ -1562,14 +1562,14 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
cp->set_visible (false);
}
}
-
+
if (is_drawable()) {
track_canvas->get_window()->set_cursor (*current_canvas_cursor);
}
hide_verbose_canvas_cursor ();
break;
-
+
case RegionViewNameHighlight:
case StartSelectionTrimItem:
case EndSelectionTrimItem:
@@ -1619,7 +1619,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
track_canvas->get_window()->set_cursor (*current_canvas_cursor);
}
break;
-
+
case MarkerItem:
if ((marker = static_cast<Marker *> (item->get_data ("marker"))) == 0) {
break;
@@ -1631,7 +1631,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
// fall through
case MeterMarkerItem:
case TempoMarkerItem:
-
+
if (is_drawable()) {
track_canvas->get_window()->set_cursor (*timebar_cursor);
}
@@ -1657,7 +1657,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* /*event*/, ItemType i
Glib::signal_idle().connect (mem_fun(*this, &Editor::left_automation_track));
}
break;
-
+
default:
break;
}
@@ -1679,63 +1679,63 @@ void
Editor::scrub ()
{
double delta;
-
+
if (scrubbing_direction == 0) {
/* first move */
session->request_locate (_drag->current_pointer_frame(), false);
session->request_transport_speed (0.1);
scrubbing_direction = 1;
-
+
} else {
-
+
if (last_scrub_x > _drag->current_pointer_x()) {
-
+
/* pointer moved to the left */
-
+
if (scrubbing_direction > 0) {
-
+
/* we reversed direction to go backwards */
-
+
scrub_reversals++;
scrub_reverse_distance += (int) (last_scrub_x - _drag->current_pointer_x());
-
+
} else {
-
+
/* still moving to the left (backwards) */
-
+
scrub_reversals = 0;
scrub_reverse_distance = 0;
-
+
delta = 0.01 * (last_scrub_x - _drag->current_pointer_x());
session->request_transport_speed (session->transport_speed() - delta);
}
-
+
} else {
/* pointer moved to the right */
-
+
if (scrubbing_direction < 0) {
/* we reversed direction to go forward */
-
+
scrub_reversals++;
scrub_reverse_distance += (int) (_drag->current_pointer_x() - last_scrub_x);
-
+
} else {
/* still moving to the right */
-
+
scrub_reversals = 0;
scrub_reverse_distance = 0;
-
+
delta = 0.01 * (_drag->current_pointer_x() - last_scrub_x);
session->request_transport_speed (session->transport_speed() + delta);
}
}
-
+
/* if there have been more than 2 opposite motion moves detected, or one that moves
back more than 10 pixels, reverse direction
*/
-
+
if (scrub_reversals >= 2 || scrub_reverse_distance > 10) {
-
+
if (scrubbing_direction > 0) {
/* was forwards, go backwards */
session->request_transport_speed (-0.1);
@@ -1745,12 +1745,12 @@ Editor::scrub ()
session->request_transport_speed (0.1);
scrubbing_direction = 1;
}
-
+
scrub_reverse_distance = 0;
scrub_reversals = 0;
}
}
-
+
last_scrub_x = _drag->current_pointer_x();
}
@@ -1759,18 +1759,18 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
{
if (event->motion.is_hint) {
gint x, y;
-
+
/* We call this so that MOTION_NOTIFY events continue to be
delivered to the canvas. We need to do this because we set
Gdk::POINTER_MOTION_HINT_MASK on the canvas. This reduces
the density of the events, at the expense of a round-trip
to the server. Given that this will mostly occur on cases
where DISPLAY = :0.0, and given the cost of what the motion
- event might do, its a good tradeoff.
+ event might do, its a good tradeoff.
*/
track_canvas->get_pointer (x, y);
- }
+ }
if (current_stepping_trackview) {
/* don't keep the persistent stepped trackview if the mouse moves */
@@ -1808,7 +1808,7 @@ Editor::remove_gain_control_point (ArdourCanvas::Item*item, GdkEvent* /*event*/)
// We shouldn't remove the first or last gain point
if (control_point->line().is_last_point(*control_point) ||
- control_point->line().is_first_point(*control_point)) {
+ control_point->line().is_first_point(*control_point)) {
return;
}
@@ -1855,17 +1855,17 @@ Editor::visible_order_range (int* low, int* high) const
{
*low = TimeAxisView::max_order ();
*high = 0;
-
+
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
-
+
if (!rtv->hidden()) {
-
+
if (*high < rtv->order()) {
*high = rtv->order ();
}
-
+
if (*low > rtv->order()) {
*low = rtv->order ();
}
@@ -1879,7 +1879,7 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
/* Either add to or set the set the region selection, unless
this is an alignment click (control used)
*/
-
+
if (Keyboard::modifier_state_contains (event->state, Keyboard::PrimaryModifier)) {
TimeAxisView* tv = &rv.get_time_axis_view();
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(tv);
@@ -1893,15 +1893,15 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
if (where >= 0) {
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
-
+
align_region (rv.region(), SyncPoint, (nframes64_t) (where * speed));
-
+
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
-
+
align_region (rv.region(), End, (nframes64_t) (where * speed));
-
+
} else {
-
+
align_region (rv.region(), Start, (nframes64_t) (where * speed));
}
}
@@ -1909,7 +1909,7 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
}
void
-Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos, double ypos)
+Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos, double ypos)
{
char buf[128];
SMPTE::Time smpte;
@@ -1935,7 +1935,7 @@ Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos,
session->bbt_time (frame, bbt);
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, bbt.bars, bbt.beats, bbt.ticks);
break;
-
+
case AudioClock::SMPTE:
session->smpte_time (frame, smpte);
snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
@@ -1967,7 +1967,7 @@ Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos,
}
void
-Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset, double xpos, double ypos)
+Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset, double xpos, double ypos)
{
char buf[128];
SMPTE::Time smpte;
@@ -2013,10 +2013,10 @@ Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double
ebbt.beats--;
ebbt.ticks = int(Meter::ticks_per_beat) + ebbt.ticks - sbbt.ticks;
}
-
+
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, ebbt.bars, ebbt.beats, ebbt.ticks);
break;
-
+
case AudioClock::SMPTE:
session->smpte_duration (end - start, smpte);
snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
@@ -2071,7 +2071,7 @@ Editor::cancel_selection ()
selection->clear ();
clicked_selection = 0;
-}
+}
void
@@ -2092,7 +2092,7 @@ Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left
if (tv && tv->is_track()) {
speed = tv->get_diskstream()->speed();
}
-
+
if (left_direction) {
if (swap_direction) {
new_bound = (nframes64_t) (region->position()/speed) + frame_delta;
@@ -2110,14 +2110,14 @@ Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left
if (obey_snap) {
snap_to (new_bound);
}
- region->trim_start ((nframes64_t) (new_bound * speed), this);
+ region->trim_start ((nframes64_t) (new_bound * speed), this);
rv.region_changed (StartChanged);
}
void
Editor::single_start_trim (RegionView& rv, nframes64_t frame_delta, bool left_direction, bool obey_snap, bool no_overlap)
{
- boost::shared_ptr<Region> region (rv.region());
+ boost::shared_ptr<Region> region (rv.region());
if (region->locked()) {
return;
@@ -2132,7 +2132,7 @@ Editor::single_start_trim (RegionView& rv, nframes64_t frame_delta, bool left_di
if (tv && tv->is_track()) {
speed = tv->get_diskstream()->speed();
}
-
+
if (left_direction) {
new_bound = (nframes64_t) (region->position()/speed) - frame_delta;
} else {
@@ -2140,18 +2140,18 @@ Editor::single_start_trim (RegionView& rv, nframes64_t frame_delta, bool left_di
}
if (obey_snap) {
- snap_to (new_bound, (left_direction ? 0 : 1));
+ snap_to (new_bound, (left_direction ? 0 : 1));
}
-
+
nframes64_t pre_trim_first_frame = region->first_frame();
region->trim_front ((nframes64_t) (new_bound * speed), this);
-
+
if (no_overlap) {
//Get the next region on the left of this region and shrink/expand it.
boost::shared_ptr<Playlist> playlist (region->playlist());
boost::shared_ptr<Region> region_left = playlist->find_next_region (pre_trim_first_frame, End, 0);
-
+
bool regions_touching = false;
if (region_left != 0 && (pre_trim_first_frame == region_left->last_frame() + 1)){
@@ -2159,14 +2159,14 @@ Editor::single_start_trim (RegionView& rv, nframes64_t frame_delta, bool left_di
}
//Only trim region on the left if the first frame has gone beyond the left region's last frame.
- if (region_left != 0 &&
- (region_left->last_frame() > region->first_frame() || regions_touching))
+ if (region_left != 0 &&
+ (region_left->last_frame() > region->first_frame() || regions_touching))
{
region_left->trim_end(region->first_frame(), this);
}
}
-
+
rv.region_changed (Change (LengthChanged|PositionChanged|StartChanged));
}
@@ -2217,11 +2217,11 @@ Editor::single_end_trim (RegionView& rv, nframes64_t frame_delta, bool left_dire
//Only trim region on the right if the last frame has gone beyond the right region's first frame.
if (region_right != 0 &&
- (region_right->first_frame() < region->last_frame() || regions_touching))
+ (region_right->first_frame() < region->last_frame() || regions_touching))
{
region_right->trim_front(region->last_frame() + 1, this);
}
-
+
rv.region_changed (Change (LengthChanged|PositionChanged|StartChanged));
}
else {
@@ -2274,13 +2274,13 @@ Editor::point_trim (GdkEvent* event)
}
commit_reversible_command();
-
+
break;
case 2:
begin_reversible_command (_("End point trim"));
if (selection->selected (rv)) {
-
+
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i)
{
if (!(*i)->region()->locked()) {
@@ -2304,7 +2304,7 @@ Editor::point_trim (GdkEvent* event)
}
commit_reversible_command();
-
+
break;
default:
break;
@@ -2323,7 +2323,7 @@ Editor::thaw_region_after_trim (RegionView& rv)
region->thaw (_("trimmed region"));
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(&rv);
-
+
if (arv) {
arv->unhide_envelope ();
}
@@ -2340,7 +2340,7 @@ Editor::hide_marker (ArdourCanvas::Item* item, GdkEvent* /*event*/)
/*NOTREACHED*/
}
- Location* location = find_location_from_marker (marker, is_start);
+ Location* location = find_location_from_marker (marker, is_start);
location->set_hidden (true, this);
}
@@ -2405,7 +2405,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, nframes64_t pos)
}
/* don't brush a copy over the original */
-
+
if (pos == rv->region()->position()) {
return;
}
@@ -2418,14 +2418,14 @@ Editor::mouse_brush_insert_region (RegionView* rv, nframes64_t pos)
boost::shared_ptr<Playlist> playlist = rtv->playlist();
double speed = rtv->get_diskstream()->speed();
-
+
XMLNode &before = playlist->get_state();
playlist->add_region (RegionFactory::create (rv->region()), (nframes64_t) (pos * speed));
XMLNode &after = playlist->get_state();
session->add_command(new MementoCommand<Playlist>(*playlist.get(), &before, &after));
-
+
// playlist is frozen, so we have to update manually
-
+
playlist->Modified(); /* EMIT SIGNAL */
}
@@ -2445,16 +2445,16 @@ Editor::start_region_grab (ArdourCanvas::Item* item, GdkEvent* event, RegionView
assert (region_view);
_region_motion_group->raise_to_top ();
-
+
assert (_drag == 0);
-
+
if (Config->get_edit_mode() == Splice) {
_drag = new RegionSpliceDrag (this, item, region_view, selection->regions.by_layer());
} else {
RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new RegionMoveDrag (this, item, region_view, s.by_layer(), false, false);
}
-
+
_drag->start_grab (event);
begin_reversible_command (_("move region(s)"));
@@ -2468,7 +2468,7 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event, Regio
{
assert (region_view);
assert (_drag == 0);
-
+
_region_motion_group->raise_to_top ();
RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
@@ -2481,7 +2481,7 @@ Editor::start_region_brush_grab (ArdourCanvas::Item* item, GdkEvent* event, Regi
{
assert (region_view);
assert (_drag == 0);
-
+
if (Config->get_edit_mode() == Splice) {
return;
}
@@ -2489,7 +2489,7 @@ Editor::start_region_brush_grab (ArdourCanvas::Item* item, GdkEvent* event, Regi
RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new RegionMoveDrag (this, item, region_view, s.by_layer(), true, false);
_drag->start_grab (event);
-
+
begin_reversible_command (_("Drag region brush"));
}
@@ -2514,7 +2514,7 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
}
/* XXX fix me one day to use all new regions */
-
+
boost::shared_ptr<Region> region (new_regions.front());
/* add it to the current stream/playlist.
@@ -2523,11 +2523,11 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
catch the signal it sends when it creates the regionview to
set the regionview we want to then drag.
*/
-
+
latest_regionviews.clear();
sigc::connection c = clicked_routeview->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
-
- /* A selection grab currently creates two undo/redo operations, one for
+
+ /* A selection grab currently creates two undo/redo operations, one for
creating the new region and another for moving it.
*/
@@ -2541,19 +2541,19 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
session->add_command(new MementoCommand<Playlist>(*playlist, before, after));
commit_reversible_command ();
-
+
c.disconnect ();
-
+
if (latest_regionviews.empty()) {
/* something went wrong */
return;
}
/* we need to deselect all other regionviews, and select this one
- i'm ignoring undo stuff, because the region creation will take care of it
+ i'm ignoring undo stuff, because the region creation will take care of it
*/
selection->set (latest_regionviews);
-
+
assert (_drag == 0);
_drag = new RegionMoveDrag (this, latest_regionviews.front()->get_canvas_group(), latest_regionviews.front(), latest_regionviews, false, false);
_drag->start_grab (event);
@@ -2574,7 +2574,7 @@ Editor::set_internal_edit (bool yn)
if (yn) {
mouse_select_button.set_image (*(manage (new Image (::get_icon("midi_tool_pencil")))));
-
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*> (*i);
if (mtv) {
diff --git a/gtk2_ardour/editor_nudge.cc b/gtk2_ardour/editor_nudge.cc
index 1420fd6fc2..a6961d43cd 100644
--- a/gtk2_ardour/editor_nudge.cc
+++ b/gtk2_ardour/editor_nudge.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 55e8014638..159336bf67 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2004 Paul Davis
+ Copyright (C) 2000-2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -145,7 +145,7 @@ Editor::split_regions_at (nframes64_t where, RegionSelection& regions)
/* XXX this test needs to be more complicated, to make sure we really
have something to split.
*/
-
+
if (!(*a)->region()->covers (where)) {
++a;
continue;
@@ -159,7 +159,7 @@ Editor::split_regions_at (nframes64_t where, RegionSelection& regions)
if (! pl->frozen()) {
/* we haven't seen this playlist before */
- /* remember used playlists so we can thaw them later */
+ /* remember used playlists so we can thaw them later */
used_playlists.push_back(pl);
pl->freeze();
}
@@ -168,7 +168,7 @@ Editor::split_regions_at (nframes64_t where, RegionSelection& regions)
if (arv) {
_new_regionviews_show_envelope = arv->envelope_visible();
}
-
+
if (pl) {
XMLNode &before = pl->get_state();
pl->split_region ((*a)->region(), where);
@@ -184,7 +184,7 @@ Editor::split_regions_at (nframes64_t where, RegionSelection& regions)
(*i)->thaw();
used_playlists.pop_front();
}
-
+
commit_reversible_command ();
_new_regionviews_show_envelope = false;
}
@@ -197,14 +197,14 @@ Editor::select_region_for_operation (int /*dir*/, TimeAxisView **tv)
nframes64_t start = 0;
if (selection->time.start () == selection->time.end_frame ()) {
-
+
/* no current selection-> is there a selected regionview? */
if (selection->regions.empty()) {
return region;
}
- }
+ }
if (!selection->regions.empty()) {
@@ -220,18 +220,18 @@ Editor::select_region_for_operation (int /*dir*/, TimeAxisView **tv)
if ((rtv = dynamic_cast<RouteTimeAxisView*> (*tv)) != 0) {
boost::shared_ptr<Playlist> pl;
-
+
if ((pl = rtv->playlist()) == 0) {
return region;
}
-
+
region = pl->top_region_at (start);
}
- }
-
+ }
+
return region;
}
-
+
void
Editor::extend_selection_to_end_of_region (bool next)
{
@@ -278,7 +278,7 @@ Editor::extend_selection_to_start_of_region (bool previous)
}
/* Try to leave the selection with the same route if possible */
-
+
if ((tv = selection->time.track) == 0) {
return;
}
@@ -316,19 +316,19 @@ Editor::nudge_forward (bool next, bool force_playhead)
{
nframes64_t distance;
nframes64_t next_distance;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
if (!session) return;
-
+
if (!force_playhead && !rs.empty()) {
begin_reversible_command (_("nudge regions forward"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
boost::shared_ptr<Region> r ((*i)->region());
-
+
distance = get_nudge_distance (r->position(), next_distance);
if (next) {
@@ -343,21 +343,21 @@ Editor::nudge_forward (bool next, bool force_playhead)
commit_reversible_command ();
-
+
} else if (!force_playhead && !selection->markers.empty()) {
bool is_start;
begin_reversible_command (_("nudge location forward"));
-
+
for (MarkerSelection::iterator i = selection->markers.begin(); i != selection->markers.end(); ++i) {
-
+
Location* loc = find_location_from_marker ((*i), is_start);
-
+
if (loc) {
-
+
XMLNode& before (loc->get_state());
-
+
if (is_start) {
distance = get_nudge_distance (loc->start(), next_distance);
if (next) {
@@ -383,26 +383,26 @@ Editor::nudge_forward (bool next, bool force_playhead)
session->add_command (new MementoCommand<Location>(*loc, &before, &after));
}
}
-
+
commit_reversible_command ();
-
+
} else {
distance = get_nudge_distance (playhead_cursor->current_frame, next_distance);
session->request_locate (playhead_cursor->current_frame + distance);
}
}
-
+
void
Editor::nudge_backward (bool next, bool force_playhead)
{
nframes64_t distance;
nframes64_t next_distance;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
if (!session) return;
-
+
if (!force_playhead && !rs.empty()) {
begin_reversible_command (_("nudge regions backward"));
@@ -411,13 +411,13 @@ Editor::nudge_backward (bool next, bool force_playhead)
boost::shared_ptr<Region> r ((*i)->region());
distance = get_nudge_distance (r->position(), next_distance);
-
+
if (next) {
distance = next_distance;
}
XMLNode &before = r->playlist()->get_state();
-
+
if (r->position() > distance) {
r->set_position (r->position() - distance, this);
} else {
@@ -438,11 +438,11 @@ Editor::nudge_backward (bool next, bool force_playhead)
for (MarkerSelection::iterator i = selection->markers.begin(); i != selection->markers.end(); ++i) {
Location* loc = find_location_from_marker ((*i), is_start);
-
+
if (loc) {
-
+
XMLNode& before (loc->get_state());
-
+
if (is_start) {
distance = get_nudge_distance (loc->start(), next_distance);
if (next) {
@@ -455,25 +455,25 @@ Editor::nudge_backward (bool next, bool force_playhead)
}
} else {
distance = get_nudge_distance (loc->end(), next_distance);
-
+
if (next) {
distance = next_distance;
}
-
+
if (distance < loc->end() - loc->length()) {
loc->set_end (loc->end() - distance);
} else {
loc->set_end (loc->length());
}
}
-
+
XMLNode& after (loc->get_state());
session->add_command (new MementoCommand<Location>(*loc, &before, &after));
}
}
commit_reversible_command ();
-
+
} else {
distance = get_nudge_distance (playhead_cursor->current_frame, next_distance);
@@ -490,12 +490,12 @@ void
Editor::nudge_forward_capture_offset ()
{
nframes64_t distance;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
if (!session) return;
-
+
if (!rs.empty()) {
begin_reversible_command (_("nudge forward"));
@@ -504,7 +504,7 @@ Editor::nudge_forward_capture_offset ()
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
boost::shared_ptr<Region> r ((*i)->region());
-
+
XMLNode &before = r->playlist()->get_state();
r->set_position (r->position() + distance, this);
XMLNode &after = r->playlist()->get_state();
@@ -513,19 +513,19 @@ Editor::nudge_forward_capture_offset ()
commit_reversible_command ();
- }
+ }
}
-
+
void
Editor::nudge_backward_capture_offset ()
{
nframes64_t distance;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
if (!session) return;
-
+
if (!rs.empty()) {
begin_reversible_command (_("nudge forward"));
@@ -536,7 +536,7 @@ Editor::nudge_backward_capture_offset ()
boost::shared_ptr<Region> r ((*i)->region());
XMLNode &before = r->playlist()->get_state();
-
+
if (r->position() > distance) {
r->set_position (r->position() - distance, this);
} else {
@@ -579,27 +579,27 @@ Editor::build_region_boundary_cache ()
if (session == 0) {
return;
}
-
+
switch (snap_type) {
case SnapToRegionStart:
interesting_points.push_back (Start);
break;
case SnapToRegionEnd:
interesting_points.push_back (End);
- break;
+ break;
case SnapToRegionSync:
interesting_points.push_back (SyncPoint);
- break;
+ break;
case SnapToRegionBoundary:
interesting_points.push_back (Start);
interesting_points.push_back (End);
- break;
+ break;
default:
fatal << string_compose (_("build_region_boundary_cache called with snap_type = %1"), snap_type) << endmsg;
/*NOTREACHED*/
return;
}
-
+
TimeAxisView *ontrack = 0;
TrackViewList tlist;
@@ -631,7 +631,7 @@ Editor::build_region_boundary_cache ()
case End:
rpos = r->last_frame();
- break;
+ break;
case SyncPoint:
rpos = r->sync_position ();
@@ -641,16 +641,16 @@ Editor::build_region_boundary_cache ()
default:
break;
}
-
+
float speed = 1.0f;
RouteTimeAxisView *rtav;
-
+
if (ontrack != 0 && (rtav = dynamic_cast<RouteTimeAxisView*>(ontrack)) != 0 ) {
if (rtav->get_diskstream() != 0) {
speed = rtav->get_diskstream()->speed();
}
}
-
+
rpos = track_frame_to_session_frame (rpos, speed);
if (rpos < lpos) {
@@ -661,8 +661,8 @@ Editor::build_region_boundary_cache ()
to sort later.
*/
- vector<nframes64_t>::iterator ri;
-
+ vector<nframes64_t>::iterator ri;
+
for (ri = region_boundary_cache.begin(); ri != region_boundary_cache.end(); ++ri) {
if (*ri == rpos) {
break;
@@ -698,7 +698,7 @@ Editor::find_next_region (nframes64_t frame, RegionPoint point, int32_t dir, Tra
nframes64_t distance;
boost::shared_ptr<Region> r;
-
+
track_speed = 1.0f;
if ( (rtav = dynamic_cast<RouteTimeAxisView*>(*i)) != 0 ) {
if (rtav->get_diskstream()!=0)
@@ -774,7 +774,7 @@ Editor::find_next_region_boundary (nframes64_t pos, int32_t dir, const TrackView
distance = d;
}
}
-
+
return current_nearest;
}
@@ -787,11 +787,11 @@ Editor::get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection,
if (with_selection && Config->get_region_boundaries_from_selected_tracks()) {
if (!selection->tracks.empty()) {
-
+
target = find_next_region_boundary (pos, dir, selection->tracks);
-
+
} else {
-
+
if (only_onscreen || Config->get_region_boundaries_from_onscreen_tracks()) {
get_onscreen_tracks (tvl);
target = find_next_region_boundary (pos, dir, tvl);
@@ -799,7 +799,7 @@ Editor::get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection,
target = find_next_region_boundary (pos, dir, track_views);
}
}
-
+
} else {
if (only_onscreen || Config->get_region_boundaries_from_onscreen_tracks()) {
@@ -809,7 +809,7 @@ Editor::get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection,
target = find_next_region_boundary (pos, dir, track_views);
}
}
-
+
return target;
}
@@ -865,25 +865,25 @@ Editor::cursor_to_region_point (EditorCursor* cursor, RegionPoint point, int32_t
pos+=dir;
if (!selection->tracks.empty()) {
-
+
r = find_next_region (pos, point, dir, selection->tracks, &ontrack);
-
+
} else if (clicked_axisview) {
-
+
TrackViewList t;
t.push_back (clicked_axisview);
-
+
r = find_next_region (pos, point, dir, t, &ontrack);
-
+
} else {
-
+
r = find_next_region (pos, point, dir, track_views, &ontrack);
}
if (r == 0) {
return;
}
-
+
switch (point){
case Start:
pos = r->first_frame ();
@@ -896,9 +896,9 @@ Editor::cursor_to_region_point (EditorCursor* cursor, RegionPoint point, int32_t
case SyncPoint:
pos = r->sync_position ();
// r->adjust_to_sync (r->first_frame());
- break;
+ break;
}
-
+
float speed = 1.0f;
RouteTimeAxisView *rtav;
@@ -909,7 +909,7 @@ Editor::cursor_to_region_point (EditorCursor* cursor, RegionPoint point, int32_t
}
pos = track_frame_to_session_frame(pos, speed);
-
+
if (cursor == playhead_cursor) {
session->request_locate (pos);
} else {
@@ -933,7 +933,7 @@ void
Editor::cursor_to_selection_start (EditorCursor *cursor)
{
nframes64_t pos = 0;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -965,7 +965,7 @@ void
Editor::cursor_to_selection_end (EditorCursor *cursor)
{
nframes64_t pos = 0;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -1011,7 +1011,7 @@ Editor::selected_marker_to_region_boundary (bool with_selection, int32_t dir)
if (!mouse_frame (mouse, ignored)) {
return;
}
-
+
add_location_mark (mouse);
}
@@ -1070,18 +1070,18 @@ Editor::selected_marker_to_region_point (RegionPoint point, int32_t dir)
pos+=dir;
if (!selection->tracks.empty()) {
-
+
r = find_next_region (pos, point, dir, selection->tracks, &ontrack);
-
+
} else {
-
+
r = find_next_region (pos, point, dir, track_views, &ontrack);
}
if (r == 0) {
return;
}
-
+
switch (point){
case Start:
pos = r->first_frame ();
@@ -1093,9 +1093,9 @@ Editor::selected_marker_to_region_point (RegionPoint point, int32_t dir)
case SyncPoint:
pos = r->adjust_to_sync (r->first_frame());
- break;
+ break;
}
-
+
float speed = 1.0f;
RouteTimeAxisView *rtav;
@@ -1137,7 +1137,7 @@ Editor::selected_marker_to_selection_start ()
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -1176,7 +1176,7 @@ Editor::selected_marker_to_selection_end ()
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -1215,13 +1215,13 @@ Editor::scroll_playhead (bool forward)
pos += delta ;
} else {
pos = max_frames;
- }
+ }
} else {
if (pos == 0) {
return;
- }
+ }
if (pos > delta) {
pos -= delta;
@@ -1258,7 +1258,7 @@ Editor::playhead_backward ()
} else {
pos -= cnt;
}
-
+
/* XXX this is completely insane. with the current buffering
design, we'll force a complete track buffer flush and
reload, just to move 1 sample !!!
@@ -1286,7 +1286,7 @@ Editor::playhead_forward ()
}
pos = playhead_cursor->current_frame;
-
+
/* XXX this is completely insane. with the current buffering
design, we'll force a complete track buffer flush and
reload, just to move 1 sample !!!
@@ -1307,17 +1307,17 @@ Editor::cursor_align (bool playhead_to_edit)
if (selection->markers.empty()) {
return;
}
-
+
session->request_locate (selection->markers.front()->position(), session->transport_rolling());
-
+
} else {
/* move selected markers to playhead */
-
+
for (MarkerSelection::iterator i = selection->markers.begin(); i != selection->markers.end(); ++i) {
bool ignored;
-
+
Location* loc = find_location_from_marker (*i, ignored);
-
+
if (loc->is_mark()) {
loc->set_start (playhead_cursor->current_frame);
} else {
@@ -1355,7 +1355,7 @@ Editor::edit_cursor_backward ()
} else {
pos -= cnt;
}
-
+
// EDIT CURSOR edit_cursor->set_position (pos);
}
@@ -1409,7 +1409,7 @@ Editor::scroll_backward (float pages)
bool was_floating;
float prefix;
nframes64_t cnt;
-
+
if (get_prefix (prefix, was_floating)) {
cnt = (nframes64_t) floor (pages * one_page);
} else {
@@ -1437,7 +1437,7 @@ Editor::scroll_forward (float pages)
bool was_floating;
float prefix;
nframes64_t cnt;
-
+
if (get_prefix (prefix, was_floating)) {
cnt = (nframes64_t) floor (pages * one_page);
} else {
@@ -1520,7 +1520,7 @@ void
Editor::tav_zoom_step (bool coarser)
{
ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::temporal_zoom_step), coarser));
-
+
_routes->suspend_redisplay ();
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
@@ -1529,7 +1529,7 @@ Editor::tav_zoom_step (bool coarser)
}
_routes->resume_redisplay ();
-}
+}
void
Editor::temporal_zoom_step (bool coarser)
@@ -1539,21 +1539,21 @@ Editor::temporal_zoom_step (bool coarser)
double nfpu;
nfpu = frames_per_unit;
-
- if (coarser) {
+
+ if (coarser) {
nfpu *= 1.61803399;
- } else {
+ } else {
nfpu = max(1.0,(nfpu/1.61803399));
}
temporal_zoom (nfpu);
-}
+}
void
Editor::temporal_zoom (gdouble fpu)
{
if (!session) return;
-
+
nframes64_t current_page = current_page_frames();
nframes64_t current_leftmost = leftmost_frame;
nframes64_t current_rightmost;
@@ -1573,7 +1573,7 @@ Editor::temporal_zoom (gdouble fpu)
}
nfpu = fpu;
-
+
new_page_size = (nframes64_t) floor (_canvas_width * nfpu);
half_page_size = new_page_size / 2;
@@ -1581,7 +1581,7 @@ Editor::temporal_zoom (gdouble fpu)
case ZoomFocusLeft:
leftmost_after_zoom = current_leftmost;
break;
-
+
case ZoomFocusRight:
current_rightmost = leftmost_frame + current_page;
if (current_rightmost < new_page_size) {
@@ -1590,26 +1590,26 @@ Editor::temporal_zoom (gdouble fpu)
leftmost_after_zoom = current_rightmost - new_page_size;
}
break;
-
+
case ZoomFocusCenter:
- current_center = current_leftmost + (current_page/2);
+ current_center = current_leftmost + (current_page/2);
if (current_center < half_page_size) {
leftmost_after_zoom = 0;
} else {
leftmost_after_zoom = current_center - half_page_size;
}
break;
-
+
case ZoomFocusPlayhead:
/* try to keep the playhead in the same place */
where = playhead_cursor->current_frame;
-
+
l = - ((new_page_size * ((where - current_leftmost)/(double)current_page)) - where);
if (l < 0) {
leftmost_after_zoom = 0;
- } else if (l > max_frames) {
+ } else if (l > max_frames) {
leftmost_after_zoom = max_frames - new_page_size;
} else {
leftmost_after_zoom = (nframes64_t) l;
@@ -1635,7 +1635,7 @@ Editor::temporal_zoom (gdouble fpu)
if (l < 0) {
leftmost_after_zoom = 0;
- } else if (l > max_frames) {
+ } else if (l > max_frames) {
leftmost_after_zoom = max_frames - new_page_size;
} else {
leftmost_after_zoom = (nframes64_t) l;
@@ -1654,7 +1654,7 @@ Editor::temporal_zoom (gdouble fpu)
if (l < 0) {
leftmost_after_zoom = 0;
- } else if (l > max_frames) {
+ } else if (l > max_frames) {
leftmost_after_zoom = max_frames - new_page_size;
} else {
leftmost_after_zoom = (nframes64_t) l;
@@ -1665,13 +1665,13 @@ Editor::temporal_zoom (gdouble fpu)
return;
}
break;
-
+
}
-
+
// leftmost_after_zoom = min (leftmost_after_zoom, session->current_end_frame());
reposition_and_zoom (leftmost_after_zoom, nfpu);
-}
+}
void
Editor::temporal_zoom_region (bool both_axes)
@@ -1679,7 +1679,7 @@ Editor::temporal_zoom_region (bool both_axes)
nframes64_t start = max_frames;
nframes64_t end = 0;
- RegionSelection rs;
+ RegionSelection rs;
set<TimeAxisView*> tracks;
get_regions_for_action (rs);
@@ -1724,7 +1724,7 @@ Editor::temporal_zoom_region (bool both_axes)
start -= extra_samples;
} else {
start = 0;
- }
+ }
if (max_frames - extra_samples > end) {
end += extra_samples;
@@ -1744,13 +1744,13 @@ Editor::temporal_zoom_region (bool both_axes)
if (both_axes) {
uint32_t per_track_height = (uint32_t) floor ((_canvas_height - canvas_timebars_vsize - 10.0) / tracks.size());
-
+
/* set visible track heights appropriately */
-
+
for (set<TimeAxisView*>::iterator t = tracks.begin(); t != tracks.end(); ++t) {
(*t)->set_height (per_track_height);
}
-
+
/* hide irrelevant tracks */
_routes->suspend_redisplay ();
@@ -1785,7 +1785,7 @@ void
Editor::temporal_zoom_selection ()
{
if (!selection) return;
-
+
if (selection->time.empty()) {
return;
}
@@ -1818,7 +1818,7 @@ Editor::temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string
nframes64_t range = end - start;
double new_fpu = (double)range / (double)_canvas_width;
-
+
nframes64_t new_page = (nframes64_t) floor (_canvas_width * new_fpu);
nframes64_t middle = (nframes64_t) floor( (double)start + ((double)range / 2.0f ));
nframes64_t new_leftmost = (nframes64_t) floor( (double)middle - ((double)new_page/2.0f));
@@ -1830,7 +1830,7 @@ Editor::temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string
reposition_and_zoom (new_leftmost, new_fpu);
}
-void
+void
Editor::temporal_zoom_to_frame (bool coarser, nframes64_t frame)
{
if (!session) {
@@ -1838,13 +1838,13 @@ Editor::temporal_zoom_to_frame (bool coarser, nframes64_t frame)
}
double range_before = frame - leftmost_frame;
double new_fpu;
-
+
new_fpu = frames_per_unit;
-
- if (coarser) {
+
+ if (coarser) {
new_fpu *= 1.61803399;
range_before *= 1.61803399;
- } else {
+ } else {
new_fpu = max(1.0,(new_fpu/1.61803399));
range_before /= 1.61803399;
}
@@ -1899,7 +1899,7 @@ Editor::choose_new_marker_name(string &name) {
default:
return false;
}
-
+
dialog.get_result(name);
return true;
@@ -1962,7 +1962,7 @@ Editor::add_location_from_playhead_cursor ()
void
Editor::add_locations_from_audio_region ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -1972,15 +1972,15 @@ Editor::add_locations_from_audio_region ()
session->begin_reversible_command (rs.size () > 1 ? _("add markers") : _("add marker"));
XMLNode &before = session->locations()->get_state();
-
+
cerr << "Add locations\n";
for (RegionSelection::iterator i = rs.begin (); i != rs.end (); ++i) {
-
+
boost::shared_ptr<Region> region = (*i)->region ();
-
+
Location *location = new Location (region->position(), region->last_frame(), region->name(), Location::IsRangeMarker);
-
+
session->locations()->add (location, true);
}
@@ -1992,7 +1992,7 @@ Editor::add_locations_from_audio_region ()
void
Editor::add_location_from_audio_region ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -2012,14 +2012,14 @@ Editor::add_location_from_audio_region ()
boost::shared_ptr<Region> region = rv->region();
markername = region->name();
}
-
+
if (!choose_new_marker_name(markername)) {
return;
}
cerr << "Add location\n";
- // single range spanning all selected
+ // single range spanning all selected
Location *location = new Location (rs.start(), rs.end_frame(), markername, Location::IsRangeMarker);
session->locations()->add (location, true);
@@ -2046,7 +2046,7 @@ Editor::amplitude_zoom_step (bool in)
#ifdef FIX_FOR_CANVAS
/* XXX DO SOMETHING */
#endif
-}
+}
/* DELETION */
@@ -2089,7 +2089,7 @@ Editor::jump_forward_to_mark ()
if (!session) {
return;
}
-
+
Location *location = session->locations()->first_location_after (playhead_cursor->current_frame);
if (location) {
@@ -2107,7 +2107,7 @@ Editor::jump_backward_to_mark ()
}
Location *location = session->locations()->first_location_before (playhead_cursor->current_frame);
-
+
if (location) {
session->request_locate (location->start(), session->transport_rolling());
} else {
@@ -2159,15 +2159,15 @@ Editor::clear_ranges ()
if (session) {
session->begin_reversible_command (_("clear ranges"));
XMLNode &before = session->locations()->get_state();
-
+
Location * looploc = session->locations()->auto_loop_location();
Location * punchloc = session->locations()->auto_punch_location();
-
+
session->locations()->clear_ranges ();
// re-add these
if (looploc) session->locations()->add (looploc);
if (punchloc) session->locations()->add (punchloc);
-
+
XMLNode &after = session->locations()->get_state();
session->add_command(new MementoCommand<Locations>(*(session->locations()), &before, &after));
session->commit_reversible_command ();
@@ -2202,7 +2202,7 @@ Editor::unhide_ranges ()
{
for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
Location *l = (*i).first;
- if (l->is_hidden() && l->is_range_marker()) {
+ if (l->is_hidden() && l->is_range_marker()) {
l->set_hidden(false, this);
}
}
@@ -2218,7 +2218,7 @@ Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
nframes64_t where;
RouteTimeAxisView *rtv = 0;
boost::shared_ptr<Playlist> playlist;
-
+
track_canvas->window_to_world (x, y, wx, wy);
//wx += horizontal_adjustment.get_value();
//wy += vertical_adjustment.get_value();
@@ -2227,7 +2227,7 @@ Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
event.type = GDK_BUTTON_RELEASE;
event.button.x = wx;
event.button.y = wy;
-
+
where = event_frame (&event, &cx, &cy);
if (where < leftmost_frame || where > leftmost_frame + current_page_frames()) {
@@ -2239,7 +2239,7 @@ Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
if (tv.first == 0) {
return;
}
-
+
if ((rtv = dynamic_cast<RouteTimeAxisView*> (tv.first)) == 0) {
return;
}
@@ -2247,9 +2247,9 @@ Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
if ((playlist = rtv->playlist()) == 0) {
return;
}
-
+
snap_to (where);
-
+
begin_reversible_command (_("insert dragged region"));
XMLNode &before = playlist->get_state();
playlist->add_region (RegionFactory::create (region), where, 1.0);
@@ -2285,13 +2285,13 @@ Editor::insert_route_list_drag (boost::shared_ptr<Route> route, int x, int y) {
return;
}
- /* use this drag source to add underlay to a track. But we really don't care
+ /* use this drag source to add underlay to a track. But we really don't care
about the Route, only the view of the route, so find it first */
for(TrackViewList::iterator it = track_views.begin(); it != track_views.end(); ++it) {
if((source_rtv = dynamic_cast<RouteTimeAxisView*>(*it)) == 0) {
continue;
}
-
+
if(source_rtv->route() == route && source_rtv != dest_rtv) {
dest_rtv->add_underlay(source_rtv->view());
break;
@@ -2327,7 +2327,7 @@ Editor::insert_region_list_selection (float times)
if (region == 0) {
return;
}
-
+
begin_reversible_command (_("insert region"));
XMLNode &before = playlist->get_state();
playlist->add_region ((RegionFactory::create (region)), get_preferred_edit_position(), times);
@@ -2372,7 +2372,7 @@ Editor::transition_to_rolling (bool fwd)
session->cancel_audition ();
return;
}
-
+
session->request_transport_speed (fwd ? 1.0f : -1.0f);
}
@@ -2396,7 +2396,7 @@ Editor::toggle_playback (bool with_abort)
session->cancel_audition ();
return;
}
-
+
if (session->transport_rolling()) {
session->request_stop (with_abort);
if (session->get_play_loop()) {
@@ -2456,7 +2456,7 @@ Editor::play_selection ()
void
Editor::loop_selected_region ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -2467,7 +2467,7 @@ Editor::loop_selected_region ()
if ((tll = transport_loop_location()) != 0) {
tll->set (rv->region()->position(), rv->region()->last_frame());
-
+
// enable looping, reposition and start rolling
session->request_play_loop (true);
@@ -2546,7 +2546,7 @@ Editor::show_midi_list_editor ()
void
Editor::rename_region()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -2579,9 +2579,9 @@ Editor::rename_region()
entry.select_region (0, -1);
entry.signal_activate().connect (bind (mem_fun (d, &Dialog::response), RESPONSE_OK));
-
+
d.show_all ();
-
+
entry.grab_focus();
int ret = d.run();
@@ -2603,7 +2603,7 @@ Editor::audition_playlist_region_via_route (boost::shared_ptr<Region> region, Ro
{
if (session->is_auditioning()) {
session->cancel_audition ();
- }
+ }
// note: some potential for creativity here, because region doesn't
// have to belong to the playlist that Route is handling
@@ -2611,9 +2611,9 @@ Editor::audition_playlist_region_via_route (boost::shared_ptr<Region> region, Ro
// bool was_soloed = route.soloed();
route.set_solo (true, this);
-
+
session->request_bounded_roll (region->position(), region->position() + region->length());
-
+
/* XXX how to unset the solo state ? */
}
@@ -2633,10 +2633,10 @@ Editor::play_selected_region ()
{
nframes64_t start = max_frames;
nframes64_t end = 0;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
-
+
if (rs.empty()) {
return;
}
@@ -2666,7 +2666,7 @@ Editor::build_interthread_progress_window ()
interthread_progress_window = new ArdourDialog (X_("interthread progress"), true);
interthread_progress_bar.set_orientation (Gtk::PROGRESS_LEFT_TO_RIGHT);
-
+
interthread_progress_window->set_border_width (12);
interthread_progress_window->get_vbox()->set_spacing (6);
@@ -2710,7 +2710,7 @@ Editor::region_from_selection ()
TrackSelection tracks = get_tracks_for_range_action ();
nframes64_t selection_cnt = end - start + 1;
-
+
for (TrackSelection::iterator i = tracks.begin(); i != tracks.end(); ++i) {
boost::shared_ptr<Region> current;
boost::shared_ptr<Playlist> pl;
@@ -2730,7 +2730,7 @@ Editor::region_from_selection ()
boost::shared_ptr<Region> region (RegionFactory::create (current,
internal_start, selection_cnt, new_name));
}
-}
+}
void
Editor::create_region_from_selection (vector<boost::shared_ptr<Region> >& new_regions)
@@ -2741,7 +2741,7 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<Region> >& new_re
nframes64_t start = selection->time[clicked_selection].start;
nframes64_t end = selection->time[clicked_selection].end;
-
+
sort_track_selection ();
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
@@ -2769,7 +2769,7 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<Region> >& new_re
void
Editor::split_multichannel_region ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -2812,9 +2812,9 @@ TrackSelection
Editor::get_tracks_for_range_action () const
{
TrackSelection t;
-
+
if (selection->tracks.empty()) {
-
+
/* use tracks with selected regions */
RegionSelection rs = selection->regions;
@@ -2863,7 +2863,7 @@ Editor::separate_regions_between (const TimeSelection& ts)
if (rtv->track()->diskstream()->destructive()) {
continue;
}
-
+
if ((playlist = rtv->playlist()) != 0) {
XMLNode *before;
@@ -2889,21 +2889,21 @@ Editor::separate_regions_between (const TimeSelection& ts)
c.disconnect ();
if (!latest_regionviews.empty()) {
-
+
got_some = true;
rtv->view()->foreach_regionview (bind (
sigc::ptr_fun (add_if_covered),
&(*t), &new_selection));
-
+
if (!in_command) {
begin_reversible_command (_("separate"));
in_command = true;
}
-
+
session->add_command(new MementoCommand<Playlist>(
*playlist, before, &playlist->get_state()));
- }
+ }
}
if (!got_some) {
@@ -2942,9 +2942,9 @@ Editor::separate_region_from_selection ()
nframes64_t start;
nframes64_t end;
-
+
if (get_edit_op_range (start, end)) {
-
+
AudioRange ar (start, end, 1);
TimeSelection ts;
ts.push_back (ar);
@@ -3003,8 +3003,8 @@ Editor::crop_region_to_selection ()
crop_region_to (start, end);
}
}
-
-}
+
+}
void
Editor::crop_region_to (nframes64_t start, nframes64_t end)
@@ -3019,17 +3019,17 @@ Editor::crop_region_to (nframes64_t start, nframes64_t end)
sort_track_selection ();
ts = &selection->tracks;
}
-
+
for (TrackSelection::iterator i = ts->begin(); i != ts->end(); ++i) {
-
+
RouteTimeAxisView* rtv;
-
+
if ((rtv = dynamic_cast<RouteTimeAxisView*> ((*i))) != 0) {
boost::shared_ptr<Track> t = rtv->track();
if (t != 0 && ! t->diskstream()->destructive()) {
-
+
if ((playlist = rtv->playlist()) != 0) {
playlists.push_back (playlist);
}
@@ -3040,27 +3040,27 @@ Editor::crop_region_to (nframes64_t start, nframes64_t end)
if (playlists.empty()) {
return;
}
-
+
nframes64_t the_start;
nframes64_t the_end;
nframes64_t cnt;
-
+
begin_reversible_command (_("trim to selection"));
-
+
for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
-
+
boost::shared_ptr<Region> region;
-
+
the_start = start;
-
+
if ((region = (*i)->top_region_at(the_start)) == 0) {
continue;
}
-
+
/* now adjust lengths to that we do the right thing
if the selection extends beyond the region
*/
-
+
the_start = max (the_start, (nframes64_t) region->position());
if (max_frames - the_start < region->length()) {
the_end = the_start + region->length() - 1;
@@ -3069,21 +3069,21 @@ Editor::crop_region_to (nframes64_t start, nframes64_t end)
}
the_end = min (end, the_end);
cnt = the_end - the_start + 1;
-
+
XMLNode &before = (*i)->get_state();
region->trim_to (the_start, cnt, this);
XMLNode &after = (*i)->get_state();
session->add_command (new MementoCommand<Playlist>(*(*i), &before, &after));
}
-
+
commit_reversible_command ();
-}
+}
void
Editor::region_fill_track ()
{
nframes64_t end;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -3098,7 +3098,7 @@ Editor::region_fill_track ()
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
boost::shared_ptr<Region> region ((*i)->region());
-
+
// FIXME
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(region);
assert(ar);
@@ -3142,7 +3142,7 @@ Editor::region_fill_selection ()
nframes64_t start = selection->time[clicked_selection].start;
nframes64_t end = selection->time[clicked_selection].end;
- boost::shared_ptr<Playlist> playlist;
+ boost::shared_ptr<Playlist> playlist;
if (selection->tracks.empty()) {
return;
@@ -3150,21 +3150,21 @@ Editor::region_fill_selection ()
nframes64_t selection_length = end - start;
float times = (float)selection_length / region->length();
-
+
begin_reversible_command (_("fill selection"));
-
+
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
if ((playlist = (*i)->playlist()) == 0) {
continue;
- }
-
+ }
+
XMLNode &before = playlist->get_state();
playlist->add_region (RegionFactory::create (region), start, times);
session->add_command (new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
}
-
- commit_reversible_command ();
+
+ commit_reversible_command ();
}
void
@@ -3182,7 +3182,7 @@ Editor::set_sync_point (nframes64_t where, const RegionSelection& rs)
bool in_command = false;
for (RegionSelection::const_iterator r = rs.begin(); r != rs.end(); ++r) {
-
+
if (!(*r)->region()->covers (where)) {
continue;
}
@@ -3209,7 +3209,7 @@ Editor::set_sync_point (nframes64_t where, const RegionSelection& rs)
void
Editor::remove_region_sync ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -3231,7 +3231,7 @@ Editor::remove_region_sync ()
void
Editor::naturalize ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -3252,7 +3252,7 @@ Editor::naturalize ()
void
Editor::align (RegionPoint what)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
nframes64_t where = get_preferred_edit_position();
@@ -3271,13 +3271,13 @@ void
Editor::align_relative (RegionPoint what)
{
nframes64_t where = get_preferred_edit_position();
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
if (!rs.empty()) {
align_selection_relative (what, where, rs);
- }
+ }
}
struct RegionSortByTime {
@@ -3312,7 +3312,7 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
dir = -1;
}
break;
-
+
case End:
if (position > r->last_frame()) {
distance = position - r->last_frame();
@@ -3332,7 +3332,7 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
distance = r->position() - pos;
dir = -1;
}
- break;
+ break;
}
if (pos == r->position()) {
@@ -3349,15 +3349,15 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
session->add_command(new MementoCommand<Playlist>(*(r->playlist()), &before, &after));
/* move rest by the same amount */
-
+
sorted.pop_front();
-
+
for (list<RegionView*>::iterator i = sorted.begin(); i != sorted.end(); ++i) {
boost::shared_ptr<Region> region ((*i)->region());
XMLNode &before = region->playlist()->get_state();
-
+
if (dir > 0) {
region->set_position (region->position() + distance, this);
} else {
@@ -3419,7 +3419,7 @@ Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint poi
XMLNode &after = region->playlist()->get_state();
session->add_command(new MementoCommand<Playlist>(*(region->playlist()), &before, &after));
-}
+}
void
Editor::trim_region_front ()
@@ -3452,9 +3452,9 @@ Editor::trim_region (bool front)
boost::shared_ptr<Playlist> pl = (*i)->region()->playlist();
XMLNode &before = pl->get_state();
if (front) {
- (*i)->region()->trim_front (where, this);
+ (*i)->region()->trim_front (where, this);
} else {
- (*i)->region()->trim_end (where, this);
+ (*i)->region()->trim_end (where, this);
}
XMLNode &after = pl->get_state();
session->add_command(new MementoCommand<Playlist>(*pl.get(), &before, &after));
@@ -3503,7 +3503,7 @@ Editor::trim_region_to_location (const Location& loc, const char* str)
default:
continue;
}
-
+
RouteTimeAxisView* tav = dynamic_cast<RouteTimeAxisView*> (&rv->get_time_axis_view());
if (!tav) {
return;
@@ -3516,7 +3516,7 @@ Editor::trim_region_to_location (const Location& loc, const char* str)
if (tav->get_diskstream() != 0) {
speed = tav->get_diskstream()->speed();
}
-
+
start = session_frame_to_track_frame (loc.start(), speed);
end = session_frame_to_track_frame (loc.end(), speed);
@@ -3534,7 +3534,7 @@ void
Editor::trim_region_to_edit_point ()
{
RegionSelection rs;
-
+
get_regions_for_action (rs);
nframes64_t where = get_preferred_edit_position();
@@ -3566,7 +3566,7 @@ Editor::trim_region_to_edit_point ()
session->add_command(new MementoCommand<Playlist>(
*(rv->region()->playlist()), &before, &after));
}
-
+
commit_reversible_command ();
}
@@ -3606,7 +3606,7 @@ Editor::trim_region_from_edit_point ()
session->add_command(new MementoCommand<Playlist>(
*(rv->region()->playlist()), &before, &after));
}
-
+
commit_reversible_command ();
}
@@ -3653,10 +3653,10 @@ Editor::trim_to_region(bool forward)
speed = atav->get_diskstream()->speed();
}
-
+
boost::shared_ptr<Region> region = arv->region();
boost::shared_ptr<Playlist> playlist (region->playlist());
-
+
XMLNode &before = playlist->get_state();
if(forward){
@@ -3678,7 +3678,7 @@ Editor::trim_to_region(bool forward)
continue;
}
- region->trim_front((nframes64_t) ((next_region->last_frame() + 1) * speed), this);
+ region->trim_front((nframes64_t) ((next_region->last_frame() + 1) * speed), this);
arv->region_changed (Change (LengthChanged|PositionChanged|StartChanged));
}
@@ -3695,7 +3695,7 @@ Editor::unfreeze_route ()
if (clicked_routeview == 0 || !clicked_routeview->is_track()) {
return;
}
-
+
clicked_routeview->track()->unfreeze ();
}
@@ -3727,7 +3727,7 @@ Editor::freeze_route ()
if (clicked_routeview == 0 || !clicked_routeview->is_audio_track()) {
return;
}
-
+
InterThreadInfo itt;
if (interthread_progress_window == 0) {
@@ -3744,13 +3744,13 @@ Editor::freeze_route ()
interthread_cancel_label.set_text (_("Cancel Freeze"));
current_interthread_info = &itt;
- interthread_progress_connection =
+ interthread_progress_connection =
Glib::signal_timeout().connect (bind (mem_fun(*this, &Editor::freeze_progress_timeout), (gpointer) 0), 100);
itt.done = false;
itt.cancel = false;
itt.progress = 0.0f;
-
+
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, 500000);
@@ -3793,22 +3793,22 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
if ((rtv = dynamic_cast<RouteTimeAxisView*> (*i)) == 0) {
continue;
}
-
+
boost::shared_ptr<Playlist> playlist;
-
+
if ((playlist = rtv->playlist()) == 0) {
return;
}
InterThreadInfo itt;
-
+
itt.done = false;
itt.cancel = false;
itt.progress = false;
XMLNode &before = playlist->get_state();
boost::shared_ptr<Region> r = rtv->track()->bounce_range (start, start+cnt, itt, enable_processing);
-
+
if (replace) {
list<AudioRange> ranges;
ranges.push_back (AudioRange (start, start+cnt, 0));
@@ -3819,7 +3819,7 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
XMLNode &after = playlist->get_state();
session->add_command (new MementoCommand<Playlist> (*playlist, &before, &after));
}
-
+
commit_reversible_command ();
}
@@ -3843,19 +3843,19 @@ bool
Editor::can_cut_copy () const
{
switch (current_mouse_mode()) {
-
+
case MouseObject:
if (!selection->regions.empty() || !selection->points.empty()) {
return true;
}
break;
-
+
case MouseRange:
if (!selection->time.empty()) {
return true;
}
break;
-
+
default:
break;
}
@@ -3867,7 +3867,7 @@ Editor::can_cut_copy () const
/** Cut, copy or clear selected regions, automation points or a time range.
* @param op Operation (Cut, Copy or Clear)
*/
-void
+void
Editor::cut_copy (CutCopyOp op)
{
/* only cancel selection if cut/copy is successful.*/
@@ -3899,7 +3899,7 @@ Editor::cut_copy (CutCopyOp op)
_drag = 0;
}
}
-
+
cut_buffer->clear ();
if (entered_marker) {
@@ -3930,26 +3930,26 @@ Editor::cut_copy (CutCopyOp op)
default:
break;
}
-
+
} else {
-
- RegionSelection rs;
-
+
+ RegionSelection rs;
+
/* we only want to cut regions if some are selected */
-
+
if (!selection->regions.empty()) {
get_regions_for_action (rs, false, false);
}
switch (current_mouse_mode()) {
- case MouseObject:
+ case MouseObject:
if (!rs.empty() || !selection->points.empty()) {
begin_reversible_command (opname + _(" objects"));
if (!rs.empty()) {
cut_copy_regions (op, rs);
-
+
if (op == Cut) {
selection->clear_regions ();
}
@@ -3963,15 +3963,15 @@ Editor::cut_copy (CutCopyOp op)
}
}
- commit_reversible_command ();
+ commit_reversible_command ();
break; // terminate case statement here
- }
+ }
if (!selection->time.empty()) {
/* don't cause suprises */
break;
}
// fall thru if there was nothing selected
-
+
case MouseRange:
if (selection->time.empty()) {
nframes64_t start, end;
@@ -3980,22 +3980,22 @@ Editor::cut_copy (CutCopyOp op)
}
selection->set ((TimeAxisView*) 0, start, end);
}
-
+
begin_reversible_command (opname + _(" range"));
cut_copy_ranges (op);
commit_reversible_command ();
-
+
if (op == Cut) {
selection->clear_time ();
}
break;
-
+
default:
break;
}
}
-
+
if (op == Cut || op == Clear) {
break_drag ();
delete _drag;
@@ -4015,7 +4015,7 @@ Editor::cut_copy_points (CutCopyOp op)
if (atv) {
atv->cut_copy_clear_objects (selection->points, op);
- }
+ }
}
}
@@ -4041,8 +4041,8 @@ struct lt_playlist {
return a.playlist < b.playlist;
}
};
-
-struct PlaylistMapping {
+
+struct PlaylistMapping {
TimeAxisView* tv;
boost::shared_ptr<Playlist> pl;
@@ -4058,7 +4058,7 @@ Editor::remove_clicked_region ()
}
boost::shared_ptr<Playlist> playlist = clicked_routeview->playlist();
-
+
begin_reversible_command (_("remove region"));
XMLNode &before = playlist->get_state();
playlist->remove_region (clicked_regionview->region());
@@ -4072,9 +4072,9 @@ Editor::remove_clicked_region ()
void
Editor::remove_selected_regions ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
-
+
if (!session) {
return;
}
@@ -4096,12 +4096,12 @@ Editor::remove_selected_regions ()
// so, first iterate over the regions to be removed from rs and
// add them to the regions_to_remove list, and then
// iterate over the list to actually remove them.
-
+
regions_to_remove.push_back ((*i)->region());
}
vector<PlaylistState> playlists;
-
+
for (list<boost::shared_ptr<Region> >::iterator rl = regions_to_remove.begin(); rl != regions_to_remove.end(); ++rl) {
boost::shared_ptr<Playlist> playlist = (*rl)->playlist();
@@ -4130,7 +4130,7 @@ Editor::remove_selected_regions ()
playlists.push_back(before);
}
- playlist->remove_region (*rl);
+ playlist->remove_region (*rl);
}
vector<PlaylistState>::iterator pl;
@@ -4156,12 +4156,12 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
vector<PlaylistMapping> pmap;
nframes64_t first_position = max_frames;
-
+
set<PlaylistState, lt_playlist> freezelist;
pair<set<PlaylistState, lt_playlist>::iterator,bool> insert_result;
-
+
/* get ordering correct before we cut/copy */
-
+
rs.sort_by_position_and_track ();
for (RegionSelection::iterator x = rs.begin(); x != rs.end(); ++x) {
@@ -4180,7 +4180,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
break;
}
}
-
+
if (fl == freezelist.end()) {
PlaylistState before;
before.playlist = pl;
@@ -4199,7 +4199,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
break;
}
}
-
+
if (z == pmap.end()) {
pmap.push_back (PlaylistMapping (tv));
}
@@ -4208,7 +4208,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
for (RegionSelection::iterator x = rs.begin(); x != rs.end(); ) {
boost::shared_ptr<Playlist> pl = (*x)->region()->playlist();
-
+
if (!pl) {
/* impossible, but this handles it for the future */
continue;
@@ -4217,20 +4217,20 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
TimeAxisView& tv = (*x)->get_trackview();
boost::shared_ptr<Playlist> npl;
RegionSelection::iterator tmp;
-
+
tmp = x;
++tmp;
vector<PlaylistMapping>::iterator z;
-
+
for (z = pmap.begin(); z != pmap.end(); ++z) {
if ((*z).tv == &tv) {
break;
}
}
-
+
assert (z != pmap.end());
-
+
if (!(*z).pl) {
npl = PlaylistFactory::create (pl->data_type(), *session, "cutlist", true);
npl->freeze();
@@ -4238,7 +4238,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
} else {
npl = (*z).pl;
}
-
+
boost::shared_ptr<Region> r = (*x)->region();
boost::shared_ptr<Region> _xx;
@@ -4250,12 +4250,12 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
npl->add_region (_xx, r->position() - first_position);
pl->remove_region (r);
break;
-
+
case Copy:
/* copy region before adding, so we're not putting same object into two different playlists */
npl->add_region (RegionFactory::create (r), r->position() - first_position);
break;
-
+
case Clear:
pl->remove_region (r);
break;
@@ -4263,16 +4263,16 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
x = tmp;
}
-
+
list<boost::shared_ptr<Playlist> > foo;
-
+
/* the pmap is in the same order as the tracks in which selected regions occured */
-
+
for (vector<PlaylistMapping>::iterator i = pmap.begin(); i != pmap.end(); ++i) {
(*i).pl->thaw();
foo.push_back ((*i).pl);
}
-
+
if (!foo.empty()) {
cut_buffer->set (foo);
@@ -4333,7 +4333,7 @@ Editor::paste_internal (nframes64_t position, float times)
if (internal_editing()) {
if (cut_buffer->midi_notes.empty()) {
return;
- }
+ }
} else {
if (cut_buffer->empty()) {
return;
@@ -4364,14 +4364,14 @@ Editor::paste_internal (nframes64_t position, float times)
/* undo/redo is handled by individual tracks/regions */
if (internal_editing()) {
-
+
RegionSelection rs;
RegionSelection::iterator r;
MidiNoteSelection::iterator cb;
get_regions_at (rs, position, ts);
- for (cb = cut_buffer->midi_notes.begin(), r = rs.begin();
+ for (cb = cut_buffer->midi_notes.begin(), r = rs.begin();
cb != cut_buffer->midi_notes.end() && r != rs.end(); ++r) {
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (*r);
if (mrv) {
@@ -4385,9 +4385,9 @@ Editor::paste_internal (nframes64_t position, float times)
if ((*i)->paste (position, times, *cut_buffer, nth)) {
commit = true;
}
- }
+ }
}
-
+
if (commit) {
commit_reversible_command ();
}
@@ -4411,13 +4411,13 @@ Editor::paste_named_selection (float times)
list<boost::shared_ptr<Playlist> >::iterator tmp;
chunk = ns->playlists.begin();
-
+
begin_reversible_command (_("paste chunk"));
-
+
sort_track_selection ();
for (t = selection->tracks.begin(); t != selection->tracks.end(); ++t) {
-
+
RouteTimeAxisView* rtv;
boost::shared_ptr<Playlist> pl;
boost::shared_ptr<AudioPlaylist> apl;
@@ -4429,7 +4429,7 @@ Editor::paste_named_selection (float times)
if ((pl = rtv->playlist()) == 0) {
continue;
}
-
+
if ((apl = boost::dynamic_pointer_cast<AudioPlaylist> (pl)) == 0) {
continue;
}
@@ -4452,7 +4452,7 @@ Editor::paste_named_selection (float times)
void
Editor::duplicate_some_regions (RegionSelection& regions, float times)
{
- boost::shared_ptr<Playlist> playlist;
+ boost::shared_ptr<Playlist> playlist;
RegionSelection sel = regions; // clear (below) may clear the argument list if its the current region selection
RegionSelection foo;
@@ -4468,14 +4468,14 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times)
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&tv);
latest_regionviews.clear ();
sigc::connection c = rtv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
-
+
playlist = (*i)->region()->playlist();
XMLNode &before = playlist->get_state();
playlist->duplicate (r, r->last_frame(), times);
session->add_command(new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
c.disconnect ();
-
+
foo.insert (foo.end(), latest_regionviews.begin(), latest_regionviews.end());
}
@@ -4493,16 +4493,16 @@ Editor::duplicate_selection (float times)
return;
}
- boost::shared_ptr<Playlist> playlist;
+ boost::shared_ptr<Playlist> playlist;
vector<boost::shared_ptr<Region> > new_regions;
vector<boost::shared_ptr<Region> >::iterator ri;
-
+
create_region_from_selection (new_regions);
if (new_regions.empty()) {
return;
}
-
+
begin_reversible_command (_("duplicate selection"));
ri = new_regions.begin();
@@ -4531,12 +4531,12 @@ Editor::reset_point_selection ()
/* reset all selected points to the relevant default value */
for (PointSelection::iterator i = selection->points.begin(); i != selection->points.end(); ++i) {
-
+
AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*>(&(*i).track);
-
+
if (atv) {
atv->reset_objects (selection->points);
- }
+ }
}
}
@@ -4568,7 +4568,7 @@ Editor::clear_playlist (boost::shared_ptr<Playlist> playlist)
void
Editor::nudge_track (bool use_edit, bool forwards)
{
- boost::shared_ptr<Playlist> playlist;
+ boost::shared_ptr<Playlist> playlist;
nframes64_t distance;
nframes64_t next_distance;
nframes64_t start;
@@ -4582,26 +4582,26 @@ Editor::nudge_track (bool use_edit, bool forwards)
if ((distance = get_nudge_distance (start, next_distance)) == 0) {
return;
}
-
+
if (selection->tracks.empty()) {
return;
}
-
+
begin_reversible_command (_("nudge track"));
-
+
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
if ((playlist = (*i)->playlist()) == 0) {
continue;
- }
-
+ }
+
XMLNode &before = playlist->get_state();
playlist->nudge_after (start, distance, forwards);
XMLNode &after = playlist->get_state();
session->add_command (new MementoCommand<Playlist>(*playlist, &before, &after));
}
-
- commit_reversible_command ();
+
+ commit_reversible_command ();
}
void
@@ -4609,7 +4609,7 @@ Editor::remove_last_capture ()
{
vector<string> choices;
string prompt;
-
+
if (!session) {
return;
}
@@ -4620,9 +4620,9 @@ Editor::remove_last_capture ()
choices.push_back (_("No, do nothing."));
choices.push_back (_("Yes, destroy it."));
-
+
Gtkmm2ext::Choice prompter (prompt, choices);
-
+
if (prompter.run () == 1) {
session->remove_last_capture ();
}
@@ -4639,13 +4639,13 @@ Editor::normalize_region ()
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
if (rs.empty()) {
return;
}
-
+
Dialog dialog (rs.size() > 1 ? _("Normalize regions") : _("Normalize region"));
HBox hbox;
hbox.pack_start (*manage (new Label (_("Normalize to:"))));
@@ -4693,7 +4693,7 @@ Editor::reset_region_scale_amplitude ()
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -4722,7 +4722,7 @@ Editor::adjust_region_scale_amplitude (bool up)
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -4737,9 +4737,9 @@ Editor::adjust_region_scale_amplitude (bool up)
if (!arv)
continue;
XMLNode &before = arv->region()->get_state();
-
+
double fraction = gain_to_slider_position (arv->audio_region()->scale_amplitude ());
-
+
if (up) {
fraction += 0.05;
fraction = min (fraction, 1.0);
@@ -4757,7 +4757,7 @@ Editor::adjust_region_scale_amplitude (bool up)
if (up && fraction >= 2.0) {
continue;
}
-
+
arv->audio_region()->set_scale_amplitude (fraction);
session->add_command (new MementoCommand<Region>(*(arv->region().get()), &before, &arv->region()->get_state()));
}
@@ -4792,14 +4792,14 @@ Editor::strip_region_silence ()
}
std::list<boost::shared_ptr<AudioRegion> > ar;
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*> (*i);
if (arv) {
ar.push_back (arv->audio_region ());
}
}
-
+
StripSilenceDialog d (ar);
int const r = d.run ();
@@ -4820,11 +4820,11 @@ Editor::apply_midi_note_edit_op_to_region (MidiOperator& op, MidiRegionView& mrv
return op (mrv.midi_region()->model(), v);
}
-
+
void
Editor::apply_midi_note_edit_op (MidiOperator& op)
{
- RegionSelection rs;
+ RegionSelection rs;
Command* cmd;
get_regions_for_action (rs);
@@ -4848,7 +4848,7 @@ Editor::apply_midi_note_edit_op (MidiOperator& op)
session->add_command (cmd);
}
}
-
+
r = tmp;
}
@@ -4868,8 +4868,8 @@ Editor::quantize_region ()
qd->present ();
qd->run ();
qd->hide ();
-
- Quantize quant (*session, Plain,
+
+ Quantize quant (*session, Plain,
qd->snap_start(), qd->snap_end(),
qd->start_grid_size(), qd->end_grid_size(),
qd->strength(), qd->swing(), qd->threshold());
@@ -4880,7 +4880,7 @@ Editor::quantize_region ()
void
Editor::apply_filter (Filter& filter, string command)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -4909,7 +4909,7 @@ Editor::apply_filter (Filter& filter, string command)
/* no regions returned; remove the old one */
playlist->remove_region (arv->region ());
-
+
} else {
std::vector<boost::shared_ptr<Region> >::iterator res = filter.results.begin ();
@@ -4923,7 +4923,7 @@ Editor::apply_filter (Filter& filter, string command)
playlist->add_region (*res, (*res)->position());
++res;
}
-
+
}
XMLNode &after = playlist->get_state();
@@ -4981,7 +4981,7 @@ void
Editor::brush (nframes64_t pos)
{
RegionSelection sel;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5053,7 +5053,7 @@ Editor::toggle_gain_envelope_active ()
if (!session || rs.empty()) {
return;
}
-
+
session->begin_reversible_command (_("region gain envelope active"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
@@ -5077,7 +5077,7 @@ Editor::toggle_region_lock ()
if (!session || rs.empty()) {
return;
}
-
+
session->begin_reversible_command (_("region lock"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
@@ -5098,7 +5098,7 @@ Editor::set_region_lock_style (Region::PositionLockStyle ps)
if (!session || rs.empty()) {
return;
}
-
+
session->begin_reversible_command (_("region lock style"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
@@ -5120,7 +5120,7 @@ Editor::toggle_region_mute ()
if (!session || rs.empty()) {
return;
}
-
+
session->begin_reversible_command (_("region mute"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
@@ -5141,7 +5141,7 @@ Editor::toggle_region_opaque ()
if (!session || rs.empty()) {
return;
}
-
+
session->begin_reversible_command (_("region opacity"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
@@ -5179,7 +5179,7 @@ Editor::toggle_record_enable ()
void
Editor::set_fade_length (bool in)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs, true);
@@ -5194,7 +5194,7 @@ Editor::set_fade_length (bool in)
nframes64_t pos = get_preferred_edit_position();
nframes64_t len;
char* cmd;
-
+
if (pos > rv->region()->last_frame() || pos < rv->region()->first_frame()) {
/* edit point is outside the relevant region */
return;
@@ -5241,7 +5241,7 @@ Editor::set_fade_length (bool in)
tmp->audio_region()->set_fade_out_length (len);
tmp->audio_region()->set_fade_out_active (true);
}
-
+
XMLNode &after = alist->get_state();
session->add_command(new MementoCommand<AutomationList>(*alist, &before, &after));
}
@@ -5252,7 +5252,7 @@ Editor::set_fade_length (bool in)
void
Editor::toggle_fade_active (bool in)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5268,7 +5268,7 @@ Editor::toggle_fade_active (bool in)
for (RegionSelection::iterator x = rs.begin(); x != rs.end(); ++x) {
AudioRegionView* tmp = dynamic_cast<AudioRegionView*> (*x);
-
+
if (!tmp) {
return;
}
@@ -5276,7 +5276,7 @@ Editor::toggle_fade_active (bool in)
boost::shared_ptr<AudioRegion> region (tmp->audio_region());
/* make the behaviour consistent across all regions */
-
+
if (!have_switch) {
if (in) {
yn = region->fade_in_active();
@@ -5302,7 +5302,7 @@ Editor::toggle_fade_active (bool in)
void
Editor::set_fade_in_shape (AudioRegion::FadeShape shape)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5323,19 +5323,19 @@ Editor::set_fade_in_shape (AudioRegion::FadeShape shape)
XMLNode &before = alist->get_state();
tmp->audio_region()->set_fade_in_shape (shape);
-
+
XMLNode &after = alist->get_state();
session->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &after));
}
commit_reversible_command ();
-
+
}
void
Editor::set_fade_out_shape (AudioRegion::FadeShape shape)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5356,7 +5356,7 @@ Editor::set_fade_out_shape (AudioRegion::FadeShape shape)
XMLNode &before = alist->get_state();
tmp->audio_region()->set_fade_out_shape (shape);
-
+
XMLNode &after = alist->get_state();
session->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &after));
}
@@ -5367,7 +5367,7 @@ Editor::set_fade_out_shape (AudioRegion::FadeShape shape)
void
Editor::set_fade_in_active (bool yn)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5390,7 +5390,7 @@ Editor::set_fade_in_active (bool yn)
XMLNode &before = ar->get_state();
ar->set_fade_in_active (yn);
-
+
XMLNode &after = ar->get_state();
session->add_command(new MementoCommand<AudioRegion>(*ar, &before, &after));
}
@@ -5401,7 +5401,7 @@ Editor::set_fade_in_active (bool yn)
void
Editor::set_fade_out_active (bool yn)
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5423,7 +5423,7 @@ Editor::set_fade_out_active (bool yn)
XMLNode &before = ar->get_state();
ar->set_fade_out_active (yn);
-
+
XMLNode &after = ar->get_state();
session->add_command(new MementoCommand<AudioRegion>(*ar, &before, &after));
}
@@ -5440,7 +5440,7 @@ Editor::toggle_selected_region_fades (int dir)
bool yn;
get_regions_for_action (rs);
-
+
if (rs.empty()) {
return;
}
@@ -5500,7 +5500,7 @@ void
Editor::update_xfade_visibility ()
{
_xfade_visibility = session->config.get_xfades_visible ();
-
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
AudioTimeAxisView* v = dynamic_cast<AudioTimeAxisView*>(*i);
if (v) {
@@ -5522,11 +5522,11 @@ Editor::set_edit_point ()
if (!mouse_frame (where, ignored)) {
return;
}
-
+
snap_to (where);
if (selection->markers.empty()) {
-
+
mouse_add_new_marker (where);
} else {
@@ -5552,9 +5552,9 @@ Editor::set_playhead_cursor ()
if (!mouse_frame (where, ignored)) {
return;
}
-
+
snap_to (where);
-
+
if (session) {
session->request_locate (where, session->transport_rolling());
}
@@ -5564,8 +5564,8 @@ Editor::set_playhead_cursor ()
void
Editor::split ()
{
- RegionSelection rs;
-
+ RegionSelection rs;
+
get_regions_for_action (rs, true);
nframes64_t where = get_preferred_edit_position();
@@ -5704,7 +5704,7 @@ Editor::set_loop_from_selection (bool play)
nframes64_t start = selection->time[clicked_selection].start;
nframes64_t end = selection->time[clicked_selection].end;
-
+
set_loop_range (start, end, _("set loop range from selection"));
if (play) {
@@ -5722,7 +5722,7 @@ Editor::set_loop_from_edit_range (bool play)
nframes64_t start;
nframes64_t end;
-
+
if (!get_edit_op_range (start, end)) {
return;
}
@@ -5741,7 +5741,7 @@ Editor::set_loop_from_region (bool play)
nframes64_t start = max_frames;
nframes64_t end = 0;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5775,7 +5775,7 @@ Editor::set_punch_from_selection ()
nframes64_t start = selection->time[clicked_selection].start;
nframes64_t end = selection->time[clicked_selection].end;
-
+
set_punch_range (start, end, _("set punch range from selection"));
}
@@ -5788,7 +5788,7 @@ Editor::set_punch_from_edit_range ()
nframes64_t start;
nframes64_t end;
-
+
if (!get_edit_op_range (start, end)) {
return;
}
@@ -5802,7 +5802,7 @@ Editor::set_punch_from_region ()
nframes64_t start = max_frames;
nframes64_t end = 0;
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5825,17 +5825,17 @@ Editor::set_punch_from_region ()
void
Editor::pitch_shift_regions ()
{
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
-
+
if (rs.empty()) {
return;
}
pitch_shift (rs, 1.2);
}
-
+
void
Editor::use_region_as_bar ()
{
@@ -5843,7 +5843,7 @@ Editor::use_region_as_bar ()
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5869,7 +5869,7 @@ void
Editor::define_one_bar (nframes64_t start, nframes64_t end)
{
nframes64_t length = end - start;
-
+
const Meter& m (session->tempo_map().meter_at (start));
/* length = 1 bar */
@@ -5879,14 +5879,14 @@ Editor::define_one_bar (nframes64_t start, nframes64_t end)
*/
double frames_per_beat = length / m.beats_per_bar();
-
+
/* beats per minute = */
double beats_per_minute = (session->frame_rate() * 60.0) / frames_per_beat;
/* now decide whether to:
- (a) set global tempo
+ (a) set global tempo
(b) add a new tempo marker
*/
@@ -5896,7 +5896,7 @@ Editor::define_one_bar (nframes64_t start, nframes64_t end)
bool do_global = false;
if ((session->tempo_map().n_tempos() == 1) && (session->tempo_map().n_meters() == 1)) {
-
+
/* only 1 tempo & 1 meter: ask if the user wants to set the tempo
at the start, or create a new marker
*/
@@ -5925,7 +5925,7 @@ Editor::define_one_bar (nframes64_t start, nframes64_t end)
/* more than 1 tempo and/or meter section already, go ahead do the "usual":
if the marker is at the region starter, change it, otherwise add
- a new tempo marker
+ a new tempo marker
*/
}
@@ -5955,7 +5955,7 @@ Editor::split_region_at_transients ()
return;
}
- RegionSelection rs;
+ RegionSelection rs;
get_regions_for_action (rs);
@@ -5973,12 +5973,12 @@ Editor::split_region_at_transients ()
++tmp;
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> ((*i)->region());
-
+
if (ar && (ar->get_transients (positions) == 0)) {
split_region_at_points ((*i)->region(), positions, true);
positions.clear ();
}
-
+
i = tmp;
}
@@ -5992,11 +5992,11 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
bool use_rhythmic_rodent = false;
boost::shared_ptr<Playlist> pl = r->playlist();
-
+
if (!pl) {
return;
}
-
+
if (positions.empty()) {
return;
}
@@ -6031,44 +6031,44 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
return;
}
}
-
+
if (use_rhythmic_rodent) {
show_rhythm_ferret ();
return;
}
- AnalysisFeatureList::const_iterator x;
-
+ AnalysisFeatureList::const_iterator x;
+
nframes64_t pos = r->position();
XMLNode& before (pl->get_state());
-
+
x = positions.begin();
-
+
while (x != positions.end()) {
if ((*x) > pos) {
break;
}
++x;
}
-
+
if (x == positions.end()) {
return;
}
-
+
pl->freeze ();
pl->remove_region (r);
-
+
while (x != positions.end()) {
-
- /* file start = original start + how far we from the initial position ?
+
+ /* file start = original start + how far we from the initial position ?
*/
-
+
nframes64_t file_start = r->start() + (pos - r->position());
/* length = next position - current position
*/
-
+
nframes64_t len = (*x) - pos;
/* XXX we do we really want to allow even single-sample regions?
@@ -6078,13 +6078,13 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
if (len <= 0) {
break;
}
-
+
string new_name;
-
+
if (session->region_name (new_name, r->name())) {
break;
}
-
+
/* do NOT announce new regions 1 by one, just wait till they are all done */
boost::shared_ptr<Region> nr = RegionFactory::create (r->sources(), file_start, len, new_name, 0, Region::DefaultFlags, false);
@@ -6096,7 +6096,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
if (*x > r->last_frame()) {
/* add final fragment */
-
+
file_start = r->start() + (pos - r->position());
len = r->last_frame() - pos;
@@ -6105,12 +6105,12 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
break;
}
- }
+ }
pl->thaw ();
XMLNode& after (pl->get_state());
-
+
session->add_command (new MementoCommand<Playlist>(*pl, &before, &after));
}
@@ -6137,7 +6137,7 @@ Editor::tab_to_transient (bool forward)
boost::shared_ptr<Playlist> pl = rtv->get_diskstream()->playlist ();
if (pl) {
nframes64_t result = pl->find_next_transient (pos, forward ? 1 : -1);
-
+
if (result >= 0) {
positions.push_back (result);
}
@@ -6147,15 +6147,15 @@ Editor::tab_to_transient (bool forward)
}
} else {
-
- RegionSelection rs;
+
+ RegionSelection rs;
get_regions_for_action (rs);
-
+
if (rs.empty()) {
return;
}
-
+
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
(*r)->region()->get_transients (positions);
}
@@ -6277,7 +6277,7 @@ Editor::remove_tracks ()
}
routes.push_back (rtv->_route);
}
-
+
if (ntracks + nbusses == 0) {
return;
}
@@ -6339,7 +6339,7 @@ Editor::do_insert_time ()
ArdourDialog d (*this, _("Insert Time"));
nframes64_t const pos = get_preferred_edit_position ();
-
+
d.get_vbox()->set_border_width (12);
d.get_vbox()->set_spacing (4);
@@ -6352,7 +6352,7 @@ Editor::do_insert_time ()
AudioClock clock ("insertTimeClock", true, X_("InsertTimeClock"), true, true, true);
clock.set (0);
clock.set_session (session);
- clock.set_bbt_reference (pos);
+ clock.set_bbt_reference (pos);
table.attach (clock, 1, 2, 0, 1);
Label intersected_label (_("Intersected regions should:"));
@@ -6373,7 +6373,7 @@ Editor::do_insert_time ()
d.get_vbox()->pack_start (move_markers);
CheckButton move_tempos (_("Move tempo and meter changes"));
d.get_vbox()->pack_start (move_tempos);
-
+
d.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
d.add_button (_("Insert time"), Gtk::RESPONSE_OK);
d.show_all ();
@@ -6408,7 +6408,7 @@ Editor::do_insert_time ()
}
void
-Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt,
+Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt,
bool ignore_music_glue, bool markers_too, bool tempo_too)
{
bool commit = false;
@@ -6422,23 +6422,23 @@ Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt,
for (TrackSelection::iterator x = selection->tracks.begin(); x != selection->tracks.end(); ++x) {
/* regions */
boost::shared_ptr<Playlist> pl = (*x)->playlist();
-
+
if (pl) {
XMLNode &before = pl->get_state();
-
+
if (opt == SplitIntersected) {
pl->split (pos);
}
-
+
pl->shift (pos, frames, (opt == MoveIntersected), ignore_music_glue);
-
+
XMLNode &after = pl->get_state();
-
+
session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));
commit = true;
}
-
+
/* automation */
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
if (rtav) {
@@ -6454,7 +6454,7 @@ Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt,
Locations::LocationList copy (session->locations()->list());
for (Locations::LocationList::iterator i = copy.begin(); i != copy.end(); ++i) {
-
+
Locations::LocationList::const_iterator tmp;
if ((*i)->start() >= pos) {
@@ -6515,9 +6515,9 @@ Editor::fit_tracks (TrackSelection & tracks)
}
undo_visual_stack.push_back (current_visual_state());
-
+
/* operate on all tracks, hide unselected ones that are in the middle of selected ones */
-
+
bool prev_was_selected = false;
bool is_selected = tracks.contains (track_views.front());
bool next_is_selected;
@@ -6525,10 +6525,10 @@ Editor::fit_tracks (TrackSelection & tracks)
for (TrackViewList::iterator t = track_views.begin(); t != track_views.end(); ++t) {
TrackViewList::iterator next;
-
+
next = t;
++next;
-
+
if (next != track_views.end()) {
next_is_selected = tracks.contains (*next);
} else {
@@ -6548,10 +6548,10 @@ Editor::fit_tracks (TrackSelection & tracks)
is_selected = next_is_selected;
}
- /*
- set the controls_layout height now, because waiting for its size
- request signal handler will cause the vertical adjustment setting to fail
- */
+ /*
+ set the controls_layout height now, because waiting for its size
+ request signal handler will cause the vertical adjustment setting to fail
+ */
controls_layout.property_height () = full_canvas_height - canvas_timebars_vsize;
vertical_adjustment.set_value (first_y_pos);
@@ -6613,7 +6613,7 @@ Editor::end_visual_state_op (uint32_t n)
{
visual_state_op_connection.disconnect();
save_visual_state (n);
-
+
PopUp* pup = new PopUp (WIN_POS_MOUSE, 1000, true);
char buf[32];
snprintf (buf, sizeof (buf), _("Saved view %u"), n+1);
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 2ec9e4356e..b763a0bbdf 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2005 Paul Davis
+ Copyright (C) 2000-2005 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -87,53 +87,53 @@ EditorRegions::EditorRegions (Editor* e)
_display.append_column (_("Path"), _columns.path);
_display.set_headers_visible (true);
//_display.set_grid_lines (TREE_VIEW_GRID_LINES_BOTH);
-
+
CellRendererText* region_name_cell = dynamic_cast<CellRendererText*>(_display.get_column_cell_renderer (0));
region_name_cell->property_editable() = true;
region_name_cell->signal_edited().connect (mem_fun (*this, &EditorRegions::name_edit));
_display.get_selection()->set_select_function (mem_fun (*this, &EditorRegions::selection_filter));
-
+
TreeViewColumn* tv_col = _display.get_column(0);
CellRendererText* renderer = dynamic_cast<CellRendererText*>(_display.get_column_cell_renderer (0));
tv_col->add_attribute(renderer->property_text(), _columns.name);
tv_col->add_attribute(renderer->property_foreground_gdk(), _columns.color_);
-
+
_display.get_selection()->set_mode (SELECTION_MULTIPLE);
_display.add_object_drag (_columns.region.index(), "regions");
-
+
/* setup DnD handling */
-
+
list<TargetEntry> region_list_target_table;
-
+
region_list_target_table.push_back (TargetEntry ("text/plain"));
region_list_target_table.push_back (TargetEntry ("text/uri-list"));
region_list_target_table.push_back (TargetEntry ("application/x-rootwin-drop"));
-
+
_display.add_drop_targets (region_list_target_table);
_display.signal_drag_data_received().connect (mem_fun(*this, &EditorRegions::drag_data_received));
_scroller.add (_display);
_scroller.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC);
-
+
_display.signal_key_press_event().connect (mem_fun(*this, &EditorRegions::key_press));
_display.signal_key_release_event().connect (mem_fun(*this, &EditorRegions::key_release));
_display.signal_button_press_event().connect (mem_fun(*this, &EditorRegions::button_press), false);
_display.signal_button_release_event().connect (mem_fun(*this, &EditorRegions::button_release));
_change_connection = _display.get_selection()->signal_changed().connect (mem_fun(*this, &EditorRegions::selection_changed));
// _display.signal_popup_menu().connect (bind (mem_fun (*this, &Editor::show__display_context_menu), 1, 0));
-
+
//ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (mem_fun(*this, &Editor::redisplay_regions));
ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (mem_fun(*this, &EditorRegions::update_all_rows));
ARDOUR::Region::RegionPropertyChanged.connect (mem_fun(*this, &EditorRegions::update_row));
-
+
}
void
EditorRegions::connect_to_session (ARDOUR::Session* s)
{
EditorComponent::connect_to_session (s);
-
+
_session_connections.push_back (_session->RegionsAdded.connect (mem_fun(*this, &EditorRegions::handle_new_regions)));
_session_connections.push_back (_session->RegionRemoved.connect (mem_fun(*this, &EditorRegions::handle_region_removed)));
_session_connections.push_back (_session->RegionHiddenChange.connect (mem_fun(*this, &EditorRegions::region_hidden)));
@@ -145,7 +145,7 @@ void
EditorRegions::handle_region_removed (boost::weak_ptr<Region> wregion)
{
ENSURE_GUI_THREAD (bind (mem_fun (*this, &EditorRegions::handle_region_removed), wregion));
-
+
redisplay ();
}
@@ -159,7 +159,7 @@ EditorRegions::handle_new_regions (vector<boost::weak_ptr<Region> >& v)
void
EditorRegions::region_hidden (boost::shared_ptr<Region> r)
{
- ENSURE_GUI_THREAD(bind (mem_fun(*this, &EditorRegions::region_hidden), r));
+ ENSURE_GUI_THREAD(bind (mem_fun(*this, &EditorRegions::region_hidden), r));
redisplay ();
}
@@ -180,7 +180,7 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
if (!region || !_session) {
return;
}
-
+
string str;
TreeModel::Row row;
Gdk::Color c;
@@ -220,31 +220,31 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
for (i = rows.begin(); i != rows.end(); ++i) {
boost::shared_ptr<Region> rr = (*i)[_columns.region];
-
+
if (rr && region->region_list_equivalent (rr)) {
return;
}
}
row = *(_model->append());
-
+
if (missing_source) {
c.set_rgb(65535,0,0); // FIXME: error color from style
-
+
} else if (region->automatic()){
c.set_rgb(0,65535,0); // FIXME: error color from style
-
+
} else {
set_color(c, rgba_from_style ("RegionListWholeFile", 0xff, 0, 0, 0, "fg", Gtk::STATE_NORMAL, false ));
-
+
}
-
+
row[_columns.color_] = c;
if (region->source()->name()[0] == '/') { // external file
-
+
if (region->whole_file()) {
-
+
boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource>(region->source());
str = ".../";
@@ -272,23 +272,23 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
row[_columns.name] = str;
row[_columns.region] = region;
-
+
if (missing_source) {
row[_columns.path] = _("(MISSING) ") + region->source()->name();
-
+
} else {
row[_columns.path] = region->source()->name();
-
- }
-
+
+ }
+
if (region->automatic()) {
return;
}
-
+
} else {
/* find parent node, add as new child */
-
+
TreeModel::iterator i;
TreeModel::Children rows = _model->children();
bool found_parent = false;
@@ -296,16 +296,16 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
for (i = rows.begin(); i != rows.end(); ++i) {
boost::shared_ptr<Region> rr = (*i)[_columns.region];
boost::shared_ptr<AudioRegion> r = boost::dynamic_pointer_cast<AudioRegion>(rr);
-
+
if (r && r->whole_file()) {
-
+
if (region->source_equivalent (r)) {
row = *(_model->append ((*i).children()));
found_parent = true;
break;
}
}
-
+
TreeModel::iterator ii;
TreeModel::Children subrows = (*i).children();
@@ -314,18 +314,18 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
if (region->region_list_equivalent (rrr)) {
return;
-
+
}
}
}
-
+
if (!found_parent) {
row = *(_model->append());
- }
+ }
}
-
+
row[_columns.region] = region;
-
+
populate_row(region, (*row));
}
@@ -334,13 +334,13 @@ void
EditorRegions::region_changed (Change what_changed, boost::weak_ptr<Region> region)
{
ENSURE_GUI_THREAD (bind (mem_fun (*this, &EditorRegions::region_changed), what_changed, region));
-
+
boost::shared_ptr<Region> r = region.lock ();
-
+
if (!r) {
return;
}
-
+
if (what_changed & ARDOUR::NameChanged) {
/* find the region in our model and change its name */
TreeModel::Children rows = _model->children ();
@@ -360,7 +360,7 @@ EditorRegions::region_changed (Change what_changed, boost::weak_ptr<Region> regi
(*j)[_columns.name] = r->name ();
break;
}
-
+
++i;
}
@@ -368,25 +368,25 @@ EditorRegions::region_changed (Change what_changed, boost::weak_ptr<Region> regi
}
void
-EditorRegions::selection_changed ()
+EditorRegions::selection_changed ()
{
if (_display.get_selection()->count_selected_rows() > 0) {
-
+
TreeIter iter;
TreeView::Selection::ListHandle_Path rows = _display.get_selection()->get_selected_rows ();
-
+
_editor->deselect_all ();
-
+
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
-
+
if (iter = _model->get_iter (*i)) { // they could have clicked on a row that is just a placeholder, like "Hidden"
boost::shared_ptr<Region> region = (*iter)[_columns.region];
-
+
if (region) {
-
+
if (region->automatic()) {
_display.get_selection()->unselect(*i);
-
+
} else {
_change_connection.block (true);
//editor_regions_selection_changed_connection.block(true);
@@ -408,20 +408,20 @@ void
EditorRegions::set_selected (RegionSelection& regions)
{
for (RegionSelection::iterator iter = regions.begin(); iter != regions.end(); ++iter) {
-
+
TreeModel::iterator i;
TreeModel::Children rows = _model->children();
boost::shared_ptr<Region> r ((*iter)->region());
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
-
+
boost::shared_ptr<Region> compared_region = (*i)[_columns.region];
if (r == compared_region) {
_display.get_selection()->select(*i);
break;
}
-
+
if (!(*i).children().empty()) {
if (set_selected_in_subrow(r, (*i), 2)) {
break;
@@ -436,16 +436,16 @@ EditorRegions::set_selected_in_subrow (boost::shared_ptr<Region> region, TreeMod
{
TreeModel::iterator i;
TreeModel::Children subrows = (*parent_row).children();
-
+
for (i = subrows.begin(); i != subrows.end(); ++i) {
-
+
boost::shared_ptr<Region> compared_region = (*i)[_columns.region];
-
+
if (region == compared_region) {
_display.get_selection()->select(*i);
return true;
}
-
+
if (!(*i).children().empty()) {
if (set_selected_in_subrow (region, (*i), level + 1)) {
return true;
@@ -459,7 +459,7 @@ void
EditorRegions::insert_into_tmp_regionlist(boost::shared_ptr<Region> region)
{
/* keep all whole files at the beginning */
-
+
if (region->whole_file()) {
tmp_region_list.push_front (region);
} else {
@@ -469,24 +469,24 @@ EditorRegions::insert_into_tmp_regionlist(boost::shared_ptr<Region> region)
void
EditorRegions::redisplay ()
-{
+{
if (_no_redisplay || !_session) {
return;
}
-
+
bool tree_expanded = false;
-
- if (_toggle_full_action && _toggle_full_action->get_active()) { //If the list was expanded prior to rebuilding,
+
+ if (_toggle_full_action && _toggle_full_action->get_active()) { //If the list was expanded prior to rebuilding,
tree_expanded = true; //expand it again afterwards
}
-
+
_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
_model->clear ();
/* now add everything we have, via a temporary list used to help with
sorting.
*/
-
+
tmp_region_list.clear();
_session->foreach_region (this, &EditorRegions::insert_into_tmp_regionlist);
@@ -494,9 +494,9 @@ EditorRegions::redisplay ()
add_region (*r);
}
tmp_region_list.clear();
-
+
_display.set_model (_model);
-
+
if (tree_expanded) {
_display.expand_all();
}
@@ -504,26 +504,26 @@ EditorRegions::redisplay ()
void
EditorRegions::update_row (boost::shared_ptr<Region> region)
-{
+{
if (!region || !_session) {
return;
}
-
+
TreeModel::iterator i;
TreeModel::Children rows = _model->children();
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
-
+
// cerr << "Level 1: Compare " << region->name() << " with parent " << (*i)[_columns.name] << "\n";
-
+
boost::shared_ptr<Region> compared_region = (*i)[_columns.region];
-
+
if (region == compared_region) {
// cerr << "Matched\n";
populate_row(region, (*i));
return;
}
-
+
if (!(*i).children().empty()) {
if (update_subrows(region, (*i), 2)) {
return;
@@ -538,19 +538,19 @@ EditorRegions::update_subrows (boost::shared_ptr<Region> region, TreeModel::Row
{
TreeModel::iterator i;
TreeModel::Children subrows = (*parent_row).children();
-
+
for (i = subrows.begin(); i != subrows.end(); ++i) {
-
+
// cerr << "Level " << level << ": Compare " << region->name() << " with child " << (*i)[_columns.name] << "\n";
-
+
boost::shared_ptr<Region> compared_region = (*i)[_columns.region];
-
+
if (region == compared_region) {
populate_row(region, (*i));
// cerr << "Matched\n";
return true;
}
-
+
if (!(*i).children().empty()) {
if (update_subrows (region, (*i), level + 1)) {
return true;
@@ -569,16 +569,16 @@ EditorRegions::update_all_rows ()
TreeModel::iterator i;
TreeModel::Children rows = _model->children();
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
-
+
boost::shared_ptr<Region> region = (*i)[_columns.region];
-
+
if (!region->automatic()) {
cerr << "level 1 : Updating " << region->name() << "\n";
populate_row(region, (*i));
}
-
+
if (!(*i).children().empty()) {
update_all_subrows ((*i), 2);
}
@@ -590,16 +590,16 @@ EditorRegions::update_all_subrows (TreeModel::Row const &parent_row, int level)
{
TreeModel::iterator i;
TreeModel::Children subrows = (*parent_row).children();
-
+
for (i = subrows.begin(); i != subrows.end(); ++i) {
-
+
boost::shared_ptr<Region> region = (*i)[_columns.region];
-
+
if (!region->automatic()) {
cerr << "level " << level << " : Updating " << region->name() << "\n";
populate_row(region, (*i));
}
-
+
if (!(*i).children().empty()) {
update_all_subrows ((*i), level + 1);
}
@@ -619,11 +619,11 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
int used;
BBT_Time bbt; // FIXME Why do these have to be declared here ?
SMPTE::Time smpte; // FIXME I would like them declared in the case statment where they are used.
-
+
bool missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source());
-
+
boost::shared_ptr<AudioRegion> audioRegion = boost::dynamic_pointer_cast<AudioRegion>(region);
-
+
bool fades_in_seconds = false;
start_str[0] = '\0';
@@ -636,7 +636,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
used = _editor->get_regionview_count_from_region_list (region);
sprintf (used_str, "%4d" , used);
-
+
switch (ARDOUR_UI::instance()->secondary_clock.mode ()) {
case AudioClock::SMPTE:
case AudioClock::Off: /* If the secondary clock is off, default to SMPTE */
@@ -648,16 +648,16 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
sprintf (length_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
_session->smpte_time (region->sync_position() + region->position(), smpte);
sprintf (sync_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
-
- if (audioRegion && !fades_in_seconds) {
+
+ if (audioRegion && !fades_in_seconds) {
_session->smpte_time (audioRegion->fade_in()->back()->when, smpte);
sprintf (fadein_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
_session->smpte_time (audioRegion->fade_out()->back()->when, smpte);
sprintf (fadeout_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
}
-
+
break;
-
+
case AudioClock::BBT:
_session->tempo_map().bbt_time (region->position(), bbt);
sprintf (start_str, "%03d|%02d|%04d" , bbt.bars, bbt.beats, bbt.ticks);
@@ -667,21 +667,21 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
sprintf (length_str, "%03d|%02d|%04d" , bbt.bars, bbt.beats, bbt.ticks);
_session->tempo_map().bbt_time (region->sync_position() + region->position(), bbt);
sprintf (sync_str, "%03d|%02d|%04d" , bbt.bars, bbt.beats, bbt.ticks);
-
+
if (audioRegion && !fades_in_seconds) {
_session->tempo_map().bbt_time (audioRegion->fade_in()->back()->when, bbt);
sprintf (fadein_str, "%03d|%02d|%04d" , bbt.bars, bbt.beats, bbt.ticks);
_session->tempo_map().bbt_time (audioRegion->fade_out()->back()->when, bbt);
sprintf (fadeout_str, "%03d|%02d|%04d" , bbt.bars, bbt.beats, bbt.ticks);
- }
+ }
break;
-
+
case AudioClock::MinSec:
nframes_t left;
int hrs;
int mins;
float secs;
-
+
left = region->position();
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
@@ -689,7 +689,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
sprintf (start_str, "%02d:%02d:%06.3f", hrs, mins, secs);
-
+
left = region->position() + region->length() - 1;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
@@ -697,7 +697,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
sprintf (end_str, "%02d:%02d:%06.3f", hrs, mins, secs);
-
+
left = region->length();
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
@@ -705,7 +705,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
sprintf (length_str, "%02d:%02d:%06.3f", hrs, mins, secs);
-
+
left = region->sync_position() + region->position();
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
@@ -713,7 +713,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
sprintf (sync_str, "%02d:%02d:%06.3f", hrs, mins, secs);
-
+
if (audioRegion && !fades_in_seconds) {
left = audioRegion->fade_in()->back()->when;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
@@ -722,7 +722,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
sprintf (fadein_str, "%02d:%02d:%06.3f", hrs, mins, secs);
-
+
left = audioRegion->fade_out()->back()->when;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
@@ -731,55 +731,55 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
secs = left / (float) _session->frame_rate();
sprintf (fadeout_str, "%02d:%02d:%06.3f", hrs, mins, secs);
}
-
+
break;
-
+
case AudioClock::Frames:
snprintf (start_str, sizeof (start_str), "%u", region->position());
snprintf (end_str, sizeof (end_str), "%u", (region->position() + region->length() - 1));
snprintf (length_str, sizeof (length_str), "%u", region->length());
snprintf (sync_str, sizeof (sync_str), "%u", region->sync_position() + region->position());
-
+
if (audioRegion && !fades_in_seconds) {
snprintf (fadein_str, sizeof (fadein_str), "%u", uint (audioRegion->fade_in()->back()->when));
snprintf (fadeout_str, sizeof (fadeout_str), "%u", uint (audioRegion->fade_out()->back()->when));
}
-
+
break;
-
+
default:
break;
}
-
+
if (audioRegion && fades_in_seconds) {
-
+
nframes_t left;
int mins;
int millisecs;
-
+
left = audioRegion->fade_in()->back()->when;
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
millisecs = (int) floor ((left * 1000.0f) / _session->frame_rate());
-
+
if (audioRegion->fade_in()->back()->when >= _session->frame_rate()) {
sprintf (fadein_str, "%01dM %01dmS", mins, millisecs);
} else {
sprintf (fadein_str, "%01dmS", millisecs);
}
-
+
left = audioRegion->fade_out()->back()->when;
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
millisecs = (int) floor ((left * 1000.0f) / _session->frame_rate());
-
+
if (audioRegion->fade_out()->back()->when >= _session->frame_rate()) {
sprintf (fadeout_str, "%01dM %01dmS", mins, millisecs);
} else {
sprintf (fadeout_str, "%01dmS", millisecs);
}
}
-
+
if (used > 1) {
row[_columns.start] = _("Multiple");
row[_columns.end] = _("Multiple");
@@ -793,7 +793,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
} else {
row[_columns.start] = start_str;
row[_columns.end] = end_str;
-
+
if (region->sync_position() == 0) {
row[_columns.sync] = _("Start");
} else if (region->sync_position() == region->length() - 1) {
@@ -801,7 +801,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
} else {
row[_columns.sync] = sync_str;
}
-
+
if (audioRegion) {
if (audioRegion->fade_in_active()) {
row[_columns.fadein] = string_compose("%1%2%3", " ", fadein_str, " ");
@@ -821,28 +821,28 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
} else {
row[_columns.fadeout] = "";
}
-
+
row[_columns.locked] = region->locked();
-
+
if (region->positional_lock_style() == Region::MusicTime) {
row[_columns.glued] = true;
} else {
row[_columns.glued] = false;
}
-
+
row[_columns.muted] = region->muted();
row[_columns.opaque] = region->opaque();
}
-
+
row[_columns.length] = length_str;
row[_columns.used] = used_str;
-
+
if (missing_source) {
row[_columns.path] = _("MISSING ") + region->source()->name();
} else {
row[_columns.path] = region->source()->name();
}
-
+
if (region->n_channels() > 1) {
row[_columns.name] = string_compose("%1 [%2]", region->name(), region->n_channels());
} else {
@@ -854,7 +854,7 @@ void
EditorRegions::build_menu ()
{
_menu = dynamic_cast<Menu*>(ActionManager::get_widget ("/RegionListMenu"));
-
+
/* now grab specific menu items that we need */
Glib::RefPtr<Action> act;
@@ -952,9 +952,9 @@ EditorRegions::button_press (GdkEventButton *ev)
}
return true;
}
-
+
return false;
-}
+}
bool
EditorRegions::button_release (GdkEventButton *ev)
@@ -1022,23 +1022,23 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
case ByLength:
cmp = region1->length() - region2->length();
break;
-
+
case ByPosition:
cmp = region1->position() - region2->position();
break;
-
+
case ByTimestamp:
cmp = region1->source()->timestamp() - region2->source()->timestamp();
break;
-
+
case ByStartInFile:
cmp = region1->start() - region2->start();
break;
-
+
case ByEndInFile:
cmp = (region1->start() + region1->length()) - (region2->start() + region2->length());
break;
-
+
case BySourceFileName:
cmp = strcasecmp (region1->source()->name().c_str(), region2->source()->name().c_str());
break;
@@ -1046,7 +1046,7 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
case BySourceFileLength:
cmp = region1->source_length(0) - region2->source_length(0);
break;
-
+
case BySourceFileCreationDate:
cmp = region1->source()->timestamp() - region2->source()->timestamp();
break;
@@ -1120,9 +1120,9 @@ EditorRegions::remove_region ()
selection_mapover (mem_fun (*_editor, &Editor::remove_a_region));
}
-void
+void
EditorRegions::drag_data_received (const RefPtr<Gdk::DragContext>& context,
- int x, int y,
+ int x, int y,
const SelectionData& data,
guint info, guint time)
{
@@ -1136,7 +1136,7 @@ EditorRegions::drag_data_received (const RefPtr<Gdk::DragContext>& context,
if (_editor->convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
nframes64_t pos = 0;
if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
- _editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, SrcBest, pos);
+ _editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, SrcBest, pos);
} else {
_editor->do_embed (paths, Editing::ImportDistinctFiles, ImportAsRegion, pos);
}
@@ -1148,7 +1148,7 @@ bool
EditorRegions::selection_filter (const RefPtr<TreeModel>& model, const TreeModel::Path& path, bool /*yn*/)
{
/* not possible to select rows that do not represent regions, like "Hidden" */
-
+
TreeModel::iterator iter = model->get_iter (path);
if (iter) {
@@ -1156,7 +1156,7 @@ EditorRegions::selection_filter (const RefPtr<TreeModel>& model, const TreeModel
if (!r) {
return false;
}
- }
+ }
return true;
}
@@ -1166,12 +1166,12 @@ EditorRegions::name_edit (const Glib::ustring& path, const Glib::ustring& new_te
{
boost::shared_ptr<Region> region;
TreeIter iter;
-
+
if ((iter = _model->get_iter (path))) {
region = (*iter)[_columns.region];
(*iter)[_columns.name] = new_text;
}
-
+
/* now mapover everything */
if (region) {
@@ -1209,11 +1209,11 @@ boost::shared_ptr<Region>
EditorRegions::get_single_selection ()
{
Glib::RefPtr<TreeSelection> selected = _display.get_selection();
-
+
if (selected->count_selected_rows() != 1) {
return boost::shared_ptr<Region> ();
}
-
+
TreeView::Selection::ListHandle_Path rows = selected->get_selected_rows ();
/* only one row selected, so rows.begin() is it */
diff --git a/gtk2_ardour/editor_regions.h b/gtk2_ardour/editor_regions.h
index ddb1477a16..885acca628 100644
--- a/gtk2_ardour/editor_regions.h
+++ b/gtk2_ardour/editor_regions.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ public:
}
void clear ();
-
+
void toggle_full ();
void toggle_show_auto_regions ();
void reset_sort_direction (bool);
@@ -63,7 +63,7 @@ public:
}
private:
-
+
struct Columns : public Gtk::TreeModel::ColumnRecord {
Columns () {
add (name);
@@ -82,7 +82,7 @@ private:
add (used);
add (path);
}
-
+
Gtk::TreeModelColumn<Glib::ustring> name;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
Gtk::TreeModelColumn<Gdk::Color> color_;
@@ -99,9 +99,9 @@ private:
Gtk::TreeModelColumn<Glib::ustring> used;
Gtk::TreeModelColumn<Glib::ustring> path;
};
-
+
Columns _columns;
-
+
void region_changed (ARDOUR::Change, boost::weak_ptr<ARDOUR::Region>);
void selection_changed ();
sigc::connection _change_connection;
@@ -148,4 +148,4 @@ private:
std::list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list;
};
-
+
diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc
index ded5ce3529..08695f348f 100644
--- a/gtk2_ardour/editor_route_groups.cc
+++ b/gtk2_ardour/editor_route_groups.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -155,14 +155,14 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
add_button->signal_clicked().connect (mem_fun (*this, &EditorRouteGroups::new_route_group));
remove_button->signal_clicked().connect (mem_fun (*this, &EditorRouteGroups::remove_selected));
-
+
button_box->pack_start (*add_button);
button_box->pack_start (*remove_button);
_display_packer->pack_start (_scroller, true, true);
_display_packer->pack_start (*button_box, false, false);
}
-
+
Gtk::Menu*
EditorRouteGroups::menu (RouteGroup* g)
@@ -272,7 +272,7 @@ EditorRouteGroups::new_from_selection ()
rtv->route()->set_route_group (g, this);
}
}
-
+
} else {
delete g;
}
@@ -300,7 +300,7 @@ EditorRouteGroups::new_from_rec_enabled ()
rtv->route()->set_route_group (g, this);
}
}
-
+
} else {
delete g;
}
@@ -328,7 +328,7 @@ EditorRouteGroups::new_from_soloed ()
rtv->route()->set_route_group (g, this);
}
}
-
+
} else {
delete g;
}
@@ -353,7 +353,7 @@ EditorRouteGroups::remove_selected ()
TreeView::Selection::ListHandle_Path::iterator i = rows.begin();
TreeIter iter;
-
+
/* selection mode is single, so rows.begin() is it */
if ((iter = _model->get_iter (*i))) {
@@ -387,7 +387,7 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
if (p) {
iter = _model->get_iter (path);
}
-
+
if (iter) {
group = (*iter)[_columns.routegroup];
}
@@ -413,8 +413,8 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
return true;
}
}
-
- }
+
+ }
break;
case 1:
@@ -497,11 +497,11 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
default:
break;
}
-
+
return false;
}
-void
+void
EditorRouteGroups::row_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter)
{
RouteGroup* group;
@@ -549,7 +549,7 @@ EditorRouteGroups::add (RouteGroup* group)
bool focus = false;
TreeModel::Row row = *(_model->append());
-
+
row[_columns.is_visible] = !group->is_hidden();
row[_columns.gain] = group->property(RouteGroup::Gain);
row[_columns.record] = group->property(RouteGroup::RecEnable);
@@ -571,7 +571,7 @@ EditorRouteGroups::add (RouteGroup* group)
group->FlagsChanged.connect (bind (mem_fun (*this, &EditorRouteGroups::flags_changed), group));
- if (focus) {
+ if (focus) {
TreeViewColumn* col = _display.get_column (0);
CellRendererText* name_cell = dynamic_cast<CellRendererText*>(_display.get_column_cell_renderer (0));
_display.set_cursor (_model->get_path (row), *col, *name_cell, true);
@@ -634,13 +634,13 @@ EditorRouteGroups::name_edit (const Glib::ustring& path, const Glib::ustring& ne
{
RouteGroup* group;
TreeIter iter;
-
+
if ((iter = _model->get_iter (path))) {
-
+
if ((group = (*iter)[_columns.routegroup]) == 0) {
return;
}
-
+
if (new_text != group->name()) {
group->set_name (new_text);
}
@@ -694,7 +694,7 @@ EditorRouteGroups::collect (RouteGroup* g)
boost::shared_ptr<Route> r = rtv->route ();
int const k = r->order_key (N_ ("editor"));
-
+
if (*i == r.get()) {
if (coll == -1) {
@@ -703,19 +703,19 @@ EditorRouteGroups::collect (RouteGroup* g)
} else {
--diff;
}
-
+
r->set_order_key (N_ ("editor"), coll);
-
+
++coll;
++i;
-
+
} else {
-
+
r->set_order_key (N_ ("editor"), k + diff);
-
+
}
}
-
+
++j;
}
diff --git a/gtk2_ardour/editor_route_groups.h b/gtk2_ardour/editor_route_groups.h
index d87c8f5c83..e5fc6d7c64 100644
--- a/gtk2_ardour/editor_route_groups.h
+++ b/gtk2_ardour/editor_route_groups.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,9 +33,9 @@ public:
Gtk::Menu* menu (ARDOUR::RouteGroup *);
void clear ();
-
+
private:
-
+
struct Columns : public Gtk::TreeModel::ColumnRecord {
Columns () {
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc
index e7e8d76795..bbda43a295 100644
--- a/gtk2_ardour/editor_routes.cc
+++ b/gtk2_ardour/editor_routes.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -82,11 +82,11 @@ EditorRoutes::EditorRoutes (Editor* e)
_display.append_column (*rec_state_column);
_display.append_column (_("Show"), _columns.visible);
_display.append_column (_("Name"), _columns.text);
-
+
_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0));
_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1));
_display.get_column (2)->set_data (X_("colnum"), GUINT_TO_POINTER(2));
-
+
_display.set_headers_visible (true);
_display.set_name ("TrackListDisplay");
_display.get_selection()->set_mode (SELECTION_NONE);
@@ -96,7 +96,7 @@ EditorRoutes::EditorRoutes (Editor* e)
_display.add_object_drag (_columns.route.index(), "routes");
CellRendererToggle* visible_cell = dynamic_cast<CellRendererToggle*>(_display.get_column_cell_renderer (1));
-
+
visible_cell->property_activatable() = true;
visible_cell->property_radio() = false;
@@ -116,7 +116,7 @@ EditorRoutes::connect_to_session (Session* s)
initial_display ();
}
-void
+void
EditorRoutes::on_tv_rec_enable_toggled (Glib::ustring const & path_string)
{
// Get the model row that has been toggled.
@@ -137,7 +137,7 @@ EditorRoutes::build_menu ()
using namespace Gtk;
_menu = new Menu;
-
+
MenuList& items = _menu->items();
_menu->set_name ("ArdourContextMenu");
@@ -182,11 +182,11 @@ EditorRoutes::redisplay ()
}
if (!_redisplay_does_not_reset_order_keys) {
-
+
/* this reorder is caused by user action, so reassign sort order keys
to tracks.
*/
-
+
route->set_order_key (N_ ("editor"), n);
}
@@ -201,7 +201,7 @@ EditorRoutes::redisplay ()
tv->set_marked_for_display (false);
tv->hide ();
}
-
+
n++;
}
@@ -211,12 +211,12 @@ EditorRoutes::redisplay ()
*/
Glib::signal_idle().connect (mem_fun (*_editor, &Editor::sync_track_view_list_and_routes));
-
+
_editor->full_canvas_height = position + _editor->canvas_timebars_vsize;
_editor->vertical_adjustment.set_upper (_editor->full_canvas_height);
if ((_editor->vertical_adjustment.get_value() + _editor->_canvas_height) > _editor->vertical_adjustment.get_upper()) {
- /*
+ /*
We're increasing the size of the canvas while the bottom is visible.
We scroll down to keep in step with the controls layout.
*/
@@ -268,12 +268,12 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
row[_columns.is_track] = (boost::dynamic_pointer_cast<Track> ((*x)->route()) != 0);
_ignore_reorder = true;
-
+
/* added a new fresh one at the end */
if ((*x)->route()->order_key (N_ ("editor")) == -1) {
(*x)->route()->set_order_key (N_ ("editor"), _model->children().size()-1);
}
-
+
_ignore_reorder = false;
boost::weak_ptr<Route> wr ((*x)->route());
@@ -297,7 +297,7 @@ EditorRoutes::handle_gui_changes (string const & what, void *src)
ENSURE_GUI_THREAD (bind (mem_fun(*this, &EditorRoutes::handle_gui_changes), what, src));
if (what == "track_height") {
- /* Optional :make tracks change height while it happens, instead
+ /* Optional :make tracks change height while it happens, instead
of on first-idle
*/
//update_canvas_now ();
@@ -317,7 +317,7 @@ EditorRoutes::route_removed (TimeAxisView *tv)
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator ri;
- /* the core model has changed, there is no need to sync
+ /* the core model has changed, there is no need to sync
view orders.
*/
@@ -342,17 +342,17 @@ EditorRoutes::route_name_changed (boost::weak_ptr<Route> r)
if (!route) {
return;
}
-
+
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
boost::shared_ptr<Route> t = (*i)[_columns.route];
if (t == route) {
(*i)[_columns.text] = route->name();
break;
}
- }
+ }
}
void
@@ -379,7 +379,7 @@ EditorRoutes::hide_track_in_display (TimeAxisView& tv)
TreeModel::Children::iterator i;
for (i = rows.begin(); i != rows.end(); ++i) {
- if ((*i)[_columns.tv] == &tv) {
+ if ((*i)[_columns.tv] == &tv) {
(*i)[_columns.visible] = false;
break;
}
@@ -391,9 +391,9 @@ EditorRoutes::show_track_in_display (TimeAxisView& tv)
{
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
- if ((*i)[_columns.tv] == &tv) {
+ if ((*i)[_columns.tv] == &tv) {
(*i)[_columns.visible] = true;
break;
}
@@ -457,14 +457,14 @@ EditorRoutes::hide_all_tracks (bool /*with_select*/)
suspend_redisplay ();
for (i = rows.begin(); i != rows.end(); ++i) {
-
+
TreeModel::Row row = (*i);
TimeAxisView *tv = row[_columns.tv];
if (tv == 0) {
continue;
}
-
+
row[_columns.visible] = false;
}
@@ -493,7 +493,7 @@ EditorRoutes::set_all_tracks_visibility (bool yn)
if (tv == 0) {
continue;
}
-
+
(*i)[_columns.visible] = yn;
}
@@ -501,7 +501,7 @@ EditorRoutes::set_all_tracks_visibility (bool yn)
}
void
-EditorRoutes::set_all_audio_visibility (int tracks, bool yn)
+EditorRoutes::set_all_audio_visibility (int tracks, bool yn)
{
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i;
@@ -528,7 +528,7 @@ EditorRoutes::set_all_audio_visibility (int tracks, bool yn)
(*i)[_columns.visible] = yn;
}
break;
-
+
case 2:
if (!atv->is_audio_track()) {
(*i)[_columns.visible] = yn;
@@ -588,7 +588,7 @@ EditorRoutes::button_press (GdkEventButton* ev)
TreeViewColumn* column;
int cellx;
int celly;
-
+
if (!_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
return false;
}
@@ -652,23 +652,23 @@ EditorRoutes::initial_display ()
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i;
-
+
_no_redisplay = true;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
TimeAxisView *tv = (*i)[_columns.tv];
RouteTimeAxisView *rtv;
-
+
if ((rtv = dynamic_cast<RouteTimeAxisView*>(tv)) != 0) {
if (rtv->route()->is_master()) {
_display.get_selection()->unselect (i);
}
}
}
-
+
_no_redisplay = false;
redisplay ();
- }
+ }
resume_redisplay ();
}
@@ -682,9 +682,9 @@ EditorRoutes::track_list_reorder (Gtk::TreeModel::Path const &, Gtk::TreeModel::
_redisplay_does_not_sync_order_keys = false;
}
-void
+void
EditorRoutes::display_drag_data_received (const RefPtr<Gdk::DragContext>& context,
- int x, int y,
+ int x, int y,
const SelectionData& data,
guint info, guint time)
{
@@ -692,7 +692,7 @@ EditorRoutes::display_drag_data_received (const RefPtr<Gdk::DragContext>& contex
_display.on_drag_data_received (context, x, y, data, info, time);
return;
}
-
+
context->drag_finish (true, false, time);
}
@@ -718,14 +718,14 @@ EditorRoutes::move_selected_tracks (bool up)
list<ViewRoute>::iterator trailing;
list<ViewRoute>::iterator leading;
-
+
if (up) {
-
+
trailing = view_routes.begin();
leading = view_routes.begin();
-
+
++leading;
-
+
while (leading != view_routes.end()) {
if (_editor->selection->selected (leading->first)) {
view_routes.insert (trailing, ViewRoute (leading->first, leading->second));
@@ -763,7 +763,7 @@ EditorRoutes::move_selected_tracks (bool up)
tmp++;
view_routes.insert (tmp, ViewRoute (leading->first, leading->second));
-
+
/* can't use iter = cont.erase (iter); form here, because
we need iter to move backwards.
*/
@@ -782,7 +782,7 @@ EditorRoutes::move_selected_tracks (bool up)
}
view_routes.erase (leading);
-
+
if (done) {
break;
}
@@ -813,7 +813,7 @@ EditorRoutes::update_rec_display ()
{
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
boost::shared_ptr<Route> route = (*i)[_columns.route];
@@ -824,7 +824,7 @@ EditorRoutes::update_rec_display ()
} else {
(*i)[_columns.rec_enabled] = false;
}
- }
+ }
}
}
diff --git a/gtk2_ardour/editor_routes.h b/gtk2_ardour/editor_routes.h
index a075902dee..22bff40e35 100644
--- a/gtk2_ardour/editor_routes.h
+++ b/gtk2_ardour/editor_routes.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -75,7 +75,7 @@ private:
bool selection_filter (Glib::RefPtr<Gtk::TreeModel> const &, Gtk::TreeModel::Path const &, bool);
struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
- ModelColumns() {
+ ModelColumns() {
add (text);
add (visible);
add (rec_enabled);
@@ -92,7 +92,7 @@ private:
};
Gtk::ScrolledWindow _scroller;
- Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
Glib::RefPtr<Gtk::ListStore> _model;
ModelColumns _columns;
bool _ignore_reorder;
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 3f1fc6a497..f21c996598 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
*/
-#include <cstdio> // for sprintf, grrr
+#include <cstdio> // for sprintf, grrr
#include <cmath>
#include <string>
@@ -148,7 +148,7 @@ Editor::initialize_rulers ()
bbt_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
frames_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
minsec_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
-
+
smpte_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
bbt_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
frames_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
@@ -242,7 +242,7 @@ Editor::ruler_button_press (GdkEventButton* ev)
if (session->is_auditioning()) {
session->cancel_audition ();
}
-
+
/* playhead cursor */
assert (_drag == 0);
_drag = new CursorDrag (this, &playhead_cursor->canvas_item, false);
@@ -259,7 +259,7 @@ Editor::ruler_button_release (GdkEventButton* ev)
if (session == 0) {
return FALSE;
}
-
+
gint x,y;
Gdk::ModifierType state;
@@ -275,7 +275,7 @@ Editor::ruler_button_release (GdkEventButton* ev)
time_canvas_event_box.get_window()->get_pointer (x, y, state);
stop_canvas_autoscroll();
-
+
nframes64_t where = leftmost_frame + pixel_to_frame (x);
snap_to (where);
popup_ruler_menu (where);
@@ -298,7 +298,7 @@ Editor::ruler_label_button_release (GdkEventButton* ev)
m->popup (1, ev->time);
}
}
-
+
return TRUE;
}
@@ -350,13 +350,13 @@ Editor::popup_ruler_menu (nframes64_t where, ItemType t)
case TransportMarkerBarItem:
break;
-
+
case CdMarkerBarItem:
// TODO
ruler_items.push_back (MenuElem (_("New CD track marker"), bind ( mem_fun(*this, &Editor::mouse_add_new_marker), where, true, false)));
break;
-
-
+
+
case TempoBarItem:
ruler_items.push_back (MenuElem (_("New Tempo"), bind ( mem_fun(*this, &Editor::mouse_add_new_tempo_event), where)));
ruler_items.push_back (MenuElem (_("Clear tempo")));
@@ -445,7 +445,7 @@ Editor::store_ruler_visibility ()
session->set_dirty ();
}
-void
+void
Editor::restore_ruler_visibility ()
{
XMLProperty* prop;
@@ -528,7 +528,7 @@ Editor::restore_ruler_visibility ()
} else {
// this session doesn't yet know about the cdmarker ruler
- // as a benefit to the user who doesn't know the feature exists, show the ruler if
+ // as a benefit to the user who doesn't know the feature exists, show the ruler if
// any cd marks exist
ruler_cd_marker_action->set_active (false);
const Locations::LocationList & locs = session->locations()->list();
@@ -614,7 +614,7 @@ Editor::update_ruler_visibility ()
old_unit_pos = meter_bar_group->property_y();
if (tbgpos != old_unit_pos) {
meter_bar_group->move ( 0.0, tbgpos - old_unit_pos);
- }
+ }
meter_bar_group->show();
meter_group->show();
meter_label.show();
@@ -626,7 +626,7 @@ Editor::update_ruler_visibility ()
meter_group->hide();
meter_label.hide();
}
-
+
if (ruler_tempo_action->get_active()) {
old_unit_pos = tempo_group->property_y();
if (tbpos != old_unit_pos) {
@@ -647,7 +647,7 @@ Editor::update_ruler_visibility ()
tempo_group->hide();
tempo_label.hide();
}
-
+
if (!Profile->get_sae() && ruler_range_action->get_active()) {
old_unit_pos = range_marker_group->property_y();
if (tbpos != old_unit_pos) {
@@ -715,7 +715,7 @@ Editor::update_ruler_visibility ()
// make sure all cd markers show up in their respective places
update_cd_marker_display();
}
-
+
if (ruler_marker_action->get_active()) {
old_unit_pos = marker_group->property_y();
if (tbpos != old_unit_pos) {
@@ -753,7 +753,7 @@ Editor::update_ruler_visibility ()
_background_group->move (0, 0);
last_trackview_group_vertical_offset = get_trackview_group_vertical_offset ();
}
-
+
gdouble bottom_track_pos = vertical_adjustment.get_value() + _canvas_height - canvas_timebars_vsize;
std::pair<TimeAxisView*, int> const p = trackview_by_y_position (bottom_track_pos);
if (p.first) {
@@ -771,7 +771,7 @@ void
Editor::update_just_smpte ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_just_smpte));
-
+
if (session == 0) {
return;
}
@@ -794,7 +794,7 @@ Editor::compute_fixed_ruler_scale ()
if (ruler_timecode_action->get_active()) {
set_smpte_ruler_scale (leftmost_frame, leftmost_frame + current_page_frames() );
}
-
+
if (ruler_minsec_action->get_active()) {
set_minsec_ruler_scale (leftmost_frame, leftmost_frame + current_page_frames() );
}
@@ -823,17 +823,17 @@ Editor::update_fixed_rulers ()
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_smpte_ruler), leftmost_frame, rightmost_frame,
leftmost_frame, session->current_end_frame());
}
-
+
if (ruler_samples_action->get_active()) {
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_frames_ruler), leftmost_frame, rightmost_frame,
leftmost_frame, session->current_end_frame());
}
-
+
if (ruler_minsec_action->get_active()) {
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_minsec_ruler), leftmost_frame, rightmost_frame,
leftmost_frame, session->current_end_frame());
}
-}
+}
void
Editor::update_tempo_based_rulers ()
@@ -843,7 +843,7 @@ Editor::update_tempo_based_rulers ()
}
ruler_metrics[ruler_metric_bbt].units_per_pixel = frames_per_unit;
-
+
if (ruler_bbt_action->get_active()) {
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_bbt_ruler), leftmost_frame, leftmost_frame+current_page_frames(),
leftmost_frame, session->current_end_frame());
@@ -966,14 +966,14 @@ Editor::set_smpte_ruler_scale (gdouble lower, gdouble upper)
smpte_mark_modulo = 1;
smpte_nmarks = 2 + 24;
} else {
-
+
/* not possible if nframes64_t is a 32 bit quantity */
-
+
smpte_ruler_scale = smpte_show_hours;
smpte_mark_modulo = 4;
smpte_nmarks = 2 + 24;
}
-
+
}
gint
@@ -996,14 +996,14 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
}
pos = (nframes_t) floor (lower);
-
- *marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * smpte_nmarks);
+
+ *marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * smpte_nmarks);
switch (smpte_ruler_scale) {
case smpte_show_bits:
// Find smpte time of this sample (pos) with subframe accuracy
session->sample_to_smpte(pos, smpte, true /* use_offset */, true /* use_subframes */ );
-
+
for (n = 0; n < smpte_nmarks; n++) {
session->smpte_to_sample(smpte, pos, true /* use_offset */, true /* use_subframes */ );
if ((smpte.subframes % smpte_mark_modulo) == 0) {
@@ -1017,7 +1017,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
-
+
}
(*marks)[n].label = g_strdup (buf);
(*marks)[n].position = pos;
@@ -1047,7 +1047,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
(*marks)[n].position = pos;
-
+
}
(*marks)[n].label = g_strdup (buf);
SMPTE::increment_seconds( smpte, session->config.get_subframes_per_frame() );
@@ -1071,7 +1071,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
-
+
}
(*marks)[n].label = g_strdup (buf);
(*marks)[n].position = pos;
@@ -1093,7 +1093,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
-
+
}
(*marks)[n].label = g_strdup (buf);
(*marks)[n].position = pos;
@@ -1121,7 +1121,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
(*marks)[n].position = pos;
-
+
}
(*marks)[n].label = g_strdup (buf);
SMPTE::increment( smpte, session->config.get_subframes_per_frame() );
@@ -1129,7 +1129,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
break;
}
-
+
return smpte_nmarks;
}
@@ -1153,7 +1153,7 @@ Editor::compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper)
bbt_nmarks = 1;
bbt_ruler_scale = bbt_over;
-
+
switch (snap_type) {
case SnapToAThirdBeat:
bbt_beat_subdivision = 3;
@@ -1212,7 +1212,7 @@ Editor::compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper)
bbt_ruler_scale = bbt_show_ticks;
} else {
bbt_ruler_scale = bbt_show_ticks_detail;
- }
+ }
if ((bbt_ruler_scale == bbt_show_ticks_detail) && (lower_beat.beats == upper_beat.beats) && (upper_beat.ticks - lower_beat.ticks <= Meter::ticks_per_beat / 4)) {
bbt_ruler_scale = bbt_show_ticks_super_detail;
@@ -1260,14 +1260,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[0].label = g_strdup(" ");
(*marks)[0].position = lower;
(*marks)[0].style = GtkCustomRulerMarkMicro;
-
+
for (n = 1, i = current_bbt_points->begin(); n < bbt_nmarks && i != current_bbt_points->end(); ++i) {
if ((*i).type != TempoMap::Beat) {
continue;
}
if ((*i).frame < lower && (bbt_bar_helper_on)) {
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
- (*marks)[0].label = g_strdup (buf);
+ (*marks)[0].label = g_strdup (buf);
helper_active = true;
} else {
@@ -1299,14 +1299,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[0].label = g_strdup(" ");
(*marks)[0].position = lower;
(*marks)[0].style = GtkCustomRulerMarkMicro;
-
+
for (n = 1, i = current_bbt_points->begin(); n < bbt_nmarks && i != current_bbt_points->end(); ++i) {
if ((*i).type != TempoMap::Beat) {
continue;
}
if ((*i).frame < lower && (bbt_bar_helper_on)) {
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
- (*marks)[0].label = g_strdup (buf);
+ (*marks)[0].label = g_strdup (buf);
helper_active = true;
} else {
@@ -1324,23 +1324,23 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[n].position = (*i).frame;
n++;
}
-
+
/* Add the tick marks */
/* Find the next beat */
next_beat.beats = (*i).beat;
next_beat.bars = (*i).bar;
next_beat.ticks = 0;
-
+
if ((*i).meter->beats_per_bar() > (next_beat.beats + 1)) {
next_beat.beats += 1;
} else {
next_beat.bars += 1;
next_beat.beats = 1;
}
-
+
next_beat_pos = session->tempo_map().frame_time(next_beat);
-
+
frame_skip = (nframes64_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
frame_skip_error -= frame_skip;
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
@@ -1349,7 +1349,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
accumulated_error = frame_skip_error;
tick = skip;
-
+
for (t = 0; (tick < Meter::ticks_per_beat) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
@@ -1391,14 +1391,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[0].label = g_strdup(" ");
(*marks)[0].position = lower;
(*marks)[0].style = GtkCustomRulerMarkMicro;
-
+
for (n = 1, i = current_bbt_points->begin(); n < bbt_nmarks && i != current_bbt_points->end(); ++i) {
if ((*i).type != TempoMap::Beat) {
continue;
}
if ((*i).frame < lower && (bbt_bar_helper_on)) {
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
- (*marks)[0].label = g_strdup (buf);
+ (*marks)[0].label = g_strdup (buf);
helper_active = true;
} else {
@@ -1416,23 +1416,23 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[n].position = (*i).frame;
n++;
}
-
+
/* Add the tick marks */
/* Find the next beat */
next_beat.beats = (*i).beat;
next_beat.bars = (*i).bar;
-
+
if ((*i).meter->beats_per_bar() > (next_beat.beats + 1)) {
next_beat.beats += 1;
} else {
next_beat.bars += 1;
next_beat.beats = 1;
}
-
+
next_beat_pos = session->tempo_map().frame_time(next_beat);
-
+
frame_skip = (nframes64_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
frame_skip_error -= frame_skip;
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
@@ -1441,7 +1441,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
accumulated_error = frame_skip_error;
tick = skip;
-
+
for (t = 0; (tick < Meter::ticks_per_beat) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
@@ -1471,7 +1471,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[n].style = GtkCustomRulerMarkMicro;
}
i_am_accented = false;
- n++;
+ n++;
}
}
@@ -1488,14 +1488,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[0].label = g_strdup(" ");
(*marks)[0].position = lower;
(*marks)[0].style = GtkCustomRulerMarkMicro;
-
+
for (n = 1, i = current_bbt_points->begin(); n < bbt_nmarks && i != current_bbt_points->end(); ++i) {
if ((*i).type != TempoMap::Beat) {
continue;
}
if ((*i).frame < lower && (bbt_bar_helper_on)) {
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
- (*marks)[0].label = g_strdup (buf);
+ (*marks)[0].label = g_strdup (buf);
helper_active = true;
} else {
@@ -1513,23 +1513,23 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
(*marks)[n].position = (*i).frame;
n++;
}
-
+
/* Add the tick marks */
/* Find the next beat */
next_beat.beats = (*i).beat;
next_beat.bars = (*i).bar;
-
+
if ((*i).meter->beats_per_bar() > (next_beat.beats + 1)) {
next_beat.beats += 1;
} else {
next_beat.bars += 1;
next_beat.beats = 1;
}
-
+
next_beat_pos = session->tempo_map().frame_time(next_beat);
-
+
frame_skip = (nframes64_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
frame_skip_error -= frame_skip;
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
@@ -1538,7 +1538,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
accumulated_error = frame_skip_error;
tick = skip;
-
+
for (t = 0; (tick < Meter::ticks_per_beat) && (n < bbt_nmarks) && (pos < next_beat_pos) ; pos += frame_skip, tick += skip, ++t) {
if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) {
@@ -1561,14 +1561,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
}
(*marks)[n].position = pos;
-
+
if ((bbt_beat_subdivision > 4) && i_am_accented) {
(*marks)[n].style = GtkCustomRulerMarkMinor;
} else {
(*marks)[n].style = GtkCustomRulerMarkMicro;
}
i_am_accented = false;
- n++;
+ n++;
}
}
@@ -1682,12 +1682,12 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
n++;
}
}
-
+
break;
}
- return n; //return the actual number of marks made, since we might have skipped some from fractional time signatures
+ return n; //return the actual number of marks made, since we might have skipped some from fractional time signatures
}
@@ -1720,13 +1720,13 @@ Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble up
(*marks)[n].position = pos;
(*marks)[n].style = GtkCustomRulerMarkMajor;
}
-
+
return nmarks;
}
static void
sample_to_clock_parts ( nframes64_t sample,
- nframes64_t sample_rate,
+ nframes64_t sample_rate,
long *hrs_p,
long *mins_p,
long *secs_p,
@@ -1738,7 +1738,7 @@ sample_to_clock_parts ( nframes64_t sample,
long mins;
long secs;
long millisecs;
-
+
left = sample;
hrs = left / (sample_rate * 60 * 60);
left -= hrs * sample_rate * 60 * 60;
@@ -1847,9 +1847,9 @@ Editor::set_minsec_ruler_scale (gdouble lower, gdouble upper)
minsec_ruler_scale = minsec_show_hours;
minsec_mark_modulo = 2;
} else {
-
+
/* not possible if nframes64_t is a 32 bit quantity */
-
+
minsec_mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
}
minsec_nmarks = 2 + (range / minsec_mark_interval);
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 2da8172fc9..b77d1b4935 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -70,10 +70,10 @@ Editor::extend_selection_to_track (TimeAxisView& view)
} else {
return false;
}
- }
+ }
/* something is already selected, so figure out which range of things to add */
-
+
TrackViewList to_be_added;
TrackViewList sorted = track_views;
TrackViewByPositionSorter cmp;
@@ -103,18 +103,18 @@ Editor::extend_selection_to_track (TimeAxisView& view)
break;
}
}
-
+
passed_clicked = false;
if (forwards) {
for (TrackViewList::iterator i = sorted.begin(); i != sorted.end(); ++i) {
-
+
if ((*i) == &view) {
passed_clicked = true;
continue;
}
-
+
if (passed_clicked) {
if ((*i)->hidden()) {
continue;
@@ -130,18 +130,18 @@ Editor::extend_selection_to_track (TimeAxisView& view)
} else {
for (TrackViewList::reverse_iterator r = sorted.rbegin(); r != sorted.rend(); ++r) {
-
+
if ((*r) == &view) {
passed_clicked = true;
continue;
}
-
+
if (passed_clicked) {
-
+
if ((*r)->hidden()) {
continue;
}
-
+
if (selection->selected (*r)) {
break;
} else if (!(*r)->hidden()) {
@@ -150,12 +150,12 @@ Editor::extend_selection_to_track (TimeAxisView& view)
}
}
}
-
+
if (!to_be_added.empty()) {
selection->add (to_be_added);
return true;
}
-
+
return false;
}
@@ -211,7 +211,7 @@ Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no
case Selection::Set:
selection->set (&view);
break;
-
+
case Selection::Extend:
extend_selection_to_track (view);
break;
@@ -224,7 +224,7 @@ Editor::set_selected_track_from_click (bool press, Selection::Operation op, bool
if (!clicked_routeview) {
return;
}
-
+
if (!press) {
return;
}
@@ -278,7 +278,7 @@ Editor::get_equivalent_tracks (RouteTimeAxisView* basis, set<RouteTimeAxisView*>
/* the basis is a member of an active route group, with the appropriate
properties; find other members */
-
+
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
RouteTimeAxisView* v = dynamic_cast<RouteTimeAxisView*> (*i);
if (v && v->route()->route_group() == group) {
@@ -319,7 +319,7 @@ Editor::mapover_tracks (slot<void, RouteTimeAxisView&, uint32_t> sl, TimeAxisVie
if (route_basis == 0) {
return;
}
-
+
set<RouteTimeAxisView*> tracks;
get_equivalent_tracks (route_basis, tracks, prop);
@@ -363,9 +363,9 @@ void
Editor::get_equivalent_regions (RegionView* basis, vector<RegionView*>& equivalent_regions, RouteGroup::Property prop) const
{
mapover_tracks (bind (mem_fun (*this, &Editor::mapped_get_equivalent_regions), basis, &equivalent_regions), &basis->get_trackview(), prop);
-
+
/* add clicked regionview since we skipped all other regions in the same track as the one it was in */
-
+
equivalent_regions.push_back (basis);
}
@@ -373,11 +373,11 @@ RegionSelection
Editor::get_equivalent_regions (RegionSelection & basis, RouteGroup::Property prop) const
{
RegionSelection equivalent;
-
+
for (RegionSelection::const_iterator i = basis.begin(); i != basis.end(); ++i) {
vector<RegionView*> eq;
-
+
mapover_tracks (
bind (mem_fun (*this, &Editor::mapped_get_equivalent_regions), *i, &eq),
&(*i)->get_trackview(), prop
@@ -392,42 +392,42 @@ Editor::get_equivalent_regions (RegionSelection & basis, RouteGroup::Property pr
return equivalent;
}
-
+
int
Editor::get_regionview_count_from_region_list (boost::shared_ptr<Region> region)
{
int region_count = 0;
-
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
-
+
RouteTimeAxisView* tatv;
-
+
if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
-
+
boost::shared_ptr<Playlist> pl;
vector<boost::shared_ptr<Region> > results;
RegionView* marv;
boost::shared_ptr<Diskstream> ds;
-
+
if ((ds = tatv->get_diskstream()) == 0) {
/* bus */
continue;
}
-
+
if ((pl = (ds->playlist())) != 0) {
pl->get_region_list_equivalent_regions (region, results);
}
-
+
for (vector<boost::shared_ptr<Region> >::iterator ir = results.begin(); ir != results.end(); ++ir) {
if ((marv = tatv->view()->find_view (*ir)) != 0) {
region_count++;
}
}
-
+
}
}
-
+
return region_count;
}
@@ -444,14 +444,14 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
if (press) {
button_release_can_deselect = false;
- }
+ }
if (op == Selection::Toggle || op == Selection::Set) {
switch (op) {
case Selection::Toggle:
-
+
if (selection->selected (clicked_regionview)) {
if (press) {
@@ -476,7 +476,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
button_release_can_deselect = false;
}
- }
+ }
} else {
@@ -489,7 +489,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
}
/* add all the equivalent regions, but only on button press */
-
+
if (!all_equivalent_regions.empty()) {
@@ -497,10 +497,10 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
}
selection->add (all_equivalent_regions);
- }
+ }
}
break;
-
+
case Selection::Set:
if (!selection->selected (clicked_regionview)) {
get_equivalent_regions (clicked_regionview, all_equivalent_regions, RouteGroup::Select);
@@ -547,7 +547,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
if (same_track) {
/* 2. figure out the boundaries for our search for new objects */
-
+
switch (clicked_regionview->region()->coverage (first_frame, last_frame)) {
case OverlapNone:
if (last_frame < clicked_regionview->region()->first_frame()) {
@@ -558,7 +558,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
first_frame = clicked_regionview->region()->first_frame();
}
break;
-
+
case OverlapExternal:
if (last_frame < clicked_regionview->region()->first_frame()) {
first_frame = last_frame;
@@ -568,7 +568,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
first_frame = clicked_regionview->region()->first_frame();
}
break;
-
+
case OverlapInternal:
if (last_frame < clicked_regionview->region()->first_frame()) {
first_frame = last_frame;
@@ -578,7 +578,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
first_frame = clicked_regionview->region()->first_frame();
}
break;
-
+
case OverlapStart:
case OverlapEnd:
/* nothing to do except add clicked region to selection, since it
@@ -593,11 +593,11 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
to pick out all regions that are defined by the existing selection
plus this one.
*/
-
-
+
+
first_frame = entered_regionview->region()->position();
last_frame = entered_regionview->region()->last_frame();
-
+
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
if ((*i)->region()->position() < first_frame) {
first_frame = (*i)->region()->position();
@@ -653,12 +653,12 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
if (result.second) {
/* newly added to already_in_selection */
-
+
int d = artv->route()->order_key ("editor");
-
+
d -= key;
-
+
if (abs (d) < distance) {
distance = abs (d);
closest = artv;
@@ -666,17 +666,17 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
}
}
}
-
+
if (closest) {
/* now add all tracks between that one and this one */
-
+
int okey = closest->route()->order_key ("editor");
-
+
if (okey > key) {
swap (okey, key);
}
-
+
for (TrackViewList::iterator x = track_views.begin(); x != track_views.end(); ++x) {
RouteTimeAxisView* artv = dynamic_cast<RouteTimeAxisView*>(*x);
if (artv && artv != rtv) {
@@ -714,11 +714,11 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
for (set<RouteTimeAxisView*>::iterator t = relevant_tracks.begin(); t != relevant_tracks.end(); ++t) {
(*t)->get_selectables (first_frame, last_frame, -1.0, -1.0, results);
}
-
+
/* 4. convert to a vector of regions */
vector<RegionView*> regions;
-
+
for (list<Selectable*>::iterator x = results.begin(); x != results.end(); ++x) {
RegionView* arv;
@@ -750,7 +750,7 @@ Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> regi
}
begin_reversible_command (_("set selected regions"));
-
+
switch (op) {
case Selection::Toggle:
/* XXX this is not correct */
@@ -784,16 +784,16 @@ Editor::set_selected_regionview_from_map_event (GdkEventAny* /*ev*/, StreamView*
return true;
}
- /* don't reset the selection if its something other than
+ /* don't reset the selection if its something other than
a single other region.
*/
if (selection->regions.size() > 1) {
return true;
}
-
+
begin_reversible_command (_("set selected regions"));
-
+
selection->set (rv);
commit_reversible_command () ;
@@ -883,14 +883,14 @@ Editor::region_selection_changed ()
editor_regions_selection_changed_connection.block(true);
_regions->unselect_all ();
-
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
-
+
(*i)->set_selected_regionviews (selection->regions);
_regions->set_selected (selection->regions);
-
+
}
-
+
sensitize_the_right_region_actions (!selection->regions.empty());
zoomed_to_region = false;
@@ -915,7 +915,7 @@ Editor::select_all_in_track (Selection::Operation op)
if (!clicked_routeview) {
return;
}
-
+
clicked_routeview->get_selectables (0, max_frames, 0, DBL_MAX, touched);
switch (op) {
@@ -970,7 +970,7 @@ Editor::invert_selection_in_track ()
if (!clicked_routeview) {
return;
}
-
+
clicked_routeview->get_inverted_selectables (*selection, touched);
selection->set (touched);
}
@@ -979,7 +979,7 @@ void
Editor::invert_selection ()
{
list<Selectable *> touched;
-
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
@@ -1005,7 +1005,7 @@ Editor::select_all_within (nframes64_t start, nframes64_t end, double top, doubl
n = touched.size();
(*iter)->get_selectables (start, end, top, bot, touched);
-
+
if (n != touched.size()) {
touched_tracks.push_back (*iter);
}
@@ -1048,7 +1048,7 @@ Editor::select_all_within (nframes64_t start, nframes64_t end, double top, doubl
/* not defined yet */
break;
}
-
+
commit_reversible_command ();
return !touched.empty();
@@ -1315,7 +1315,7 @@ Editor::select_range_between ()
{
nframes64_t start;
nframes64_t end;
-
+
if (!get_edit_op_range (start, end)) {
return;
}
@@ -1365,7 +1365,7 @@ Editor::get_edit_op_range (nframes64_t& start, nframes64_t& end) const
end = selection->markers.front()->position();
}
break;
-
+
case EditAtMouse:
/* use mouse + selected marker */
if (selection->markers.empty()) {
@@ -1376,11 +1376,11 @@ Editor::get_edit_op_range (nframes64_t& start, nframes64_t& end) const
end = m;
}
break;
-
+
case EditAtSelectedMarker:
/* use mouse + selected marker */
if (selection->markers.empty()) {
-
+
MessageDialog win (_("No edit range defined"),
false,
MESSAGE_INFO,
@@ -1388,14 +1388,14 @@ Editor::get_edit_op_range (nframes64_t& start, nframes64_t& end) const
win.set_secondary_text (
_("the edit point is Selected Marker\nbut there is no selected marker."));
-
+
win.set_default_response (RESPONSE_CLOSE);
win.set_position (Gtk::WIN_POS_MOUSE);
win.show_all();
-
+
win.run ();
-
+
return false; // NO RANGE
}
start = selection->markers.front()->position();
diff --git a/gtk2_ardour/editor_selection_list.cc b/gtk2_ardour/editor_selection_list.cc
index fab22e8f89..bb85a2e57d 100644
--- a/gtk2_ardour/editor_selection_list.cc
+++ b/gtk2_ardour/editor_selection_list.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -154,7 +154,7 @@ Editor::create_named_selection ()
if (selection->time.empty()) {
return;
}
-
+
TrackViewList *views = get_valid_views (selection->time.track, selection->time.group);
if (views->empty()) {
@@ -166,9 +166,9 @@ Editor::create_named_selection ()
list<boost::shared_ptr<Playlist> > thelist;
for (TrackViewList::iterator i = views->begin(); i != views->end(); ++i) {
-
+
boost::shared_ptr<Playlist> pl = (*i)->playlist();
-
+
if (pl && (what_we_found = pl->copy (selection->time, false)) != 0) {
thelist.push_back (what_we_found);
}
@@ -177,20 +177,20 @@ Editor::create_named_selection ()
if (!thelist.empty()) {
ArdourPrompter p;
-
+
p.set_prompt (_("Name for Chunk:"));
p.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
p.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
p.change_labels (_("Create Chunk"), _("Forget it"));
p.show_all ();
-
+
switch (p.run ()) {
-
+
case Gtk::RESPONSE_ACCEPT:
p.get_result (name);
if (name.empty()) {
return;
- }
+ }
break;
default:
return;
@@ -199,7 +199,7 @@ Editor::create_named_selection ()
new NamedSelection (name, thelist); // creation will add it to the model
/* make the one we just added be selected */
-
+
TreeModel::Children::iterator added = named_selection_model->children().end();
--added;
named_selection_display.get_selection()->select (*added);
diff --git a/gtk2_ardour/editor_snapshots.cc b/gtk2_ardour/editor_snapshots.cc
index 673d5c22a1..80ffdb4491 100644
--- a/gtk2_ardour/editor_snapshots.cc
+++ b/gtk2_ardour/editor_snapshots.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,17 +67,17 @@ EditorSnapshots::selection_changed ()
if (_display.get_selection()->count_selected_rows() > 0) {
TreeModel::iterator i = _display.get_selection()->get_selected();
-
+
Glib::ustring snap_name = (*i)[_columns.real_name];
if (snap_name.length() == 0) {
return;
}
-
+
if (_session->snap_name() == snap_name) {
return;
}
-
+
ARDOUR_UI::instance()->load_session (_session->path(), string (snap_name));
}
}
@@ -138,7 +138,7 @@ EditorSnapshots::rename (Glib::ustring old_name)
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
prompter.set_prompt (_("New name of snapshot"));
prompter.set_initial_text (old_name);
-
+
if (prompter.run() == RESPONSE_ACCEPT) {
prompter.get_result (new_name);
if (new_name.length()) {
@@ -191,18 +191,18 @@ EditorSnapshots::redisplay ()
{
string statename = (*i);
TreeModel::Row row = *(_model->append());
-
+
/* this lingers on in case we ever want to change the visible
name of the snapshot.
*/
-
+
string display_name;
display_name = statename;
if (statename == _session->snap_name()) {
_display.get_selection()->select(row);
- }
-
+ }
+
row[_columns.visible_name] = display_name;
row[_columns.real_name] = statename;
}
diff --git a/gtk2_ardour/editor_snapshots.h b/gtk2_ardour/editor_snapshots.h
index 30cde55b28..1a17e6de30 100644
--- a/gtk2_ardour/editor_snapshots.h
+++ b/gtk2_ardour/editor_snapshots.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,11 +37,11 @@ public:
void redisplay ();
private:
-
+
Gtk::ScrolledWindow _scroller;
-
+
struct Columns : public Gtk::TreeModel::ColumnRecord {
- Columns () {
+ Columns () {
add (visible_name);
add (real_name);
}
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index 762749eeca..6740ef92eb 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,9 +42,9 @@ EditorSummary::EditorSummary (Editor* e)
_move_dragging (false),
_moved (false),
_zoom_dragging (false)
-
+
{
-
+
}
/** Connect to a session.
@@ -80,11 +80,11 @@ EditorSummary::on_expose_event (GdkEventExpose* event)
cairo_t* cr = gdk_cairo_create (get_window()->gobj());
/* Render the view rectangle */
-
+
pair<double, double> x;
pair<double, double> y;
get_editor (&x, &y);
-
+
cairo_move_to (cr, x.first, y.first);
cairo_line_to (cr, x.second, y.first);
cairo_line_to (cr, x.second, y.second);
@@ -109,7 +109,7 @@ EditorSummary::on_expose_event (GdkEventExpose* event)
_last_playhead = p;
cairo_destroy (cr);
-
+
return true;
}
@@ -120,7 +120,7 @@ void
EditorSummary::render (cairo_t* cr)
{
/* background */
-
+
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, 0, 0, _width, _height);
cairo_fill (cr);
@@ -130,7 +130,7 @@ EditorSummary::render (cairo_t* cr)
}
/* compute total height of all tracks */
-
+
int h = 0;
int max_height = 0;
for (PublicEditor::TrackViewList::const_iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
@@ -184,7 +184,7 @@ EditorSummary::render_region (RegionView* r, cairo_t* cr, nframes_t start, doubl
{
uint32_t const c = r->get_fill_color ();
cairo_set_source_rgb (cr, UINT_RGBA_R (c) / 255.0, UINT_RGBA_G (c) / 255.0, UINT_RGBA_B (c) / 255.0);
-
+
cairo_move_to (cr, (r->region()->position() - start) * _x_scale, y);
cairo_line_to (cr, ((r->region()->position() - start + r->region()->length())) * _x_scale, y);
cairo_stroke (cr);
@@ -219,7 +219,7 @@ EditorSummary::centre_on_click (GdkEventButton* ev)
double const w = xr.second - xr.first;
double const h = yr.second - yr.first;
-
+
xr.first = ev->x - w / 2;
xr.second = ev->x + w / 2;
yr.first = ev->y - h / 2;
@@ -259,18 +259,18 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
_start_editor_x = xr;
_start_editor_y = yr;
_start_mouse_x = ev->x;
- _start_mouse_y = ev->y;
-
+ _start_mouse_y = ev->y;
+
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
/* primary-modifier-click: start a zoom drag */
-
+
double const hx = (xr.first + xr.second) * 0.5;
_zoom_left = ev->x < hx;
_zoom_dragging = true;
_editor->_dragging_playhead = true;
-
-
+
+
/* In theory, we could support vertical dragging, which logically
might scale track heights in order to make the editor reflect
the dragged viewbox. However, having tried this:
@@ -278,13 +278,13 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
b) it's quite slow
c) it doesn't seem particularly useful, especially with the
limited height of the summary
-
+
So at the moment we don't support that...
- */
+ */
+
-
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
-
+
/* secondary-modifier-click: locate playhead */
if (_session) {
_session->request_locate (ev->x / _x_scale + _session->current_start_frame());
@@ -293,17 +293,17 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
centre_on_click (ev);
-
+
} else {
-
+
/* ordinary click: start a move drag */
-
+
_move_dragging = true;
_moved = false;
_editor->_dragging_playhead = true;
}
}
-
+
return true;
}
@@ -322,7 +322,7 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
{
pair<double, double> xr = _start_editor_x;
pair<double, double> yr = _start_editor_y;
-
+
if (_move_dragging) {
_moved = true;
@@ -331,7 +331,7 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
xr.second += ev->x - _start_mouse_x;
yr.first += ev->y - _start_mouse_y;
yr.second += ev->y - _start_mouse_y;
-
+
set_editor (xr, yr);
} else if (_zoom_dragging) {
@@ -346,7 +346,7 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
set_editor (xr, yr);
}
-
+
return true;
}
@@ -363,15 +363,15 @@ bool
EditorSummary::on_scroll_event (GdkEventScroll* ev)
{
/* mouse wheel */
-
+
pair<double, double> xr;
pair<double, double> yr;
get_editor (&xr, &yr);
double const amount = 8;
-
+
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
-
+
if (ev->direction == GDK_SCROLL_UP) {
xr.first += amount;
xr.second += amount;
@@ -381,7 +381,7 @@ EditorSummary::on_scroll_event (GdkEventScroll* ev)
}
} else {
-
+
if (ev->direction == GDK_SCROLL_DOWN) {
yr.first += amount;
yr.second += amount;
@@ -389,9 +389,9 @@ EditorSummary::on_scroll_event (GdkEventScroll* ev)
yr.first -= amount;
yr.second -= amount;
}
-
+
}
-
+
set_editor (xr, yr);
return true;
}
@@ -434,4 +434,4 @@ EditorSummary::playhead_position_changed (nframes64_t p)
}
}
-
+
diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h
index 96d20fffa6..9cc4b12e0d 100644
--- a/gtk2_ardour/editor_summary.h
+++ b/gtk2_ardour/editor_summary.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index be7203f2db..e0eba936c8 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
*/
-#include <cstdio> // for sprintf, grrr
+#include <cstdio> // for sprintf, grrr
#include <cstdlib>
#include <cmath>
#include <string>
@@ -65,7 +65,7 @@ Editor::remove_metric_marks ()
delete_when_idle (*x);
}
metric_marks.clear ();
-}
+}
void
Editor::draw_metric_marks (const Metrics& metrics)
@@ -74,21 +74,21 @@ Editor::draw_metric_marks (const Metrics& metrics)
const MeterSection *ms;
const TempoSection *ts;
char buf[64];
-
+
remove_metric_marks ();
-
+
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
-
+
if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
- metric_marks.push_back (new MeterMarker (*this, *meter_group, ARDOUR_UI::config()->canvasvar_MeterMarker.get(), buf,
+ metric_marks.push_back (new MeterMarker (*this, *meter_group, ARDOUR_UI::config()->canvasvar_MeterMarker.get(), buf,
*(const_cast<MeterSection*>(ms))));
} else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
- metric_marks.push_back (new TempoMarker (*this, *tempo_group, ARDOUR_UI::config()->canvasvar_TempoMarker.get(), buf,
+ metric_marks.push_back (new TempoMarker (*this, *tempo_group, ARDOUR_UI::config()->canvasvar_TempoMarker.get(), buf,
*(const_cast<TempoSection*>(ts))));
}
-
+
}
}
@@ -116,7 +116,7 @@ Editor::redisplay_tempo (bool immediate_redraw)
if (!session) {
return;
}
-
+
compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_frames()); // redraw rulers and measures
compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_frames());
@@ -159,7 +159,7 @@ Editor::compute_current_bbt_points (nframes_t leftmost, nframes_t rightmost)
next_beat.beats = 1;
}
next_beat.ticks = 0;
-
+
delete current_bbt_points;
current_bbt_points = 0;
@@ -183,7 +183,7 @@ Editor::redraw_measures ()
void
Editor::draw_measures ()
{
- if (session == 0 || _show_measures == false ||
+ if (session == 0 || _show_measures == false ||
!current_bbt_points || current_bbt_points->empty()) {
return;
}
@@ -204,7 +204,7 @@ Editor::mouse_add_new_tempo_event (nframes64_t frame)
TempoMap& map(session->tempo_map());
TempoDialog tempo_dialog (map, frame, _("add"));
-
+
tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
//this causes compiz to display no border.
//tempo_dialog.signal_realize().connect (bind (sigc::ptr_fun (set_decoration), &tempo_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
@@ -220,20 +220,20 @@ Editor::mouse_add_new_tempo_event (nframes64_t frame)
double bpm = 0;
BBT_Time requested;
-
+
bpm = tempo_dialog.get_bpm ();
double nt = tempo_dialog.get_note_type();
bpm = max (0.01, bpm);
-
+
tempo_dialog.get_bbt_time (requested);
-
+
begin_reversible_command (_("add tempo mark"));
XMLNode &before = map.get_state();
map.add_tempo (Tempo (bpm,nt), requested);
XMLNode &after = map.get_state();
session->add_command(new MementoCommand<TempoMap>(map, &before, &after));
commit_reversible_command ();
-
+
//map.dump (cerr);
}
@@ -250,11 +250,11 @@ Editor::mouse_add_new_meter_event (nframes64_t frame)
meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
- //this causes compiz to display no border..
+ //this causes compiz to display no border..
//meter_dialog.signal_realize().connect (bind (sigc::ptr_fun (set_decoration), &meter_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
ensure_float (meter_dialog);
-
+
switch (meter_dialog.run ()) {
case RESPONSE_ACCEPT:
break;
@@ -264,7 +264,7 @@ Editor::mouse_add_new_meter_event (nframes64_t frame)
double bpb = meter_dialog.get_bpb ();
bpb = max (1.0, bpb); // XXX is this a reasonable limit?
-
+
double note_type = meter_dialog.get_note_type ();
BBT_Time requested;
@@ -275,7 +275,7 @@ Editor::mouse_add_new_meter_event (nframes64_t frame)
map.add_meter (Meter (bpb, note_type), requested);
session->add_command(new MementoCommand<TempoMap>(map, &before, &map.get_state()));
commit_reversible_command ();
-
+
//map.dump (cerr);
}
@@ -293,7 +293,7 @@ Editor::remove_tempo_marker (ArdourCanvas::Item* item)
if ((tempo_marker = dynamic_cast<TempoMarker*> (marker)) == 0) {
fatal << _("programming error: marker for tempo is not a tempo marker!") << endmsg;
/*NOTREACHED*/
- }
+ }
if (tempo_marker->tempo().movable()) {
Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::real_remove_tempo_marker), &tempo_marker->tempo()));
@@ -318,7 +318,7 @@ Editor::edit_meter_section (MeterSection* section)
double bpb = meter_dialog.get_bpb ();
bpb = max (1.0, bpb); // XXX is this a reasonable limit?
-
+
double note_type = meter_dialog.get_note_type ();
begin_reversible_command (_("replace tempo mark"));
@@ -378,7 +378,7 @@ Editor::edit_tempo_marker (ArdourCanvas::Item *item)
if ((tempo_marker = dynamic_cast<TempoMarker*> (marker)) == 0) {
fatal << _("programming error: marker for tempo is not a tempo marker!") << endmsg;
/*NOTREACHED*/
- }
+ }
edit_tempo_section (&tempo_marker->tempo());
}
@@ -397,8 +397,8 @@ Editor::edit_meter_marker (ArdourCanvas::Item *item)
if ((meter_marker = dynamic_cast<MeterMarker*> (marker)) == 0) {
fatal << _("programming error: marker for meter is not a meter marker!") << endmsg;
/*NOTREACHED*/
- }
-
+ }
+
edit_meter_section (&meter_marker->meter());
}
@@ -429,7 +429,7 @@ Editor::remove_meter_marker (ArdourCanvas::Item* item)
if ((meter_marker = dynamic_cast<MeterMarker*> (marker)) == 0) {
fatal << _("programming error: marker for meter is not a meter marker!") << endmsg;
/*NOTREACHED*/
- }
+ }
if (meter_marker->meter().movable()) {
Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::real_remove_meter_marker), &meter_marker->meter()));
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 4339962a87..25d0286d0a 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -64,7 +64,7 @@ int
Editor::time_stretch (RegionSelection& regions, float fraction)
{
// FIXME: kludge, implement stretching of selection of both types
-
+
if (regions.front()->region()->data_type() == DataType::AUDIO) {
// Audio, pop up timefx dialog
return time_fx (regions, fraction, false);
@@ -73,7 +73,7 @@ Editor::time_stretch (RegionSelection& regions, float fraction)
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&regions.front()->get_time_axis_view());
if (!rtv)
return -1;
-
+
boost::shared_ptr<Playlist> playlist
= rtv->track()->diskstream()->playlist();
@@ -135,12 +135,12 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
// one octave == 1200 cents
// adding one octave doubles the frequency
// ratio is 2^^octaves
-
+
pitch_fraction = pow(2, cents/1200);
current_timefx->request.time_fraction = 1.0;
current_timefx->request.pitch_fraction = pitch_fraction;
-
+
} else {
current_timefx->request.time_fraction = val;
@@ -166,26 +166,26 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
BandLimitedTransients,
Transients
} transients = Transients;
-
+
precise = current_timefx->precise_button.get_active();
preserve_formants = current_timefx->preserve_formants_button.get_active();
-
+
txt = current_timefx->stretch_opts_selector.get_active_text ();
if (txt == rb_opt_strings[0]) {
- transients = NoTransients; peaklock = false; longwin = true; shortwin = false;
+ transients = NoTransients; peaklock = false; longwin = true; shortwin = false;
} else if (txt == rb_opt_strings[1]) {
- transients = NoTransients; peaklock = false; longwin = false; shortwin = false;
+ transients = NoTransients; peaklock = false; longwin = false; shortwin = false;
} else if (txt == rb_opt_strings[2]) {
- transients = NoTransients; peaklock = true; longwin = false; shortwin = false;
+ transients = NoTransients; peaklock = true; longwin = false; shortwin = false;
} else if (txt == rb_opt_strings[3]) {
- transients = BandLimitedTransients; peaklock = true; longwin = false; shortwin = false;
+ transients = BandLimitedTransients; peaklock = true; longwin = false; shortwin = false;
} else if (txt == rb_opt_strings[5]) {
- transients = Transients; peaklock = false; longwin = false; shortwin = true;
+ transients = Transients; peaklock = false; longwin = false; shortwin = true;
} else {
/* default/4 */
- transients = Transients; peaklock = true; longwin = false; shortwin = false;
+ transients = Transients; peaklock = true; longwin = false; shortwin = false;
}
if (realtime) options |= RubberBandStretcher::OptionProcessRealTime;
@@ -194,7 +194,7 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
if (!peaklock) options |= RubberBandStretcher::OptionPhaseIndependent;
if (longwin) options |= RubberBandStretcher::OptionWindowLong;
if (shortwin) options |= RubberBandStretcher::OptionWindowShort;
-
+
switch (transients) {
case NoTransients:
options |= RubberBandStretcher::OptionTransientsSmooth;
@@ -215,15 +215,15 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
current_timefx->request.progress = 0.0f;
current_timefx->request.done = false;
current_timefx->request.cancel = false;
-
+
/* re-connect the cancel button and delete events */
-
+
current_timefx->first_cancel.disconnect();
current_timefx->first_delete.disconnect();
-
- current_timefx->first_cancel = current_timefx->cancel_button->signal_clicked().connect
+
+ current_timefx->first_cancel = current_timefx->cancel_button->signal_clicked().connect
(mem_fun (current_timefx, &TimeFXDialog::cancel_in_progress));
- current_timefx->first_delete = current_timefx->signal_delete_event().connect
+ current_timefx->first_delete = current_timefx->signal_delete_event().connect
(mem_fun (current_timefx, &TimeFXDialog::delete_in_progress));
if (pthread_create_and_store ("timefx", &current_timefx->request.thread, 0, timefx_thread, current_timefx)) {
@@ -241,7 +241,7 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
}
c.disconnect ();
-
+
current_timefx->hide ();
return current_timefx->status;
}
@@ -253,7 +253,7 @@ Editor::do_timefx (TimeFXDialog& dialog)
boost::shared_ptr<Playlist> playlist;
boost::shared_ptr<Region> new_region;
bool in_command = false;
-
+
for (RegionSelection::iterator i = dialog.regions.begin(); i != dialog.regions.end(); ) {
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*i);
@@ -265,7 +265,7 @@ Editor::do_timefx (TimeFXDialog& dialog)
TimeAxisView* tv = &(arv->get_time_axis_view());
RouteTimeAxisView* rtv;
RegionSelection::iterator tmp;
-
+
tmp = i;
++tmp;
@@ -278,7 +278,7 @@ Editor::do_timefx (TimeFXDialog& dialog)
i = tmp;
continue;
}
-
+
if ((playlist = t->diskstream()->playlist()) == 0) {
i = tmp;
continue;
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index 51cbdda398..3dbc5b5eea 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -65,7 +65,7 @@ EngineControl::EngineControl ()
basic_packer (8, 2),
options_packer (14, 2),
device_packer (6, 2)
-#endif
+#endif
{
using namespace Notebook_Helpers;
Label* label;
@@ -245,7 +245,7 @@ EngineControl::EngineControl ()
++row;
options_packer.attach (verbose_output_button, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
++row;
-#else
+#else
options_packer.attach (verbose_output_button, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
++row;
#endif
@@ -273,7 +273,7 @@ EngineControl::EngineControl ()
++row;
#ifndef __APPLE__
- label = manage (new Label (_("Dither")));
+ label = manage (new Label (_("Dither")));
label->set_alignment (1.0, 0.5);
options_packer.attach (dither_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, AttachOptions(0));
options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
@@ -286,7 +286,7 @@ EngineControl::EngineControl ()
fatal << _("No JACK server found anywhere on this system. Please install JACK and restart") << endmsg;
/*NOTREACHED*/
}
-
+
set_popdown_strings (serverpath_combo, server_strings);
serverpath_combo.set_active_text (server_strings.front());
@@ -312,7 +312,7 @@ EngineControl::EngineControl ()
label = manage (new Label (_("Output device")));
label->set_alignment (1.0, 0.5);
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
- device_packer.attach (output_device_combo, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
+ device_packer.attach (output_device_combo, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
++row;
#endif
label = manage (new Label (_("Input channels")));
@@ -372,7 +372,7 @@ EngineControl::build_command_line (vector<string>& cmd)
/* first, path to jackd */
cmd.push_back (serverpath_combo.get_active_text ());
-
+
/* now jackd arguments */
str = timeout_combo.get_active_text ();
@@ -390,7 +390,7 @@ EngineControl::build_command_line (vector<string>& cmd)
if (no_memory_lock_button.get_active()) {
cmd.push_back ("-m"); /* no munlock */
}
-
+
cmd.push_back ("-p"); /* port max */
cmd.push_back (to_string ((uint32_t) floor (ports_spinner.get_value()), std::dec));
@@ -407,7 +407,7 @@ EngineControl::build_command_line (vector<string>& cmd)
if (verbose_output_button.get_active()) {
cmd.push_back ("-v");
}
-
+
/* now add fixed arguments (not user-selectable) */
cmd.push_back ("-T"); // temporary */
@@ -451,13 +451,13 @@ EngineControl::build_command_line (vector<string>& cmd)
if (!using_coreaudio) {
str = audio_mode_combo.get_active_text();
-
+
if (str == _("Playback/Recording on 1 Device")) {
-
+
/* relax */
-
+
} else if (str == _("Playback/Recording on 2 Devices")) {
-
+
string input_device = get_device_name (driver, input_device_combo.get_active_text());
string output_device = get_device_name (driver, output_device_combo.get_active_text());
@@ -485,12 +485,12 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-r");
cmd.push_back (to_string (get_rate(), std::dec));
-
+
cmd.push_back ("-p");
cmd.push_back (period_size_combo.get_active_text());
if (using_alsa) {
-
+
if (audio_mode_combo.get_active_text() != _("Playback/Recording on 2 Devices")) {
string device = get_device_name (driver, interface_combo.get_active_text());
@@ -501,12 +501,12 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-d");
cmd.push_back (device);
- }
+ }
if (hw_meter_button.get_active()) {
cmd.push_back ("-M");
}
-
+
if (hw_monitor_button.get_active()) {
cmd.push_back ("-H");
}
@@ -525,7 +525,7 @@ EngineControl::build_command_line (vector<string>& cmd)
if (force16bit_button.get_active()) {
cmd.push_back ("-S");
}
-
+
if (soft_mode_button.get_active()) {
cmd.push_back ("-s");
}
@@ -534,7 +534,7 @@ EngineControl::build_command_line (vector<string>& cmd)
#ifdef __APPLE__
// note: older versions of the CoreAudio JACK backend use -n instead of -d here
-
+
string device = get_device_name (driver, interface_combo.get_active_text());
if (device.empty()) {
cmd.clear ();
@@ -572,7 +572,7 @@ EngineControl::setup_engine ()
std::string cwd = "/tmp";
build_command_line (args);
-
+
if (args.empty()) {
return 1; // try again
}
@@ -613,7 +613,7 @@ EngineControl::enumerate_devices (const string& driver)
/* note: case matters for the map keys */
if (driver == "CoreAudio") {
-#ifdef __APPLE__
+#ifdef __APPLE__
devices[driver] = enumerate_coreaudio_devices ();
#endif
@@ -635,14 +635,14 @@ EngineControl::enumerate_devices (const string& driver)
}
#ifdef __APPLE__
-static OSStatus
+static OSStatus
getDeviceUIDFromID( AudioDeviceID id, char *name, size_t nsize)
{
UInt32 size = sizeof(CFStringRef);
CFStringRef UI;
OSStatus res = AudioDeviceGetProperty(id, 0, false,
kAudioDevicePropertyDeviceUID, &size, &UI);
- if (res == noErr)
+ if (res == noErr)
CFStringGetCString(UI,name,nsize,CFStringGetSystemEncoding());
CFRelease(UI);
return res;
@@ -652,7 +652,7 @@ vector<string>
EngineControl::enumerate_coreaudio_devices ()
{
vector<string> devs;
-
+
// Find out how many Core Audio devices are there, if any...
// (code snippet gently "borrowed" from St?hane Letz jackdmp;)
OSStatus err;
@@ -709,11 +709,11 @@ EngineControl::enumerate_coreaudio_devices ()
// this returns the unique id for the device
// that must be used on the commandline for jack
-
+
if (getDeviceUIDFromID(coreDeviceIDs[i], drivername, sizeof (drivername)) == noErr) {
devs.push_back (coreDeviceName);
backend_devs.push_back (drivername);
- }
+ }
}
}
}
@@ -734,7 +734,7 @@ have no duplex audio device.\n\n\
Alternatively, if you really want just playback\n\
or recording but not both, start JACK before running\n\
Ardour and choose the relevant device then."
- ),
+ ),
true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK);
msg.set_title (_("No suitable audio devices"));
msg.set_position (Gtk::WIN_POS_MOUSE);
@@ -857,7 +857,7 @@ EngineControl::driver_changed ()
error << string_compose (_("No devices found for driver \"%1\""), driver) << endmsg;
return;
}
-
+
for (vector<string>::iterator i = strings.begin(); i != strings.end(); ++i, ++n) {
if ((*i).length() > maxlen) {
maxlen = (*i).length();
@@ -873,8 +873,8 @@ EngineControl::driver_changed ()
interface_combo.set_active_text (strings.front());
input_device_combo.set_active_text (strings.front());
output_device_combo.set_active_text (strings.front());
- }
-
+ }
+
if (driver == "ALSA") {
soft_mode_button.set_sensitive (true);
force16bit_button.set_sensitive (true);
@@ -943,18 +943,18 @@ EngineControl::find_jack_servers (vector<string>& strings)
/* this magic lets us finds the path to the OSX bundle, and then
we infer JACK's location from there
*/
-
+
char execpath[MAXPATHLEN+1];
uint32_t pathsz = sizeof (execpath);
_NSGetExecutablePath (execpath, &pathsz);
-
+
string path (Glib::path_get_dirname (execpath));
path += "/jackd";
if (Glib::file_test (path, FILE_TEST_EXISTS)) {
strings.push_back (path);
- }
+ }
if (getenv ("ARDOUR_WITH_JACK")) {
/* no other options - only use the JACK we supply */
@@ -967,7 +967,7 @@ EngineControl::find_jack_servers (vector<string>& strings)
#else
string path;
#endif
-
+
PathScanner scanner;
vector<string *> *jack_servers;
std::map<string,int> un;
@@ -1003,12 +1003,12 @@ EngineControl::find_jack_servers (vector<string>& strings)
#endif
jack_servers = scanner (path, jack_server_filter, 0, false, true);
-
+
vector<string *>::iterator iter;
-
+
for (iter = jack_servers->begin(); iter != jack_servers->end(); iter++) {
string p = **iter;
-
+
if (un[p]++ == 0) {
strings.push_back(p);
}
@@ -1034,13 +1034,13 @@ EngineControl::get_device_name (const string& driver, const string& human_readab
if (backend_devs.empty()) {
return human_readable;
}
-
+
for (i = devices[driver].begin(), n = backend_devs.begin(); i != devices[driver].end(); ++i, ++n) {
if (human_readable == (*i)) {
return (*n);
}
}
-
+
if (i == devices[driver].end()) {
warning << string_compose (_("Audio device \"%1\" not known on this computer."), human_readable) << endmsg;
}
@@ -1154,7 +1154,7 @@ EngineControl::get_state ()
child = new XMLNode ("outputdevice");
child->add_property ("val", output_device_combo.get_active_text());
root->add_child_nocopy (*child);
-
+
return *root;
}
@@ -1166,17 +1166,17 @@ EngineControl::set_state (const XMLNode& root)
XMLNode* child;
XMLProperty* prop = NULL;
bool using_dummy = false;
-
+
int val;
string strval;
-
+
if ( (child = root.child ("driver"))){
prop = child->property("val");
if (prop && (prop->value() == "Dummy") ) {
using_dummy = true;
}
}
-
+
clist = root.children();
for (citer = clist.begin(); citer != clist.end(); ++citer) {
@@ -1193,7 +1193,7 @@ EngineControl::set_state (const XMLNode& root)
error << string_compose (_("AudioSetup value for %1 is missing data"), child->name()) << endmsg;
continue;
}
-
+
strval = prop->value();
/* adjustments/spinners */
diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h
index a6ebf1e8e6..c806e088cc 100644
--- a/gtk2_ardour/engine_dialog.h
+++ b/gtk2_ardour/engine_dialog.h
@@ -49,7 +49,7 @@ class EngineControl : public Gtk::VBox {
Gtk::CheckButton hw_monitor_button;
Gtk::CheckButton hw_meter_button;
Gtk::CheckButton verbose_output_button;
-
+
Gtk::Button start_button;
Gtk::Button stop_button;
Gtk::HButtonBox button_box;
@@ -74,7 +74,7 @@ class EngineControl : public Gtk::VBox {
Gtk::HBox options_hbox;
Gtk::HBox device_hbox;
Gtk::Notebook notebook;
-
+
bool _used;
void realtime_changed ();
@@ -94,7 +94,7 @@ class EngineControl : public Gtk::VBox {
std::vector<std::string> enumerate_freebob_devices ();
std::vector<std::string> enumerate_ffado_devices ();
std::vector<std::string> enumerate_dummy_devices ();
-#endif
+#endif
void redisplay_latency ();
uint32_t get_rate();
diff --git a/gtk2_ardour/enums.cc b/gtk2_ardour/enums.cc
index cc8b80554d..bec134a73c 100644
--- a/gtk2_ardour/enums.cc
+++ b/gtk2_ardour/enums.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/enums.h b/gtk2_ardour/enums.h
index 00b7a6e56c..62fe7eeace 100644
--- a/gtk2_ardour/enums.h
+++ b/gtk2_ardour/enums.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/evtest.cc b/gtk2_ardour/evtest.cc
index db8d502e70..cdf9f028d4 100644
--- a/gtk2_ardour/evtest.cc
+++ b/gtk2_ardour/evtest.cc
@@ -11,18 +11,18 @@ print_event (GdkEvent* event)
switch (event->type) {
case GDK_BUTTON_PRESS:
- cerr << "Button press, button = "
+ cerr << "Button press, button = "
<< event->button.button
<< " state "
- << event->button.state
+ << event->button.state
<< endl;
break;
case GDK_BUTTON_RELEASE:
- cerr << "Button release, button = "
+ cerr << "Button release, button = "
<< event->button.button
<< " state "
- << event->button.state
+ << event->button.state
<< endl;
break;
@@ -37,7 +37,7 @@ print_event (GdkEvent* event)
case GDK_KEY_PRESS:
cerr << "Key press, keycode = "
<< event->key.keyval
- << " name "
+ << " name "
<< gdk_keyval_name (event->key.keyval)
<< " state = "
<< event->key.state
@@ -51,7 +51,7 @@ print_event (GdkEvent* event)
case GDK_KEY_RELEASE:
cerr << "Key release, keycode = "
<< event->key.keyval
- << " name "
+ << " name "
<< gdk_keyval_name (event->key.keyval)
<< " state = "
<< event->key.state
@@ -77,7 +77,7 @@ main (int argc, char* argv[])
Gtk::Main app (&argc, &argv);
Gtk::Window window;
Gtk::EventBox eventbox;
-
+
window.add (eventbox);
window.set_size_request (250, 250);
diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc
index 7b665a6087..c0205fa201 100644
--- a/gtk2_ardour/export_channel_selector.cc
+++ b/gtk2_ardour/export_channel_selector.cc
@@ -51,38 +51,38 @@ PortExportChannelSelector::PortExportChannelSelector (ARDOUR::Session * session,
{
channels_hbox.pack_start (channels_label, false, false, 0);
channels_hbox.pack_end (channels_spinbutton, false, false, 0);
-
+
channels_vbox.pack_start (channels_hbox, false, false, 0);
channels_vbox.pack_start (split_checkbox, false, false, 6);
-
+
channel_alignment.add (channel_scroller);
channel_alignment.set_padding (0, 0, 12, 0);
channel_scroller.add (channel_view);
channel_scroller.set_size_request (-1, 130);
channel_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
-
+
pack_start (channels_vbox, false, false, 0);
pack_start (channel_alignment, true, true, 0);
-
+
/* Channels spinbutton */
-
+
channels_spinbutton.set_digits (0);
channels_spinbutton.set_increments (1, 2);
channels_spinbutton.set_range (1, max_channels);
channels_spinbutton.set_value (2);
-
+
channels_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &PortExportChannelSelector::update_channel_count));
-
+
/* Other signals */
-
+
split_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &PortExportChannelSelector::update_split_state));
channel_view.CriticalSelectionChanged.connect (CriticalSelectionChanged.make_slot());
-
+
/* Finalize */
-
+
sync_with_manager();
show_all_children ();
-
+
}
PortExportChannelSelector::~PortExportChannelSelector ()
@@ -96,10 +96,10 @@ void
PortExportChannelSelector::sync_with_manager ()
{
state = manager->get_channel_configs().front();
-
+
split_checkbox.set_active (state->config->get_split());
channels_spinbutton.set_value (state->config->get_n_chans());
-
+
fill_route_list ();
channel_view.set_config (state->config);
}
@@ -111,17 +111,17 @@ PortExportChannelSelector::fill_route_list ()
RouteList routes = *session->get_routes();
/* Add master bus and then everything else */
-
+
ARDOUR::IO* master = session->master_out()->output().get();
channel_view.add_route (master);
-
+
for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
if ((*it)->output().get() == master) {
continue;
}
channel_view.add_route ((*it)->output().get());
}
-
+
update_channel_count ();
}
@@ -158,12 +158,12 @@ PortExportChannelSelector::RouteCols::get_channel (uint32_t channel)
}
std::list<Channel>::iterator it = channels.begin();
-
+
while (channel > 1) { // Channel count starts from one!
++it;
--channel;
}
-
+
return *it;
}
@@ -171,26 +171,26 @@ PortExportChannelSelector::ChannelTreeView::ChannelTreeView (uint32_t max_channe
n_channels (0)
{
/* Main columns */
-
+
route_cols.add_channels (max_channels);
-
+
route_list = Gtk::ListStore::create(route_cols);
set_model (route_list);
-
+
/* Add column with toggle and text */
-
+
append_column_editable (_("Bus or Track"), route_cols.selected);
-
+
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
text_renderer->property_editable() = false;
-
+
Gtk::TreeView::Column* column = get_column (0);
column->pack_start (*text_renderer);
column->add_attribute (text_renderer->property_text(), route_cols.name);
-
+
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(get_column_cell_renderer (0));
toggle->signal_toggled().connect (mem_fun (*this, &PortExportChannelSelector::ChannelTreeView::update_toggle_selection));
-
+
static_columns = get_columns().size();
}
@@ -208,54 +208,54 @@ PortExportChannelSelector::ChannelTreeView::set_config (ChannelConfigPtr c)
uint32_t i = 1;
ExportChannelConfiguration::ChannelList chan_list = config->get_channels();
for (ExportChannelConfiguration::ChannelList::iterator c_it = chan_list.begin(); c_it != chan_list.end(); ++c_it) {
-
+
for (Gtk::ListStore::Children::iterator r_it = route_list->children().begin(); r_it != route_list->children().end(); ++r_it) {
-
+
ARDOUR::PortExportChannel * pec;
if (!(pec = dynamic_cast<ARDOUR::PortExportChannel *> (c_it->get()))) {
continue;
}
-
+
Glib::RefPtr<Gtk::ListStore> port_list = r_it->get_value (route_cols.port_list_col);
std::set<AudioPort *> route_ports;
std::set<AudioPort *> intersection;
std::map<AudioPort *, ustring> port_labels;
-
+
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 (std::pair<AudioPort*, ustring> ((*p_it)->get_value (route_cols.port_cols.port),
(*p_it)->get_value (route_cols.port_cols.label)));
}
-
+
std::set_intersection (pec->get_ports().begin(), pec->get_ports().end(),
route_ports.begin(), route_ports.end(),
std::insert_iterator<std::set<AudioPort *> > (intersection, intersection.begin()));
-
+
intersection.erase (0); // Remove "none" selection
-
+
if (intersection.empty()) {
continue;
}
-
+
if (!r_it->get_value (route_cols.selected)) {
r_it->set_value (route_cols.selected, true);
-
+
/* Set previous channels (if any) to none */
-
+
for (uint32_t chn = 1; chn < i; ++chn) {
r_it->set_value (route_cols.get_channel (chn).port, (AudioPort *) 0);
r_it->set_value (route_cols.get_channel (chn).label, ustring ("(none)"));
}
}
-
+
AudioPort * port = *intersection.begin();
std::map<AudioPort *, ustring>::iterator label_it = port_labels.find (port);
ustring label = label_it != port_labels.end() ? label_it->second : "error";
-
+
r_it->set_value (route_cols.get_channel (i).port, port);
r_it->set_value (route_cols.get_channel (i).label, label);
}
-
+
++i;
}
}
@@ -269,85 +269,85 @@ PortExportChannelSelector::ChannelTreeView::add_route (ARDOUR::IO * io)
row[route_cols.selected] = false;
row[route_cols.name] = io->name();
row[route_cols.io] = io;
-
+
/* Initialize port list */
-
+
Glib::RefPtr<Gtk::ListStore> port_list = Gtk::ListStore::create (route_cols.port_cols);
row[route_cols.port_list_col] = port_list;
-
+
uint32_t outs = io->n_ports().n_audio();
for (uint32_t i = 0; i < outs; ++i) {
iter = port_list->append();
row = *iter;
-
+
row[route_cols.port_cols.selected] = false;
row[route_cols.port_cols.port] = io->audio (i);
-
+
std::ostringstream oss;
oss << "Out-" << (i + 1);
-
+
row[route_cols.port_cols.label] = oss.str();
}
-
+
iter = port_list->append();
row = *iter;
-
+
row[route_cols.port_cols.selected] = false;
row[route_cols.port_cols.port] = 0;
row[route_cols.port_cols.label] = "(none)";
-
+
}
void
PortExportChannelSelector::ChannelTreeView::set_channel_count (uint32_t channels)
{
int offset = channels - n_channels;
-
+
while (offset > 0) {
++n_channels;
-
+
std::ostringstream oss;
oss << n_channels;
-
+
/* New column */
-
- Gtk::TreeView::Column* column = Gtk::manage (new Gtk::TreeView::Column (oss.str()));
-
+
+ Gtk::TreeView::Column* column = Gtk::manage (new Gtk::TreeView::Column (oss.str()));
+
Gtk::CellRendererCombo* combo_renderer = Gtk::manage (new Gtk::CellRendererCombo);
- combo_renderer->property_text_column() = 2;
+ combo_renderer->property_text_column() = 2;
column->pack_start (*combo_renderer);
-
+
append_column (*column);
-
+
column->add_attribute (combo_renderer->property_text(), route_cols.get_channel(n_channels).label);
column->add_attribute (combo_renderer->property_model(), route_cols.port_list_col);
column->add_attribute (combo_renderer->property_editable(), route_cols.selected);
-
+
combo_renderer->signal_edited().connect (sigc::bind (sigc::mem_fun (*this, &PortExportChannelSelector::ChannelTreeView::update_selection_text), n_channels));
-
+
/* put data into view */
-
+
for (Gtk::ListStore::Children::iterator it = route_list->children().begin(); it != route_list->children().end(); ++it) {
Glib::ustring label = it->get_value(route_cols.selected) ? "(none)" : "";
it->set_value (route_cols.get_channel (n_channels).label, label);
it->set_value (route_cols.get_channel (n_channels).port, (AudioPort *) 0);
}
-
+
/* set column width */
-
+
get_column (static_columns + n_channels - 1)->set_min_width (80);
-
+
--offset;
}
-
+
while (offset < 0) {
--n_channels;
-
+
remove_column (*get_column (n_channels + static_columns));
-
+
++offset;
}
-
+
update_config ();
}
@@ -360,26 +360,26 @@ PortExportChannelSelector::ChannelTreeView::update_config ()
config->clear_channels();
for (uint32_t i = 1; i <= n_channels; ++i) {
-
+
ExportChannelPtr channel (new PortExportChannel ());
PortExportChannel * pec = static_cast<PortExportChannel *> (channel.get());
-
+
for (Gtk::ListStore::Children::iterator it = route_list->children().begin(); it != route_list->children().end(); ++it) {
Gtk::TreeModel::Row row = *it;
-
+
if (!row[route_cols.selected]) {
continue;
}
-
+
AudioPort * port = row[route_cols.get_channel (i).port];
if (port) {
pec->add_port (port);
}
}
-
+
config->register_channel (channel);
}
-
+
CriticalSelectionChanged ();
}
@@ -388,31 +388,31 @@ PortExportChannelSelector::ChannelTreeView::update_toggle_selection (Glib::ustri
{
Gtk::TreeModel::iterator iter = get_model ()->get_iter (path);
bool selected = iter->get_value (route_cols.selected);
-
+
for (uint32_t i = 1; i <= n_channels; ++i) {
-
+
if (!selected) {
iter->set_value (route_cols.get_channel (i).label, Glib::ustring (""));
continue;
}
-
+
iter->set_value (route_cols.get_channel (i).label, Glib::ustring("(none)"));
iter->set_value (route_cols.get_channel (i).port, (AudioPort *) 0);
-
+
Glib::RefPtr<Gtk::ListStore> port_list = iter->get_value (route_cols.port_list_col);
Gtk::ListStore::Children::iterator port_it;
uint32_t port_number = 1;
-
+
for (port_it = port_list->children().begin(); port_it != port_list->children().end(); ++port_it) {
if (port_number == i) {
iter->set_value (route_cols.get_channel (i).label, (Glib::ustring) (*port_it)->get_value (route_cols.port_cols.label));
iter->set_value (route_cols.get_channel (i).port, (AudioPort *) (*port_it)->get_value (route_cols.port_cols.port));
}
-
+
++port_number;
}
}
-
+
update_config ();
}
@@ -421,17 +421,17 @@ PortExportChannelSelector::ChannelTreeView::update_selection_text (Glib::ustring
{
Gtk::TreeModel::iterator iter = get_model ()->get_iter (path);
iter->set_value (route_cols.get_channel (channel).label, new_text);
-
+
Glib::RefPtr<Gtk::ListStore> port_list = iter->get_value (route_cols.port_list_col);
Gtk::ListStore::Children::iterator port_it;
-
+
for (port_it = port_list->children().begin(); port_it != port_list->children().end(); ++port_it) {
Glib::ustring label = port_it->get_value (route_cols.port_cols.label);
if (label == new_text) {
iter->set_value (route_cols.get_channel (channel).port, (AudioPort *) (*port_it)[route_cols.port_cols.port]);
}
}
-
+
update_config ();
}
@@ -454,15 +454,15 @@ RegionExportChannelSelector::RegionExportChannelSelector (ARDOUR::Session * sess
raw_button.set_label (string_compose (_("Region contents without fades (channels: %1)"), region_chans));
raw_button.signal_toggled ().connect (sigc::mem_fun (*this, &RegionExportChannelSelector::handle_selection));
vbox.pack_start (raw_button);
-
+
fades_button.set_label (string_compose (_("Region contents with fades (channels: %1)"), region_chans));
fades_button.signal_toggled ().connect (sigc::mem_fun (*this, &RegionExportChannelSelector::handle_selection));
vbox.pack_start (fades_button);
-
+
processed_button.set_label (string_compose (_("Track output (channels: %1)"), track_chans));
processed_button.signal_toggled ().connect (sigc::mem_fun (*this, &RegionExportChannelSelector::handle_selection));
vbox.pack_start (processed_button);
-
+
sync_with_manager();
vbox.show_all_children ();
show_all_children ();
@@ -483,7 +483,7 @@ RegionExportChannelSelector::handle_selection ()
}
state->config->clear_channels ();
-
+
if (raw_button.get_active ()) {
factory.reset (new RegionExportChannelFactory (session, region, track, RegionExportChannelFactory::Raw));
} else if (fades_button.get_active ()) {
@@ -494,10 +494,10 @@ RegionExportChannelSelector::handle_selection ()
CriticalSelectionChanged ();
return;
}
-
+
for (size_t chan = 0; chan < region_chans; ++chan) {
state->config->register_channel (factory->create (chan));
}
-
+
CriticalSelectionChanged ();
}
diff --git a/gtk2_ardour/export_channel_selector.h b/gtk2_ardour/export_channel_selector.h
index 14b614d5a9..56ce5c9501 100644
--- a/gtk2_ardour/export_channel_selector.h
+++ b/gtk2_ardour/export_channel_selector.h
@@ -48,7 +48,7 @@ class ExportChannelSelector : public Gtk::HBox
protected:
typedef boost::shared_ptr<ARDOUR::ExportChannelConfiguration> ChannelConfigPtr;
typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ProfileManagerPtr;
-
+
ARDOUR::Session * session;
ProfileManagerPtr manager;
@@ -59,9 +59,9 @@ class ExportChannelSelector : public Gtk::HBox
{}
virtual ~ExportChannelSelector () {}
-
+
virtual void sync_with_manager () = 0;
-
+
sigc::signal<void> CriticalSelectionChanged;
};
@@ -72,7 +72,7 @@ class PortExportChannelSelector : public ExportChannelSelector
PortExportChannelSelector (ARDOUR::Session * session, ProfileManagerPtr manager);
~PortExportChannelSelector ();
-
+
void sync_with_manager ();
private:
@@ -93,101 +93,101 @@ class PortExportChannelSelector : public ExportChannelSelector
Gtk::Label channels_label;
Gtk::SpinButton channels_spinbutton;
Gtk::CheckButton split_checkbox;
-
+
/* Column record for channel selector view */
-
+
class RouteCols : public Gtk::TreeModelColumnRecord
{
public:
-
+
struct Channel;
-
+
RouteCols () : n_channels (0)
{ add (selected); add (name); add (io); add (port_list_col); }
-
+
void add_channels (uint32_t chans);
uint32_t n_channels;
-
+
/* Channel count starts from one! */
-
+
Channel & get_channel (uint32_t channel);
-
+
/* Static columns */
-
+
Gtk::TreeModelColumn<bool> selected;
Gtk::TreeModelColumn<Glib::ustring> name;
Gtk::TreeModelColumn<ARDOUR::IO *> io;
-
+
/* Combo list column (shared by all channels) */
-
+
typedef Gtk::TreeModelColumn<Glib::RefPtr<Gtk::ListStore> > ComboCol;
ComboCol port_list_col;
-
+
/* Channel struct, that represents the selected port and it's name */
-
+
struct Channel {
public:
Channel (RouteCols & cols) { cols.add (port); cols.add (label); }
-
+
Gtk::TreeModelColumn<ARDOUR::AudioPort *> port;
Gtk::TreeModelColumn<Glib::ustring> label;
};
std::list<Channel> channels;
-
+
/* List of available ports
* Note: We need only one list of selectable ports per route,
* so the list is kept in the column record
*/
-
+
/* Column record for selecting ports for a channel from a route */
-
+
class PortCols : public Gtk::TreeModel::ColumnRecord
{
public:
PortCols () { add (selected); add(port); add(label); }
-
+
Gtk::TreeModelColumn<bool> selected; // not used ATM
Gtk::TreeModelColumn<ARDOUR::AudioPort *> port;
Gtk::TreeModelColumn<Glib::ustring> label;
};
PortCols port_cols;
};
-
+
/* Channels view */
-
+
class ChannelTreeView : public Gtk::TreeView {
public:
-
+
ChannelTreeView (uint32_t max_channels);
void set_config (ChannelConfigPtr c);
-
+
/* Routes have to be added before adding channels */
-
+
void clear_routes () { route_list->clear (); }
void add_route (ARDOUR::IO * route);
void set_channel_count (uint32_t channels);
-
+
sigc::signal<void> CriticalSelectionChanged;
-
+
private:
-
+
ChannelConfigPtr config;
void update_config ();
-
+
/* Signal handlers for selections changes in the view */
-
+
void update_toggle_selection (Glib::ustring const & path);
void update_selection_text (Glib::ustring const & path, Glib::ustring const & new_text, uint32_t channel);
-
+
RouteCols route_cols;
Glib::RefPtr<Gtk::ListStore> route_list;
-
+
uint32_t static_columns;
uint32_t n_channels;
};
-
+
uint32_t max_channels;
-
+
Gtk::ScrolledWindow channel_scroller;
Gtk::Alignment channel_alignment;
ChannelTreeView channel_view;
@@ -201,7 +201,7 @@ class RegionExportChannelSelector : public ExportChannelSelector
ProfileManagerPtr manager,
ARDOUR::AudioRegion const & region,
ARDOUR::AudioTrack & track);
-
+
virtual void sync_with_manager ();
private:
@@ -212,14 +212,14 @@ class RegionExportChannelSelector : public ExportChannelSelector
boost::shared_ptr<ARDOUR::RegionExportChannelFactory> factory;
ARDOUR::AudioRegion const & region;
ARDOUR::AudioTrack & track;
-
+
uint32_t region_chans;
uint32_t track_chans;
-
+
/*** GUI components ***/
-
+
Gtk::VBox vbox;
-
+
Gtk::RadioButtonGroup type_group;
Gtk::RadioButton raw_button;
Gtk::RadioButton fades_button;
diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc
index c05c4e0140..c9a92bd79f 100644
--- a/gtk2_ardour/export_dialog.cc
+++ b/gtk2_ardour/export_dialog.cc
@@ -46,44 +46,44 @@ void
ExportDialog::set_session (ARDOUR::Session* s)
{
session = s;
-
+
/* Init handler and profile manager */
-
+
handler = session->get_export_handler ();
status = session->get_export_status ();
profile_manager.reset (new ExportProfileManager (*session));
-
+
/* Possibly init stuff in derived classes */
-
+
init ();
-
+
/* Rest of session related initialization */
-
+
preset_selector->set_manager (profile_manager);
file_notebook->set_session_and_manager (session, profile_manager);
-
+
/* Hand on selection range to profile manager */
-
+
TimeSelection const & time (editor.get_selection().time);
if (!time.empty()) {
profile_manager->set_selection_range (time.front().start, time.front().end);
} else {
profile_manager->set_selection_range ();
}
-
+
/* Load states */
-
+
profile_manager->load_profile ();
sync_with_manager ();
-
+
/* Warnings */
-
+
preset_selector->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::sync_with_manager));
timespan_selector->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::update_warnings));
channel_selector->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::update_warnings));
file_notebook->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::update_warnings));
status->Aborting.connect (sigc::mem_fun (*this, &ExportDialog::notify_errors));
-
+
update_warnings ();
}
@@ -94,38 +94,38 @@ ExportDialog::init ()
init_gui ();
/* warnings */
-
+
warning_widget.pack_start (warn_hbox, true, true, 6);
warning_widget.pack_end (list_files_hbox, false, false, 0);
-
+
warn_hbox.pack_start (warn_label, true, true, 16);
warn_label.set_use_markup (true);
-
+
list_files_hbox.pack_end (list_files_button, false, false, 6);
list_files_hbox.pack_end (list_files_label, false, false, 6);
list_files_label.set_use_markup (true);
-
+
list_files_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::show_conflicting_files));
-
+
/* Progress indicators */
-
+
progress_widget.pack_start (progress_label, false, false, 6);
progress_widget.pack_start (progress_bar, false, false, 6);
-
+
/* Buttons */
-
+
cancel_button = add_button (Gtk::Stock::CANCEL, RESPONSE_CANCEL);
rt_export_button = add_button (_("Realtime Export"), RESPONSE_RT);
fast_export_button = add_button (_("Fast Export"), RESPONSE_FAST);
-
+
list_files_button.set_name ("PaddedButton");
-
+
cancel_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::close_dialog));
rt_export_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::export_rt));
fast_export_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::export_fw));
-
+
/* Done! */
-
+
show_all_children ();
progress_widget.hide_all();
}
@@ -141,21 +141,21 @@ ExportDialog::init_gui ()
Gtk::VBox* advanced_vbox = Gtk::manage (new Gtk::VBox());
advanced_vbox->set_spacing (12);
advanced_vbox->set_border_width (12);
-
+
Gtk::Alignment * timespan_align = Gtk::manage (new Gtk::Alignment());
timespan_label = Gtk::manage (new Gtk::Label (_("Time Span"), Gtk::ALIGN_LEFT));
timespan_align->add (*timespan_selector);
timespan_align->set_padding (0, 12, 18, 0);
advanced_vbox->pack_start (*timespan_label, false, false, 0);
advanced_vbox->pack_start (*timespan_align, false, false, 0);
-
+
Gtk::Alignment * channels_align = Gtk::manage (new Gtk::Alignment());
channels_label = Gtk::manage (new Gtk::Label (_("Channels"), Gtk::ALIGN_LEFT));
channels_align->add (*channel_selector);
channels_align->set_padding (0, 12, 18, 0);
advanced_vbox->pack_start (*channels_label, false, false, 0);
advanced_vbox->pack_start (*channels_align, false, false, 0);
-
+
get_vbox()->pack_start (*file_notebook, false, false, 0);
get_vbox()->pack_start (warning_widget, false, false, 0);
get_vbox()->pack_start (progress_widget, false, false, 0);
@@ -164,11 +164,11 @@ ExportDialog::init_gui ()
advanced->add (*advanced_vbox);
get_vbox()->pack_start (*advanced, false, false);
-
+
Pango::AttrList bold;
Pango::Attribute b = Pango::Attribute::create_attr_weight (Pango::WEIGHT_BOLD);
bold.insert (b);
-
+
timespan_label->set_attributes (bold);
channels_label->set_attributes (bold);
}
@@ -198,10 +198,10 @@ ExportDialog::close_dialog ()
if (status->running) {
status->abort();
}
-
+
hide_all ();
set_modal (false);
-
+
}
void
@@ -224,7 +224,7 @@ ExportDialog::update_warnings ()
list_files_hbox.hide ();
list_files_string = "";
-
+
fast_export_button->set_sensitive (true);
rt_export_button->set_sensitive (true);
@@ -253,15 +253,15 @@ void
ExportDialog::show_conflicting_files ()
{
ArdourDialog dialog (_("Files that will be overwritten"), true);
-
+
Gtk::Label label ("", Gtk::ALIGN_LEFT);
label.set_use_markup (true);
label.set_markup (list_files_string);
-
+
dialog.get_vbox()->pack_start (label);
dialog.add_button (Gtk::Stock::OK, 0);
dialog.show_all_children ();
-
+
dialog.run();
}
@@ -295,7 +295,7 @@ ExportDialog::show_progress ()
progress_widget.show ();
progress_widget.show_all_children ();
progress_connection = Glib::signal_timeout().connect (mem_fun(*this, &ExportDialog::progress_timeout), 100);
-
+
gtk_main_iteration ();
while (status->running) {
if (gtk_events_pending()) {
@@ -339,13 +339,13 @@ ExportDialog::add_error (Glib::ustring const & text)
{
fast_export_button->set_sensitive (false);
rt_export_button->set_sensitive (false);
-
+
if (warn_string.empty()) {
warn_string = _("<span color=\"#ffa755\">Error: ") + text + "</span>";
} else {
warn_string = _("<span color=\"#ffa755\">Error: ") + text + "</span>\n" + warn_string;
}
-
+
warn_label.set_markup (warn_string);
}
@@ -357,7 +357,7 @@ ExportDialog::add_warning (Glib::ustring const & text)
} else {
warn_string = warn_string + _("\n<span color=\"#ffa755\">Warning: ") + text + "</span>";
}
-
+
warn_label.set_markup (warn_string);
}
@@ -400,7 +400,7 @@ void
ExportRegionDialog::init_gui ()
{
ExportDialog::init_gui ();
-
+
channels_label->set_text (_("Source"));
}
diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h
index 8e70920b7c..5a1d7839ca 100644
--- a/gtk2_ardour/export_dialog.h
+++ b/gtk2_ardour/export_dialog.h
@@ -50,9 +50,9 @@ class ExportDialog : public ArdourDialog {
explicit ExportDialog (PublicEditor & editor, Glib::ustring title = _("Export"));
~ExportDialog ();
-
+
void set_session (ARDOUR::Session* s);
-
+
/* Responses */
enum Responses {
@@ -65,7 +65,7 @@ class ExportDialog : public ArdourDialog {
typedef boost::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
-
+
HandlerPtr handler;
ManagerPtr profile_manager;
@@ -79,10 +79,10 @@ class ExportDialog : public ArdourDialog {
boost::shared_ptr<ExportTimespanSelector> timespan_selector;
boost::shared_ptr<ExportChannelSelector> channel_selector;
boost::shared_ptr<ExportFileNotebook> file_notebook;
-
+
Gtk::VBox warning_widget;
Gtk::VBox progress_widget;
-
+
Gtk::Label * timespan_label;
Gtk::Label * channels_label;
@@ -92,46 +92,46 @@ class ExportDialog : public ArdourDialog {
void notify_errors ();
void close_dialog ();
-
+
void sync_with_manager ();
void update_warnings ();
void show_conflicting_files ();
void export_rt ();
void export_fw ();
-
+
void show_progress ();
gint progress_timeout ();
-
+
typedef boost::shared_ptr<ARDOUR::ExportStatus> StatusPtr;
-
+
PublicEditor & editor;
StatusPtr status;
-
+
/*** GUI components ***/
-
+
/* Warning area */
-
+
Gtk::HBox warn_hbox;
Gtk::Label warn_label;
Glib::ustring warn_string;
-
+
Gtk::HBox list_files_hbox;
Gtk::Label list_files_label;
Gtk::Button list_files_button;
Glib::ustring list_files_string;
-
+
void add_error (Glib::ustring const & text);
void add_warning (Glib::ustring const & text);
-
+
/* Progress bar */
-
+
Gtk::Label progress_label;
Gtk::ProgressBar progress_bar;
sigc::connection progress_connection;
-
+
/* Buttons */
-
+
Gtk::Button * cancel_button;
Gtk::Button * rt_export_button;
Gtk::Button * fast_export_button;
@@ -145,7 +145,7 @@ class ExportRangeDialog : public ExportDialog
private:
void init_components ();
-
+
Glib::ustring range_id;
};
@@ -166,7 +166,7 @@ class ExportRegionDialog : public ExportDialog
private:
void init_gui ();
void init_components ();
-
+
ARDOUR::AudioRegion const & region;
ARDOUR::AudioTrack & track;
};
diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc
index 9b5136c9a4..ab9a22ee28 100644
--- a/gtk2_ardour/export_file_notebook.cc
+++ b/gtk2_ardour/export_file_notebook.cc
@@ -31,17 +31,17 @@ ExportFileNotebook::ExportFileNotebook () :
page_counter (1)
{
/* Last page */
-
+
new_file_button.set_image (*Gtk::manage (new Gtk::Image (::get_icon("add"))));
new_file_button.set_label (_(" Click here to add another format"));
new_file_button.set_alignment (0, 0.5);
new_file_button.set_relief (Gtk::RELIEF_NONE);
-
+
new_file_hbox.pack_start (new_file_button, true, true);
append_page (new_file_dummy, new_file_hbox);
set_tab_label_packing (new_file_dummy, true, true, Gtk::PACK_START);
new_file_hbox.show_all_children ();
-
+
page_change_connection = signal_switch_page().connect (sigc::mem_fun (*this, &ExportFileNotebook::handle_page_change));
new_file_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFileNotebook::add_new_file_page));
}
@@ -51,7 +51,7 @@ ExportFileNotebook::set_session_and_manager (ARDOUR::Session * s, boost::shared_
{
session = s;
profile_manager = manager;
-
+
sync_with_manager ();
}
@@ -67,7 +67,7 @@ ExportFileNotebook::sync_with_manager ()
remove_page (0);
}
page_change_connection.block(false);
-
+
page_counter = 1;
last_visible_page = 0;
@@ -82,7 +82,7 @@ ExportFileNotebook::sync_with_manager ()
++format_it, ++filename_it) {
add_file_page (*format_it, *filename_it);
}
-
+
set_current_page (0);
CriticalSelectionChanged ();
}
@@ -117,7 +117,7 @@ ExportFileNotebook::add_file_page (ARDOUR::ExportProfileManager::FormatStatePtr
update_remove_file_page_sensitivity ();
show_all_children();
++page_counter;
-
+
CriticalSelectionChanged ();
}
@@ -129,7 +129,7 @@ ExportFileNotebook::remove_file_page (FilePage * page)
remove_page (*page);
update_remove_file_page_sensitivity ();
-
+
CriticalSelectionChanged ();
}
@@ -173,51 +173,51 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager,
pack_start (format_align, false, false, 0);
pack_start (filename_label, false, false, 0);
pack_start (filename_align, false, false, 0);
-
+
format_align.add (format_selector);
format_align.set_padding (6, 12, 18, 0);
-
+
filename_align.add (filename_selector);
filename_align.set_padding (0, 12, 18, 0);
-
+
Pango::AttrList bold;
Pango::Attribute b = Pango::Attribute::create_attr_weight (Pango::WEIGHT_BOLD);
bold.insert (b);
-
+
format_label.set_attributes (bold);
filename_label.set_attributes (bold);
tab_label.set_attributes (bold);
-
+
/* Set states */
format_selector.set_state (format_state, s);
filename_selector.set_state (filename_state, s);
-
+
/* Signals */
-
+
tab_close_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*parent, &ExportFileNotebook::remove_file_page), this));
-
+
profile_manager->FormatListChanged.connect (sigc::mem_fun (format_selector, &ExportFormatSelector::update_format_list));
-
+
format_selector.FormatEdited.connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::save_format_to_manager));
format_selector.FormatRemoved.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::remove_format_profile));
format_selector.NewFormat.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::get_new_format));
-
+
format_selector.CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::update_tab_label));
filename_selector.CriticalSelectionChanged.connect (CriticalSelectionChanged.make_slot());
-
+
/* Tab widget */
-
+
tab_close_button.add (*Gtk::manage (new Gtk::Image (::get_icon("close"))));
tab_close_alignment.add (tab_close_button);
tab_close_alignment.set (0.5, 0.5, 0, 0);
-
+
tab_widget.pack_start (tab_label, false, false, 3);
tab_widget.pack_end (tab_close_alignment, false, false, 0);
tab_widget.show_all_children ();
update_tab_label ();
-
+
/* Done */
-
+
show_all_children ();
}
diff --git a/gtk2_ardour/export_file_notebook.h b/gtk2_ardour/export_file_notebook.h
index b6aee9992c..4eed7dc200 100644
--- a/gtk2_ardour/export_file_notebook.h
+++ b/gtk2_ardour/export_file_notebook.h
@@ -37,23 +37,23 @@ namespace ARDOUR {
class ExportFileNotebook : public Gtk::Notebook
{
public:
-
+
ExportFileNotebook ();
-
+
void set_session_and_manager (ARDOUR::Session * s, boost::shared_ptr<ARDOUR::ExportProfileManager> manager);
void sync_with_manager ();
-
+
Glib::ustring get_nth_format_name (uint32_t n);
-
+
sigc::signal<void> CriticalSelectionChanged;
-
+
private:
typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
typedef boost::shared_ptr<ARDOUR::ExportFormatSpecification> FormatPtr;
typedef boost::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
class FilePage;
-
+
ManagerPtr profile_manager;
ARDOUR::Session * session;
@@ -61,52 +61,52 @@ class ExportFileNotebook : public Gtk::Notebook
void add_file_page (ARDOUR::ExportProfileManager::FormatStatePtr format_state, ARDOUR::ExportProfileManager::FilenameStatePtr filename_state);
void remove_file_page (FilePage * page);
void update_remove_file_page_sensitivity ();
-
+
sigc::connection page_change_connection;
void handle_page_change (GtkNotebookPage*, uint32_t page);
-
+
Gtk::HBox new_file_hbox;
Gtk::Button new_file_button;
Gtk::VBox new_file_dummy;
-
+
uint32_t last_visible_page;
uint32_t page_counter;
class FilePage : public Gtk::VBox {
public:
- FilePage (ARDOUR::Session * s, ManagerPtr profile_manager, ExportFileNotebook * parent, uint32_t number,
+ FilePage (ARDOUR::Session * s, ManagerPtr profile_manager, ExportFileNotebook * parent, uint32_t number,
ARDOUR::ExportProfileManager::FormatStatePtr format_state,
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state);
-
+
virtual ~FilePage ();
-
+
Gtk::Widget & get_tab_widget () { return tab_widget; }
void set_remove_sensitive (bool value);
Glib::ustring get_format_name () const;
-
+
ARDOUR::ExportProfileManager::FormatStatePtr get_format_state () const { return format_state; }
ARDOUR::ExportProfileManager::FilenameStatePtr get_filename_state () const { return filename_state; }
-
+
sigc::signal<void> CriticalSelectionChanged;
-
+
private:
void save_format_to_manager (FormatPtr format);
void update_tab_label ();
-
+
ARDOUR::ExportProfileManager::FormatStatePtr format_state;
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state;
ManagerPtr profile_manager;
-
+
/* GUI components */
-
+
Gtk::Label format_label;
Gtk::Alignment format_align;
ExportFormatSelector format_selector;
-
+
Gtk::Label filename_label;
Gtk::Alignment filename_align;
ExportFilenameSelector filename_selector;
-
+
Gtk::HBox tab_widget;
Gtk::Label tab_label;
Gtk::Alignment tab_close_alignment;
diff --git a/gtk2_ardour/export_filename_selector.cc b/gtk2_ardour/export_filename_selector.cc
index a78c0e7890..30a7fbce7f 100644
--- a/gtk2_ardour/export_filename_selector.cc
+++ b/gtk2_ardour/export_filename_selector.cc
@@ -43,7 +43,7 @@ ExportFilenameSelector::ExportFilenameSelector () :
pack_start (include_label, false, false, 6);
pack_start (include_hbox, false, false, 0);
pack_start (path_hbox, false, false, 12);
-
+
include_hbox.pack_start (label_label, false, false, 3);
include_hbox.pack_start (label_entry, false, false, 3);
include_hbox.pack_start (session_checkbox, false, false, 3);
@@ -51,53 +51,53 @@ ExportFilenameSelector::ExportFilenameSelector () :
include_hbox.pack_start (time_format_combo, false, false, 3);
include_hbox.pack_start (revision_checkbox, false, false, 3);
include_hbox.pack_start (revision_spinbutton, false, false, 3);
-
+
path_hbox.pack_start (path_label, false, false, 3);
path_hbox.pack_start (path_entry, true, true, 3);
path_hbox.pack_start (browse_button, false, false, 3);
-
+
date_format_combo.set_name ("PaddedButton");
time_format_combo.set_name ("PaddedButton");
browse_button.set_name ("PaddedButton");
-
+
label_sizegroup = Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL);
label_sizegroup->add_widget (label_label);
label_sizegroup->add_widget (path_label);
-
+
/* Date */
-
+
date_format_list = Gtk::ListStore::create (date_format_cols);
date_format_combo.set_model (date_format_list);
date_format_combo.pack_start (date_format_cols.label);
-
+
date_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_date_format));
-
+
/* Time */
-
+
time_format_list = Gtk::ListStore::create (time_format_cols);
time_format_combo.set_model (time_format_list);
time_format_combo.pack_start (time_format_cols.label);
-
+
time_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_time_format));
-
+
/* Revision */
-
+
revision_spinbutton.set_digits (0);
revision_spinbutton.set_increments (1, 10);
revision_spinbutton.set_range (1, 1000);
revision_spinbutton.set_sensitive (false);
-
+
/* Signals */
-
+
label_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_label));
path_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_folder));
-
+
session_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_session_selection));
-
+
revision_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_revision_selection));
revision_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_revision_value));
-
- browse_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFilenameSelector::open_browse_dialog));
+
+ browse_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFilenameSelector::open_browse_dialog));
}
ExportFilenameSelector::~ExportFilenameSelector ()
@@ -117,15 +117,15 @@ ExportFilenameSelector::load_state ()
revision_checkbox.set_active (filename->include_revision);
revision_spinbutton.set_value (filename->get_revision());
path_entry.set_text (filename->get_folder());
-
+
Gtk::TreeModel::Children::iterator it;
-
+
for (it = date_format_list->children().begin(); it != date_format_list->children().end(); ++it) {
if (it->get_value (date_format_cols.format) == filename->get_date_format()) {
date_format_combo.set_active (it);
}
}
-
+
for (it = time_format_list->children().begin(); it != time_format_list->children().end(); ++it) {
if (it->get_value (time_format_cols.format) == filename->get_time_format()) {
time_format_combo.set_active (it);
@@ -137,57 +137,57 @@ void
ExportFilenameSelector::set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_)
{
session = session_;
-
+
filename = state_->filename;
-
+
/* Fill combo boxes */
-
+
Gtk::TreeModel::iterator iter;
Gtk::TreeModel::Row row;
-
+
/* Dates */
-
+
date_format_list->clear();
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_None;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_None);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_ISO;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISO);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_ISOShortY;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISOShortY);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_BE;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BE);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_BEShortY;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BEShortY);
-
+
/* Times */
-
+
time_format_list->clear();
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportFilename::T_None;
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_None);
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportFilename::T_NoDelim;
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_NoDelim);
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportFilename::T_Delim;
@@ -205,9 +205,9 @@ ExportFilenameSelector::update_label ()
if (!filename) {
return;
}
-
+
filename->set_label (label_entry.get_text());
-
+
filename->include_label = !label_entry.get_text().empty();
CriticalSelectionChanged();
}
@@ -218,7 +218,7 @@ ExportFilenameSelector::update_folder ()
if (!filename) {
return;
}
-
+
filename->set_folder (path_entry.get_text());
CriticalSelectionChanged();
}
@@ -229,7 +229,7 @@ ExportFilenameSelector::change_date_format ()
if (!filename) {
return;
}
-
+
DateFormat format = date_format_combo.get_active()->get_value (date_format_cols.format);
filename->set_date_format (format);
CriticalSelectionChanged();
@@ -241,7 +241,7 @@ ExportFilenameSelector::change_time_format ()
if (!filename) {
return;
}
-
+
TimeFormat format = time_format_combo.get_active()->get_value (time_format_cols.format);
filename->set_time_format (format);
CriticalSelectionChanged();
@@ -253,7 +253,7 @@ ExportFilenameSelector::change_session_selection ()
if (!filename) {
return;
}
-
+
filename->include_session = session_checkbox.get_active();
CriticalSelectionChanged();
}
@@ -264,10 +264,10 @@ ExportFilenameSelector::change_revision_selection ()
if (!filename) {
return;
}
-
+
bool selected = revision_checkbox.get_active();
filename->include_revision = selected;
-
+
revision_spinbutton.set_sensitive (selected);
CriticalSelectionChanged();
}
@@ -278,7 +278,7 @@ ExportFilenameSelector::change_revision_value ()
if (!filename) {
return;
}
-
+
filename->set_revision ((uint32_t) revision_spinbutton.get_value_as_int());
CriticalSelectionChanged();
}
@@ -297,11 +297,11 @@ ExportFilenameSelector::open_browse_dialog ()
if (result == Gtk::RESPONSE_OK) {
Glib::ustring filename = dialog.get_filename();
-
+
if (filename.length()) {
path_entry.set_text (filename);
}
}
-
+
CriticalSelectionChanged();
}
diff --git a/gtk2_ardour/export_filename_selector.h b/gtk2_ardour/export_filename_selector.h
index faa508de41..a6c36da83d 100644
--- a/gtk2_ardour/export_filename_selector.h
+++ b/gtk2_ardour/export_filename_selector.h
@@ -30,7 +30,7 @@ namespace ARDOUR {
class Session;
}
-///
+///
class ExportFilenameSelector : public Gtk::VBox {
public:
typedef boost::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
@@ -39,9 +39,9 @@ class ExportFilenameSelector : public Gtk::VBox {
~ExportFilenameSelector ();
void set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_);
-
+
/* Compatibility with other elements */
-
+
sigc::signal<void> CriticalSelectionChanged;
private:
@@ -53,11 +53,11 @@ class ExportFilenameSelector : public Gtk::VBox {
void change_date_format ();
void change_time_format ();
-
+
void change_session_selection ();
void change_revision_selection ();
void change_revision_value ();
-
+
void open_browse_dialog ();
ARDOUR::Session * session;
@@ -66,49 +66,49 @@ class ExportFilenameSelector : public Gtk::VBox {
Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
Gtk::Label include_label;
-
+
Gtk::HBox include_hbox;
-
+
Gtk::Label label_label;
Gtk::Entry label_entry;
-
+
Gtk::CheckButton session_checkbox;
-
+
Gtk::CheckButton revision_checkbox;
Gtk::SpinButton revision_spinbutton;
-
+
Gtk::HBox path_hbox;
-
+
Gtk::Label path_label;
Gtk::Entry path_entry;
Gtk::Button browse_button;
-
+
/* Date combo */
-
+
typedef ARDOUR::ExportFilename::DateFormat DateFormat;
-
+
struct DateFormatCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<DateFormat> format;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
DateFormatCols () { add(format); add(label); }
};
DateFormatCols date_format_cols;
Glib::RefPtr<Gtk::ListStore> date_format_list;
Gtk::ComboBox date_format_combo;
-
+
/* Time combo */
-
+
typedef ARDOUR::ExportFilename::TimeFormat TimeFormat;
-
+
struct TimeFormatCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<TimeFormat> format;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
TimeFormatCols () { add(format); add(label); }
};
TimeFormatCols time_format_cols;
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index 22852882ba..593f16ec58 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -68,110 +68,110 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
{
/* Pack containers in dialog */
-
+
get_vbox()->pack_start (name_hbox, false, false, 0);
get_vbox()->pack_start (silence_table, false, false, 6);
get_vbox()->pack_start (format_table, false, false, 6);
get_vbox()->pack_start (encoding_options_vbox, false, false, 0);
-
+
/* Name, new and remove */
-
+
name_hbox.pack_start (name_label, false, false, 0);
name_hbox.pack_start (name_entry, true, true, 0);
-
+
/* Normalize */
-
+
normalize_hbox.pack_start (normalize_checkbox, false, false, 0);
normalize_hbox.pack_start (normalize_spinbutton, false, false, 6);
normalize_hbox.pack_start (normalize_db_label, false, false, 0);
-
+
normalize_spinbutton.configure (normalize_adjustment, 0.1, 2);
-
+
/* Silence */
-
+
silence_table.set_row_spacings (6);
silence_table.set_col_spacings (12);
-
+
silence_table.attach (normalize_hbox, 0, 3, 0, 1);
-
+
silence_table.attach (trim_start_checkbox, 0, 1, 1, 2);
silence_table.attach (silence_start_checkbox, 1, 2, 1, 2);
silence_table.attach (silence_start_clock, 2, 3, 1, 2);
-
+
silence_table.attach (trim_end_checkbox, 0, 1, 2, 3);
silence_table.attach (silence_end_checkbox, 1, 2, 2, 3);
silence_table.attach (silence_end_clock, 2, 3, 2, 3);
-
+
/* Format table */
init_format_table();
-
+
/* Encoding options */
-
+
init_encoding_option_widgets();
-
+
encoding_options_table.set_spacings (1);
-
+
encoding_options_vbox.pack_start (encoding_options_label, false, false, 0);
encoding_options_vbox.pack_start (encoding_options_table, false, false, 12);
-
+
Pango::AttrList bold;
Pango::Attribute b = Pango::Attribute::create_attr_weight (Pango::WEIGHT_BOLD);
bold.insert (b);
encoding_options_label.set_attributes (bold);
-
+
/* Buttons */
-
+
revert_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
revert_button->signal_clicked().connect (mem_fun(*this, &ExportFormatDialog::revert));
close_button = add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_APPLY);
close_button->set_sensitive (false);
close_button->signal_clicked().connect (mem_fun (*this, &ExportFormatDialog::end_dialog));
manager.CompleteChanged.connect (mem_fun (*close_button, &Gtk::Button::set_sensitive));
-
+
/* Load state before hooking up the rest of the signals */
-
+
load_state (format);
-
+
/* Name entry */
-
+
name_entry.signal_changed().connect (mem_fun (*this, &ExportFormatDialog::update_name));
-
+
/* Normalize, silence and src_quality signals */
-
+
trim_start_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_trim_start_selection));
trim_end_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_trim_end_selection));
-
+
normalize_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
normalize_spinbutton.signal_value_changed().connect (mem_fun (*this, &ExportFormatDialog::update_normalize_selection));
-
+
silence_start_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_silence_start_selection));
silence_start_clock.ValueChanged.connect (mem_fun (*this, &ExportFormatDialog::update_silence_start_selection));
-
+
silence_end_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_silence_end_selection));
silence_end_clock.ValueChanged.connect (mem_fun (*this, &ExportFormatDialog::update_silence_end_selection));
-
+
src_quality_combo.signal_changed().connect (mem_fun (*this, &ExportFormatDialog::update_src_quality_selection));
-
+
/* Format table signals */
-
+
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(compatibility_view.get_column_cell_renderer (0));
toggle->signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_compatibility_selection));
compatibility_select_connection = compatibility_view.get_selection()->signal_changed().connect (mem_fun (*this, &ExportFormatDialog::prohibit_compatibility_selection));
-
+
quality_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_quality_selection));
format_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_format_selection));
sample_rate_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_sample_rate_selection));
-
+
/* Encoding option signals */
-
+
sample_format_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_sample_format_selection));
dither_type_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_dither_type_selection));
-
+
tag_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_tagging_selection));
-
+
/* Finalize */
-
+
show_all_children();
}
@@ -184,10 +184,10 @@ void
ExportFormatDialog::revert ()
{
++applying_changes_from_engine;
-
+
format->set_state (original_state);
load_state (format);
-
+
--applying_changes_from_engine;
}
@@ -198,15 +198,15 @@ ExportFormatDialog::set_session (ARDOUR::Session* s)
if (!session) {
return;
}
-
+
silence_start_clock.set_session (s);
silence_end_clock.set_session (s);
-
+
update_clock (silence_start_clock, silence_start);
update_clock (silence_end_clock, silence_end);
-
+
/* Select native samplerate if no selection is yet made */
-
+
if (sample_rate_view.get_selection()->count_selected_rows() == 0) {
Gtk::ListStore::Children::iterator it;
for (it = sample_rate_list->children().begin(); it != sample_rate_list->children().end(); ++it) {
@@ -222,39 +222,39 @@ void
ExportFormatDialog::load_state (FormatPtr spec)
{
name_entry.set_text (spec->name());
-
+
normalize_checkbox.set_active (spec->normalize());
normalize_spinbutton.set_value (spec->normalize_target());
-
+
trim_start_checkbox.set_active (spec->trim_beginning());
silence_start = spec->silence_beginning_time();
silence_start_checkbox.set_active (spec->silence_beginning() > 0);
-
+
trim_end_checkbox.set_active (spec->trim_end());
silence_end = spec->silence_end_time();
silence_end_checkbox.set_active (spec->silence_end() > 0);
-
+
for (Gtk::ListStore::Children::iterator it = src_quality_list->children().begin(); it != src_quality_list->children().end(); ++it) {
if (it->get_value (src_quality_cols.id) == spec->src_quality()) {
src_quality_combo.set_active (it);
break;
}
}
-
+
for (Gtk::ListStore::Children::iterator it = format_list->children().begin(); it != format_list->children().end(); ++it) {
if (it->get_value (format_cols.ptr)->get_format_id() == spec->format_id()) {
it->get_value (format_cols.ptr)->set_selected (true);
break;
}
}
-
+
for (Gtk::ListStore::Children::iterator it = sample_rate_list->children().begin(); it != sample_rate_list->children().end(); ++it) {
if (it->get_value (sample_rate_cols.ptr)->rate == spec->sample_rate()) {
it->get_value (sample_rate_cols.ptr)->set_selected (true);
break;
}
}
-
+
if (spec->sample_format()) {
for (Gtk::ListStore::Children::iterator it = sample_format_list->children().begin(); it != sample_format_list->children().end(); ++it) {
if (it->get_value (sample_format_cols.ptr)->format == spec->sample_format()) {
@@ -262,7 +262,7 @@ ExportFormatDialog::load_state (FormatPtr spec)
break;
}
}
-
+
for (Gtk::ListStore::Children::iterator it = dither_type_list->children().begin(); it != dither_type_list->children().end(); ++it) {
if (it->get_value (dither_type_cols.ptr)->type == spec->dither_type()) {
it->get_value (dither_type_cols.ptr)->set_selected (true);
@@ -270,7 +270,7 @@ ExportFormatDialog::load_state (FormatPtr spec)
}
}
}
-
+
tag_checkbox.set_active (spec->tag());
}
@@ -279,20 +279,20 @@ ExportFormatDialog::init_format_table ()
{
format_table.set_spacings (1);
-
+
format_table.attach (compatibility_label, 0, 1, 0, 1);
format_table.attach (quality_label, 1, 2, 0, 1);
format_table.attach (format_label, 2, 3, 0, 1);
format_table.attach (sample_rate_label, 3, 4, 0, 1);
-
+
format_table.attach (compatibility_view, 0, 1, 1, 2);
format_table.attach (quality_view, 1, 2, 1, 2);
format_table.attach (format_view, 2, 3, 1, 2);
format_table.attach (sample_rate_view, 3, 4, 1, 2);
-
+
format_table.attach (src_quality_label, 0, 3, 2, 3);
format_table.attach (src_quality_combo, 3, 4, 2, 3);
-
+
compatibility_view.set_headers_visible (false);
quality_view.set_headers_visible (false);
format_view.set_headers_visible (false);
@@ -307,108 +307,108 @@ ExportFormatDialog::init_format_table ()
compatibility_list = Gtk::ListStore::create (compatibility_cols);
compatibility_view.set_model (compatibility_list);
-
+
ExportFormatManager::CompatList const & compat_list = manager.get_compatibilities();
-
+
for (ExportFormatManager::CompatList::const_iterator it = compat_list.begin(); it != compat_list.end(); ++it) {
iter = compatibility_list->append();
row = *iter;
-
+
row[compatibility_cols.ptr] = *it;
row[compatibility_cols.selected] = false;
row[compatibility_cols.label] = (*it)->name();
-
+
WeakCompatPtr ptr (*it);
(*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_compatibility_selection), ptr));
}
-
+
compatibility_view.append_column_editable ("", compatibility_cols.selected);
-
+
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
text_renderer->property_editable() = false;
-
+
Gtk::TreeView::Column* column = compatibility_view.get_column (0);
column->pack_start (*text_renderer);
column->add_attribute (text_renderer->property_text(), compatibility_cols.label);
-
+
/* Qualities */
quality_list = Gtk::ListStore::create (quality_cols);
quality_view.set_model (quality_list);
-
+
ExportFormatManager::QualityList const & qualities = manager.get_qualities ();
-
+
for (ExportFormatManager::QualityList::const_iterator it = qualities.begin(); it != qualities.end(); ++it) {
iter = quality_list->append();
row = *iter;
-
+
row[quality_cols.ptr] = *it;
row[quality_cols.color] = "white";
row[quality_cols.label] = (*it)->name();
-
+
WeakQualityPtr ptr (*it);
(*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_quality_selection), ptr));
(*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_quality_compatibility), ptr));
}
-
+
quality_view.append_column ("", quality_cols.label);
-
+
/* Formats */
-
+
format_list = Gtk::ListStore::create (format_cols);
format_view.set_model (format_list);
-
+
ExportFormatManager::FormatList const & formats = manager.get_formats ();
-
+
for (ExportFormatManager::FormatList::const_iterator it = formats.begin(); it != formats.end(); ++it) {
iter = format_list->append();
row = *iter;
-
+
row[format_cols.ptr] = *it;
row[format_cols.color] = "white";
row[format_cols.label] = (*it)->name();
-
+
WeakFormatPtr ptr (*it);
(*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_format_selection), ptr));
(*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_format_compatibility), ptr));
-
+
/* Encoding options */
-
+
boost::shared_ptr<HasSampleFormat> hsf;
-
+
if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (*it)) {
hsf->SampleFormatSelectChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_format_selection));
hsf->SampleFormatCompatibleChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_format_compatibility));
-
+
hsf->DitherTypeSelectChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_dither_type_selection));
hsf->DitherTypeCompatibleChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_dither_type_compatibility));
}
}
-
+
format_view.append_column ("", format_cols.label);
-
+
/* Sample Rates */
-
+
sample_rate_list = Gtk::ListStore::create (sample_rate_cols);
sample_rate_view.set_model (sample_rate_list);
-
+
ExportFormatManager::SampleRateList const & rates = manager.get_sample_rates ();
-
+
for (ExportFormatManager::SampleRateList::const_iterator it = rates.begin(); it != rates.end(); ++it) {
iter = sample_rate_list->append();
row = *iter;
-
+
row[sample_rate_cols.ptr] = *it;
row[sample_rate_cols.color] = "white";
row[sample_rate_cols.label] = (*it)->name();
-
+
WeakSampleRatePtr ptr (*it);
(*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_rate_selection), ptr));
(*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_rate_compatibility), ptr));
}
sample_rate_view.append_column ("", sample_rate_cols.label);
-
+
/* Color rendering */
Gtk::TreeViewColumn * label_col;
@@ -417,45 +417,45 @@ ExportFormatDialog::init_format_table ()
label_col = quality_view.get_column(0);
renderer = dynamic_cast<Gtk::CellRendererText*> (quality_view.get_column_cell_renderer (0));
label_col->add_attribute(renderer->property_foreground(), quality_cols.color);
-
+
label_col = format_view.get_column(0);
renderer = dynamic_cast<Gtk::CellRendererText*> (format_view.get_column_cell_renderer (0));
label_col->add_attribute(renderer->property_foreground(), format_cols.color);
-
+
label_col = sample_rate_view.get_column(0);
renderer = dynamic_cast<Gtk::CellRendererText*> (sample_rate_view.get_column_cell_renderer (0));
label_col->add_attribute(renderer->property_foreground(), sample_rate_cols.color);
-
+
/* SRC Qualities */
-
+
src_quality_list = Gtk::ListStore::create (src_quality_cols);
src_quality_combo.set_model (src_quality_list);
-
+
iter = src_quality_list->append();
row = *iter;
row[src_quality_cols.id] = ExportFormatBase::SRC_SincBest;
row[src_quality_cols.label] = _("Best (sinc)");
-
+
iter = src_quality_list->append();
row = *iter;
row[src_quality_cols.id] = ExportFormatBase::SRC_SincMedium;
row[src_quality_cols.label] = _("Medium (sinc)");
-
+
iter = src_quality_list->append();
row = *iter;
row[src_quality_cols.id] = ExportFormatBase::SRC_SincFast;
row[src_quality_cols.label] = _("Fast (sinc)");
-
+
iter = src_quality_list->append();
row = *iter;
row[src_quality_cols.id] = ExportFormatBase::SRC_Linear;
row[src_quality_cols.label] = _("Linear");
-
+
iter = src_quality_list->append();
row = *iter;
row[src_quality_cols.id] = ExportFormatBase::SRC_ZeroOrderHold;
row[src_quality_cols.label] = _("Zero order hold");
-
+
src_quality_combo.pack_start (src_quality_cols.label);
src_quality_combo.set_active (0);
}
@@ -473,7 +473,7 @@ ExportFormatDialog::init_encoding_option_widgets ()
label_col = sample_format_view.get_column(0);
renderer = dynamic_cast<Gtk::CellRendererText*> (sample_format_view.get_column_cell_renderer (0));
label_col->add_attribute(renderer->property_foreground(), sample_format_cols.color);
-
+
dither_type_list = Gtk::ListStore::create (dither_type_cols);
dither_type_view.set_model (dither_type_list);
dither_type_view.set_headers_visible (false);
@@ -481,20 +481,20 @@ ExportFormatDialog::init_encoding_option_widgets ()
label_col = dither_type_view.get_column(0);
renderer = dynamic_cast<Gtk::CellRendererText*> (dither_type_view.get_column_cell_renderer (0));
label_col->add_attribute(renderer->property_foreground(), dither_type_cols.color);
-
+
}
void
ExportFormatDialog::update_compatibility_selection (Glib::ustring const & path)
{
-
+
Gtk::TreeModel::iterator iter = compatibility_view.get_model ()->get_iter (path);
ExportFormatManager::CompatPtr ptr = iter->get_value (compatibility_cols.ptr);
bool state = iter->get_value (compatibility_cols.selected);
-
+
iter->set_value (compatibility_cols.selected, state);
ptr->set_selected (state);
-
+
}
void
@@ -537,7 +537,7 @@ ExportFormatDialog::update_selection (Glib::RefPtr<Gtk::ListStore> & list, Gtk::
Gtk::ListStore::Children::iterator it;
Glib::RefPtr<Gtk::TreeSelection> selection = view.get_selection();
-
+
for (it = list->children().begin(); it != list->children().end(); ++it) {
bool selected = selection->is_selected (it);
it->get_value (cols.ptr)->set_selected (selected);
@@ -548,16 +548,16 @@ void
ExportFormatDialog::change_compatibility_selection (bool select, WeakCompatPtr compat)
{
++applying_changes_from_engine;
-
+
ExportFormatManager::CompatPtr ptr = compat.lock();
-
+
for (Gtk::ListStore::Children::iterator it = compatibility_list->children().begin(); it != compatibility_list->children().end(); ++it) {
if (it->get_value (compatibility_cols.ptr) == ptr) {
it->set_value (compatibility_cols.selected, select);
break;
}
}
-
+
--applying_changes_from_engine;
}
@@ -583,7 +583,7 @@ void
ExportFormatDialog::change_sample_rate_selection (bool select, WeakSampleRatePtr rate)
{
change_selection<ExportFormatManager::SampleRateState, SampleRateCols> (select, rate, sample_rate_list, sample_rate_view, sample_rate_cols);
-
+
if (select) {
ExportFormatManager::SampleRatePtr ptr = rate.lock();
if (ptr && session) {
@@ -609,14 +609,14 @@ void
ExportFormatDialog::change_selection (bool select, boost::weak_ptr<T> w_ptr, Glib::RefPtr<Gtk::ListStore> & list, Gtk::TreeView & view, ColsT & cols)
{
++applying_changes_from_engine;
-
+
boost::shared_ptr<T> ptr = w_ptr.lock();
-
+
Gtk::ListStore::Children::iterator it;
Glib::RefPtr<Gtk::TreeSelection> selection;
-
+
selection = view.get_selection();
-
+
if (!ptr) {
selection->unselect_all();
} else {
@@ -631,7 +631,7 @@ ExportFormatDialog::change_selection (bool select, boost::weak_ptr<T> w_ptr, Gli
}
}
}
-
+
--applying_changes_from_engine;
}
@@ -671,7 +671,7 @@ ExportFormatDialog::change_compatibility (bool compatibility, boost::weak_ptr<T>
Glib::ustring const & c_incompatible, Glib::ustring const & c_compatible)
{
boost::shared_ptr<T> ptr = w_ptr.lock();
-
+
Gtk::ListStore::Children::iterator it;
for (it = list->children().begin(); it != list->children().end(); ++it) {
if (it->get_value (cols.ptr) == ptr) {
@@ -729,9 +729,9 @@ ExportFormatDialog::update_clock (AudioClock & clock, ARDOUR::AnyTime const & ti
{
// TODO position
clock.set (session->convert_to_frames_at (0, time), true);
-
+
AudioClock::Mode mode(AudioClock::SMPTE);
-
+
switch (time.type) {
case AnyTime::SMPTE:
mode = AudioClock::SMPTE;
@@ -746,7 +746,7 @@ ExportFormatDialog::update_clock (AudioClock & clock, ARDOUR::AnyTime const & ti
mode = AudioClock::MinSec;
break;
}
-
+
clock.set_mode (mode);
}
@@ -756,9 +756,9 @@ ExportFormatDialog::update_time (AnyTime & time, AudioClock const & clock)
if (!session) {
return;
}
-
+
nframes_t frames = clock.current_duration();
-
+
switch (clock.mode()) {
case AudioClock::SMPTE:
time.type = AnyTime::SMPTE;
@@ -778,7 +778,7 @@ ExportFormatDialog::update_time (AnyTime & time, AudioClock const & clock)
break;
case AudioClock::Off:
silence_end_checkbox.set_active (false);
- return;
+ return;
}
}
@@ -837,15 +837,15 @@ ExportFormatDialog::show_linear_enconding_options (boost::shared_ptr<ARDOUR::Exp
/* Set label and pack table */
encoding_options_label.set_label (_("Linear encoding options"));
-
+
encoding_options_table.resize (2, 2);
encoding_options_table.attach (sample_format_label, 0, 1, 0, 1);
encoding_options_table.attach (dither_label, 1, 2, 0, 1);
encoding_options_table.attach (sample_format_view, 0, 1, 1, 2);
encoding_options_table.attach (dither_type_view, 1, 2, 1, 2);
-
+
fill_sample_format_lists (boost::dynamic_pointer_cast<HasSampleFormat> (ptr));
-
+
show_all_children ();
}
@@ -853,12 +853,12 @@ void
ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> /*ptr*/)
{
encoding_options_label.set_label (_("Ogg Vorbis options"));
-
+
encoding_options_table.resize (1, 1);
encoding_options_table.attach (tag_checkbox, 0, 1, 0, 1);
-
+
update_tagging_selection ();
-
+
show_all_children ();
}
@@ -866,16 +866,16 @@ void
ExportFormatDialog::show_flac_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFLAC> ptr)
{
encoding_options_label.set_label (_("FLAC options"));
-
+
encoding_options_table.resize (3, 2);
encoding_options_table.attach (sample_format_label, 0, 1, 0, 1);
encoding_options_table.attach (dither_label, 1, 2, 0, 1);
encoding_options_table.attach (sample_format_view, 0, 1, 1, 2);
encoding_options_table.attach (dither_type_view, 1, 2, 1, 2);
encoding_options_table.attach (tag_checkbox, 0, 2, 2, 3);
-
+
fill_sample_format_lists (boost::dynamic_pointer_cast<HasSampleFormat> (ptr));
-
+
show_all_children ();
}
@@ -883,15 +883,15 @@ void
ExportFormatDialog::show_bwf_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatBWF> ptr)
{
encoding_options_label.set_label (_("Broadcast Wave options"));
-
+
encoding_options_table.resize (2, 2);
encoding_options_table.attach (sample_format_label, 0, 1, 0, 1);
encoding_options_table.attach (dither_label, 1, 2, 0, 1);
encoding_options_table.attach (sample_format_view, 0, 1, 1, 2);
encoding_options_table.attach (dither_type_view, 1, 2, 1, 2);
-
+
fill_sample_format_lists (boost::dynamic_pointer_cast<HasSampleFormat> (ptr));
-
+
show_all_children ();
}
@@ -899,39 +899,39 @@ void
ExportFormatDialog::fill_sample_format_lists (boost::shared_ptr<ARDOUR::HasSampleFormat> ptr)
{
/* Fill lists */
-
+
Gtk::TreeModel::iterator iter;
Gtk::TreeModel::Row row;
-
+
sample_format_list->clear ();
-
+
HasSampleFormat::SampleFormatList const & formats = ptr->get_sample_formats ();
-
+
for (HasSampleFormat::SampleFormatList::const_iterator it = formats.begin(); it != formats.end(); ++it) {
iter = sample_format_list->append();
row = *iter;
-
+
row[sample_format_cols.ptr] = *it;
row[sample_format_cols.color] = (*it)->compatible() ? "white" : "red";
row[sample_format_cols.label] = (*it)->name();
-
+
if ((*it)->selected()) {
sample_format_view.get_selection()->select (iter);
}
}
-
+
dither_type_list->clear ();
-
+
HasSampleFormat::DitherTypeList const & types = ptr->get_dither_types ();
-
+
for (HasSampleFormat::DitherTypeList::const_iterator it = types.begin(); it != types.end(); ++it) {
iter = dither_type_list->append();
row = *iter;
-
+
row[dither_type_cols.ptr] = *it;
row[dither_type_cols.color] = "white";
row[dither_type_cols.label] = (*it)->name();
-
+
if ((*it)->selected()) {
dither_type_view.get_selection()->select (iter);
}
diff --git a/gtk2_ardour/export_format_dialog.h b/gtk2_ardour/export_format_dialog.h
index acb561b06b..418b015d8c 100644
--- a/gtk2_ardour/export_format_dialog.h
+++ b/gtk2_ardour/export_format_dialog.h
@@ -57,9 +57,9 @@ class ExportFormatDialog : public ArdourDialog {
FormatPtr format;
ARDOUR::ExportFormatManager manager;
-
+
XMLNode & original_state;
-
+
ARDOUR::AnyTime silence_start;
ARDOUR::AnyTime silence_end;
@@ -67,7 +67,7 @@ class ExportFormatDialog : public ArdourDialog {
void revert ();
/*** Init functions ***/
-
+
void load_state (FormatPtr spec);
void init_format_table ();
void init_encoding_option_widgets ();
@@ -75,71 +75,71 @@ class ExportFormatDialog : public ArdourDialog {
/*** Interactive selections ***/
/* These are connected to signals from GUI components, and should change element states */
-
+
void update_compatibility_selection (Glib::ustring const & path);
void update_quality_selection ();
void update_format_selection ();
void update_sample_rate_selection ();
void update_sample_format_selection ();
void update_dither_type_selection ();
-
+
template<typename ColsT>
void update_selection (Glib::RefPtr<Gtk::ListStore> & list, Gtk::TreeView & view, ColsT & cols);
-
+
/* These are connected to signals from elements, and should only update the gui */
-
+
void change_compatibility_selection (bool select, WeakCompatPtr compat);
-
+
void change_quality_selection (bool select, WeakQualityPtr quality);
void change_format_selection (bool select, WeakFormatPtr format);
void change_sample_rate_selection (bool select, WeakSampleRatePtr rate);
void change_sample_format_selection (bool select, WeakSampleFormatPtr format);
void change_dither_type_selection (bool select, WeakDitherTypePtr type);
-
+
template<typename T, typename ColsT>
void change_selection (bool select, boost::weak_ptr<T> w_ptr, Glib::RefPtr<Gtk::ListStore> & list, Gtk::TreeView & view, ColsT & cols);
-
+
void change_quality_compatibility (bool compatibility, WeakQualityPtr quality);
void change_format_compatibility (bool compatibility, WeakFormatPtr format);
void change_sample_rate_compatibility (bool compatibility, WeakSampleRatePtr rate);
void change_sample_format_compatibility (bool compatibility, WeakSampleFormatPtr format);
void change_dither_type_compatibility (bool compatibility, WeakDitherTypePtr type);
-
+
template<typename T, typename ColsT>
void change_compatibility (bool compatibility, boost::weak_ptr<T> w_ptr, Glib::RefPtr<Gtk::ListStore> & list, ColsT & cols,
Glib::ustring const & c_incompatible = "red", Glib::ustring const & c_compatible = "white");
-
+
uint32_t applying_changes_from_engine;
-
+
/*** Non-interactive selections ***/
-
+
void update_name ();
-
+
void update_trim_start_selection ();
void update_trim_end_selection ();
-
+
void update_normalize_selection ();
void update_silence_start_selection ();
void update_silence_end_selection ();
-
+
void update_clock (AudioClock & clock, ARDOUR::AnyTime const & time);
void update_time (ARDOUR::AnyTime & time, AudioClock const & clock);
-
+
void update_src_quality_selection ();
void update_tagging_selection ();
-
+
/*** Encoding options */
-
+
void change_encoding_options (ARDOUR::ExportFormatManager::FormatPtr ptr);
-
+
void empty_encoding_option_table ();
void remove_widget (Gtk::Widget & to_remove, Gtk::Container * remove_from);
-
+
void show_linear_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatLinear> ptr);
void show_ogg_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatOggVorbis> ptr);
void show_flac_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatFLAC> ptr);
void show_bwf_enconding_options (boost::shared_ptr<ARDOUR::ExportFormatBWF> ptr);
-
+
void fill_sample_format_lists (boost::shared_ptr<ARDOUR::HasSampleFormat> ptr);
/*** GUI components ***/
@@ -150,159 +150,159 @@ class ExportFormatDialog : public ArdourDialog {
Gtk::Label name_label;
Gtk::Entry name_entry;
-
+
/* Normalize */
-
+
Gtk::HBox normalize_hbox;
Gtk::CheckButton normalize_checkbox;
Gtk::SpinButton normalize_spinbutton;
Gtk::Adjustment normalize_adjustment;
Gtk::Label normalize_db_label;
-
+
/* Silence */
-
+
Gtk::Table silence_table;
-
+
Gtk::CheckButton trim_start_checkbox;
Gtk::CheckButton silence_start_checkbox;
AudioClock silence_start_clock;
-
+
Gtk::CheckButton trim_end_checkbox;
Gtk::CheckButton silence_end_checkbox;
AudioClock silence_end_clock;
-
+
/* Format table */
-
+
struct CompatibilityCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::CompatPtr> ptr;
Gtk::TreeModelColumn<bool> selected;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
CompatibilityCols () { add(ptr); add(selected); add(label); }
};
CompatibilityCols compatibility_cols;
Glib::RefPtr<Gtk::ListStore> compatibility_list;
-
+
/* Hack to disallow row selection in compatibilities */
void prohibit_compatibility_selection ();
sigc::connection compatibility_select_connection;
-
+
struct QualityCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::QualityPtr> ptr;
Gtk::TreeModelColumn<Glib::ustring> color;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
QualityCols () { add(ptr); add(color); add(label); }
};
QualityCols quality_cols;
Glib::RefPtr<Gtk::ListStore> quality_list;
-
+
struct FormatCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::FormatPtr> ptr;
Gtk::TreeModelColumn<Glib::ustring> color;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
FormatCols () { add(ptr); add(color); add(label); }
- };
+ };
FormatCols format_cols;
Glib::RefPtr<Gtk::ListStore> format_list;
-
+
struct SampleRateCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::ExportFormatManager::SampleRatePtr> ptr;
Gtk::TreeModelColumn<Glib::ustring> color;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
SampleRateCols () { add(ptr); add(color); add(label); }
};
SampleRateCols sample_rate_cols;
Glib::RefPtr<Gtk::ListStore> sample_rate_list;
-
+
Gtk::Table format_table;
-
+
Gtk::Label compatibility_label;
Gtk::Label quality_label;
Gtk::Label format_label;
Gtk::Label sample_rate_label;
-
+
Gtk::TreeView compatibility_view;
Gtk::TreeView quality_view;
Gtk::TreeView format_view;
Gtk::TreeView sample_rate_view;
-
+
/* SRC quality combo */
-
+
struct SRCQualityCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::ExportFormatBase::SRCQuality> id;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
SRCQualityCols () { add(id); add(label); }
};
SRCQualityCols src_quality_cols;
Glib::RefPtr<Gtk::ListStore> src_quality_list;
-
+
Gtk::Label src_quality_label;
Gtk::ComboBox src_quality_combo;
/* Common encoding option components */
-
+
Gtk::VBox encoding_options_vbox;
Gtk::Label encoding_options_label;
-
+
Gtk::Table encoding_options_table;
/* Other common components */
-
+
Gtk::Button * revert_button;
Gtk::Button * close_button;
-
+
/*** Changing encoding option stuff ***/
-
+
/* Linear */
-
+
struct SampleFormatCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::HasSampleFormat::SampleFormatPtr> ptr;
Gtk::TreeModelColumn<Glib::ustring> color;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
SampleFormatCols () { add(ptr); add(color); add(label); }
};
SampleFormatCols sample_format_cols;
Glib::RefPtr<Gtk::ListStore> sample_format_list;
-
+
struct DitherTypeCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<ARDOUR::HasSampleFormat::DitherTypePtr> ptr;
Gtk::TreeModelColumn<Glib::ustring> color;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
DitherTypeCols () { add(ptr); add (color); add(label); }
};
DitherTypeCols dither_type_cols;
Glib::RefPtr<Gtk::ListStore> dither_type_list;
-
+
Gtk::Label sample_format_label;
Gtk::Label dither_label;
-
+
Gtk::TreeView sample_format_view;
Gtk::TreeView dither_type_view;
-
+
/* Tagging */
-
+
Gtk::CheckButton tag_checkbox;
-
+
};
#endif /* __export_format_dialog_h__ */
diff --git a/gtk2_ardour/export_format_selector.cc b/gtk2_ardour/export_format_selector.cc
index 122facdd39..002edaf50c 100644
--- a/gtk2_ardour/export_format_selector.cc
+++ b/gtk2_ardour/export_format_selector.cc
@@ -46,14 +46,14 @@ ExportFormatSelector::ExportFormatSelector () :
edit_button.signal_clicked().connect (sigc::hide_return (sigc::bind (sigc::mem_fun (*this, &ExportFormatSelector::open_edit_dialog), false)));
remove_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFormatSelector::remove_format));
new_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFormatSelector::add_new_format));
-
+
/* Format combo */
-
+
format_list = Gtk::ListStore::create (format_cols);
format_combo.set_model (format_list);
format_combo.pack_start (format_cols.label);
format_combo.set_active (0);
-
+
format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFormatSelector::update_format_combo));
}
@@ -67,7 +67,7 @@ ExportFormatSelector::set_state (ARDOUR::ExportProfileManager::FormatStatePtr co
{
session = session_;
state = state_;
-
+
update_format_list ();
}
@@ -97,7 +97,7 @@ ExportFormatSelector::update_format_list ()
if (format_combo.get_active_row_number() == -1) {
format_combo.set_active (0);
}
-
+
select_format (format_to_select);
}
@@ -111,7 +111,7 @@ ExportFormatSelector::select_format (FormatPtr f)
break;
}
}
-
+
CriticalSelectionChanged();
}
@@ -119,7 +119,7 @@ void
ExportFormatSelector::add_new_format ()
{
FormatPtr new_format = state->format = NewFormat (state->format);
-
+
if (open_edit_dialog (true) != Gtk::RESPONSE_APPLY) {
remove_format();
if (state->list->empty()) {
@@ -163,7 +163,7 @@ ExportFormatSelector::update_format_combo ()
edit_button.set_sensitive (false);
remove_button.set_sensitive (false);
}
-
+
CriticalSelectionChanged();
}
diff --git a/gtk2_ardour/export_format_selector.h b/gtk2_ardour/export_format_selector.h
index 78daf5b5c6..46d9bc3f06 100644
--- a/gtk2_ardour/export_format_selector.h
+++ b/gtk2_ardour/export_format_selector.h
@@ -33,7 +33,7 @@ namespace ARDOUR {
class ExportProfileManager;
}
-///
+///
class ExportFormatSelector : public Gtk::HBox {
private:
@@ -45,16 +45,16 @@ class ExportFormatSelector : public Gtk::HBox {
ExportFormatSelector ();
~ExportFormatSelector ();
-
+
void set_state (ARDOUR::ExportProfileManager::FormatStatePtr state_, ARDOUR::Session * session_);
void update_format_list ();
-
+
sigc::signal<void, FormatPtr> FormatEdited;
sigc::signal<void, FormatPtr> FormatRemoved;
sigc::signal<FormatPtr, FormatPtr> NewFormat;
-
+
/* Compatibility with other elements */
-
+
sigc::signal<void> CriticalSelectionChanged;
private:
@@ -76,7 +76,7 @@ class ExportFormatSelector : public Gtk::HBox {
public:
Gtk::TreeModelColumn<FormatPtr> format;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
FormatCols () { add (format); add (label); }
};
FormatCols format_cols;
diff --git a/gtk2_ardour/export_multiplicator.cc b/gtk2_ardour/export_multiplicator.cc
index 757039dc9d..f6f31bfc0a 100644
--- a/gtk2_ardour/export_multiplicator.cc
+++ b/gtk2_ardour/export_multiplicator.cc
@@ -51,7 +51,7 @@ ExportMultiplicator::set_manager (boost::shared_ptr<ARDOUR::ExportProfileManager
{
manager = _manager;
manager->GraphChanged.connect (sigc::mem_fun (*this, &ExportMultiplicator::redraw));
-
+
redraw();
}
@@ -61,59 +61,59 @@ ExportMultiplicator::redraw ()
if (!manager) { return; }
graph = &manager->get_graph();
-
+
/* Empty table */
-
+
table.foreach (sigc::mem_fun (table, &Gtk::Table::remove));
widget_map.clear();
/* Calculate table dimensions */
-
+
uint32_t max_width = 0;
GraphLevel max_level = NoLevel;
-
+
if (graph->timespans.size() > max_width) {
max_width = graph->timespans.size();
max_level = Timespans;
}
-
+
if (graph->channel_configs.size() > max_width) {
max_width = graph->channel_configs.size();
max_level = ChannelConfigs;
}
-
+
if (graph->formats.size() > max_width) {
max_width = graph->formats.size();
max_level = Formats;
}
-
+
if (graph->filenames.size() > max_width) {
max_width = graph->filenames.size();
max_level = Filenames;
}
-
+
table.resize (4, max_width);
-
+
std::cout << "Table width: " << max_width << std::endl;
-
+
/* Fill table */
-
+
for (list<ExportProfileManager::TimespanNodePtr>::const_iterator it = graph->timespans.begin(); it != graph->timespans.end(); ++it) {
draw_timespan (*it, get_bounds (it->get(), Timespans, max_level));
}
-
+
for (list<ExportProfileManager::ChannelConfigNodePtr>::const_iterator it = graph->channel_configs.begin(); it != graph->channel_configs.end(); ++it) {
draw_channel_config (*it, get_bounds (it->get(), ChannelConfigs, max_level));
}
-
+
for (list<ExportProfileManager::FormatNodePtr>::const_iterator it = graph->formats.begin(); it != graph->formats.end(); ++it) {
draw_format (*it, get_bounds (it->get(), Formats, max_level));
}
-
+
for (list<ExportProfileManager::FilenameNodePtr>::const_iterator it = graph->filenames.begin(); it != graph->filenames.end(); ++it) {
draw_filename (*it, get_bounds (it->get(), Filenames, max_level));
}
-
+
show_all_children ();
}
@@ -124,9 +124,9 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
uint32_t left_bound = 0;
uint32_t right_bound = 0;
-
+
bool left_bound_found = false;
-
+
bool (ExportProfileManager::GraphNode::*relation_func) (ExportProfileManager::GraphNode const *) const;
if (max_level < current_level) {
std::cout << "using 'is_ancestor_of'" << std::endl;
@@ -138,7 +138,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
std::cout << "using 'equals'" << std::endl;
relation_func = &ExportProfileManager::GraphNode::equals;
}
-
+
switch (max_level) {
case Timespans:
for (list<ExportProfileManager::TimespanNodePtr>::const_iterator it = graph->timespans.begin(); it != graph->timespans.end(); ++it) {
@@ -147,7 +147,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
} else if (!left_bound_found) {
++left_bound;
}
-
+
if (left_bound_found && !CALL_MEMBER_FN(**it, relation_func) (node)) {
break;
} else {
@@ -155,7 +155,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
}
}
break;
-
+
case ChannelConfigs:
for (list<ExportProfileManager::ChannelConfigNodePtr>::const_iterator it = graph->channel_configs.begin(); it != graph->channel_configs.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
@@ -163,7 +163,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
} else if (!left_bound_found) {
++left_bound;
}
-
+
if (left_bound_found && !CALL_MEMBER_FN(**it, relation_func) (node)) {
break;
} else {
@@ -171,7 +171,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
}
}
break;
-
+
case Formats:
for (list<ExportProfileManager::FormatNodePtr>::const_iterator it = graph->formats.begin(); it != graph->formats.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
@@ -179,7 +179,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
} else if (!left_bound_found) {
++left_bound;
}
-
+
if (left_bound_found && !CALL_MEMBER_FN(**it, relation_func) (node)) {
break;
} else {
@@ -187,7 +187,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
}
}
break;
-
+
case Filenames:
for (list<ExportProfileManager::FilenameNodePtr>::const_iterator it = graph->filenames.begin(); it != graph->filenames.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
@@ -197,7 +197,7 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
std::cout << "filename relation check returned false" << std::endl;
++left_bound;
}
-
+
if (left_bound_found && !CALL_MEMBER_FN(**it, relation_func) (node)) {
break;
} else {
@@ -205,12 +205,12 @@ ExportMultiplicator::get_bounds (ARDOUR::ExportProfileManager::GraphNode * node,
}
}
break;
-
+
case NoLevel:
// Not reached !
break;
}
-
+
return std::pair<uint32_t, uint32_t> (left_bound, right_bound);
}
@@ -247,10 +247,10 @@ ExportMultiplicator::get_hbox (TablePosition position)
{
WidgetMap::iterator it = widget_map.find (position);
if (it != widget_map.end()) { return it->second; }
-
+
boost::shared_ptr<Gtk::HBox> widget = widget_map.insert (WidgetPair (position, boost::shared_ptr<Gtk::HBox> (new Gtk::HBox ()))).first->second;
table.attach (*widget, position.left, position.right, position.row - 1, position.row);
-
+
return widget;
}
@@ -264,10 +264,10 @@ ExportMultiplicator::ButtonWidget::ButtonWidget (Glib::ustring name, boost::shar
menu_actions = Gtk::ActionGroup::create();
menu_actions->add (Gtk::Action::create ("Split", _("_Split here")), sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::split));
menu_actions->add (Gtk::Action::create ("Remove", _("_Remove")), sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::remove));
-
+
ui_manager = Gtk::UIManager::create();
ui_manager->insert_action_group (menu_actions);
-
+
Glib::ustring ui_info =
"<ui>"
" <popup name='PopupMenu'>"
@@ -277,11 +277,11 @@ ExportMultiplicator::ButtonWidget::ButtonWidget (Glib::ustring name, boost::shar
"</ui>";
ui_manager->add_ui_from_string (ui_info);
- menu = dynamic_cast<Gtk::Menu*> (ui_manager->get_widget ("/PopupMenu"));
+ menu = dynamic_cast<Gtk::Menu*> (ui_manager->get_widget ("/PopupMenu"));
add_events (Gdk::BUTTON_PRESS_MASK);
signal_button_press_event ().connect (sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::on_button_press_event));
-
+
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#0000"));
set_border_width (1);
vbox.pack_start (label, true, true, 4);
@@ -294,7 +294,7 @@ ExportMultiplicator::ButtonWidget::on_button_press_event (GdkEventButton* event)
if(event->type != GDK_BUTTON_PRESS) { return false; }
if (event->button == 1) {
node->select (!node->selected ());
-
+
if (node->selected ()) {
unset_bg (Gtk::STATE_NORMAL);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#194756"));
@@ -302,14 +302,14 @@ ExportMultiplicator::ButtonWidget::on_button_press_event (GdkEventButton* event)
unset_bg (Gtk::STATE_NORMAL);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#0000"));
}
-
+
return true;
-
+
} else if (event->button == 3) {
int x, y;
get_pointer (x, y);
split_position = (float) x / get_width();
-
+
menu->popup (event->button, event->time);
return true;
}
diff --git a/gtk2_ardour/export_multiplicator.h b/gtk2_ardour/export_multiplicator.h
index 679c6bc1d3..c58cce1011 100644
--- a/gtk2_ardour/export_multiplicator.h
+++ b/gtk2_ardour/export_multiplicator.h
@@ -42,7 +42,7 @@ class ExportMultiplicator : public Gtk::EventBox {
ExportMultiplicator ();
~ExportMultiplicator ();
-
+
void set_manager (boost::shared_ptr<ExportProfileManager> _manager);
private:
@@ -55,7 +55,7 @@ class ExportMultiplicator : public Gtk::EventBox {
Gtk::Table table;
void redraw ();
-
+
enum GraphLevel {
NoLevel = 0,
Timespans = 1,
@@ -63,9 +63,9 @@ class ExportMultiplicator : public Gtk::EventBox {
Formats = 3,
Filenames = 4
};
-
+
std::pair<uint32_t, uint32_t> get_bounds (ExportProfileManager::GraphNode * node, GraphLevel current_level, GraphLevel max_level) const;
-
+
void draw_timespan (ExportProfileManager::TimespanNodePtr node, std::pair<uint32_t, uint32_t> bounds);
void draw_channel_config (ExportProfileManager::ChannelConfigNodePtr node, std::pair<uint32_t, uint32_t> bounds);
void draw_format (ExportProfileManager::FormatNodePtr node, std::pair<uint32_t, uint32_t> bounds);
@@ -75,42 +75,42 @@ class ExportMultiplicator : public Gtk::EventBox {
uint32_t left;
uint32_t right;
uint32_t row;
-
+
TablePosition (uint32_t left, uint32_t right, uint32_t row) :
left (left), right (right), row (row) {}
-
+
bool operator== (TablePosition const & other) const { return (row == other.row && left == other.left && right == other.right); }
bool operator< (TablePosition const & other) const { return (row < other.row || left < other.left || right < other.right); }
};
-
+
typedef std::map<TablePosition, boost::shared_ptr<Gtk::HBox> > WidgetMap;
typedef std::pair<TablePosition, boost::shared_ptr<Gtk::HBox> > WidgetPair;
-
+
boost::shared_ptr<Gtk::HBox> get_hbox (TablePosition position);
WidgetMap widget_map;
-
+
/* Button Widget */
-
+
class ButtonWidget : public Gtk::EventBox {
public:
ButtonWidget (Glib::ustring name, boost::shared_ptr<ExportProfileManager> m, ExportProfileManager::GraphNode * node);
-
+
private:
-
+
Gtk::Label label;
Gtk::VBox vbox;
-
+
bool on_button_press_event (GdkEventButton* event);
-
+
void split ();
void remove ();
-
+
boost::shared_ptr<ExportProfileManager> manager;
ExportProfileManager::GraphNode * node;
float split_position;
-
+
/* Context menu */
-
+
Glib::RefPtr<Gtk::ActionGroup> menu_actions;
Glib::RefPtr<Gtk::UIManager> ui_manager;
Gtk::Menu * menu;
diff --git a/gtk2_ardour/export_preset_selector.cc b/gtk2_ardour/export_preset_selector.cc
index fbbc215fb0..dab10e335d 100644
--- a/gtk2_ardour/export_preset_selector.cc
+++ b/gtk2_ardour/export_preset_selector.cc
@@ -33,27 +33,27 @@ ExportPresetSelector::ExportPresetSelector () :
list = Gtk::ListStore::create (cols);
entry.set_model (list);
entry.set_text_column (cols.label);
-
+
pack_start (label, false, false, 0);
pack_start (entry, true, true, 6);
pack_start (save_button, false, false, 0);
pack_start (remove_button, false, false, 6);
pack_start (new_button, false, false, 0);
-
+
entry.set_name ("PaddedButton");
save_button.set_name ("PaddedButton");
remove_button.set_name ("PaddedButton");
new_button.set_name ("PaddedButton");
-
+
save_button.set_sensitive (false);
remove_button.set_sensitive (false);
new_button.set_sensitive (false);
-
+
select_connection = entry.signal_changed().connect (sigc::mem_fun (*this, &ExportPresetSelector::update_selection));
save_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::save_current));
new_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::save_current));
remove_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::remove_current));
-
+
show_all_children ();
}
@@ -68,15 +68,15 @@ void
ExportPresetSelector::sync_with_manager ()
{
list->clear();
-
+
PresetList const & presets = profile_manager->get_presets();
Gtk::ListStore::iterator tree_it;
-
+
for (PresetList::const_iterator it = presets.begin(); it != presets.end(); ++it) {
tree_it = list->append();
tree_it->set_value (cols.preset, *it);
tree_it->set_value (cols.label, Glib::ustring ((*it)->name()));
-
+
if (*it == current) {
select_connection.block (true);
entry.set_active (tree_it);
@@ -91,13 +91,13 @@ ExportPresetSelector::update_selection ()
Gtk::ListStore::iterator it = entry.get_active ();
Glib::ustring text = entry.get_entry()->get_text();
bool preset_name_exists = false;
-
+
for (PresetList::const_iterator it = profile_manager->get_presets().begin(); it != profile_manager->get_presets().end(); ++it) {
if (!(*it)->name().compare (text)) { preset_name_exists = true; }
}
-
+
if (list->iter_is_valid (it)) {
-
+
previous = current = it->get_value (cols.preset);
if (!profile_manager->load_preset (current)) {
Gtk::MessageDialog dialog (_("The selected preset did not load successfully!\nPerhaps it references a format that has been removed?"),
@@ -106,14 +106,14 @@ ExportPresetSelector::update_selection ()
}
sync_with_manager ();
CriticalSelectionChanged();
-
+
/* Make an edit, so that signal changed will be emitted on re-selection */
-
+
select_connection.block (true);
entry.get_entry()->set_text ("");
entry.get_entry()->set_text (text);
select_connection.block (false);
-
+
} else { // Text has been edited, this should not make any changes in the profile manager
if (previous && !text.compare (previous->name())) {
current = previous;
@@ -121,7 +121,7 @@ ExportPresetSelector::update_selection ()
current.reset ();
}
}
-
+
save_button.set_sensitive (current);
remove_button.set_sensitive (current);
new_button.set_sensitive (!current && !text.empty() && !preset_name_exists);
@@ -131,7 +131,7 @@ void
ExportPresetSelector::save_current ()
{
if (!profile_manager) { return; }
-
+
previous = current = profile_manager->save_preset (entry.get_entry()->get_text());
sync_with_manager ();
update_selection (); // Update preset widget states
@@ -141,7 +141,7 @@ void
ExportPresetSelector::remove_current ()
{
if (!profile_manager) { return; }
-
+
profile_manager->remove_preset();
entry.get_entry()->set_text ("");
sync_with_manager ();
diff --git a/gtk2_ardour/export_preset_selector.h b/gtk2_ardour/export_preset_selector.h
index ea7e61b32e..fe78e4bd78 100644
--- a/gtk2_ardour/export_preset_selector.h
+++ b/gtk2_ardour/export_preset_selector.h
@@ -30,11 +30,11 @@ class ExportPresetSelector : public Gtk::HBox
{
public:
-
+
ExportPresetSelector ();
-
+
void set_manager (boost::shared_ptr<ARDOUR::ExportProfileManager> manager);
-
+
sigc::signal<void> CriticalSelectionChanged;
private:
@@ -42,31 +42,31 @@ class ExportPresetSelector : public Gtk::HBox
typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
typedef ARDOUR::ExportProfileManager::PresetPtr PresetPtr;
typedef ARDOUR::ExportProfileManager::PresetList PresetList;
-
+
ManagerPtr profile_manager;
sigc::connection select_connection;
-
+
void sync_with_manager ();
void update_selection ();
void save_current ();
void remove_current ();
-
+
struct PresetCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<PresetPtr> preset;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
PresetCols () { add (preset); add (label); }
};
PresetCols cols;
Glib::RefPtr<Gtk::ListStore> list;
PresetPtr current;
PresetPtr previous;
-
+
Gtk::Label label;
Gtk::ComboBoxEntry entry;
-
+
Gtk::Button save_button;
Gtk::Button remove_button;
Gtk::Button new_button;
diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc
index df612a340d..fa9b3abfe5 100644
--- a/gtk2_ardour/export_range_markers_dialog.cc
+++ b/gtk2_ardour/export_range_markers_dialog.cc
@@ -35,14 +35,14 @@ using namespace ARDOUR;
using namespace PBD;
using namespace std;
-ExportRangeMarkersDialog::ExportRangeMarkersDialog (PublicEditor& editor)
+ExportRangeMarkersDialog::ExportRangeMarkersDialog (PublicEditor& editor)
: ExportDialog(editor)
-{
+{
set_title (_("ardour: export ranges"));
file_frame.set_label (_("Export to Directory"));
do_not_allow_export_cd_markers();
-
+
total_duration = 0;
current_range_marker_index = 0;
}
@@ -52,8 +52,8 @@ ExportRangeMarkersDialog::browse_action () const
{
return Gtk::FILE_CHOOSER_ACTION_CREATE_FOLDER;
}
-
-void
+
+void
ExportRangeMarkersDialog::export_data ()
{
getSession().locations()->apply(*this, &ExportRangeMarkersDialog::process_range_markers_export);
@@ -75,14 +75,14 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
get_selected_file_name(),
currentLocation->name(),
sndfile_file_ending_from_string(get_selected_header_format()));
-
+
initSpec(filepath);
-
+
spec.start_frame = currentLocation->start();
spec.end_frame = currentLocation->end();
if (getSession().start_export(spec)){
- // if export fails
+ // if export fails
return;
}
@@ -96,13 +96,13 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
usleep(10000);
}
}
-
+
current_range_marker_index++;
-
+
getSession().stop_export (spec);
}
}
-
+
spec.running = false;
}
@@ -117,17 +117,17 @@ ExportRangeMarkersDialog::get_target_filepath(string path, string filename, stri
string target_filepath = target_path + filename + postfix;
struct stat statbuf;
-
+
for(int counter=1; (stat (target_filepath.c_str(), &statbuf) == 0); counter++){
- // while file exists
+ // while file exists
ostringstream scounter;
scounter.flush();
scounter << counter;
-
- target_filepath =
+
+ target_filepath =
target_path + filename + "_" + scounter.str() + postfix;
}
-
+
return target_filepath;
}
@@ -136,7 +136,7 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
{
// sanity check file name first
struct stat statbuf;
-
+
if (filepath.empty()) {
// warning dialog
string txt = _("Please enter a valid target directory.");
@@ -144,15 +144,15 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
msg.run();
return false;
}
-
- if ( (stat (filepath.c_str(), &statbuf) != 0) ||
+
+ if ( (stat (filepath.c_str(), &statbuf) != 0) ||
(!S_ISDIR (statbuf.st_mode)) ) {
string txt = _("Please select an existing target directory. Files are not allowed!");
MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
msg.run();
return false;
}
-
+
// directory needs to exist and be writable
string dirpath = Glib::path_get_dirname (filepath);
if (::access (dirpath.c_str(), W_OK) != 0) {
@@ -161,7 +161,7 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
msg.run();
return false;
}
-
+
return true;
}
@@ -170,24 +170,24 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
{
// flush vector
range_markers_durations_aggregated.resize(0);
-
+
nframes_t duration_before_current_location = 0;
Locations::LocationList::iterator locationIter;
-
+
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
Location *currentLocation = (*locationIter);
-
+
if(currentLocation->is_range_marker()){
range_markers_durations_aggregated.push_back (duration_before_current_location);
-
+
nframes_t duration = currentLocation->end() - currentLocation->start();
-
+
range_markers_durations.push_back (duration);
- duration_before_current_location += duration;
+ duration_before_current_location += duration;
}
}
- total_duration = duration_before_current_location;
+ total_duration = duration_before_current_location;
}
@@ -203,7 +203,7 @@ ExportRangeMarkersDialog::progress_timeout ()
(spec.progress * (double) range_markers_durations[current_range_marker_index])) /
(double) total_duration;
}
-
+
set_progress_fraction( progress );
return TRUE;
}
diff --git a/gtk2_ardour/export_range_markers_dialog.h b/gtk2_ardour/export_range_markers_dialog.h
index a3a20836b1..b0a29b5dc2 100644
--- a/gtk2_ardour/export_range_markers_dialog.h
+++ b/gtk2_ardour/export_range_markers_dialog.h
@@ -25,11 +25,11 @@
#include "export_dialog.h"
-class ExportRangeMarkersDialog : public ExportDialog
+class ExportRangeMarkersDialog : public ExportDialog
{
public:
ExportRangeMarkersDialog (PublicEditor&);
-
+
Gtk::FileChooserAction browse_action() const;
protected:
@@ -38,7 +38,7 @@ class ExportRangeMarkersDialog : public ExportDialog
void export_data();
bool wants_dir() { return true; }
-
+
private:
// keeps the duration of all range_markers before the current
vector<nframes_t> range_markers_durations_aggregated;
@@ -47,15 +47,15 @@ class ExportRangeMarkersDialog : public ExportDialog
nframes_t total_duration;
// index of range marker, that get's exported right now
unsigned int current_range_marker_index;
-
+
// sets value of progress bar
virtual gint progress_timeout ();
-
+
// initializes range_markers_durations_aggregated, range_markers_durations
// and total_duration
void init_progress_computing(ARDOUR::Locations::LocationList& locations);
- // searches for a filename like "<filename><nr>.<postfix>" in path, that
+ // searches for a filename like "<filename><nr>.<postfix>" in path, that
// does not exist
string get_target_filepath(string path, string filename, string postfix);
diff --git a/gtk2_ardour/export_timespan_selector.cc b/gtk2_ardour/export_timespan_selector.cc
index e716e47be1..b11169b214 100644
--- a/gtk2_ardour/export_timespan_selector.cc
+++ b/gtk2_ardour/export_timespan_selector.cc
@@ -48,45 +48,45 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
option_hbox.pack_start (time_format_label, false, false, 0);
option_hbox.pack_start (time_format_combo, false, false, 6);
-
+
range_scroller.add (range_view);
-
+
pack_start (option_hbox, false, false, 0);
pack_start (range_scroller, true, true, 6);
-
+
/*** Combo boxes ***/
-
+
Gtk::TreeModel::iterator iter;
Gtk::TreeModel::Row row;
-
+
/* Time format combo */
-
+
time_format_list = Gtk::ListStore::create (time_format_cols);
time_format_combo.set_model (time_format_list);
time_format_combo.set_name ("PaddedButton");
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportProfileManager::SMPTE;
row[time_format_cols.label] = X_("Timecode");
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportProfileManager::MinSec;
row[time_format_cols.label] = _("Minutes:Seconds");
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportProfileManager::BBT;
row[time_format_cols.label] = _("Bars:Beats");
-
+
time_format_combo.pack_start (time_format_cols.label);
time_format_combo.set_active (0);
-
+
time_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportTimespanSelector::change_time_format));
-
+
/* Range view */
-
+
range_list = Gtk::ListStore::create (range_cols);
range_view.set_model (range_list);
range_view.set_headers_visible (false);
@@ -101,7 +101,7 @@ void
ExportTimespanSelector::add_range_to_selection (ARDOUR::Location const * loc)
{
TimespanPtr span = session->get_export_handler()->add_timespan();
-
+
Glib::ustring id;
if (loc == state->session_range.get()) {
id = "session";
@@ -110,7 +110,7 @@ ExportTimespanSelector::add_range_to_selection (ARDOUR::Location const * loc)
} else {
id = loc->id().to_s();
}
-
+
span->set_range (loc->start(), loc->end());
span->set_name (loc->name());
span->set_range_id (id);
@@ -153,47 +153,47 @@ ExportTimespanSelector::construct_label (ARDOUR::Location const * location) cons
Glib::ustring label;
Glib::ustring start;
Glib::ustring end;
-
+
nframes_t start_frame = location->start();
nframes_t end_frame = location->end();
-
+
switch (state->time_format) {
case AudioClock::BBT:
start = bbt_str (start_frame);
end = bbt_str (end_frame);
break;
-
+
case AudioClock::SMPTE:
start = smpte_str (start_frame);
end = smpte_str (end_frame);
break;
-
+
case AudioClock::MinSec:
start = ms_str (start_frame);
end = ms_str (end_frame);
break;
-
+
case AudioClock::Frames:
start = to_string (start_frame, std::dec);
end = to_string (end_frame, std::dec);
break;
-
+
case AudioClock::Off:
break;
}
-
+
// label += _("from ");
-
+
// label += "<span color=\"#7fff7f\">";
label += start;
// label += "</span>";
-
+
label += _(" to ");
-
+
// label += "<span color=\"#7fff7f\">";
label += end;
// label += "</span>";
-
+
return label;
}
@@ -204,12 +204,12 @@ ExportTimespanSelector::bbt_str (nframes_t frames) const
if (!session) {
return "Error!";
}
-
+
std::ostringstream oss;
BBT_Time time;
-
+
session->bbt_time (frames, time);
-
+
oss << std::setfill('0') << std::right <<
std::setw(3) <<
time.bars << "|" <<
@@ -217,7 +217,7 @@ ExportTimespanSelector::bbt_str (nframes_t frames) const
time.beats << "|" <<
std::setw(4) <<
time.ticks;
-
+
return oss.str();
}
@@ -227,12 +227,12 @@ ExportTimespanSelector::smpte_str (nframes_t frames) const
if (!session) {
return "Error!";
}
-
+
std::ostringstream oss;
SMPTE::Time time;
-
+
session->smpte_time (frames, time);
-
+
oss << std::setfill('0') << std::right <<
std::setw(2) <<
time.hours << ":" <<
@@ -242,7 +242,7 @@ ExportTimespanSelector::smpte_str (nframes_t frames) const
time.seconds << ":" <<
std::setw(2) <<
time.frames;
-
+
return oss.str();
}
@@ -252,14 +252,14 @@ ExportTimespanSelector::ms_str (nframes_t frames) const
if (!session) {
return "Error!";
}
-
+
std::ostringstream oss;
nframes_t left;
int hrs;
int mins;
int secs;
int sec_promilles;
-
+
left = frames;
hrs = (int) floor (left / (session->frame_rate() * 60.0f * 60.0f));
left -= (nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
@@ -268,7 +268,7 @@ ExportTimespanSelector::ms_str (nframes_t frames) const
secs = (int) floor (left / (float) session->frame_rate());
left -= (nframes_t) floor (secs * session->frame_rate());
sec_promilles = (int) (left * 1000 / (float) session->frame_rate() + 0.5);
-
+
oss << std::setfill('0') << std::right <<
std::setw(2) <<
hrs << ":" <<
@@ -278,7 +278,7 @@ ExportTimespanSelector::ms_str (nframes_t frames) const
secs << "." <<
std::setw(3) <<
sec_promilles;
-
+
return oss.str();
}
@@ -287,7 +287,7 @@ ExportTimespanSelector::update_range_name (Glib::ustring const & path, Glib::ust
{
Gtk::TreeStore::iterator it = range_list->get_iter (path);
it->get_value (range_cols.location)->set_name (new_text);
-
+
CriticalSelectionChanged();
}
@@ -299,17 +299,17 @@ ExportTimespanSelectorSingle::ExportTimespanSelectorSingle (ARDOUR::Session * se
{
range_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
range_view.append_column_editable ("", range_cols.name);
-
+
// Adjust selector height
int x_offset, y_offset, width, height;
Gtk::CellRenderer * renderer = *range_view.get_column(0)->get_cell_renderers().begin();
renderer->get_size (range_view, x_offset, y_offset, width, height);
range_scroller.set_size_request (-1, height);
-
+
if (Gtk::CellRendererText * renderer = dynamic_cast<Gtk::CellRendererText *> (range_view.get_column_cell_renderer (0))) {
renderer->signal_edited().connect (sigc::mem_fun (*this, &ExportTimespanSelectorSingle::update_range_name));
}
-
+
Gtk::CellRendererText * label_render = Gtk::manage (new Gtk::CellRendererText());
Gtk::TreeView::Column * label_col = Gtk::manage (new Gtk::TreeView::Column ("", *label_render));
label_col->add_attribute (label_render->property_markup(), range_cols.label);
@@ -321,7 +321,7 @@ void
ExportTimespanSelectorSingle::fill_range_list ()
{
if (!state) { return; }
-
+
Glib::ustring id;
if (!range_id.compare (X_("session"))) {
id = state->session_range->id().to_s();
@@ -337,22 +337,22 @@ ExportTimespanSelectorSingle::fill_range_list ()
Gtk::TreeModel::iterator iter;
Gtk::TreeModel::Row row;
for (LocationList::const_iterator it = state->ranges->begin(); it != state->ranges->end(); ++it) {
-
+
if (!(*it)->id().to_s().compare (id)) {
iter = range_list->append();
row = *iter;
-
+
row[range_cols.location] = *it;
row[range_cols.selected] = true;
row[range_cols.name] = (*it)->name();
row[range_cols.label] = construct_label (*it);
-
+
add_range_to_selection (*it);
-
+
break;
}
}
-
+
set_time_format_from_state();
}
@@ -364,14 +364,14 @@ ExportTimespanSelectorMultiple::ExportTimespanSelectorMultiple (ARDOUR::Session
range_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
range_view.append_column_editable ("", range_cols.selected);
range_view.append_column_editable ("", range_cols.name);
-
+
if (Gtk::CellRendererToggle * renderer = dynamic_cast<Gtk::CellRendererToggle *> (range_view.get_column_cell_renderer (0))) {
renderer->signal_toggled().connect (sigc::hide (sigc::mem_fun (*this, &ExportTimespanSelectorMultiple::update_selection)));
}
if (Gtk::CellRendererText * renderer = dynamic_cast<Gtk::CellRendererText *> (range_view.get_column_cell_renderer (1))) {
renderer->signal_edited().connect (sigc::mem_fun (*this, &ExportTimespanSelectorMultiple::update_range_name));
}
-
+
Gtk::CellRendererText * label_render = Gtk::manage (new Gtk::CellRendererText());
Gtk::TreeView::Column * label_col = Gtk::manage (new Gtk::TreeView::Column ("", *label_render));
label_col->add_attribute (label_render->property_markup(), range_cols.label);
@@ -389,16 +389,16 @@ ExportTimespanSelectorMultiple::fill_range_list ()
Gtk::TreeModel::iterator iter;
Gtk::TreeModel::Row row;
for (LocationList::const_iterator it = state->ranges->begin(); it != state->ranges->end(); ++it) {
-
+
iter = range_list->append();
row = *iter;
-
+
row[range_cols.location] = *it;
row[range_cols.selected] = false;
row[range_cols.name] = (*it)->name();
row[range_cols.label] = construct_label (*it);
}
-
+
set_selection_from_state ();
}
@@ -406,12 +406,12 @@ void
ExportTimespanSelectorMultiple::set_selection_from_state ()
{
Gtk::TreeModel::Children::iterator tree_it;
-
+
for (TimespanList::iterator it = state->timespans->begin(); it != state->timespans->end(); ++it) {
ustring id = (*it)->range_id();
for (tree_it = range_list->children().begin(); tree_it != range_list->children().end(); ++tree_it) {
Location * loc = tree_it->get_value (range_cols.location);
-
+
if ((!id.compare ("session") && loc == state->session_range.get()) ||
(!id.compare ("selection") && loc == state->selection_range.get()) ||
(!id.compare (loc->id().to_s()))) {
@@ -419,7 +419,7 @@ ExportTimespanSelectorMultiple::set_selection_from_state ()
}
}
}
-
+
set_time_format_from_state();
}
@@ -434,7 +434,7 @@ void
ExportTimespanSelectorMultiple::update_timespans ()
{
state->timespans->clear();
-
+
for (Gtk::TreeStore::Children::iterator it = range_list->children().begin(); it != range_list->children().end(); ++it) {
if (it->get_value (range_cols.selected)) {
add_range_to_selection (it->get_value (range_cols.location));
diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h
index e2291faf5a..72d5990422 100644
--- a/gtk2_ardour/export_timespan_selector.h
+++ b/gtk2_ardour/export_timespan_selector.h
@@ -56,11 +56,11 @@ class ExportTimespanSelector : public Gtk::VBox {
public:
ExportTimespanSelector (ARDOUR::Session * session, ProfileManagerPtr manager);
-
+
virtual ~ExportTimespanSelector ();
void sync_with_manager ();
-
+
sigc::signal<void> CriticalSelectionChanged;
protected:
@@ -70,12 +70,12 @@ class ExportTimespanSelector : public Gtk::VBox {
TimespanStatePtr state;
virtual void fill_range_list () = 0;
-
+
void add_range_to_selection (ARDOUR::Location const * loc);
void set_time_format_from_state ();
-
+
void change_time_format ();
-
+
Glib::ustring construct_label (ARDOUR::Location const * location) const;
Glib::ustring bbt_str (nframes_t frames) const;
Glib::ustring smpte_str (nframes_t frames) const;
@@ -84,28 +84,28 @@ class ExportTimespanSelector : public Gtk::VBox {
void update_range_name (Glib::ustring const & path, Glib::ustring const & new_text);
/*** GUI components ***/
-
+
Gtk::HBox option_hbox;
Gtk::Label time_format_label;
-
+
/* Time format */
-
+
typedef ARDOUR::ExportProfileManager::TimeFormat TimeFormat;
-
+
struct TimeFormatCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<TimeFormat> format;
Gtk::TreeModelColumn<Glib::ustring> label;
-
+
TimeFormatCols () { add(format); add(label); }
};
TimeFormatCols time_format_cols;
Glib::RefPtr<Gtk::ListStore> time_format_list;
Gtk::ComboBox time_format_combo;
-
+
/* View */
-
+
struct RangeCols : public Gtk::TreeModelColumnRecord
{
public:
@@ -113,14 +113,14 @@ class ExportTimespanSelector : public Gtk::VBox {
Gtk::TreeModelColumn<Glib::ustring> label;
Gtk::TreeModelColumn<bool> selected;
Gtk::TreeModelColumn<Glib::ustring> name;
-
+
RangeCols () { add (location); add(label); add(selected); add(name); }
};
RangeCols range_cols;
-
+
Glib::RefPtr<Gtk::ListStore> range_list;
Gtk::TreeView range_view;
-
+
Gtk::ScrolledWindow range_scroller;
};
@@ -148,7 +148,7 @@ class ExportTimespanSelectorSingle : public ExportTimespanSelector
private:
virtual void fill_range_list ();
-
+
Glib::ustring range_id;
};
diff --git a/gtk2_ardour/fft.cc b/gtk2_ardour/fft.cc
index f78a1e94ad..d4841dd573 100644
--- a/gtk2_ardour/fft.cc
+++ b/gtk2_ardour/fft.cc
@@ -46,7 +46,7 @@ FFT::reset()
{
memset(_power_at_bin, 0, sizeof(float) * _data_size);
memset(_phase_at_bin, 0, sizeof(float) * _data_size);
-
+
_iterations = 0;
}
@@ -74,11 +74,11 @@ FFT::analyze(ARDOUR::Sample *input, WindowingType windowing_type)
#define Re (_fftOutput[i])
#define Im (_fftOutput[_window_size-i])
- for (uint32_t i=1; i < _data_size - 1; i++) {
+ for (uint32_t i=1; i < _data_size - 1; i++) {
power = (Re * Re) + (Im * Im);
phase = atanf(Im / Re);
-
+
if (Re < 0.0 && Im > 0.0) {
phase += M_PI;
} else if (Re < 0.0 && Im < 0.0) {
@@ -96,7 +96,7 @@ void
FFT::calculate()
{
if (_iterations > 1) {
- for (uint32_t i=0; i < _data_size - 1; i++) {
+ for (uint32_t i=0; i < _data_size - 1; i++) {
_power_at_bin[i] /= (float)_iterations;
_phase_at_bin[i] /= (float)_iterations;
}
@@ -114,14 +114,14 @@ FFT::get_hann_window()
_hann_window = (float *) malloc(sizeof(float) * _window_size);
double sum = 0.0;
-
+
for (uint32_t i=0; i < _window_size; i++) {
_hann_window[i]=0.81f * ( 0.5f - (0.5f * (float) cos(2.0f * M_PI * (float)i / (float)(_window_size))));
sum += _hann_window[i];
}
double isum = 1.0 / sum;
-
+
for (uint32_t i=0; i < _window_size; i++) {
_hann_window[i] *= isum;
}
diff --git a/gtk2_ardour/fft_graph.cc b/gtk2_ardour/fft_graph.cc
index 99f752c236..c0171ce57b 100644
--- a/gtk2_ardour/fft_graph.cc
+++ b/gtk2_ardour/fft_graph.cc
@@ -43,7 +43,7 @@ using namespace Gdk;
FFTGraph::FFTGraph(int windowSize)
{
_logScale = 0;
-
+
_in = 0;
_out = 0;
_hanning = 0;
@@ -75,7 +75,7 @@ FFTGraph::setWindowSize_internal(int windowSize)
if (_a_window) {
_a_window->clear_tracklist();
}
-
+
_windowSize = windowSize;
_dataSize = windowSize / 2;
if (_in != 0) {
@@ -83,12 +83,12 @@ FFTGraph::setWindowSize_internal(int windowSize)
free(_in);
_in = 0;
}
-
+
if (_out != 0) {
free(_out);
_out = 0;
}
-
+
if (_hanning != 0) {
free(_hanning);
_hanning = 0;
@@ -113,18 +113,18 @@ FFTGraph::setWindowSize_internal(int windowSize)
// normalize the window
double sum = 0.0;
-
+
for (int i=0; i < _windowSize; i++) {
_hanning[i]=0.81f * ( 0.5f - (0.5f * (float) cos(2.0f * M_PI * (float)i / (float)(_windowSize))));
sum += _hanning[i];
}
double isum = 1.0 / sum;
-
+
for (int i=0; i < _windowSize; i++) {
_hanning[i] *= isum;
}
-
+
_logScale = (int *) malloc(sizeof(int) * _dataSize);
//float count = 0;
for (int i = 0; i < _dataSize; i++) {
@@ -164,13 +164,13 @@ FFTGraph::set_analysis_window(AnalysisWindow *a_window)
void
FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
{
-
+
Glib::RefPtr<Gtk::Style> style = get_style();
Glib::RefPtr<Gdk::GC> black = style->get_black_gc();
Glib::RefPtr<Gdk::GC> white = style->get_white_gc();
-
+
window->draw_rectangle(black, true, 0, 0, width, height);
-
+
/**
* 4 5
* _ _
@@ -192,7 +192,7 @@ FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
#define DB_METRIC_LENGTH 8
// Line 4
window->draw_line(white, h_margin - DB_METRIC_LENGTH, v_margin, h_margin, v_margin );
-
+
// Line 5
window->draw_line(white, width - h_margin + 1, v_margin, width - h_margin + DB_METRIC_LENGTH, v_margin );
@@ -205,7 +205,7 @@ FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
Color grey;
grey.set_rgb_p(0.2, 0.2, 0.2);
-
+
graph_gc->set_rgb_fg_color( grey );
if (layout == 0) {
@@ -222,7 +222,7 @@ FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
float scale_points[10] = { 55.0, 110.0, 220.0, 440.0, 880.0, 1760.0, 3520.0, 7040.0, 14080.0, 28160.0 };
for (int x = 0; x < 10; x++) {
-
+
// i = 0.. _dataSize-1
float freq_at_bin = (SR/2.0) * ((double)i / (double)_dataSize);
@@ -237,13 +237,13 @@ FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
while (_logScale[logscale_pos] < position_on_scale)
logscale_pos++;
-
+
int coord = (int)(v_margin + 1.0 + position_on_scale);
-
+
int SR = 44100;
int rate_at_pos = (int)((double)(SR/2) * (double)logscale_pos / (double)_dataSize);
-
+
char buf[32];
if (rate_at_pos < 1000)
snprintf(buf,32,"%dHz",rate_at_pos);
@@ -251,28 +251,28 @@ FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
snprintf(buf,32,"%dk",(int)floor( (float)rate_at_pos/(float)1000) );
std::string label = buf;
-
+
layout->set_text(label);
-
+
window->draw_line(graph_gc, coord, v_margin, coord, height - v_margin - 1);
int width, height;
layout->get_pixel_size (width, height);
-
+
window->draw_layout(white, coord - width / 2, v_margin / 2, layout);
-
+
}
}
void
FFTGraph::redraw()
-{
+{
Glib::Mutex::Lock lm (_a_window->track_list_lock);
draw_scales(get_window());
-
+
if (_a_window == 0)
return;
@@ -284,16 +284,16 @@ FFTGraph::redraw()
cairo_set_line_width(cr, 1.5);
cairo_translate(cr, (float)v_margin + 1.0, (float)h_margin);
-
-
+
+
// Find "session wide" min & max
float min = 1000000000000.0;
float max = -1000000000000.0;
-
+
TreeNodeChildren track_rows = _a_window->track_list.get_model()->children();
-
+
for (TreeIter i = track_rows.begin(); i != track_rows.end(); i++) {
-
+
TreeModel::Row row = *i;
FFTResult *res = row[_a_window->tlcols.graph];
@@ -301,7 +301,7 @@ FFTGraph::redraw()
if (res->minimum() == res->maximum()) {
continue;
}
-
+
if ( res->minimum() < min) {
min = res->minimum();
}
@@ -315,11 +315,11 @@ FFTGraph::redraw()
min = -150.0f;
max = 0.0f;
}
-
+
//int graph_height = height - 2 * h_margin;
-
-
+
+
float fft_pane_size_w = (float)(width - 2*v_margin) - 1.0;
float fft_pane_size_h = (float)(height - 2*h_margin);
@@ -329,23 +329,23 @@ FFTGraph::redraw()
cairo_clip(cr);
for (TreeIter i = track_rows.begin(); i != track_rows.end(); i++) {
-
+
TreeModel::Row row = *i;
// don't show graphs for tracks which are deselected
if (!row[_a_window->tlcols.visible]) {
continue;
}
-
+
FFTResult *res = row[_a_window->tlcols.graph];
// don't show graphs for empty signals
if (res->minimum() == res->maximum()) {
continue;
}
-
+
float mpp;
-
+
if (_show_minmax) {
mpp = -1000000.0;
@@ -408,15 +408,15 @@ FFTGraph::redraw()
mpp = -1000000.0;
cairo_move_to(cr, 0.5, fft_pane_size_h-0.5);
-
+
for (int x = 0; x < res->length(); x++) {
-
+
if (res->avgAt(x) > mpp)
mpp = res->avgAt(x);
mpp = fmax(mpp, min);
mpp = fmin(mpp, max);
-
+
// If the next point on the log scale is at the same location,
// don't draw yet
if (x + 1 < res->length() && _logScale[x] == _logScale[x + 1]) {
@@ -451,7 +451,7 @@ FFTGraph::on_size_allocate(Gtk::Allocation & alloc)
{
width = alloc.get_width();
height = alloc.get_height();
-
+
update_size();
DrawingArea::on_size_allocate (alloc);
@@ -461,7 +461,7 @@ void
FFTGraph::update_size()
{
currentScaleWidth = width - h_margin*2;
- currentScaleHeight = height - 2 - v_margin*2;
+ currentScaleHeight = height - 2 - v_margin*2;
float SR = 44100;
float FFT_START = SR/(double)_dataSize;
diff --git a/gtk2_ardour/fft_graph.h b/gtk2_ardour/fft_graph.h
index 50a2df1fda..c91adec8b7 100644
--- a/gtk2_ardour/fft_graph.h
+++ b/gtk2_ardour/fft_graph.h
@@ -38,22 +38,22 @@ class AnalysisWindow;
class FFTGraph : public Gtk::DrawingArea
{
public:
-
+
FFTGraph(int windowSize);
~FFTGraph();
void set_analysis_window(AnalysisWindow *a_window);
-
+
int windowSize() const { return _windowSize; }
void setWindowSize(int windowSize);
void redraw();
bool on_expose_event (GdkEventExpose* event);
-
+
void on_size_request(Gtk::Requisition* requisition);
void on_size_allocate(Gtk::Allocation & alloc);
FFTResult *prepareResult(Gdk::Color color, std::string trackname);
-
+
void set_show_minmax (bool v) { _show_minmax = v; redraw(); }
void set_show_normalized (bool v) { _show_normalized = v; redraw(); }
@@ -64,7 +64,7 @@ class FFTGraph : public Gtk::DrawingArea
void setWindowSize_internal(int windowSize);
void draw_scales(Glib::RefPtr<Gdk::Window> window);
-
+
static const int minScaleWidth = 512;
static const int minScaleHeight = 420;
@@ -77,7 +77,7 @@ class FFTGraph : public Gtk::DrawingArea
int width;
int height;
-
+
int _windowSize;
int _dataSize;
diff --git a/gtk2_ardour/fft_result.cc b/gtk2_ardour/fft_result.cc
index a9858542a3..37c045b7b0 100644
--- a/gtk2_ardour/fft_result.cc
+++ b/gtk2_ardour/fft_result.cc
@@ -32,7 +32,7 @@ using namespace std;
FFTResult::FFTResult(FFTGraph *graph, Gdk::Color color, string trackname)
{
_graph = graph;
-
+
_windowSize = _graph->windowSize();
_dataSize = _windowSize / 2;
@@ -73,12 +73,12 @@ FFTResult::analyzeWindow(float *window)
_data_avg[0] += b;
if (b < _data_min[0]) _data_min[0] = b;
if (b > _data_max[0]) _data_max[0] = b;
-
+
for (i=1; i < _dataSize - 1; i++) { // TODO: check with Jesse whether this is really correct
b = (_out[i] * _out[i]);
_data_avg[i] += b; // + (_out[_windowSize-i] * _out[_windowSize-i]);, TODO: thanks to Stefan Kost
-
+
if (_data_min[i] > b) _data_min[i] = b;
if (_data_max[i] < b ) _data_max[i] = b;
}
@@ -99,18 +99,18 @@ FFTResult::finalize()
// Average & scale
for (int i = 0; i < _dataSize; i++) {
_data_avg[i] /= _averages;
- _data_avg[i] = 10.0f * log10f(_data_avg[i]);
+ _data_avg[i] = 10.0f * log10f(_data_avg[i]);
- _data_min[i] = 10.0f * log10f(_data_min[i]);
+ _data_min[i] = 10.0f * log10f(_data_min[i]);
if (_data_min[i] < -10000.0f) {
_data_min[i] = -10000.0f;
}
- _data_max[i] = 10.0f * log10f(_data_max[i]);
+ _data_max[i] = 10.0f * log10f(_data_max[i]);
}
// find min & max
_minimum = _maximum = _data_avg[0];
-
+
for (int i = 1; i < _dataSize; i++) {
if (_data_avg[i] < _minimum && !isinf(_data_avg[i])) {
_minimum = _data_avg[i];
diff --git a/gtk2_ardour/fft_result.h b/gtk2_ardour/fft_result.h
index 2042b2d042..2873138dfd 100644
--- a/gtk2_ardour/fft_result.h
+++ b/gtk2_ardour/fft_result.h
@@ -33,7 +33,7 @@ class FFTGraph;
class FFTResult
{
public:
-
+
~FFTResult();
void analyzeWindow(float *window);
@@ -44,15 +44,15 @@ class FFTResult
float avgAt(int x);
float maxAt(int x);
float minAt(int x);
-
+
float minimum() const { return _minimum; }
float maximum() const { return _maximum; }
-
+
Gdk::Color get_color() const { return _color; }
-
+
private:
FFTResult(FFTGraph *graph, Gdk::Color color, std::string trackname);
-
+
int _averages;
float* _data_avg;
@@ -68,10 +68,10 @@ class FFTResult
float _maximum;
FFTGraph *_graph;
-
+
Gdk::Color _color;
std::string _trackname;
-
+
friend class FFTGraph;
};
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 425929c9d2..1b251ba318 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -74,7 +74,7 @@ GainMeter::setup_slider_pix ()
}
}
-GainMeterBase::GainMeterBase (Session& s,
+GainMeterBase::GainMeterBase (Session& s,
const Glib::RefPtr<Gdk::Pixbuf>& pix,
bool horizontal)
: _session (s)
@@ -84,7 +84,7 @@ GainMeterBase::GainMeterBase (Session& s,
, gain_automation_state_button ("")
, dpi_changed (false)
, _is_midi (false)
-
+
{
using namespace Menu_Helpers;
@@ -136,10 +136,10 @@ GainMeterBase::GainMeterBase (Session& s,
gain_automation_state_button.set_size_request(15, 15);
gain_automation_style_button.set_size_request(15, 15);
-
+
gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
-
+
gain_astate_menu.set_name ("ArdourContextMenu");
gain_astyle_menu.set_name ("ArdourContextMenu");
@@ -163,7 +163,7 @@ GainMeterBase::~GainMeterBase ()
void
GainMeterBase::set_controls (boost::shared_ptr<Route> r,
- boost::shared_ptr<PeakMeter> pm,
+ boost::shared_ptr<PeakMeter> pm,
boost::shared_ptr<Amp> amp)
{
connections.clear ();
@@ -175,7 +175,7 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
_amp.reset ();
_route.reset ();
return;
- }
+ }
_meter = pm;
_amp = amp;
@@ -183,7 +183,7 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
level_meter->set_meter (pm.get());
gain_slider->set_controllable (amp->gain_control());
-
+
if (!_route || _route->output()->n_ports().n_midi() == 0) {
_is_midi = false;
gain_adjustment.set_lower (0.0);
@@ -197,14 +197,14 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
gain_adjustment.set_step_increment (0.05);
gain_adjustment.set_page_increment (0.1);
}
-
+
if (!_route || !_route->is_hidden()) {
-
+
using namespace Menu_Helpers;
-
+
gain_astate_menu.items().clear ();
-
- gain_astate_menu.items().push_back (MenuElem (_("Manual"),
+
+ gain_astate_menu.items().push_back (MenuElem (_("Manual"),
bind (mem_fun (*(amp.get()), &Automatable::set_parameter_automation_state),
Evoral::Parameter(GainAutomation), (AutoState) Off)));
gain_astate_menu.items().push_back (MenuElem (_("Play"),
@@ -216,7 +216,7 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
gain_astate_menu.items().push_back (MenuElem (_("Touch"),
bind (mem_fun (*(amp.get()), &Automatable::set_parameter_automation_state),
Evoral::Parameter(GainAutomation), (AutoState) Touch)));
-
+
connections.push_back (gain_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &GainMeterBase::gain_automation_style_button_event), false));
connections.push_back (gain_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false));
@@ -224,7 +224,7 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
connections.push_back (gc->alist()->automation_state_changed.connect (mem_fun(*this, &GainMeter::gain_automation_state_changed)));
connections.push_back (gc->alist()->automation_style_changed.connect (mem_fun(*this, &GainMeter::gain_automation_style_changed)));
-
+
gain_automation_state_changed ();
}
@@ -261,7 +261,7 @@ GainMeterBase::setup_meters (int len)
level_meter->setup_meters(len, 5);
}
-void
+void
GainMeter::setup_meters (int len)
{
if (!meter_metric_area.get_parent()) {
@@ -419,13 +419,13 @@ GainMeterBase::effective_gain_display ()
} else {
value = _amp->gain ();
}
-
+
//cerr << this << " for " << _io->name() << " EGAIN = " << value
// << " AGAIN = " << gain_adjustment.get_value () << endl;
// stacktrace (cerr, 20);
if (gain_adjustment.get_value() != value) {
- ignore_toggle = true;
+ ignore_toggle = true;
gain_adjustment.set_value (value);
ignore_toggle = false;
}
@@ -463,11 +463,11 @@ next_meter_point (MeterPoint mp)
case MeterInput:
return MeterPreFader;
break;
-
+
case MeterPreFader:
return MeterPostFader;
break;
-
+
case MeterPostFader:
return MeterInput;
break;
@@ -480,7 +480,7 @@ gint
GainMeterBase::meter_press(GdkEventButton* ev)
{
wait_for_release = false;
-
+
if (!_route) {
return FALSE;
}
@@ -488,7 +488,7 @@ GainMeterBase::meter_press(GdkEventButton* ev)
if (!ignore_toggle) {
if (Keyboard::is_context_menu_event (ev)) {
-
+
// no menu at this time.
} else {
@@ -497,7 +497,7 @@ GainMeterBase::meter_press(GdkEventButton* ev)
// Primary-button2 click is the midi binding click
// button2-click is "momentary"
-
+
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
wait_for_release = true;
old_meter_point = _route->meter_point ();
@@ -507,7 +507,7 @@ GainMeterBase::meter_press(GdkEventButton* ev)
if (_route && (ev->button == 1 || Keyboard::is_button2_event (ev))) {
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
-
+
/* Primary+Tertiary-click applies change to all routes */
_session.begin_reversible_command (_("meter point change"));
@@ -516,14 +516,14 @@ GainMeterBase::meter_press(GdkEventButton* ev)
cmd->mark();
_session.add_command (cmd);
_session.commit_reversible_command ();
-
-
+
+
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
/* Primary-click: solo mix group.
NOTE: Primary-button2 is MIDI learn.
*/
-
+
if (ev->button == 1) {
_session.begin_reversible_command (_("meter point change"));
Session::GlobalMeteringStateCommand *cmd = new Session::GlobalMeteringStateCommand (_session, this);
@@ -532,13 +532,13 @@ GainMeterBase::meter_press(GdkEventButton* ev)
_session.add_command (cmd);
_session.commit_reversible_command ();
}
-
+
} else {
-
+
/* click: change just this route */
// XXX no undo yet
-
+
_route->set_meter_point (next_meter_point (_route->meter_point()), this);
}
}
@@ -555,7 +555,7 @@ GainMeterBase::meter_release(GdkEventButton*)
if(!ignore_toggle){
if (wait_for_release){
wait_for_release = false;
-
+
if (_route) {
set_meter_point (*_route, old_meter_point);
}
@@ -611,7 +611,7 @@ GainMeterBase::gain_automation_state_button_event (GdkEventButton *ev)
if (ev->type == GDK_BUTTON_RELEASE) {
return TRUE;
}
-
+
switch (ev->button) {
case 1:
gain_astate_menu.popup (1, ev->time);
@@ -716,7 +716,7 @@ void
GainMeterBase::gain_automation_state_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &GainMeterBase::gain_automation_state_changed));
-
+
bool x;
switch (_width) {
@@ -729,7 +729,7 @@ GainMeterBase::gain_automation_state_changed ()
}
x = (_amp->gain_control()->alist()->automation_state() != Off);
-
+
if (gain_automation_state_button.get_active() != x) {
ignore_toggle = true;
gain_automation_state_button.set_active (x);
@@ -737,9 +737,9 @@ GainMeterBase::gain_automation_state_changed ()
}
update_gain_sensitive ();
-
+
/* start watching automation so that things move */
-
+
gain_watching.disconnect();
if (x) {
@@ -829,7 +829,7 @@ GainMeter::GainMeter (Session& s)
meter_metric_area.signal_expose_event().connect (mem_fun(*this, &GainMeter::meter_metrics_expose));
}
-void
+void
GainMeter::set_controls (boost::shared_ptr<Route> r,
boost::shared_ptr<PeakMeter> meter,
boost::shared_ptr<Amp> amp)
@@ -848,14 +848,14 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
GainMeterBase::set_controls (r, meter, amp);
- /*
- if we have a non-hidden route (ie. we're not the click or the auditioner),
+ /*
+ if we have a non-hidden route (ie. we're not the click or the auditioner),
pack some route-dependent stuff.
*/
-
+
gain_display_box.pack_end (peak_display, true, true);
hbox.pack_end (*level_meter, true, true);
-
+
if (!r->is_hidden()) {
fader_vbox->pack_start (gain_automation_state_button, false, false, 0);
}
@@ -883,7 +883,7 @@ GainMeter::render_metrics (Gtk::Widget& w)
char buf[32];
win->get_size (width, height);
-
+
Glib::RefPtr<Gdk::Pixmap> pixmap = Gdk::Pixmap::create (win, width, height);
metric_pixmaps[w.get_name()] = pixmap;
@@ -927,7 +927,7 @@ GainMeter::meter_metrics_expose (GdkEventExpose *ev)
gint width, height;
win->get_size (width, height);
-
+
base_rect.width = width;
base_rect.height = height;
base_rect.x = 0;
diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h
index b1a6ba557d..c0c5d9faff 100644
--- a/gtk2_ardour/gain_meter.h
+++ b/gtk2_ardour/gain_meter.h
@@ -134,20 +134,20 @@ class GainMeterBase : virtual public sigc::trackable
bool gain_focused (GdkEventFocus*);
float max_peak;
-
+
void gain_adjusted ();
void gain_changed ();
-
+
void meter_point_clicked ();
void gain_unit_changed ();
-
+
virtual void hide_all_meters ();
gint meter_button_press (GdkEventButton*, uint32_t);
bool peak_button_release (GdkEventButton*);
bool gain_key_press (GdkEventKey*);
-
+
Gtk::Menu* meter_menu;
void popup_meter_menu (GdkEventButton*);
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 5666f25810..b843120f8c 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -89,7 +89,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
latency_button.add (latency_label);
latency_button.signal_clicked().connect (mem_fun (*this, &PlugUIBase::latency_button_clicked));
set_latency_label ();
-
+
smaller_hbox->pack_start (latency_button, false, false, 10);
smaller_hbox->pack_start (preset_combo, false, false);
smaller_hbox->pack_start (save_button, false, false);
@@ -97,7 +97,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
constraint_hbox->set_spacing (5);
constraint_hbox->set_homogeneous (false);
-
+
VBox* v1_box = manage (new VBox);
VBox* v2_box = manage (new VBox);
pack_end(plugin_analysis_expander);
@@ -111,14 +111,14 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
constraint_hbox->pack_end (*v1_box, false, false);
main_contents.pack_start (*constraint_hbox, false, false);
-
+
if ( is_scrollable ) {
scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
scroller.set_name ("PluginEditor");
scroller_view.set_name("PluginEditor");
scroller_view.add (hpacker);
scroller.add (scroller_view);
-
+
main_contents.pack_start (scroller, true, true);
}
@@ -128,7 +128,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
pi->ActiveChanged.connect (bind(mem_fun(*this, &GenericPluginUI::processor_active_changed),
boost::weak_ptr<Processor>(pi)));
-
+
bypass_button.set_active (!pi->active());
build ();
@@ -198,7 +198,7 @@ GenericPluginUI::build ()
for (i = 0; i < plugin->parameter_count(); ++i) {
if (plugin->parameter_is_control (i)) {
-
+
/* Don't show latency control ports */
if (plugin->describe_parameter (Evoral::Parameter(PluginAutomation, 0, i)) == X_("latency")) {
@@ -206,7 +206,7 @@ GenericPluginUI::build ()
}
ControlUI* cui;
-
+
/* if we are scrollable, just use one long column */
if (!is_scrollable) {
@@ -214,7 +214,7 @@ GenericPluginUI::build ()
frame = manage (new Frame);
frame->set_name ("BaseFrame");
box = manage (new VBox);
-
+
box->set_border_width (5);
box->set_spacing (1);
@@ -233,7 +233,7 @@ GenericPluginUI::build ()
error << string_compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
continue;
}
-
+
if (cui->controller || cui->clickbox || cui->combo) {
box->pack_start (*cui, false, false);
@@ -248,25 +248,25 @@ GenericPluginUI::build ()
}
}
- button_table.attach (*cui, button_col, button_col + 1, button_row, button_row+1,
+ button_table.attach (*cui, button_col, button_col + 1, button_row, button_row+1,
FILL|EXPAND, FILL);
button_row++;
} else if (cui->display) {
- output_table.attach (*cui, output_col, output_col + 1, output_row, output_row+1,
+ output_table.attach (*cui, output_col, output_col + 1, output_row, output_row+1,
FILL|EXPAND, FILL);
-
- // TODO: The meters should be divided into multiple rows
-
+
+ // TODO: The meters should be divided into multiple rows
+
if (++output_col == output_cols) {
output_cols ++;
output_table.resize (output_rows, output_cols);
}
-
+
/* old code, which divides meters into
* columns first, rows later. New code divides into one row
-
+
if (output_row == output_rows) {
output_row = 0;
if (++output_col == output_cols) {
@@ -274,22 +274,22 @@ GenericPluginUI::build ()
output_table.resize (output_rows, output_cols);
}
}
-
- output_table.attach (*cui, output_col, output_col + 1, output_row, output_row+1,
+
+ output_table.attach (*cui, output_col, output_col + 1, output_row, output_row+1,
FILL|EXPAND, FILL);
-
+
output_row++;
*/
}
-
+
/* HACK: ideally the preferred height would be queried from
the complete hpacker, but I can't seem to get that
- information in time, so this is an estimation
+ information in time, so this is an estimation
*/
prefheight += 30;
- }
+ }
}
if (box->children().empty()) {
@@ -314,7 +314,7 @@ GenericPluginUI::build ()
}
GenericPluginUI::ControlUI::ControlUI ()
- : automate_button (X_("")) // force creation of a label
+ : automate_button (X_("")) // force creation of a label
{
automate_button.set_name ("PluginAutomateButton");
ARDOUR_UI::instance()->tooltips().set_tip (automate_button, _("Automation control"));
@@ -333,7 +333,7 @@ GenericPluginUI::ControlUI::ControlUI ()
meterinfo = 0;
}
-GenericPluginUI::ControlUI::~ControlUI()
+GenericPluginUI::ControlUI::~ControlUI()
{
if (meterinfo) {
delete meterinfo->meter;
@@ -411,13 +411,13 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
boost::shared_ptr<LV2Plugin> lv2p;
#endif
if ((lp = boost::dynamic_pointer_cast<LadspaPlugin>(plugin)) != 0) {
-
+
// FIXME: not all plugins have a numeric unique ID
uint32_t id = atol (lp->unique_id().c_str());
lrdf_defaults* defaults = lrdf_get_scale_values(id, port_index);
-
+
if (defaults && defaults->count > 0) {
-
+
control_ui->combo = new Gtk::ComboBoxText;
//control_ui->combo->set_value_in_list(true, false);
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
@@ -425,9 +425,9 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
mcontrol->Changed.connect (bind (mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui));
control_ui->pack_start(control_ui->label, true, true);
control_ui->pack_start(*control_ui->combo, false, true);
-
+
update_control_display(control_ui);
-
+
lrdf_free_setting_values(defaults);
return control_ui;
}
@@ -446,19 +446,19 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
mcontrol->Changed.connect (bind (mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui));
control_ui->pack_start(control_ui->label, true, true);
control_ui->pack_start(*control_ui->combo, false, true);
-
+
update_control_display(control_ui);
-
+
slv2_scale_points_free(points);
return control_ui;
}
#endif
}
-
+
if (desc.toggled) {
/* Build a button */
-
+
control_ui->button = manage (new ToggleButton ());
control_ui->button->set_name ("PluginEditorButton");
control_ui->button->set_size_request (20, 20);
@@ -469,11 +469,11 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
control_ui->button->signal_clicked().connect (bind (mem_fun(*this, &GenericPluginUI::control_port_toggled), control_ui));
mcontrol->Changed.connect (bind (mem_fun (*this, &GenericPluginUI::toggle_parameter_changed), control_ui));
-
+
if (plugin->get_parameter (port_index) > 0.5){
control_ui->button->set_active(true);
}
-
+
return control_ui;
}
@@ -498,8 +498,8 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
control_ui->controller->adjustment()->set_upper (log(control_ui->controller->adjustment()->get_upper()));
control_ui->controller->adjustment()->set_lower (log(control_ui->controller->adjustment()->get_lower()));
}*/
-
-
+
+
control_ui->controller->adjustment()->set_step_increment (desc.step);
control_ui->controller->adjustment()->set_page_increment (desc.largestep);
//#endif
@@ -518,7 +518,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
control_ui->controller->StartGesture.connect (bind (mem_fun(*this, &GenericPluginUI::start_touch), control_ui));
control_ui->controller->StopGesture.connect (bind (mem_fun(*this, &GenericPluginUI::stop_touch), control_ui));
-
+
}
if (control_ui->logarithmic) {
@@ -545,7 +545,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
automation_state_changed (control_ui);
mcontrol->Changed.connect (bind (mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui));
- mcontrol->alist()->automation_state_changed.connect
+ mcontrol->alist()->automation_state_changed.connect
(bind (mem_fun(*this, &GenericPluginUI::automation_state_changed), control_ui));
} else if (plugin->parameter_is_output (port_index)) {
@@ -567,7 +567,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
MeterInfo * info = new MeterInfo(port_index);
control_ui->meterinfo = info;
-
+
info->meter = new FastMeter (5, 5, FastMeter::Vertical);
info->min_unbound = desc.min_unbound;
@@ -578,25 +578,25 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
control_ui->vbox = manage (new VBox);
control_ui->hbox = manage (new HBox);
-
+
control_ui->label.set_angle(90);
control_ui->hbox->pack_start (control_ui->label, false, false);
control_ui->hbox->pack_start (*info->meter, false, false);
control_ui->vbox->pack_start (*control_ui->hbox, false, false);
-
+
control_ui->vbox->pack_start (*control_ui->display, false, false);
control_ui->pack_start (*control_ui->vbox);
control_ui->meterinfo->meter->show_all();
control_ui->meterinfo->packed = true;
-
+
output_controls.push_back (control_ui);
}
-
+
mcontrol->Changed.connect (bind (mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui));
-
+
return control_ui;
}
@@ -620,12 +620,12 @@ GenericPluginUI::astate_clicked (ControlUI* cui, uint32_t /*port*/)
if (automation_menu == 0) {
automation_menu = manage (new Menu);
automation_menu->set_name ("ArdourContextMenu");
- }
+ }
MenuList& items (automation_menu->items());
items.clear ();
- items.push_back (MenuElem (_("Manual"),
+ items.push_back (MenuElem (_("Manual"),
bind (mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Off, cui)));
items.push_back (MenuElem (_("Play"),
bind (mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Play, cui)));
@@ -647,7 +647,7 @@ void
GenericPluginUI::toggle_parameter_changed (ControlUI* cui)
{
float val = cui->control->get_value();
-
+
if (!cui->ignore_change) {
if (val > 0.5) {
cui->button->set_active (true);
@@ -667,10 +667,10 @@ GenericPluginUI::parameter_changed (ControlUI* cui)
}
void
-GenericPluginUI::update_control_display (ControlUI* cui)
+GenericPluginUI::update_control_display (ControlUI* cui)
{
/* XXX how do we handle logarithmic stuff here ? */
-
+
cui->update_pending = false;
float val = cui->control->get_value();
@@ -732,7 +732,7 @@ void
GenericPluginUI::processor_active_changed (boost::weak_ptr<Processor> weak_processor)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &GenericPluginUI::processor_active_changed), weak_processor));
-
+
boost::shared_ptr<Processor> processor = weak_processor.lock();
bypass_button.set_active (!processor || !processor->active());
@@ -743,7 +743,7 @@ GenericPluginUI::start_updating (GdkEventAny*)
{
if (output_controls.size() > 0 ) {
screen_update_connection.disconnect();
- screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
+ screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
(mem_fun(*this, &GenericPluginUI::output_update));
}
return false;
@@ -769,7 +769,7 @@ GenericPluginUI::output_update ()
/* autoscaling for the meter */
if ((*i)->meterinfo && (*i)->meterinfo->packed) {
-
+
if (val < (*i)->meterinfo->min) {
if ((*i)->meterinfo->min_unbound)
(*i)->meterinfo->min = val;
@@ -783,7 +783,7 @@ GenericPluginUI::output_update ()
else
val = (*i)->meterinfo->max;
}
-
+
if ((*i)->meterinfo->max > (*i)->meterinfo->min ) {
float lval = (val - (*i)->meterinfo->min) / ((*i)->meterinfo->max - (*i)->meterinfo->min) ;
(*i)->meterinfo->meter->set (lval );
@@ -792,7 +792,7 @@ GenericPluginUI::output_update ()
}
}
-vector<string>
+vector<string>
GenericPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
{
vector<string> enums;
@@ -825,7 +825,7 @@ GenericPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
SLV2Port port = lv2p->slv2_port(port_index);
SLV2ScalePoints points = slv2_port_get_scale_points(lv2p->slv2_plugin(), port);
cui->combo_map = new std::map<string, float>;
-
+
for (unsigned i=0; i < slv2_scale_points_size(points); ++i) {
SLV2ScalePoint p = slv2_scale_points_get_at(points, i);
SLV2Value label = slv2_scale_point_get_label(p);
@@ -842,7 +842,7 @@ GenericPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
slv2_scale_points_free(points);
#endif
}
-
+
return enums;
}
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc
index 9d3d81eb00..9fb0deb98a 100644
--- a/gtk2_ardour/ghostregion.cc
+++ b/gtk2_ardour/ghostregion.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -111,7 +111,7 @@ AudioGhostRegion::set_samples_per_unit (double spu)
{
for (vector<WaveView*>::iterator i = waves.begin(); i != waves.end(); ++i) {
(*i)->property_samples_per_unit() = spu;
- }
+ }
}
void
@@ -124,7 +124,7 @@ AudioGhostRegion::set_height ()
GhostRegion::set_height();
ht = ((trackview.current_height()) / (double) waves.size());
-
+
for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
gdouble yoff = n * ht;
(*i)->property_height() = ht;
@@ -168,7 +168,7 @@ MidiGhostRegion::MidiGhostRegion(TimeAxisView& tv, TimeAxisView& source_tv, doub
MidiGhostRegion::MidiGhostRegion(MidiStreamView& msv, TimeAxisView& source_tv, double initial_unit_pos)
: GhostRegion(msv.midi_underlay_group, msv.trackview(), source_tv, initial_unit_pos)
{
- base_rect->lower_to_bottom();
+ base_rect->lower_to_bottom();
}
MidiGhostRegion::~MidiGhostRegion()
@@ -267,7 +267,7 @@ MidiGhostRegion::update_range()
MidiGhostRegion::Note* note;
uint8_t note_num;
double y;
-
+
for (EventList::iterator it = events.begin(); it != events.end(); ++it) {
if ((note = dynamic_cast<MidiGhostRegion::Note*>(*it)) != 0) {
note_num = note->event->note()->note();
diff --git a/gtk2_ardour/ghostregion.h b/gtk2_ardour/ghostregion.h
index 8b9f0d1093..b28607e6f2 100644
--- a/gtk2_ardour/ghostregion.h
+++ b/gtk2_ardour/ghostregion.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ namespace Gnome {
class MidiStreamView;
class TimeAxisView;
-class GhostRegion : public sigc::trackable
+class GhostRegion : public sigc::trackable
{
public:
GhostRegion(ArdourCanvas::Group* parent, TimeAxisView& tv, TimeAxisView& source_tv, double initial_unit_pos);
@@ -99,7 +99,7 @@ public:
void x_changed();
ArdourCanvas::Diamond* diamond;
};
-
+
MidiGhostRegion(TimeAxisView& tv, TimeAxisView& source_tv, double initial_unit_pos);
MidiGhostRegion(MidiStreamView& msv, TimeAxisView& source_tv, double initial_unit_pos);
~MidiGhostRegion();
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index be809e44bd..72a2a6b6d7 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -86,7 +86,7 @@ GlobalPortMatrix::get_state (ARDOUR::BundleChannel c[2]) const
so nothing to connect */
return PortMatrixNode::UNKNOWN;
}
-
+
for (ARDOUR::Bundle::PortList::const_iterator i = in_ports.begin(); i != in_ports.end(); ++i) {
for (ARDOUR::Bundle::PortList::const_iterator j = out_ports.begin(); j != out_ports.end(); ++j) {
diff --git a/gtk2_ardour/global_port_matrix.h b/gtk2_ardour/global_port_matrix.h
index 5aa20f9503..508376a9d1 100644
--- a/gtk2_ardour/global_port_matrix.h
+++ b/gtk2_ardour/global_port_matrix.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ public:
GlobalPortMatrix (Gtk::Window*, ARDOUR::Session&, ARDOUR::DataType);
void setup_ports (int);
-
+
void set_state (ARDOUR::BundleChannel c[2], bool);
PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
@@ -43,7 +43,7 @@ public:
std::string channel_noun () const {
return _("port");
}
-
+
bool list_is_global (int) const {
return true;
}
@@ -64,7 +64,7 @@ public:
private:
void on_show ();
-
+
GlobalPortMatrix _port_matrix;
Gtk::Button _rescan_button;
Gtk::CheckButton _show_ports_button;
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc
index 995d41dfef..60b32520fe 100644
--- a/gtk2_ardour/group_tabs.cc
+++ b/gtk2_ardour/group_tabs.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -91,7 +91,7 @@ GroupTabs::on_button_press_event (GdkEventButton* ev)
if (m) {
m->popup (ev->button, ev->time);
}
-
+
}
return true;
@@ -106,13 +106,13 @@ GroupTabs::on_motion_notify_event (GdkEventMotion* ev)
}
double const p = primary_coordinate (ev->x, ev->y);
-
+
if (p != _drag_last) {
_drag_moved = true;
}
if (_drag_from) {
-
+
double f = _dragging->from + p - _drag_last;
if (f < _drag_limit) {
@@ -125,11 +125,11 @@ GroupTabs::on_motion_notify_event (GdkEventMotion* ev)
/* limit drag in the `too small' direction */
f = t;
}
-
+
_dragging->from = f;
-
+
} else {
-
+
double t = _dragging->to + p - _drag_last;
if (t > _drag_limit) {
@@ -142,7 +142,7 @@ GroupTabs::on_motion_notify_event (GdkEventMotion* ev)
/* limit drag in the `too small' direction */
t = f;
}
-
+
_dragging->to = t;
}
@@ -150,7 +150,7 @@ GroupTabs::on_motion_notify_event (GdkEventMotion* ev)
queue_draw ();
_drag_last = p;
-
+
return true;
}
@@ -171,13 +171,13 @@ GroupTabs::on_button_release_event (GdkEventButton* ev)
d.do_run ();
} else {
-
+
/* toggle active state */
_dragging->group->set_active (!_dragging->group->is_active (), this);
_dragging = 0;
-
+
}
-
+
} else {
/* finish drag */
_dragging = 0;
@@ -197,7 +197,7 @@ GroupTabs::render (cairo_t* cr)
}
/* background */
-
+
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, 0, 0, _width, _height);
cairo_fill (cr);
@@ -206,7 +206,7 @@ GroupTabs::render (cairo_t* cr)
for (list<Tab>::const_iterator i = _tabs.begin(); i != _tabs.end(); ++i) {
draw_tab (cr, *i);
- }
+ }
}
@@ -216,12 +216,12 @@ GroupTabs::render (cairo_t* cr)
* @param next Filled in with the next tab after the click, or 0.
* @return Tab under the click, or 0.
*/
-
+
GroupTabs::Tab *
GroupTabs::click_to_tab (double c, Tab** prev, Tab** next)
{
*prev = 0;
-
+
list<Tab>::iterator i = _tabs.begin ();
while (i != _tabs.end() && (c < i->from || c > i->to)) {
*prev = &(*i);
diff --git a/gtk2_ardour/group_tabs.h b/gtk2_ardour/group_tabs.h
index 2cff160426..3036cfcb39 100644
--- a/gtk2_ardour/group_tabs.h
+++ b/gtk2_ardour/group_tabs.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/gtk-custom-hruler.c b/gtk2_ardour/gtk-custom-hruler.c
index 1446fb487f..61a34a7c41 100644
--- a/gtk2_ardour/gtk-custom-hruler.c
+++ b/gtk2_ardour/gtk-custom-hruler.c
@@ -21,7 +21,7 @@
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/* modified by andreas meyer <hexx3000@gmx.de> */
@@ -47,7 +47,7 @@ static void gtk_custom_hruler_draw_pos (GtkCustomRuler * ruler);
GType gtk_custom_hruler_get_type (void)
{
static GType hruler_type = 0;
-
+
if (!hruler_type) {
static const GTypeInfo hruler_info =
{
@@ -62,11 +62,11 @@ GType gtk_custom_hruler_get_type (void)
(GInstanceInitFunc) gtk_custom_hruler_init,
NULL /* value_table */
};
-
+
hruler_type = g_type_register_static (gtk_custom_ruler_get_type(), "GtkCustomHRuler",
&hruler_info, 0);
}
-
+
return hruler_type;
}
@@ -153,7 +153,7 @@ gtk_custom_hruler_draw_ticks (GtkCustomRuler * ruler)
gc = widget->style->fg_gc[GTK_STATE_NORMAL];
bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
-
+
layout = gtk_widget_create_pango_layout (widget, "012456789");
pango_layout_get_extents (layout, &ink_rect, &logical_rect);
@@ -166,13 +166,13 @@ gtk_custom_hruler_draw_ticks (GtkCustomRuler * ruler)
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
NULL, widget, "custom_hruler", 0, 0, widget->allocation.width, widget->allocation.height);
- gdk_draw_line (ruler->backing_store, gc, 0, widget->allocation.height - 1,
+ gdk_draw_line (ruler->backing_store, gc, 0, widget->allocation.height - 1,
widget->allocation.width, widget->allocation.height - 1);
if ((ruler->upper - ruler->lower) == 0) {
return;
}
-
+
/* we have to assume a fixed width font here */
max_chars = widget->allocation.width / 12; // XXX FIX ME: pixel with of the char `8'
@@ -197,10 +197,10 @@ gtk_custom_hruler_draw_ticks (GtkCustomRuler * ruler)
gdk_draw_line (ruler->backing_store, gc, pos, height, pos, height - 3);
break;
}
-
+
pango_layout_set_text (layout, marks[i].label, -1);
pango_layout_get_extents (layout, &logical_rect, NULL);
-
+
gtk_paint_layout (widget->style,
ruler->backing_store,
GTK_WIDGET_STATE (widget),
@@ -210,14 +210,14 @@ gtk_custom_hruler_draw_ticks (GtkCustomRuler * ruler)
"hruler",
pos + 2, ythickness + PANGO_PIXELS (logical_rect.y - digit_offset),
layout);
-
+
g_free (marks[i].label);
}
-
+
if (nmarks) {
g_free (marks);
}
-
+
g_object_unref (layout);
}
@@ -254,7 +254,7 @@ gtk_custom_hruler_draw_pos (GtkCustomRuler * ruler)
gdk_draw_pixmap (ruler->widget.window,
ruler->non_gr_exp_gc,
ruler->backing_store, ruler->xsrc, ruler->ysrc, ruler->xsrc, ruler->ysrc, bs_width, bs_height);
-
+
increment = (gfloat) width / (ruler->upper - ruler->lower);
x = ROUND ((ruler->position - ruler->lower) * increment) + (xthickness - bs_width) / 2 - 1;
y = (height + bs_height) / 2 + ythickness;
diff --git a/gtk2_ardour/gtk-custom-hruler.h b/gtk2_ardour/gtk-custom-hruler.h
index fd3656f5ca..5213e3030c 100644
--- a/gtk2_ardour/gtk-custom-hruler.h
+++ b/gtk2_ardour/gtk-custom-hruler.h
@@ -21,7 +21,7 @@
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/* modified by andreas meyer <hexx3000@gmx.de> */
diff --git a/gtk2_ardour/gtk-custom-ruler.c b/gtk2_ardour/gtk-custom-ruler.c
index 4c937f8618..b66dd68bd3 100644
--- a/gtk2_ardour/gtk-custom-ruler.c
+++ b/gtk2_ardour/gtk-custom-ruler.c
@@ -21,7 +21,7 @@
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/* modified by andreas meyer <hexx3000@gmx.de> */
@@ -66,7 +66,7 @@ default_metric_get_marks (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
(void) lower;
(void) upper;
(void) maxchars;
-
+
return 0;
}
@@ -80,7 +80,7 @@ static GtkWidgetClass *parent_class;
GType gtk_custom_ruler_get_type (void)
{
static GType ruler_type = 0;
-
+
if (!ruler_type)
{
static const GTypeInfo ruler_info =
@@ -96,11 +96,11 @@ GType gtk_custom_ruler_get_type (void)
(GInstanceInitFunc) gtk_custom_ruler_init,
NULL /* value_table */
};
-
+
ruler_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkCustomRuler",
&ruler_info, 0);
}
-
+
return ruler_type;
}
@@ -109,15 +109,15 @@ gtk_custom_ruler_class_init (GtkCustomRulerClass * class)
{
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
-
+
gobject_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass*) class;
-
+
parent_class = g_type_class_peek_parent (class);
-
+
gobject_class->set_property = gtk_custom_ruler_set_property;
gobject_class->get_property = gtk_custom_ruler_get_property;
-
+
widget_class->realize = gtk_custom_ruler_realize;
widget_class->unrealize = gtk_custom_ruler_unrealize;
widget_class->size_allocate = gtk_custom_ruler_size_allocate;
@@ -134,8 +134,8 @@ gtk_custom_ruler_class_init (GtkCustomRulerClass * class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_UPPER,
g_param_spec_double ("upper",
@@ -144,8 +144,8 @@ gtk_custom_ruler_class_init (GtkCustomRulerClass * class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_POSITION,
g_param_spec_double ("position",
@@ -154,8 +154,8 @@ gtk_custom_ruler_class_init (GtkCustomRulerClass * class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE));
+
g_object_class_install_property (gobject_class,
PROP_MAX_SIZE,
g_param_spec_double ("max_size",
@@ -164,7 +164,7 @@ gtk_custom_ruler_class_init (GtkCustomRulerClass * class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_SHOW_POSITION,
@@ -172,7 +172,7 @@ gtk_custom_ruler_class_init (GtkCustomRulerClass * class)
_("Show Position"),
_("Draw current ruler position"),
TRUE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
}
static void
@@ -199,7 +199,7 @@ gtk_custom_ruler_set_property (GObject *object,
GParamSpec *pspec)
{
(void) pspec;
-
+
GtkCustomRuler *ruler = GTK_CUSTOM_RULER (object);
switch (prop_id)
@@ -233,7 +233,7 @@ gtk_custom_ruler_get_property (GObject *object,
GParamSpec *pspec)
{
GtkCustomRuler *ruler = GTK_CUSTOM_RULER (object);
-
+
switch (prop_id)
{
case PROP_LOWER:
@@ -346,14 +346,14 @@ gtk_custom_ruler_draw_ticks (GtkCustomRuler * ruler)
if (GTK_CUSTOM_RULER_GET_CLASS (ruler)->draw_ticks)
GTK_CUSTOM_RULER_GET_CLASS (ruler)->draw_ticks (ruler);
-
+
}
void
gtk_custom_ruler_draw_pos (GtkCustomRuler * ruler)
{
g_return_if_fail (GTK_IS_CUSTOM_RULER (ruler));
-
+
if (GTK_CUSTOM_RULER_GET_CLASS (ruler)->draw_pos && ruler->show_position)
GTK_CUSTOM_RULER_GET_CLASS (ruler)->draw_pos (ruler);
}
@@ -445,7 +445,7 @@ gtk_custom_ruler_expose (GtkWidget * widget, GdkEventExpose * event)
gdk_draw_pixmap (widget->window,
ruler->non_gr_exp_gc,
ruler->backing_store, 0, 0, 0, 0, widget->allocation.width, widget->allocation.height);
-
+
gtk_custom_ruler_draw_pos (ruler);
}
diff --git a/gtk2_ardour/gtk-custom-ruler.h b/gtk2_ardour/gtk-custom-ruler.h
index 3d0b512481..bcb3423160 100644
--- a/gtk2_ardour/gtk-custom-ruler.h
+++ b/gtk2_ardour/gtk-custom-ruler.h
@@ -21,7 +21,7 @@
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/* modified by andreas meyer <hexx3000@gmx.de> */
@@ -56,7 +56,7 @@ struct _GtkCustomRuler {
gint xsrc, ysrc;
gint slider_size;
gboolean show_position;
-
+
/* The upper limit of the ruler (in points) */
gdouble lower;
/* The lower limit of the ruler */
diff --git a/gtk2_ardour/gui_thread.h b/gtk2_ardour/gui_thread.h
index 12071c5558..388902fa28 100644
--- a/gtk2_ardour/gui_thread.h
+++ b/gtk2_ardour/gui_thread.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/i18n.h b/gtk2_ardour/i18n.h
index 8dc13404aa..d9c2a44541 100644
--- a/gtk2_ardour/i18n.h
+++ b/gtk2_ardour/i18n.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/imageframe.cc b/gtk2_ardour/imageframe.cc
index 7ff05ee9e9..ac30511864 100644
--- a/gtk2_ardour/imageframe.cc
+++ b/gtk2_ardour/imageframe.cc
@@ -174,7 +174,7 @@ Glib::PropertyProxy_ReadOnly<double> ImageFrame::property_height() const
{
return Glib::PropertyProxy_ReadOnly<double> (this, "height");
}
-Glib::PropertyProxy<Gtk::AnchorType> ImageFrame::property_anchor()
+Glib::PropertyProxy<Gtk::AnchorType> ImageFrame::property_anchor()
{
return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
}
diff --git a/gtk2_ardour/imageframe.h b/gtk2_ardour/imageframe.h
index 76787f8b88..466d0804f5 100644
--- a/gtk2_ardour/imageframe.h
+++ b/gtk2_ardour/imageframe.h
@@ -6,7 +6,7 @@
/* rect.h
- *
+ *
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
diff --git a/gtk2_ardour/imageframe_p.h b/gtk2_ardour/imageframe_p.h
index 6b0b2bffca..e37a6eaa64 100644
--- a/gtk2_ardour/imageframe_p.h
+++ b/gtk2_ardour/imageframe_p.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/imageframe_socket_handler.cc b/gtk2_ardour/imageframe_socket_handler.cc
index 2838be6f66..51ff6732c6 100644
--- a/gtk2_ardour/imageframe_socket_handler.cc
+++ b/gtk2_ardour/imageframe_socket_handler.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ ImageFrameSocketHandler* ImageFrameSocketHandler::_instance = 0 ;
*/
ImageFrameSocketHandler::ImageFrameSocketHandler(PublicEditor& ed) : thePublicEditor(ed), theArdourToCompositorSocket(-1)
{
-
+
}
/**
@@ -82,7 +82,7 @@ ImageFrameSocketHandler::~ImageFrameSocketHandler()
*
* @return the instance of the ImageFrameSocketHandler
*/
-ImageFrameSocketHandler*
+ImageFrameSocketHandler*
ImageFrameSocketHandler::get_instance()
{
return(_instance) ;
@@ -125,7 +125,7 @@ ImageFrameSocketHandler::image_socket_callback(void *arg, int32_t fd, GdkInputCo
{
//end-of-file, other end closed or shutdown?
ARDOUR_UI::instance()->popup_error(_("Image Compositor Socket has been shutdown/closed"));
-
+
// assume socket has been shutdown, tell, someone interested,
// and remove the socket from the event loop
ImageFrameSocketHandler* ifsh = ImageFrameSocketHandler::get_instance() ;
@@ -137,7 +137,7 @@ ImageFrameSocketHandler::image_socket_callback(void *arg, int32_t fd, GdkInputCo
{
//std::cout << "Received Msg [" << buf << "]\n" ;
ImageFrameSocketHandler* ifsh = ImageFrameSocketHandler::get_instance() ;
-
+
std::string mType = ifsh->get_message_part(0,2,buf) ;
if(mType == ardourvis::INSERT_ITEM)
@@ -170,10 +170,10 @@ ImageFrameSocketHandler::image_socket_callback(void *arg, int32_t fd, GdkInputCo
}
else
{
- std::string errMsg = "Unknown Message type : " ;
+ std::string errMsg = "Unknown Message type : " ;
errMsg.append(mType) ;
ifsh->send_return_failure(errMsg) ;
- }
+ }
}
}
@@ -193,29 +193,29 @@ ImageFrameSocketHandler::connect(const char * hostIp, int32_t port)
//already connected...
return(true) ;
}
-
+
theArdourToCompositorSocket = socket(AF_INET, SOCK_STREAM, 0) ;
if(theArdourToCompositorSocket == -1)
{
return(false) ;
}
-
+
int on = 1 ;
setsockopt(theArdourToCompositorSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)) ;
-
+
sockaddr_in m_addr ;
m_addr.sin_family = AF_INET ;
m_addr.sin_port = htons(port) ;
m_addr.sin_addr.s_addr = inet_addr(hostIp) ;
-
+
int status = ::connect(theArdourToCompositorSocket, (sockaddr *) &m_addr, sizeof(m_addr)) ;
-
+
if(status == -1)
{
- theArdourToCompositorSocket = -1 ;
+ theArdourToCompositorSocket = -1 ;
return(false) ;
}
-
+
return(true) ;
}
@@ -284,7 +284,7 @@ ImageFrameSocketHandler::get_socket_descriptor()
//---------------------------------------------------------------------------------------//
// Handle Sending messages to the Image Compositor
-
+
//----------------------------
// ImageFrameTimeAxis Messages
@@ -302,25 +302,25 @@ ImageFrameSocketHandler::send_imageframe_time_axis_removed(const string & track_
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::REMOVE_ITEM << ardourvis::IMAGEFRAME_TIME_AXIS ;
-
+
// add the id length, and the id
msgBuffer << std::setw(3) << track_id.length() ;
msgBuffer << track_id ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Sends a message indicating that an ImageFrameTimeAxis has been renamed
*
@@ -333,28 +333,28 @@ void
ImageFrameSocketHandler::send_imageframe_time_axis_renamed(const string & new_id, const string & old_id, void* src, ImageFrameTimeAxis* time_axis)
{
// ENSURE_GUI_THREAD(SigC::bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), new_id, old_id, src, time_axis));
-
+
if(this == src || src == 0)
{
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::IMAGEFRAME_TIME_AXIS ;
-
+
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
msgBuffer << old_id ;
-
+
// add the new id and length
msgBuffer << std::setw(3) << new_id.length() ;
msgBuffer << new_id ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
@@ -364,7 +364,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_renamed(const string & new_id
//------------------------
// MarkerTimeAxis Messages
-
+
/**
* Sends a message stating that the named marker time axis has been removed
*
@@ -379,25 +379,25 @@ ImageFrameSocketHandler::send_marker_time_axis_removed(const string & track_id,
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::REMOVE_ITEM << ardourvis::MARKER_TIME_AXIS ;
-
+
// add the id length, and the id
msgBuffer << std::setw(3) << track_id.length() ;
msgBuffer << track_id ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Sends a message indicating that an MarkerTimeAxis has been renamed
*
@@ -410,30 +410,30 @@ void
ImageFrameSocketHandler::send_marker_time_axis_renamed(const string & new_id, const string & old_id, void* src, MarkerTimeAxis* time_axis)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_marker_time_axis_renamed), new_id, old_id, src, time_axis));
-
+
if(this == src || src == 0)
{
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// ctreate a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::MARKER_TIME_AXIS ;
-
+
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
msgBuffer << old_id ;
-
+
// add the new id and length
msgBuffer << std::setw(3) << new_id.length() ;
msgBuffer << new_id ;
-
+
send_message(msgBuffer.str()) ;
-
+
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
@@ -457,23 +457,23 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_removed(const string &
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::REMOVE_ITEM << ardourvis::IMAGEFRAME_GROUP ;
-
+
// add the id length, and the id of the parent image time axis
std::string track_id = group->get_view().trackview().name() ;
msgBuffer << std::setw(3) << track_id.length() ;
msgBuffer << track_id ;
-
+
// add the group id and length
msgBuffer << std::setw(3) << group_id.length() ;
msgBuffer << group_id ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
@@ -493,34 +493,34 @@ void
ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(const string & new_id, const string & old_id, void* src, ImageFrameTimeAxisGroup* group)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed), new_id, old_id, src, group));
-
+
if(this == src || src == 0)
{
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// ctreate a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::IMAGEFRAME_GROUP ;
-
+
// add the track this group is upon
std::string track_id = group->get_view().trackview().name() ;
- msgBuffer << std::setw(3) << track_id.length() << track_id ;
-
+ msgBuffer << std::setw(3) << track_id.length() << track_id ;
+
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
msgBuffer << old_id ;
-
+
// add the new id and length
msgBuffer << std::setw(3) << new_id.length() ;
msgBuffer << new_id ;
-
+
send_message(msgBuffer.str()) ;
-
+
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
@@ -529,7 +529,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(const string &
//---------------------------------
// ImageFrameView Messages
-
+
/**
* Send an Image Frame View Item position changed message
*
@@ -541,31 +541,31 @@ void
ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), pos, src, item));
-
+
if(this == src || src == 0)
{
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::IMAGEFRAME_ITEM << ardourvis::POSITION_CHANGE ;
-
+
// add the item description
this->compose_imageframe_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << pos ;
-
+
send_message(msgBuffer.str()) ;
-
+
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Send a Image Frame View item duration changed message
*
@@ -577,30 +577,30 @@ void
ImageFrameSocketHandler::send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), dur, src, item));
-
+
if(this == src || src == 0)
{
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::IMAGEFRAME_ITEM << ardourvis::DURATION_CHANGE ;
-
+
this->compose_imageframe_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << dur ;
-
+
send_message(msgBuffer.str()) ;
-
+
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Send a message indicating that an ImageFrameView has been renamed
*
@@ -616,27 +616,27 @@ ImageFrameSocketHandler::send_imageframe_view_renamed(const string & new_id, con
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// ctreate a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::IMAGEFRAME_ITEM ;
-
+
this->compose_imageframe_item_desc(item, msgBuffer) ;
-
+
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
msgBuffer << old_id ;
-
+
send_message(msgBuffer.str()) ;
-
+
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Send a message indicating that an ImageFrameView item has been removed message
*
@@ -651,14 +651,14 @@ ImageFrameSocketHandler::send_imageframe_view_removed(const string & item_id, vo
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::REMOVE_ITEM << ardourvis::IMAGEFRAME_ITEM ;
-
+
// add the id length, and the id
ImageFrameTimeAxisGroup* parentGroup = item->get_time_axis_group() ;
std::string group_id = parentGroup->get_group_name() ;
@@ -666,7 +666,7 @@ ImageFrameSocketHandler::send_imageframe_view_removed(const string & item_id, vo
msgBuffer << std::setw(3) << track_id.length() << track_id ;
msgBuffer << std::setw(3) << group_id.length() << group_id ;
msgBuffer << std::setw(3) << item_id.length() << item_id ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
@@ -679,7 +679,7 @@ ImageFrameSocketHandler::send_imageframe_view_removed(const string & item_id, vo
//---------------------------------
// MarkerView Messages
-
+
/**
* Send a Marker View Item position changed message
*
@@ -694,26 +694,26 @@ ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* s
{
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::MARKER_ITEM << ardourvis::POSITION_CHANGE ;
-
+
// add the item description
this->compose_marker_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << pos ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Send a Marker View item duration changed message
*
@@ -728,26 +728,26 @@ ImageFrameSocketHandler::send_marker_view_duration_change(nframes_t dur, void* s
{
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::MARKER_ITEM << ardourvis::DURATION_CHANGE ;
-
+
this->compose_marker_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << dur ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
-}
+}
+
-
/**
* Send a message indicating that a MarkerView has been renamed
*
@@ -764,27 +764,27 @@ ImageFrameSocketHandler::send_marker_view_renamed(const string & new_id, const s
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// ctreate a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::MARKER_ITEM ;
-
+
this->compose_marker_item_desc(item, msgBuffer) ;
-
+
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
msgBuffer << old_id ;
-
+
send_message(msgBuffer.str()) ;
-
+
// XXX should do something with the return
std::string retmsg ;
read_message(retmsg) ;
}
-
+
/**
* Send a message indicating that a MarkerView item has been removed message
*
@@ -793,26 +793,26 @@ ImageFrameSocketHandler::send_marker_view_renamed(const string & new_id, const s
* @param item the MarkerView which has been removed
*/
void
-ImageFrameSocketHandler::send_marker_view_removed(const string & item_id, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_removed(const string & item_id, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
// ie the change originated from us, then dont send any message back
return ;
}
-
+
// create a message buffer
std::ostringstream msgBuffer ;
msgBuffer << std::setfill('0') ;
-
+
// add the msg type
msgBuffer << ardourvis::REMOVE_ITEM << ardourvis::MARKER_ITEM ;
-
+
// add the id length, and the id
std::string track_id = item->get_time_axis_view().name() ;
msgBuffer << std::setw(3) << track_id.length() << track_id ;
msgBuffer << std::setw(3) << item_id.length() << item_id ;
-
+
send_message(msgBuffer.str()) ;
// XXX should do something with the return
@@ -834,7 +834,7 @@ ImageFrameSocketHandler::send_marker_view_removed(const string & item_id, void*
//---------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------//
// Message breakdown ie avoid a big if...then...else
-
+
/**
* Handle insert item requests
@@ -846,7 +846,7 @@ ImageFrameSocketHandler::handle_insert_message(const char* msg)
{
// handle the insert item message
// determine the object type to insert based upon characters 2-3
-
+
std::string oType = get_message_part(2,2,msg) ;
if(oType == ardourvis::IMAGEFRAME_TIME_AXIS)
@@ -871,7 +871,7 @@ ImageFrameSocketHandler::handle_insert_message(const char* msg)
}
else
{
- std::string errMsg = "Unknown Object type during insert: " ;
+ std::string errMsg = "Unknown Object type during insert: " ;
errMsg.append(oType) ;
send_return_failure(errMsg) ;
}
@@ -887,7 +887,7 @@ ImageFrameSocketHandler::handle_remove_message(const char* msg)
{
// handle the removal of an item message
// determine the object type to remove based upon characters 2-3
-
+
std::string oType = get_message_part(2,2,msg) ;
if(oType == ardourvis::IMAGEFRAME_TIME_AXIS)
@@ -908,7 +908,7 @@ ImageFrameSocketHandler::handle_remove_message(const char* msg)
}
else
{
- std::string errMsg = "Unknown Object type during Remove: " ;
+ std::string errMsg = "Unknown Object type during Remove: " ;
errMsg.append(oType) ;
send_return_failure(errMsg) ;
}
@@ -924,9 +924,9 @@ ImageFrameSocketHandler::handle_rename_message(const char* msg)
{
// handle the renaming of an item message
// determine the object type to rename based upon characters 2-3
-
+
std::string oType = get_message_part(2,2,msg) ;
-
+
if(oType == ardourvis::IMAGEFRAME_TIME_AXIS)
{
this->handle_rename_imageframe_time_axis(msg) ;
@@ -945,7 +945,7 @@ ImageFrameSocketHandler::handle_rename_message(const char* msg)
}
else
{
- std::string errMsg = "Unknown Object type during Rename: " ;
+ std::string errMsg = "Unknown Object type during Rename: " ;
errMsg.append(oType) ;
send_return_failure(errMsg) ;
}
@@ -961,7 +961,7 @@ ImageFrameSocketHandler::handle_request_data(const char* msg)
{
// determine the request type
std::string reqType = get_message_part(2,2,msg) ;
-
+
if(reqType == ardourvis::SESSION_NAME)
{
handle_session_name_request(msg) ;
@@ -973,15 +973,15 @@ ImageFrameSocketHandler::handle_request_data(const char* msg)
*
* @param msg the received message
*/
-void
+void
ImageFrameSocketHandler::handle_item_update_message(const char* msg)
{
// determin the object that requires updating, characters 2-3
std::string oType = get_message_part(2,2,msg) ;
-
+
// What needs updating? chars 4-5
std::string attr = get_message_part(4,2,msg) ;
-
+
if(oType == ardourvis::IMAGEFRAME_ITEM)
{
if(attr == ardourvis::POSITION_CHANGE)
@@ -1014,7 +1014,7 @@ ImageFrameSocketHandler::handle_item_update_message(const char* msg)
}
else
{
- std::string errMsg = "Unknown Attribute during Item Update: " ;
+ std::string errMsg = "Unknown Attribute during Item Update: " ;
errMsg.append(oType) ;
send_return_failure(errMsg) ;
}
@@ -1031,14 +1031,14 @@ ImageFrameSocketHandler::handle_item_update_message(const char* msg)
}
else
{
- std::string errMsg = "Unknown Attribute during Item Update: " ;
+ std::string errMsg = "Unknown Attribute during Item Update: " ;
errMsg.append(oType) ;
send_return_failure(errMsg) ;
}
}
else
{
- std::string errMsg = "Unknown Object type during Item Update: " ;
+ std::string errMsg = "Unknown Object type during Item Update: " ;
errMsg.append(oType) ;
send_return_failure(errMsg) ;
}
@@ -1054,23 +1054,23 @@ ImageFrameSocketHandler::handle_item_selected(const char* msg)
{
// determine the object that requires updating, characters 2-3
std::string oType = get_message_part(2,2,msg) ;
-
+
if(oType == std::string(ardourvis::IMAGEFRAME_ITEM))
{
int position = 4 ; // message type chars
-
+
std::string track_id ;
std::string scene_id ;
std::string item_id ;
int track_id_size ;
int scene_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
-
+
// get the named time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
-
+
if(!ifta)
{
send_return_failure(std::string("No parent Image Track found : ").append(track_id)) ;
@@ -1112,7 +1112,7 @@ void
ImageFrameSocketHandler::handle_session_action(const char* msg)
{
std::string actionType = get_message_part(2,2,msg) ;
-
+
if(actionType == ardourvis::OPEN_SESSION)
{
this->handle_open_session(msg) ;
@@ -1129,7 +1129,7 @@ ImageFrameSocketHandler::handle_session_action(const char* msg)
//---------------------------------------------------------------------------------------//
// handlers for specific insert procedures
-
+
/**
* Handle the insertion of a new ImaegFrameTimeAxis
*
@@ -1139,15 +1139,15 @@ void
ImageFrameSocketHandler::handle_insert_imageframe_time_axis(const char* msg)
{
int position = 4 ; // message type chars
-
+
// get the ImageFrameTrack name size
int track_name_size = atoi(get_message_part(position, ardourvis::TEXT_SIZE_CHARS, msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the image frame track name
std::string track_name = get_message_part(position, track_name_size, msg) ;
position += track_name_size ;
-
+
// check we dont already have an time axis with that name
TimeAxisView* tav = thePublicEditor.get_named_time_axis(track_name) ;
if(tav)
@@ -1160,19 +1160,19 @@ ImageFrameSocketHandler::handle_insert_imageframe_time_axis(const char* msg)
{
thePublicEditor.add_imageframe_time_axis(track_name, this) ;
TimeAxisView* new_tav = thePublicEditor.get_named_time_axis(track_name) ;
-
+
if(new_tav)
{
ImageFrameTimeAxis* ifta = (ImageFrameTimeAxis*)new_tav ;
ifta->VisualTimeAxisRemoved.connect(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_removed)) ;
ifta->NameChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_time_axis_renamed), ifta)) ;
-
+
send_return_success() ;
}
else
{
std::string msg("Addition Failed: ") ;
- msg.append(track_name) ;
+ msg.append(track_name) ;
send_return_failure(msg) ;
}
}
@@ -1188,20 +1188,20 @@ void
ImageFrameSocketHandler::handle_insert_marker_time_axis(const char* msg)
{
int position = 4 ; // message type chars
-
+
// get the ImageFrameTrack name size
int track_name_size = atoi(get_message_part(position, ardourvis::TEXT_SIZE_CHARS, msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the image frame track name
std::string track_name = get_message_part(position, track_name_size, msg) ;
position += track_name_size ;
-
+
// get the size of the name of the associated track
int assoc_track_name_size = atoi(get_message_part(position, ardourvis::TEXT_SIZE_CHARS, msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
- // get the name of the track we associate the marker track with
+
+ // get the name of the track we associate the marker track with
std::string assoc_track_name = get_message_part(position, assoc_track_name_size, msg) ;
position += assoc_track_name_size ;
@@ -1221,9 +1221,9 @@ ImageFrameSocketHandler::handle_insert_marker_time_axis(const char* msg)
{
thePublicEditor.add_imageframe_marker_time_axis(track_name, assoc_tav, this) ;
TimeAxisView* new_tav = thePublicEditor.get_named_time_axis(track_name) ;
-
+
bool added = false ;
-
+
if(new_tav)
{
MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(new_tav) ;
@@ -1234,11 +1234,11 @@ ImageFrameSocketHandler::handle_insert_marker_time_axis(const char* msg)
mta->NameChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_marker_time_axis_renamed), mta)) ;
}
}
-
+
if(added)
{
std::string msg("Addition Failed: ") ;
- msg.append(track_name) ;
+ msg.append(track_name) ;
send_return_failure(msg) ;
}
}
@@ -1260,34 +1260,34 @@ void
ImageFrameSocketHandler::handle_insert_imageframe_group(const char* msg)
{
int position = 4 ; // message type chars
-
+
// get the ImageFrameTrack name size
int track_name_size = atoi(get_message_part(position, ardourvis::TEXT_SIZE_CHARS, msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the image frame track name
std::string track_name = get_message_part(position, track_name_size, msg) ;
position += track_name_size ;
-
+
// get the scene id size
int scene_id_size = atoi(get_message_part(position, ardourvis::TEXT_SIZE_CHARS, msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the scene id
std::string scene_id = get_message_part(position, scene_id_size, msg) ;
position += scene_id_size ;
-
-
+
+
// get the named ImageFrameTrack
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_name)) ;
-
+
// check we got a valid ImageFrameTimeAxis
if(!ifta)
{
send_return_failure(std::string("No Image Frame Time Axis Found: ").append(track_name)) ;
return ;
}
-
+
ImageFrameTimeAxisGroup* iftag = ifta->get_view()->add_imageframe_group(scene_id, this) ;
if(!iftag)
{
@@ -1311,35 +1311,35 @@ void
ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
{
int position = 4 ; // message type chars
-
+
// get the ImageFrameTrack name size
int track_name_size = atoi(get_message_part(position,3,msg).c_str()) ;
position += 3 ;
-
+
// get the ImageFrameTrack Name
std::string imageframe_track_name = get_message_part(position,track_name_size,msg) ;
position += track_name_size ;
-
+
// get the scene name size
int scene_size = atoi(get_message_part(position,3,msg).c_str()) ;
position += 3 ;
-
+
// get the scene Name
std::string scene_name = get_message_part(position,scene_size,msg) ;
position += scene_size ;
-
+
// get the image frame_id size
int image_id_size = atoi(get_message_part(position,3,msg).c_str()) ;
position += 3 ;
-
+
// get the image frame_id
std::string image_id = get_message_part(position,image_id_size,msg) ;
position += image_id_size ;
-
+
// get the start frame value
nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
-
+
// get the duration value
nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
@@ -1347,23 +1347,23 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
//get the named time axis view we about to add an image to
TimeAxisView* tav = thePublicEditor.get_named_time_axis(imageframe_track_name) ;
ImageFrameTimeAxis* ifta = 0 ;
-
+
if(tav)
{
ifta = dynamic_cast<ImageFrameTimeAxis*>(tav) ;
}
-
+
if(!ifta)
{
std::string errmsg("No Parent Image Track Found: ") ;
errmsg.append(imageframe_track_name) ;
send_return_failure(errmsg) ;
-
+
// dont really like all these returns mid-way
// but this is goinf to get awfully if..then nested if not
return ;
}
-
+
// check the parent group exists
ImageFrameTimeAxisGroup* iftag = ifta->get_view()->get_named_imageframe_group(scene_name) ;
if(!iftag)
@@ -1373,36 +1373,36 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
send_return_failure(errmsg) ;
return ;
}
-
+
// ok, so we have the parent group and track, now we need dome image data
-
-
+
+
//
// request the image data from the image compositor
//
-
+
// ctreate a message buffer
std::ostringstream reqBuffer ;
reqBuffer << std::setfill('0') ;
-
+
// add the msg type
reqBuffer << REQUEST_DATA << IMAGE_RGB_DATA ;
-
+
// add the image track and size
reqBuffer << std::setw(ardourvis::TEXT_SIZE_CHARS) << track_name_size ;
reqBuffer << imageframe_track_name ;
-
+
// add the scene id and size
reqBuffer << std::setw(ardourvis::TEXT_SIZE_CHARS) << scene_size ;
reqBuffer << scene_name ;
-
+
// add the image id and size
reqBuffer << std::setw(ardourvis::TEXT_SIZE_CHARS) << image_id_size ;
reqBuffer << image_id ;
-
+
// add the preferred image height
reqBuffer << std::setw(ardourvis::TEXT_SIZE_CHARS) << ifta->get_image_display_height() ;
-
+
// send the request message
send_message(reqBuffer.str()) ;
@@ -1413,13 +1413,13 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
std::string init_image_data_msg ;
read_message(init_image_data_msg) ;
int init_msg_pos = 4 ;
-
+
int imgWidth = atoi(init_image_data_msg.substr(init_msg_pos, ardourvis::IMAGE_SIZE_CHARS).c_str()) ;
init_msg_pos += ardourvis::IMAGE_SIZE_CHARS ;
int imgHeight = atoi(init_image_data_msg.substr(init_msg_pos, ardourvis::IMAGE_SIZE_CHARS).c_str()) ;
init_msg_pos += ardourvis::IMAGE_SIZE_CHARS ;
int imgChannels = atoi(init_image_data_msg.substr(init_msg_pos, ardourvis::IMAGE_SIZE_CHARS).c_str()) ;
- init_msg_pos += ardourvis::IMAGE_SIZE_CHARS ;
+ init_msg_pos += ardourvis::IMAGE_SIZE_CHARS ;
int imgSize = atoi(init_image_data_msg.substr(init_msg_pos, ardourvis::IMAGE_DATA_MESSAGE_SIZE_CHARS).c_str()) ;
// send a success msg
@@ -1444,7 +1444,7 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
ifv->PositionChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), ifv)) ;
ifv->DurationChanged.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), ifv)) ;
ifv->ItemRemoved.connect(sigc::bind(sigc::mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_removed), ifv)) ;
-
+
send_return_success() ;
}
else
@@ -1465,8 +1465,8 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
void
ImageFrameSocketHandler::handle_insert_marker_view(const char* msg)
{}
-
-
+
+
//---------------------------------------------------------------------------------------//
// handlers for specific removal procedures
@@ -1479,7 +1479,7 @@ ImageFrameSocketHandler::handle_insert_marker_view(const char* msg)
void
ImageFrameSocketHandler::handle_remove_imageframe_time_axis(const char* msg)
{}
-
+
/**
* Handle the removal of an MarkerTimeAxis
*
@@ -1488,7 +1488,7 @@ ImageFrameSocketHandler::handle_remove_imageframe_time_axis(const char* msg)
void
ImageFrameSocketHandler::handle_remove_marker_time_axis(const char* msg)
{}
-
+
/**
* Handle the removal of an ImageFrameTimeAxisGroup
*
@@ -1497,7 +1497,7 @@ ImageFrameSocketHandler::handle_remove_marker_time_axis(const char* msg)
void
ImageFrameSocketHandler::handle_remove_imageframe_time_axis_group(const char* msg)
{}
-
+
/**
* Handle the removal of an ImageFrameItem
*
@@ -1506,7 +1506,7 @@ ImageFrameSocketHandler::handle_remove_imageframe_time_axis_group(const char* ms
void
ImageFrameSocketHandler::handle_remove_imageframe_view(const char* msg)
{}
-
+
/**
* Handle the removal of an MarkerItem
*
@@ -1517,12 +1517,12 @@ ImageFrameSocketHandler::handle_remove_marker_view(const char* msg)
{}
-
-
+
+
//---------------------------------------------------------------------------------------//
-// handlers for the specific rename procedures
-
+// handlers for the specific rename procedures
+
/**
* Handle the renaming of an ImageTimeAxis
*
@@ -1532,25 +1532,25 @@ void
ImageFrameSocketHandler::handle_rename_imageframe_time_axis(const char* msg)
{
// msg [MVIT][oldSize][oldId][newSize][newId]
-
+
int position = 4 ; // message type chars
// get the old Id size
int old_id_size = atoi(get_message_part(position,3,msg).c_str()) ;
position += 3 ;
-
+
// get the old id
std::string old_id = get_message_part(position,old_id_size,msg) ;
position += old_id_size ;
-
+
//get the new Id size
int new_id_size = atoi(get_message_part(position,3,msg).c_str()) ;
position += 3 ;
-
+
// get the new Id
std::string new_id = get_message_part(position,new_id_size,msg) ;
position += new_id_size ;
-
+
// get the Named time axis
TimeAxisView* tav = thePublicEditor.get_named_time_axis(old_id) ;
if(dynamic_cast<ImageFrameTimeAxis*>(tav))
@@ -1566,7 +1566,7 @@ ImageFrameSocketHandler::handle_rename_imageframe_time_axis(const char* msg)
send_return_failure(msg) ;
}
}
-
+
/**
* Handle the renaming of an MarkerTimeAxis
*
@@ -1575,7 +1575,7 @@ ImageFrameSocketHandler::handle_rename_imageframe_time_axis(const char* msg)
void
ImageFrameSocketHandler::handle_rename_marker_time_axis(const char* msg)
{}
-
+
/**
* Handle the renaming of an ImageFrameItem
*
@@ -1584,7 +1584,7 @@ ImageFrameSocketHandler::handle_rename_marker_time_axis(const char* msg)
void
ImageFrameSocketHandler::handle_rename_imageframe_time_axis_group(const char* msg)
{}
-
+
/**
* Handle the renaming of an ImageFrameItem
*
@@ -1593,7 +1593,7 @@ ImageFrameSocketHandler::handle_rename_imageframe_time_axis_group(const char* ms
void
ImageFrameSocketHandler::handle_rename_imageframe_view(const char* msg)
{}
-
+
/**
* Handle the renaming of an Marker
*
@@ -1602,13 +1602,13 @@ ImageFrameSocketHandler::handle_rename_imageframe_view(const char* msg)
void
ImageFrameSocketHandler::handle_rename_marker_view(const char* msg)
{}
-
-
-
+
+
+
//---------------------------------------------------------------------------------------//
// handlers for data request
-
+
/**
* Handle a request for the sessnio naem fo the current session
* We return a failure state if no session is open
@@ -1619,7 +1619,7 @@ void
ImageFrameSocketHandler::handle_session_name_request(const char* msg)
{
ARDOUR::Session* currentSession = thePublicEditor.current_session() ;
-
+
if(currentSession == 0)
{
// no current session, return failure
@@ -1630,14 +1630,14 @@ ImageFrameSocketHandler::handle_session_name_request(const char* msg)
{
std::string sessionName = currentSession->name() ;
std::string sessionPath = currentSession->path() ;
-
+
if(sessionPath[sessionPath.length() -1] != '/')
{
sessionPath.append("/") ;
}
-
+
sessionPath.append(sessionName) ;
-
+
std::ostringstream msgBuf ;
msgBuf << ardourvis::RETURN_DATA << ardourvis::SESSION_NAME ;
msgBuf << std::setfill('0') ;
@@ -1646,14 +1646,14 @@ ImageFrameSocketHandler::handle_session_name_request(const char* msg)
send_message(msgBuf.str()) ;
}
}
-
-
+
+
//---------------------------------------------------------------------------------------//
// handlers for specific item update changes
-
+
/**
* Handle ImageFrameView positional changes
*
@@ -1663,28 +1663,28 @@ void
ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string scene_id ;
std::string item_id ;
int track_id_size ;
int scene_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
-
+
nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
position += ardourvis::TIME_VALUE_CHARS ;
-
+
// get the named time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
-
+
if(!ifta)
{
send_return_failure(std::string("No parent Image Track found: ").append(track_id)) ;
return ;
}
-
+
// get the parent scene
ImageFrameTimeAxisGroup* iftag = ifta->get_view()->get_named_imageframe_group(scene_id) ;
if(!iftag)
@@ -1692,20 +1692,20 @@ ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
send_return_failure(std::string("No parent Scene found: ").append(scene_id)) ;
return ;
}
-
+
ImageFrameView* ifv = iftag->get_named_imageframe_item(item_id) ;
-
+
if(!ifv)
{
send_return_failure(std::string("No Image Frame Item found: ").append(item_id)) ;
return ;
}
-
+
ifv->set_position(start_frame, this) ;
send_return_success() ;
}
-
+
/**
* Handle ImageFrameView Duration changes
*
@@ -1715,28 +1715,28 @@ void
ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string scene_id ;
std::string item_id ;
int track_id_size ;
int scene_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
-
+
nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
-
+
// get the named time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
-
+
if(!ifta)
{
send_return_failure(std::string("No parent Image Track found : ").append(track_id)) ;
return ;
}
-
+
// get the parent scene
ImageFrameTimeAxisGroup* iftag = ifta->get_view()->get_named_imageframe_group(scene_id) ;
if(!iftag)
@@ -1744,15 +1744,15 @@ ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
send_return_failure(std::string("No parent Scene found : ").append(scene_id)) ;
return ;
}
-
+
ImageFrameView* ifv = iftag->get_named_imageframe_item(item_id) ;
-
+
if(!ifv)
{
send_return_failure(std::string("No Image Frame Item found : ").append(item_id)) ;
return ;
}
-
+
ifv->set_duration(duration, this) ;
send_return_success() ;
}
@@ -1766,19 +1766,19 @@ void
ImageFrameSocketHandler::handle_imageframe_position_lock_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string group_id ;
std::string item_id ;
int track_id_size ;
int group_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
-
+
std::string pos_lock = get_message_part(position,1,msg) ;
bool pos_lock_active = false ;
-
+
if(pos_lock == "0")
{
pos_lock_active = false ;
@@ -1792,9 +1792,9 @@ ImageFrameSocketHandler::handle_imageframe_position_lock_update(const char* msg)
send_return_failure(std::string("Unknown Value used during Position Loack: ").append(pos_lock)) ;
return ;
}
-
+
position += 1 ;
-
+
int errcode ;
std::string errmsg ;
ImageFrameView* ifv = get_imageframe_view_from_desc(track_id, group_id, item_id, errcode, errmsg) ;
@@ -1808,7 +1808,7 @@ ImageFrameSocketHandler::handle_imageframe_position_lock_update(const char* msg)
send_return_failure(errmsg) ;
}
}
-
+
/**
* Handle ImageFrameView Maximum Duration changes
*
@@ -1818,19 +1818,19 @@ void
ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string group_id ;
std::string item_id ;
int track_id_size ;
int group_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
-
+
nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
-
+
int errcode ;
std::string errmsg ;
ImageFrameView* ifv = get_imageframe_view_from_desc(track_id, group_id, item_id, errcode, errmsg) ;
@@ -1844,7 +1844,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char*
send_return_failure(errmsg) ;
}
}
-
+
/**
* Handle image frame max duration enable constraint changes
*
@@ -1854,19 +1854,19 @@ void
ImageFrameSocketHandler::handle_imageframe_view_max_duration_enable_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string group_id ;
std::string item_id ;
int track_id_size ;
int group_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
-
+
std::string active = get_message_part(position,1,msg) ;
bool max_duration_active = false ;
-
+
if(active == "0")
{
max_duration_active = false ;
@@ -1880,9 +1880,9 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_enable_update(const
send_return_failure(std::string("Unknown Value used during enable max duration: ").append(active)) ;
return ;
}
-
+
position += 1 ;
-
+
int errcode ;
std::string errmsg ;
ImageFrameView* ifv = get_imageframe_view_from_desc(track_id, group_id, item_id, errcode, errmsg) ;
@@ -1896,7 +1896,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_enable_update(const
send_return_failure(errmsg) ;
}
}
-
+
/**
* Handle ImageFrameView Minimum Duration changes
*
@@ -1906,19 +1906,19 @@ void
ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string group_id ;
std::string item_id ;
int track_id_size ;
int group_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
-
+
nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
-
+
int errcode ;
std::string errmsg ;
ImageFrameView* ifv = get_imageframe_view_from_desc(track_id, group_id, item_id, errcode, errmsg) ;
@@ -1932,7 +1932,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char*
send_return_failure(errmsg) ;
}
}
-
+
/**
* Handle image frame min duration enable constraint changes
*
@@ -1942,19 +1942,19 @@ void
ImageFrameSocketHandler::handle_imageframe_view_min_duration_enable_update(const char* msg)
{
int position = 6 ; // message type chars
-
+
std::string track_id ;
std::string group_id ;
std::string item_id ;
int track_id_size ;
int group_id_size ;
int item_id_size ;
-
+
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
-
+
std::string active = get_message_part(position,1,msg) ;
bool min_duration_active = false ;
-
+
if(active == "0")
{
min_duration_active = false ;
@@ -1968,9 +1968,9 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_enable_update(const
send_return_failure(std::string("Unknown Value used during enable max duration: ").append(active)) ;
return ;
}
-
+
position += 1 ;
-
+
int errcode ;
std::string errmsg ;
ImageFrameView* ifv = get_imageframe_view_from_desc(track_id, group_id, item_id, errcode, errmsg) ;
@@ -1984,7 +1984,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_enable_update(const
send_return_failure(errmsg) ;
}
}
-
+
/**
* Handle MarkerView position changes
*
@@ -1993,7 +1993,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_enable_update(const
void
ImageFrameSocketHandler::handle_marker_view_position_update(const char* msg)
{}
-
+
/**
* Handle MarkerView duration changes
*
@@ -2012,7 +2012,7 @@ void
ImageFrameSocketHandler::handle_marker_view_position_lock_update(const char* msg)
{
}
-
+
/**
* Handle MarkerView maximum duration changes
*
@@ -2021,7 +2021,7 @@ ImageFrameSocketHandler::handle_marker_view_position_lock_update(const char* msg
void
ImageFrameSocketHandler::handle_marker_view_max_duration_update(const char* msg)
{}
-
+
/**
* Handle MarkerView minimum duration changes
*
@@ -2037,7 +2037,7 @@ ImageFrameSocketHandler::handle_marker_view_min_duration_update(const char* msg)
//---------------------------------------------------------------------------------------//
// handlers for Session Actions
-
+
/**
* Handle the opening of a named audio session
*
@@ -2047,19 +2047,19 @@ void
ImageFrameSocketHandler::handle_open_session(const char* msg)
{
// msg [SAOS][sessionSize][sessionPath]
-
+
int position = 4 ; // message type chars
// get the session name size
int session_name_size = atoi(get_message_part(position,3,msg).c_str()) ;
position += 3 ;
-
+
// get the session name
std::string session_name = get_message_part(position,session_name_size,msg) ;
position += session_name_size ;
-
-
- // open the session
+
+
+ // open the session
std::string path, name ;
bool isnew;
@@ -2076,7 +2076,7 @@ ImageFrameSocketHandler::handle_open_session(const char* msg)
}
}
-
+
/**
* Handle the closing of a named audio session
*
@@ -2085,10 +2085,10 @@ ImageFrameSocketHandler::handle_open_session(const char* msg)
void
ImageFrameSocketHandler::handle_closed_session(const char* msg)
{}
-
+
//---------------------------------------------------------------------------------------//
// handlers for the shutdown of the Image Compositor
-
+
/**
* Handle the shutdown message from the image compositor
*
@@ -2107,11 +2107,11 @@ ImageFrameSocketHandler::handle_shutdown(const char* msg)
-
-
+
+
//---------------------------------------------------------------------------------------//
// convenince methods to break up messages
-
+
/**
* Returns part of the received message as a std::string
*
@@ -2127,7 +2127,7 @@ ImageFrameSocketHandler::get_message_part(int start, int32_t num_chars, const ch
strncpy(buf,msg+start,num_chars) ;
buf[num_chars] = '\0' ;
std::string s(buf) ;
-
+
return(s) ;
}
@@ -2152,23 +2152,23 @@ ImageFrameSocketHandler::decompose_imageframe_item_desc(const char* msg, int& po
// get the track Id size
track_id_size = atoi(get_message_part(position,ardourvis::TEXT_SIZE_CHARS,msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the track id
track_id = get_message_part(position,track_id_size,msg) ;
position += track_id_size ;
-
+
// get the track Id size
scene_id_size = atoi(get_message_part(position,ardourvis::TEXT_SIZE_CHARS,msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the scene id
scene_id = get_message_part(position,scene_id_size,msg) ;
position += scene_id_size ;
-
+
// get the item id size
item_id_size = atoi(get_message_part(position,ardourvis::TEXT_SIZE_CHARS,msg).c_str()) ;
position += ardourvis::TEXT_SIZE_CHARS ;
-
+
// get the item id
item_id = get_message_part(position,item_id_size,msg) ;
position += item_id_size ;
@@ -2187,11 +2187,11 @@ ImageFrameSocketHandler::compose_imageframe_item_desc(ImageFrameView* ifv, std::
{
buffer << std::setw(3) << ifv->get_time_axis_group()->get_view().trackview().name().length() ;
buffer << ifv->get_time_axis_group()->get_view().trackview().name() ;
-
+
// add the parent scene
buffer << std::setw(3) << ifv->get_time_axis_group()->get_group_name().length() ;
buffer << ifv->get_time_axis_group()->get_group_name() ;
-
+
// add the ImageFrameItem id length and Id
buffer << setw(3) << ifv->get_item_name().length() ;
buffer << ifv->get_item_name() ;
@@ -2209,17 +2209,17 @@ void
ImageFrameSocketHandler::compose_marker_item_desc(MarkerView* mv, std::ostringstream& buffer)
{
MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(&mv->get_time_axis_view()) ;
-
+
if(!mta)
{
return ;
}
-
+
buffer << std::setw(3) << mta->name().length() ;
buffer << mta->name() ;
-
+
buffer << std::setw(3) << mv->get_item_name().length() ;
- buffer << mv->get_item_name() ;
+ buffer << mv->get_item_name() ;
}
@@ -2243,10 +2243,10 @@ ImageFrameView*
ImageFrameSocketHandler::get_imageframe_view_from_desc(const string & track_id, const string & group_id, const string & item_id, int& errcode, std::string& errmsg)
{
ImageFrameView* item = 0 ;
-
+
// get the named time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
-
+
if(!ifta)
{
errcode = 1 ;
@@ -2277,7 +2277,7 @@ ImageFrameSocketHandler::get_imageframe_view_from_desc(const string & track_id,
}
}
}
-
+
return(item) ;
}
@@ -2299,10 +2299,10 @@ ImageFrameSocketHandler::send_message(const string & msg)
{
//std::cout << "Sending Message [" << msg << "]\n" ;
int retcode = ::send(theArdourToCompositorSocket, msg.c_str(), msg.length(), MSG_NOSIGNAL) ;
-
+
return(retcode) ;
}
-
+
/**
* Reads a message from the Socket
*
@@ -2314,13 +2314,13 @@ ImageFrameSocketHandler::read_message(std::string& msg)
{
char buf[ardourvis::MAX_MSG_SIZE + 1] ;
memset(buf, 0, (ardourvis::MAX_MSG_SIZE + 1)) ;
-
+
msg = "" ;
int retcode = ::recv(theArdourToCompositorSocket, buf, ardourvis::MAX_MSG_SIZE, 0) ;
-
+
msg = buf ;
//std::cout << "Received Message [" << msg << "]\n" ;
-
+
return(retcode) ;
}
@@ -2348,6 +2348,6 @@ ImageFrameSocketHandler::send_return_failure(const std::string& msg)
buf << ardourvis::RETURN_FALSE ;
buf << std::setw(3) << msg.length(); ;
buf << msg ;
-
+
send_message(buf.str()) ;
}
diff --git a/gtk2_ardour/imageframe_socket_handler.h b/gtk2_ardour/imageframe_socket_handler.h
index 739a718c86..d12b8285ef 100644
--- a/gtk2_ardour/imageframe_socket_handler.h
+++ b/gtk2_ardour/imageframe_socket_handler.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param ed the PublicEditor
*/
ImageFrameSocketHandler(PublicEditor& ed) ;
-
+
/**
* Descructor
* this will shutdown the socket if open
@@ -59,7 +59,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @return the instance of the ImageFrameSocketHandler
*/
static ImageFrameSocketHandler* get_instance() ;
-
+
/**
* call back to handle doing the processing work
* This method is added to the gdk main loop and called when there is data
@@ -67,7 +67,7 @@ class ImageFrameSocketHandler : public sigc::trackable
*
*/
static void image_socket_callback(void *arg, int32_t fd, GdkInputCondition cond) ;
-
+
/**
* Attempt to connect to the image compositor on the specified host and port
*
@@ -77,19 +77,19 @@ class ImageFrameSocketHandler : public sigc::trackable
* false otherwise
*/
bool connect(const char * hostIp, int32_t port) ;
-
+
/**
* Closes the connection to th Image Compositor
*
*/
- void close_connection() ;
+ void close_connection() ;
/**
* Returns true if this ImagFrameSocketHandler is currently connected to rthe image compositor
*
* @return true if connected to the image compositor
*/
bool is_connected() ;
-
+
/**
* Sets the tag used to describe this input within gtk
* this is returned when gdk_input_add is called and is required to remove the input
@@ -97,7 +97,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param tag the gdk input tag of this input
*/
void set_gdk_input_tag(int tag) ;
-
+
/**
* Returns the gdk input tag of this input
*
@@ -105,22 +105,22 @@ class ImageFrameSocketHandler : public sigc::trackable
* @see setGdkInputTag
*/
int get_gdk_input_tag() ;
-
-
+
+
/**
* Returns the socket file descriptor
*
* @return the Sockt file descriptor
*/
int get_socket_descriptor() ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Handle Sending messages to the Image Compositor
-
+
//----------------------------
// ImageFrameTimeAxis Messages
-
+
/**
* Sends a message stating that the named image frame time axis has been removed
*
@@ -128,7 +128,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
void send_imageframe_time_axis_removed(const std::string & track_id, void* src) ;
-
+
/**
* Sends a message indicating that an ImageFrameTimeAxis has been renamed
*
@@ -138,10 +138,10 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param time_axis the time axis that has changed
*/
void send_imageframe_time_axis_renamed(const std::string & new_id, const std::string & old_id, void* src, ImageFrameTimeAxis* time_axis) ;
-
+
//------------------------
// MarkerTimeAxis Messages
-
+
/**
* Sends a message stating that the named marker time axis has been removed
*
@@ -149,7 +149,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
void send_marker_time_axis_removed(const std::string & track_id, void* src) ;
-
+
/**
* Sends a message indicating that an MarkerTimeAxis has been renamed
*
@@ -159,11 +159,11 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param time_axis the time axis that has changed
*/
void send_marker_time_axis_renamed(const std::string & new_id, const std::string & old_id, void* src, MarkerTimeAxis* time_axis) ;
-
-
+
+
//---------------------------------
// ImageFrameTimeAxisGroup Messages
-
+
/**
* Sends a message stating that the group has been removed
*
@@ -172,7 +172,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param group the group that has changed
*/
void send_imageframe_time_axis_group_removed(const std::string & group_id, void* src, ImageFrameTimeAxisGroup* group) ;
-
+
/**
* Send a message indicating that an ImageFrameTimeAxisGroup has been renamed
*
@@ -186,7 +186,7 @@ class ImageFrameSocketHandler : public sigc::trackable
//---------------------------------
// ImageFrameView Messages
-
+
/**
* Send an Image Frame View Item position changed message
*
@@ -195,7 +195,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the time axis item whos position has changed
*/
void send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item) ;
-
+
/**
* Send a Image Frame View item duration changed message
*
@@ -204,7 +204,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the item which has had a duration change
*/
void send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item) ;
-
+
/**
* Send a message indicating that an ImageFrameView has been renamed
*
@@ -213,7 +213,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the renamed item
*/
void send_imageframe_view_renamed(const std::string & new_id, const std::string & old_id, void* src, ImageFrameView* item) ;
-
+
/**
* Send a message indicating that an ImageFrameView item has been removed message
*
@@ -222,10 +222,10 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the removed item
*/
void send_imageframe_view_removed(const std::string & item_id, void* src, ImageFrameView* item) ;
-
+
//---------------------------------
// MarkerView Messages
-
+
/**
* Send a Marker View Item position changed message
*
@@ -234,7 +234,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the time axis item whos position has changed
*/
void send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item) ;
-
+
/**
* Send a Marker View item duration changed message
*
@@ -243,7 +243,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the time axis item whos position has changed
*/
void send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item) ;
-
+
/**
* Send a message indicating that a MarkerView has been renamed
*
@@ -253,7 +253,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item the MarkerView which has been renamed
*/
void send_marker_view_renamed(const std::string & new_id, const std::string & old_id, void* src, MarkerView* item) ;
-
+
/**
* Send a message indicating that a MarkerView item has been removed message
*
@@ -263,200 +263,200 @@ class ImageFrameSocketHandler : public sigc::trackable
*/
void send_marker_view_removed(const std::string & item_id, void* src, MarkerView* item) ;
-
+
//---------------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted if the socket connection is shutdown at the other end */
sigc::signal<void> CompositorSocketShutdown ;
-
+
/** Emitted as a generic error is captured from the socket connection to the animatic compositor */
sigc::signal<void> CompositorSocketError ;
-
-
+
+
protected:
-
-
+
+
private:
/* I dont like friends :-( */
friend class Editor;
-
+
/**
* Create an new instance of the ImageFrameSocketHandler, if one does not already exist
*
* @param ed the Ardour PublicEditor
*/
static ImageFrameSocketHandler* create_instance(PublicEditor& ed) ;
-
+
//---------------------------------------------------------------------------------------//
// Message breakdown ie avoid a big if...then...else
-
+
/**
* Handle insert item requests
*
* @param msg the received message
*/
void handle_insert_message(const char* msg) ;
-
+
/**
* Handle remove item requests
*
* @param msg the received message
*/
void handle_remove_message(const char* msg) ;
-
+
/**
* Handle rename item requests
*
* @param msg the received message
*/
void handle_rename_message(const char* msg) ;
-
+
/**
* Handle a request for session information
*
* @param msg the received message
*/
void handle_request_data(const char* msg) ;
-
+
/**
* Handle the update of a particular item
*
* @param msg the received message
*/
void handle_item_update_message(const char* msg) ;
-
+
/**
* Handle the selection of an Item
*
* @param msg the received message
*/
void handle_item_selected(const char* msg) ;
-
+
/**
* Handle s session action message
*
* @param msg the received message
*/
void handle_session_action(const char* msg) ;
-
+
//---------------------------------------------------------------------------------------//
// handlers for specific insert procedures
-
+
/**
* Handle the insertion of a new ImaegFrameTimeAxis
*
* @param msg the received message
*/
void handle_insert_imageframe_time_axis(const char* msg) ;
-
+
/**
* Handle the insertion of a new MarkerTimeAxis
*
* @param msg the received message
*/
void handle_insert_marker_time_axis(const char* msg) ;
-
+
/**
* Handle the insertion of a time axis group (a scene)
*
* @param msg the received message
*/
void handle_insert_imageframe_group(const char* msg) ;
-
+
/**
* Handle the insertion of a new ImageFrameItem
*
* @param msg the received message
*/
void handle_insert_imageframe_view(const char* msg) ;
-
+
/**
* Handle the insertion of a new MarkerItem
*
* @param msg the received message
*/
void handle_insert_marker_view(const char* msg) ;
-
+
//---------------------------------------------------------------------------------------//
// handlers for specific removal procedures
-
+
/**
* Handle the removal of an ImageTimeAxis
*
* @param msg the received message
*/
void handle_remove_imageframe_time_axis(const char* msg) ;
-
+
/**
* Handle the removal of an MarkerTimeAxis
*
* @param msg the received message
*/
void handle_remove_marker_time_axis(const char* msg) ;
-
+
/**
* Handle the removal of an ImageFrameTimeAxisGroup
*
* @param msg the received message
*/
void handle_remove_imageframe_time_axis_group(const char* msg) ;
-
+
/**
* Handle the removal of an ImageFrameItem
*
* @param msg the received message
*/
void handle_remove_imageframe_view(const char* msg) ;
-
+
/**
* Handle the removal of an MarkerItem
*
* @param msg the received message
*/
void handle_remove_marker_view(const char* msg) ;
-
+
//---------------------------------------------------------------------------------------//
// handlers for the specific rename procedures
-
+
/**
* Handle the renaming of an ImageTimeAxis
*
* @param msg the received message
*/
void handle_rename_imageframe_time_axis(const char* msg) ;
-
+
/**
* Handle the renaming of an MarkerTimeAxis
*
* @param msg the received message
*/
void handle_rename_marker_time_axis(const char* msg) ;
-
+
/**
* Handle the renaming of an ImageFrameItem
*
* @param msg the received message
*/
void handle_rename_imageframe_time_axis_group(const char* msg) ;
-
+
/**
* Handle the renaming of an ImageFrameItem
*
* @param msg the received message
*/
void handle_rename_imageframe_view(const char* msg) ;
-
+
/**
* Handle the renaming of an Marker
*
* @param msg the received message
*/
void handle_rename_marker_view(const char* msg) ;
-
+
//---------------------------------------------------------------------------------------//
// handlers for data request
-
+
/**
* Handle a request for the sessnio naem fo the current session
* We return a failure state if no session is open
@@ -464,129 +464,129 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param msg the received message
*/
void handle_session_name_request(const char* msg) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// handlers for specific item update changes
-
+
/**
* Handle ImageFrameView positional changes
*
* @param msg the received message
*/
void handle_imageframe_view_position_update(const char* msg) ;
-
+
/**
* Handle ImageFrameView Duration changes
*
* @param msg the received message
*/
void handle_imageframe_view_duration_update(const char* msg) ;
-
+
/**
* Handle ImageFrameView Position Lock Constraint changes
*
* @param msg the received message
*/
void handle_imageframe_position_lock_update(const char* msg) ;
-
+
/**
* Handle ImageFrameView Maximum Duration changes
*
* @param msg the received message
*/
void handle_imageframe_view_max_duration_update(const char* msg) ;
-
+
/**
* Handle image frame max duration enable constraint changes
*
* @param msg the received message
*/
void handle_imageframe_view_max_duration_enable_update(const char* msg) ;
-
+
/**
* Handle ImageFrameView Minimum Duration changes
*
* @param msg the received message
*/
void handle_imageframe_view_min_duration_update(const char* msg) ;
-
+
/**
* Handle image frame min duration enable constraint changes
*
* @param msg the received message
*/
void handle_imageframe_view_min_duration_enable_update(const char* msg) ;
-
-
+
+
/**
* Handle MarkerView position changes
*
* @param msg the received message
*/
void handle_marker_view_position_update(const char* msg) ;
-
+
/**
* Handle MarkerView duration changes
*
* @param msg the received message
*/
void handle_marker_view_duration_update(const char* msg) ;
-
+
/**
* Handle MarkerView Position Lock Constraint changes
*
* @param msg the received message
*/
void handle_marker_view_position_lock_update(const char* msg) ;
-
+
/**
* Handle MarkerView maximum duration changes
*
* @param msg the received message
*/
void handle_marker_view_max_duration_update(const char* msg) ;
-
+
/**
* Handle MarkerView minimum duration changes
*
* @param msg the received message
*/
void handle_marker_view_min_duration_update(const char* msg) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// handlers for Session Actions
-
+
/**
* Handle the opening of a named audio session
*
* @param msg the received message
*/
void handle_open_session(const char* msg) ;
-
+
/**
* Handle the closing of a named audio session
*
* @param msg the received message
*/
void handle_closed_session(const char* msg) ;
-
+
//---------------------------------------------------------------------------------------//
// handlers for the shutdown of the Image Compositor
-
+
/**
* Handle the shutdown message from the image compositor
*
* @param msg the received message
*/
void handle_shutdown(const char* msg) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// convenince methods to break up messages
-
+
/**
* Returns part of the received message as a std::string
*
@@ -596,8 +596,8 @@ class ImageFrameSocketHandler : public sigc::trackable
* @return the sub std::string of the message
*/
std::string get_message_part(int start, int32_t num_chars, const char* msg) ;
-
-
+
+
/**
* break up am image item description message
* we break the mesage up into the parent Image Track id and size,
@@ -611,7 +611,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param item_id_size
*/
void decompose_imageframe_item_desc(const char* msg, int& position, std::string& track_id, int& track_id_size, std::string& scene_id, int& scene_id_size, std::string& item_id, int& item_id_size) ;
-
+
/**
* Compose a description of the specified image frame view
* The description consists of the parent track name size and name,
@@ -631,8 +631,8 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param buffer the buffer to write the description
*/
void compose_marker_item_desc(MarkerView* mv, std::ostringstream& buffer) ;
-
-
+
+
/**
* Returns the ImageFrameView from the specified description
* The errcode parameter is used to indicate the item which caused
@@ -650,10 +650,10 @@ class ImageFrameSocketHandler : public sigc::trackable
* @return the described item on success, 0 otherwise
*/
ImageFrameView* get_imageframe_view_from_desc(const std::string & track_id, const std::string & group_ud, const std::string & item_id, int& errcode, std::string& errmsg) ;
-
+
//---------------------------------------------------------------------------------------//
// Convenince Message Send Methods
-
+
/**
* Sends a message throught the socket
*
@@ -661,7 +661,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @return the return value of the socket call
*/
int send_message(const std::string & msg) ;
-
+
/**
* Reads a message from the Socket
*
@@ -669,32 +669,32 @@ class ImageFrameSocketHandler : public sigc::trackable
* @return the return value from the socket call
*/
int read_message(std::string& msg) ;
-
+
/**
* Convenience method to compose and send a success messasge back to the Image Compositor
*
*/
void send_return_success() ;
-
+
/**
* Convenience method to compose and send a failure messasge back to the Image Compositor
*
* @param msg the failure message
*/
void send_return_failure(const std::string& msg) ;
-
+
//---------------------------------------------------------------------------------------//
// Memebr Data
-
+
/** Our instance of the socket handler, singleton */
static ImageFrameSocketHandler* _instance ;
-
+
/** The Ardour PublicEditor */
PublicEditor& thePublicEditor ;
-
+
/** the socket file descriptor */
int theArdourToCompositorSocket ;
-
+
/** This stores the 'tag' returned from gdk_input_add, which is required for removing the input */
int theGdkInputTag ;
diff --git a/gtk2_ardour/imageframe_time_axis.cc b/gtk2_ardour/imageframe_time_axis.cc
index 2f421a1132..866b677608 100644
--- a/gtk2_ardour/imageframe_time_axis.cc
+++ b/gtk2_ardour/imageframe_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(const string & track_id, PublicEditor& ed
VisualTimeAxis(track_id, ed, sess, canvas)
{
_color = unique_random_color() ;
-
+
selection_group = new ArdourCanvas::Group (*canvas_display);
selection_group->hide();
@@ -73,13 +73,13 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(const string & track_id, PublicEditor& ed
/* create our new image frame view */
view = new ImageFrameTimeAxisView(*this) ;
-
+
/* create the Image Frame Edit Menu */
create_imageframe_menu() ;
-
+
// set the initial time axis text label
label_view() ;
-
+
// set the initial height of this time axis
set_height(hNormal) ;
}
@@ -91,28 +91,28 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(const string & track_id, PublicEditor& ed
ImageFrameTimeAxis::~ImageFrameTimeAxis ()
{
GoingAway() ; /* EMIT_SIGNAL */
-
+
// Destroy all the marker views we may have associaited with this TimeAxis
for(MarkerTimeAxisList::iterator iter = marker_time_axis_list.begin(); iter != marker_time_axis_list.end(); ++iter)
{
MarkerTimeAxis* mta = *iter ;
MarkerTimeAxisList::iterator next = iter ;
next++ ;
-
+
marker_time_axis_list.erase(iter) ;
delete mta ;
mta = 0 ;
-
+
iter = next ;
}
-
+
delete image_action_menu ;
image_action_menu = 0 ;
-
+
delete selection_group;
selection_group = 0 ;
-
+
// Destroy our Axis View helper
delete view ;
view = 0 ;
@@ -124,19 +124,19 @@ ImageFrameTimeAxis::~ImageFrameTimeAxis ()
/**
* Sets the height of this TrackView to one of ths TrackHeghts
*
- * @param h
+ * @param h
*/
void
ImageFrameTimeAxis::set_height (uint32_t h)
{
VisualTimeAxis::set_height(h) ;
-
+
// tell out view helper of the change too
if(view != 0)
{
view->set_height((double) height) ;
}
-
+
// tell those interested that we have had our height changed
gui_changed("track_height",(void*)0); /* EMIT_SIGNAL */
}
@@ -194,7 +194,7 @@ ImageFrameTimeAxis::popup_imageframe_edit_menu(int button, int32_t time, ImageFr
{
imageframe_item_menu->set_sensitive(false) ;
}
-
+
imageframe_menu->popup(button,time) ;
}
@@ -240,7 +240,7 @@ ImageFrameTimeAxis::build_display_menu()
image_action_menu = new Menu() ;
image_action_menu->set_name ("ArdourContextMenu");
MenuList image_items = image_action_menu->items() ;
-
+
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Height"), *size_menu));
items.push_back (MenuElem (_("Color"), mem_fun(*this, &ImageFrameTimeAxis::select_track_color)));
@@ -261,7 +261,7 @@ ImageFrameTimeAxis::create_imageframe_menu()
imageframe_menu = manage(new Menu) ;
imageframe_menu->set_name ("ArdourContextMenu");
MenuList& items = imageframe_menu->items();
-
+
imageframe_item_menu = manage(new Menu) ;
imageframe_item_menu->set_name ("ArdourContextMenu");
MenuList& imageframe_sub_items = imageframe_item_menu->items() ;
@@ -290,7 +290,7 @@ ImageFrameTimeAxis::create_imageframe_menu()
{
imageframe_sub_items.push_back(MenuElem (_("Remove Frame"), bind(mem_fun (view, &ImageFrameTimeAxisView::remove_selected_imageframe_item), (void*)this))) ;
}
-
+
items.push_back(MenuElem(_("Image Frame"), *imageframe_item_menu)) ;
items.push_back(MenuElem (_("Rename Track"), mem_fun(*this,&ImageFrameTimeAxis::start_time_axis_rename))) ;
@@ -315,7 +315,7 @@ bool
ImageFrameTimeAxis::add_marker_time_axis(MarkerTimeAxis* marker_track, void* src)
{
bool ret = false ;
-
+
if(get_named_marker_time_axis(marker_track->name()) != 0)
{
ret = false ;
@@ -324,11 +324,11 @@ ImageFrameTimeAxis::add_marker_time_axis(MarkerTimeAxis* marker_track, void* src
{
marker_time_axis_list.push_back(marker_track) ;
marker_track->GoingAway.connect(bind(mem_fun(*this, &ImageFrameTimeAxis::remove_time_axis_view), marker_track, (void*)this));
-
+
MarkerTimeAxisAdded(marker_track, src) ; /* EMIT_SIGNAL */
ret = true ;
}
-
+
return(ret) ;
}
@@ -342,7 +342,7 @@ MarkerTimeAxis*
ImageFrameTimeAxis::get_named_marker_time_axis(const string & track_id)
{
MarkerTimeAxis* mta = 0 ;
-
+
for (MarkerTimeAxisList::iterator i = marker_time_axis_list.begin(); i != marker_time_axis_list.end(); ++i)
{
if (((MarkerTimeAxis*)*i)->name() == track_id)
@@ -365,21 +365,21 @@ MarkerTimeAxis*
ImageFrameTimeAxis::remove_named_marker_time_axis(const string & track_id, void* src)
{
MarkerTimeAxis* mta = 0 ;
-
+
for(MarkerTimeAxisList::iterator i = marker_time_axis_list.begin(); i != marker_time_axis_list.end(); ++i)
{
if (((MarkerTimeAxis*)*i)->name() == track_id)
{
mta = ((MarkerTimeAxis*)*i) ;
-
+
// the iterator is invalid after this call, so we can no longer use it as is.
marker_time_axis_list.erase(i) ;
-
+
MarkerTimeAxisRemoved(mta->name(), src) ; /* EMIT_SIGNAL */
break ;
}
}
-
+
return(mta) ;
}
@@ -394,7 +394,7 @@ void
ImageFrameTimeAxis::remove_time_axis_view(MarkerTimeAxis* mta, void* src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxis::remove_time_axis_view), mta, src));
-
+
MarkerTimeAxisList::iterator i;
if((i = find (marker_time_axis_list.begin(), marker_time_axis_list.end(), mta)) != marker_time_axis_list.end())
{
diff --git a/gtk2_ardour/imageframe_time_axis.h b/gtk2_ardour/imageframe_time_axis.h
index f34472a295..21db88e3e4 100644
--- a/gtk2_ardour/imageframe_time_axis.h
+++ b/gtk2_ardour/imageframe_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new ImageFrameTimeAxis.
*
@@ -63,13 +63,13 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* @param canvas the parent canvas item
*/
ImageFrameTimeAxis(const std::string & track_id, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas) ;
-
+
/**
* Destructor
* Responsible for destroying any child image items that may have been added to thie time axis
*/
virtual ~ImageFrameTimeAxis() ;
-
+
//---------------------------------------------------------------------------------------//
// ui methods & data
@@ -77,9 +77,9 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* Sets the height of this TrackView to one of ths TrackHeghts
*
* @param h the number of pixels to set the height too
- */
+ */
virtual void set_height(uint32_t h) ;
-
+
/**
* Sets the number of samples per unit that are used.
* This is used to determine the siezes of items upon this time axis
@@ -87,15 +87,15 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* @param spu the number of samples per unit
*/
virtual void set_samples_per_unit(double spu) ;
-
+
/**
* Returns the available height for images to be drawn onto
*
* @return the available height for an image item to be drawn onto
*/
int get_image_display_height() ;
-
-
+
+
/**
* Show the popup edit menu
*
@@ -105,11 +105,11 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* @param with_item true if an item has been selected upon the time axis, used to set context menu
*/
void popup_imageframe_edit_menu(int button, int32_t time, ImageFrameView* clicked_imageframe, bool with_item) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Marker Time Axis Methods
-
+
/**
* Add a MarkerTimeAxis to the ilst of MarkerTimeAxis' associated with this ImageFrameTimeAxis
*
@@ -119,7 +119,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* false otherwise
*/
bool add_marker_time_axis(MarkerTimeAxis* marker_track, void* src) ;
-
+
/**
* Returns the named MarkerTimeAxis associated with this ImageFrameTimeAxis
*
@@ -127,7 +127,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* @return the named markerTimeAxis, or 0 if the named MarkerTimeAxis is not associated with this ImageFrameTimeAxis
*/
MarkerTimeAxis* get_named_marker_time_axis(const std::string & track_id) ;
-
+
/**
* Removes the named markerTimeAxis from those associated with this ImageFrameTimeAxis
*
@@ -136,7 +136,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* @return the removed MarkerTimeAxis
*/
MarkerTimeAxis* remove_named_marker_time_axis(const std::string & track_id, void* src) ;
-
+
/**
* Removes tav from the list of MarkerTimaAxis associated with this ImageFrameTimeAxis
*
@@ -145,10 +145,10 @@ class ImageFrameTimeAxis : public VisualTimeAxis
*/
void remove_time_axis_view(MarkerTimeAxis* tav, void* src) ;
-
+
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
-
+
/**
* Returns the view helper of this TimeAxis
*
@@ -156,16 +156,16 @@ class ImageFrameTimeAxis : public VisualTimeAxis
*/
ImageFrameTimeAxisView* get_view() ;
-
+
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted when a Marker Time Axis is Added, or associated with, this time axis */
sigc::signal<void,MarkerTimeAxis*,void*> MarkerTimeAxisAdded ;
-
+
/** Emitted when a Marker Time Axis is removed, from this time axis */
sigc::signal<void,std::string,void*> MarkerTimeAxisRemoved ;
-
+
protected:
private:
@@ -174,7 +174,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis
*
*/
void select_track_color() ;
-
+
/**
* Handles the building of the popup menu
*/
@@ -184,14 +184,14 @@ class ImageFrameTimeAxis : public VisualTimeAxis
* handles the building of the ImageFrameView sub menu
*/
void create_imageframe_menu() ;
-
+
/* We may have multiple marker views, but each marker view should only be associated with one timeaxisview */
typedef std::list<MarkerTimeAxis*> MarkerTimeAxisList ;
MarkerTimeAxisList marker_time_axis_list;
-
+
/* the TimeAxis view helper */
ImageFrameTimeAxisView *view ;
-
+
// popup menu widgets
Gtk::Menu *image_action_menu ;
Gtk::Menu *imageframe_menu ;
diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc
index 5dc76978b0..49f7d3a6a8 100644
--- a/gtk2_ardour/imageframe_time_axis_group.cc
+++ b/gtk2_ardour/imageframe_time_axis_group.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ using namespace ARDOUR ;
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new ImageFrameTimeAxisGroup.
*
@@ -62,25 +62,25 @@ ImageFrameTimeAxisGroup::~ImageFrameTimeAxisGroup()
for(ImageFrameViewList::iterator iter = imageframe_views.begin(); iter != imageframe_views.end(); ++iter)
{
ImageFrameView* ifv = *iter ;
-
+
ImageFrameViewList::iterator next = iter ;
next++ ;
-
+
imageframe_views.erase(iter) ;
delete ifv ;
ifv = 0 ;
-
+
iter = next ;
}
-
+
GoingAway() ; /* EMIT_SIGNAL */
}
//---------------------------------------------------------------------------------------//
// Name/Id Accessors/Mutators
-
+
/**
* Set the name/Id of this group.
*
@@ -140,10 +140,10 @@ ImageFrameTimeAxisGroup::set_item_heights(gdouble h)
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
-int
+int
ImageFrameTimeAxisGroup::set_item_samples_per_units(gdouble spp)
{
if(spp < 1.0)
@@ -155,7 +155,7 @@ ImageFrameTimeAxisGroup::set_item_samples_per_units(gdouble spp)
{
(*citer)->set_samples_per_unit(spp) ;
}
-
+
return(0) ;
}
@@ -197,7 +197,7 @@ ImageFrameView*
ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
{
ImageFrameView* ifv = 0 ;
-
+
//check that there is not already an imageframe with that id
if(get_named_imageframe_item(frame_id) == 0)
{
@@ -215,9 +215,9 @@ ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t
num_channels) ;
imageframe_views.push_front(ifv) ;
-
+
ifv->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisGroup::remove_imageframe_item), (void*)this)) ;
-
+
ImageFrameAdded(ifv, src) ; /* EMIT_SIGNAL */
}
@@ -235,7 +235,7 @@ ImageFrameView*
ImageFrameTimeAxisGroup::get_named_imageframe_item(const string & frame_id)
{
ImageFrameView* ifv = 0 ;
-
+
for (ImageFrameViewList::const_iterator i = imageframe_views.begin(); i != imageframe_views.end(); ++i)
{
if (((ImageFrameView*)*i)->get_item_name() == frame_id)
@@ -246,7 +246,7 @@ ImageFrameTimeAxisGroup::get_named_imageframe_item(const string & frame_id)
}
return(ifv) ;
}
-
+
/**
* Removes the currently selected ImageFrameView
*
@@ -259,20 +259,20 @@ void
ImageFrameTimeAxisGroup::remove_selected_imageframe_item(void* src)
{
std::string frame_id ;
-
+
if(selected_imageframe_item)
{
ImageFrameViewList::iterator i ;
-
+
if((i = find(imageframe_views.begin(), imageframe_views.end(), selected_imageframe_item)) != imageframe_views.end())
{
imageframe_views.erase(i) ;
frame_id = selected_imageframe_item->get_item_name() ;
-
+
// note that we delete the item here
delete(selected_imageframe_item) ;
selected_imageframe_item = 0 ;
-
+
std::string track_id = _view_helper.trackview().name() ;
ImageFrameRemoved(track_id, _group_id, frame_id, src) ; /* EMIT_SIGNAL */
}
@@ -283,7 +283,7 @@ ImageFrameTimeAxisGroup::remove_selected_imageframe_item(void* src)
}
}
-
+
/**
* Removes and returns the named ImageFrameView from the list of ImageFrameViews held by this view helper
*
@@ -295,29 +295,29 @@ ImageFrameView*
ImageFrameTimeAxisGroup::remove_named_imageframe_item(const string & frame_id, void* src)
{
ImageFrameView* removed = 0 ;
-
+
for(ImageFrameViewList::iterator iter = imageframe_views.begin(); iter != imageframe_views.end(); ++iter)
{
ImageFrameView* tempItem = *iter ;
if(tempItem->get_item_name() == frame_id)
{
- removed = tempItem ;
+ removed = tempItem ;
imageframe_views.erase(iter) ;
-
+
if (removed == selected_imageframe_item)
{
selected_imageframe_item = 0 ;
}
-
+
std::string track_id = _view_helper.trackview().name() ;
ImageFrameRemoved(track_id, _group_id, frame_id, src) ; /* EMIT_SIGNAL */
-
+
// break from the for loop
break ;
}
iter++ ;
}
-
+
return(removed) ;
}
@@ -331,12 +331,12 @@ void
ImageFrameTimeAxisGroup::remove_imageframe_item(ImageFrameView* ifv, void* src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxisGroup::remove_imageframe_item), ifv, src));
-
+
ImageFrameViewList::iterator i;
if((i = find (imageframe_views.begin(), imageframe_views.end(), ifv)) != imageframe_views.end())
{
imageframe_views.erase(i) ;
-
+
std::string frame_id = ifv->get_item_name() ;
std::string track_id = _view_helper.trackview().name() ;
ImageFrameRemoved(track_id, _group_id, frame_id, src) ; /* EMIT_SIGNAL */
@@ -358,9 +358,9 @@ ImageFrameTimeAxisGroup::remove_imageframe_item(ImageFrameView* ifv, void* src)
// {
// selected_imageframe_item->set_selected(false, this) ;
// }
-//
+//
// selected_imageframe_item = ifv ;
-//
+//
// if(!ifv->get_selected())
// {
// selected_imageframe_item->set_selected(true, this) ;
diff --git a/gtk2_ardour/imageframe_time_axis_group.h b/gtk2_ardour/imageframe_time_axis_group.h
index e189b71e0b..714d8515f7 100644
--- a/gtk2_ardour/imageframe_time_axis_group.h
+++ b/gtk2_ardour/imageframe_time_axis_group.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new ImageFrameTimeAxisGroup.
*
@@ -54,18 +54,18 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @param group_id the unique name/id of this group
*/
ImageFrameTimeAxisGroup(ImageFrameTimeAxisView& iftav, const std::string & group_id) ;
-
+
/**
* Destructor
* Responsible for destroying any Items that may have been added to this group
*
*/
virtual ~ImageFrameTimeAxisGroup() ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Name/Id Accessors/Mutators
-
+
/**
* Set the name/Id of this group.
*
@@ -81,49 +81,49 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @return the id of this group
*/
std::string get_group_name() const ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
-
+
/**
* Returns the TimeAxisView thatt his object is acting as a helper for
*
* @return the TimeAxisView that this object is acting as a view helper for
*/
ImageFrameTimeAxisView& get_view() const { return _view_helper ; }
-
-
-
+
+
+
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Sets the height of the time axis view and the item upon it
*
* @param height the new height
*/
int set_item_heights(gdouble) ;
-
+
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
int set_item_samples_per_units(gdouble spu) ;
-
+
/**
* Sets the color of the items contained uopn this view helper
*
* @param color the new base color
*/
void apply_item_color(Gdk::Color&) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// child ImageFrameView methods
-
+
/**
* Adds an ImageFrameView to the list of items upon this time axis view helper
* the new ImageFrameView is returned
@@ -139,7 +139,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
ImageFrameView* add_imageframe_item(const std::string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
-
+
/**
* Returns the named ImageFrameView or 0 if the named view does not exist on this view helper
*
@@ -147,7 +147,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @return the named ImageFrameView, or 0 if it is not held upon this view
*/
ImageFrameView* get_named_imageframe_item(const std::string & item_id) ;
-
+
/**
* Removes the currently selected ImageFrameView
*
@@ -155,7 +155,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @see add_imageframe_view
*/
void remove_selected_imageframe_item(void* src) ;
-
+
/**
* Removes and returns the named ImageFrameView from the list of ImageFrameViews held by this view helper
*
@@ -164,7 +164,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @see add_imageframe_view
*/
ImageFrameView* remove_named_imageframe_item(const std::string & item_id, void* src) ;
-
+
/**
* Removes ifv from the list of ImageFrameViews upon this TimeAxis.
* if ifv is not upon this TimeAxis, this method takes no action
@@ -172,23 +172,23 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @param ifv the ImageFrameView to remove
*/
void remove_imageframe_item(ImageFrameView*, void* src) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Selected group methods
-
+
// removed in favour of a track level selectewd item
// this is simply easier to manage a singularly selected item, rather than
// a selected item within each group
-
+
/**
* Sets the currently selected item upon this time axis
*
* @param ifv the item to set selected
*/
//void set_selected_imageframe_item(ImageFrameView* ifv) ;
-
+
/**
* Sets the currently selected item upon this time axis to the named item
*
@@ -200,26 +200,26 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* Returns the currently selected item upon this time axis
*
* @return the currently selected item pon this time axis
- */
+ */
//ImageFrameView* get_selected_imageframe_item() ;
-
+
/**
* Returns whether this grou pis currently selected
*
* @returns true if this group is currently selected
*/
bool get_selected() const ;
-
+
/**
* Sets he selected state of this group
*
* @param yn set true if this group is selected, false otherwise
*/
void set_selected(bool yn) ;
-
+
//---------------------------------------------------------------------------------------//
// Handle group removal
-
+
/**
* Handles the Removal of this VisualTimeAxis
* This _needs_ to be called to alert others of the removal properly, ie where the source
@@ -234,9 +234,9 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
sigc::signal<void> GoingAway ;
-
+
/**
* Emitted when this Group has been removed
* This is different to the GoingAway signal in that this signal
@@ -245,16 +245,16 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* event
*/
sigc::signal<void,std::string,void*> GroupRemoved ;
-
+
/** Emitted when we have changed the name of this TimeAxis */
sigc::signal<void,std::string,std::string,void*> NameChanged ;
-
+
/** Emitted when an ImageFrameView is added to this group */
sigc::signal<void, ImageFrameView*, void*> ImageFrameAdded ;
-
+
/** Emitted when an ImageFrameView is removed from this group */
sigc::signal<void, const std::string &, const std::string &, const std::string &, void*> ImageFrameRemoved ;
-
+
protected:
@@ -264,7 +264,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
*
*/
void reset_samples_per_unit() ;
-
+
/**
* Callback used to remove this group during the gtk idle loop
* This is used to avoid deleting the obejct while inside the remove_this_group
@@ -274,27 +274,27 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
static gint idle_remove_this_group(ImageFrameTimeAxisGroup* group, void* src) ;
-
+
/** The list of ImageFrameViews held by this view helper */
typedef std::list<ImageFrameView *> ImageFrameViewList ;
ImageFrameViewList imageframe_views ;
-
+
/** the currently selected time axis item upon this time axis */
ImageFrameView* selected_imageframe_item ;
-
+
/** the view helper that this object is acting as a container upon on */
ImageFrameTimeAxisView& _view_helper ;
-
- /** the is of this group */
+
+ /** the is of this group */
std::string _group_id ;
-
+
/* XXX why are these different? */
Gdk::Color region_color ;
uint32_t stream_base_color ;
-
+
/** indicates if this group is currently selected */
bool is_selected ;
-
+
} ; /* class ImageFrameTimeAxisGroup */
#endif /* __ardour_imageframe_time_axis_group_h__ */
diff --git a/gtk2_ardour/imageframe_time_axis_view.cc b/gtk2_ardour/imageframe_time_axis_view.cc
index a57db60a38..60bb6c3e03 100644
--- a/gtk2_ardour/imageframe_time_axis_view.cc
+++ b/gtk2_ardour/imageframe_time_axis_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ using namespace Editing;
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new ImageFrameTimeAxisView.
*
@@ -69,17 +69,17 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
}
/**
- * Destructor
+ * Destructor
* Responsible for destroying all items tat may have been added to this time axis
*/
ImageFrameTimeAxisView::~ImageFrameTimeAxisView()
{
// Destroy all the ImageFrameGroups that we have
-
+
for(ImageFrameGroupList::iterator iter = imageframe_groups.begin(); iter != imageframe_groups.end(); ++iter)
{
ImageFrameTimeAxisGroup* iftag = (*iter) ;
-
+
ImageFrameGroupList::iterator next = iter ;
next++ ;
@@ -88,16 +88,16 @@ ImageFrameTimeAxisView::~ImageFrameTimeAxisView()
delete iftag ;
iftag = 0 ;
-
+
iter = next ;
}
-
+
}
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Sets the height of the time axis view and the item upon it
*
@@ -110,7 +110,7 @@ ImageFrameTimeAxisView::set_height (gdouble h)
if (h < 10.0 || h > 1000.0) {
return(-1) ;
}
-
+
canvas_rect.property_y2() = h ;
@@ -121,7 +121,7 @@ ImageFrameTimeAxisView::set_height (gdouble h)
return(0) ;
}
-
+
/**
* Sets the position of this view helper on the canvas
*
@@ -141,10 +141,10 @@ ImageFrameTimeAxisView::set_position (gdouble x, gdouble y)
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
-int
+int
ImageFrameTimeAxisView::set_samples_per_unit (gdouble spp)
{
if (spp < 1.0) {
@@ -152,12 +152,12 @@ ImageFrameTimeAxisView::set_samples_per_unit (gdouble spp)
}
_samples_per_unit = spp;
-
+
for(ImageFrameGroupList::const_iterator citer = imageframe_groups.begin(); citer != imageframe_groups.end(); ++citer)
{
(*citer)->set_item_samples_per_units(spp) ;
}
-
+
return(0) ;
}
@@ -190,7 +190,7 @@ ImageFrameTimeAxisView::reset_samples_per_unit ()
//---------------------------------------------------------------------------------------//
// Child ImageFrameTimeAxisGroup Accessors/Mutators
-
+
/**
* Adds an ImageFrameTimeAxisGroup to the list of items upon this time axis view helper
* the new ImageFrameTimeAxisGroup is returned
@@ -202,7 +202,7 @@ ImageFrameTimeAxisGroup*
ImageFrameTimeAxisView::add_imageframe_group(std::string group_id, void* src)
{
ImageFrameTimeAxisGroup* iftag = 0 ;
-
+
//check that there is not already a group with that id
if(get_named_imageframe_group(group_id) != 0)
{
@@ -213,9 +213,9 @@ ImageFrameTimeAxisView::add_imageframe_group(std::string group_id, void* src)
iftag = new ImageFrameTimeAxisGroup(*this, group_id) ;
imageframe_groups.push_front(iftag) ;
-
+
iftag->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisView::remove_imageframe_group), iftag, (void*)this)) ;
-
+
ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */
}
@@ -232,7 +232,7 @@ ImageFrameTimeAxisGroup*
ImageFrameTimeAxisView::get_named_imageframe_group(std::string group_id)
{
ImageFrameTimeAxisGroup* iftag = 0 ;
-
+
for(ImageFrameGroupList::iterator i = imageframe_groups.begin(); i != imageframe_groups.end(); ++i)
{
if (((ImageFrameTimeAxisGroup*)*i)->get_group_name() == group_id)
@@ -241,7 +241,7 @@ ImageFrameTimeAxisView::get_named_imageframe_group(std::string group_id)
break ;
}
}
-
+
return(iftag) ;
}
@@ -257,27 +257,27 @@ ImageFrameTimeAxisGroup*
ImageFrameTimeAxisView::remove_named_imageframe_group(std::string group_id, void* src)
{
ImageFrameTimeAxisGroup* removed = 0 ;
-
+
for(ImageFrameGroupList::iterator iter = imageframe_groups.begin(); iter != imageframe_groups.end(); ++iter)
{
if(((ImageFrameTimeAxisGroup*)*iter)->get_group_name() == group_id)
{
removed = (*iter) ;
imageframe_groups.erase(iter) ;
-
+
if(removed == selected_imageframe_group)
{
selected_imageframe_group = 0 ;
}
-
+
ImageFrameGroupRemoved(removed->get_group_name(), src) ; /* EMIT_SIGNAL */
-
+
// break from the for loop
break ;
}
iter++ ;
}
-
+
return(removed) ;
}
@@ -296,7 +296,7 @@ ImageFrameTimeAxisView::remove_imageframe_group(ImageFrameTimeAxisGroup* iftag,
if((i = find (imageframe_groups.begin(), imageframe_groups.end(), iftag)) != imageframe_groups.end())
{
imageframe_groups.erase(i) ;
-
+
ImageFrameGroupRemoved(iftag->get_group_name(), src) ; /* EMIT_SIGNAL */
}
}
@@ -306,7 +306,7 @@ ImageFrameTimeAxisView::remove_imageframe_group(ImageFrameTimeAxisGroup* iftag,
//---------------------------------------------------------------------------------------//
// Selected group methods
-
+
/**
* Sets the currently selected group upon this time axis
*
@@ -319,7 +319,7 @@ ImageFrameTimeAxisView::set_selected_imageframe_group(ImageFrameTimeAxisGroup* i
{
selected_imageframe_group->set_selected(false) ;
}
-
+
selected_imageframe_group = iftag ;
selected_imageframe_group->set_selected(true) ;
}
@@ -337,7 +337,7 @@ ImageFrameTimeAxisView::clear_selected_imageframe_group()
}
selected_imageframe_group = 0 ;
}
-
+
/**
* Returns the currently selected group upon this time axis
*
@@ -351,7 +351,7 @@ ImageFrameTimeAxisView::get_selected_imageframe_group() const
//---------------------------------------------------------------------------------------//
// Selected item methods
-
+
/**
* Sets the currently selected imag frame view item
*
@@ -362,12 +362,12 @@ void
ImageFrameTimeAxisView::set_selected_imageframe_view(ImageFrameTimeAxisGroup* iftag, ImageFrameView* ifv)
{
set_selected_imageframe_group(iftag) ;
-
+
if(selected_imageframe_view)
{
selected_imageframe_view->set_selected(false) ;
}
-
+
selected_imageframe_view = ifv ;
selected_imageframe_view->set_selected(true) ;
}
@@ -383,14 +383,14 @@ ImageFrameTimeAxisView::clear_selected_imageframe_item(bool clear_group)
{
clear_selected_imageframe_group() ;
}
-
+
if(selected_imageframe_view)
{
selected_imageframe_view->set_selected(false) ;
}
selected_imageframe_view = 0 ;
}
-
+
/**
* Returns the currently selected image frame view item upon this time axis
*
@@ -404,7 +404,7 @@ ImageFrameTimeAxisView::get_selected_imageframe_view() const
-
+
void
ImageFrameTimeAxisView::set_imageframe_duration_sec(double sec)
{
@@ -429,7 +429,7 @@ ImageFrameTimeAxisView::remove_selected_imageframe_item(void* src)
{
ImageFrameView* temp_item = selected_imageframe_view ;
selected_imageframe_group->remove_imageframe_item(temp_item, src) ;
-
+
// XXX although we have removed the item from the group, we need the group id still set within the
// item as the remove method requires this data when telling others about the deletion
// to fully specify the item we need the track, group and item id
diff --git a/gtk2_ardour/imageframe_time_axis_view.h b/gtk2_ardour/imageframe_time_axis_view.h
index 45725038d1..1191068c1d 100644
--- a/gtk2_ardour/imageframe_time_axis_view.h
+++ b/gtk2_ardour/imageframe_time_axis_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,20 +48,20 @@ class ImageFrameTimeAxisView : public sigc::trackable
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new ImageFrameTimeAxisView.
*
* @param ifta the parent ImageFrameTimeAxis of this view helper
*/
ImageFrameTimeAxisView(ImageFrameTimeAxis& ifta) ;
-
+
/**
- * Destructor
+ * Destructor
* Responsible for destroying all items tat may have been added to this time axis
*/
~ImageFrameTimeAxisView () ;
-
+
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
@@ -71,23 +71,23 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @return the TimeAxisView that this object is acting as a view helper for
*/
ImageFrameTimeAxis& trackview() { return _trackview; }
-
+
/**
*
*/
ArdourCanvas::Group * canvas_item() { return &canvas_group; }
-
-
+
+
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Sets the height of the time axis view and the item upon it
*
* @param height the new height
*/
int set_height(gdouble) ;
-
+
/**
* Sets the position of this view helper on the canvas
*
@@ -95,32 +95,32 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @param y the y position upon the canvas
*/
int set_position(gdouble x, gdouble y) ;
-
+
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
int set_samples_per_unit(gdouble spu) ;
-
+
/**
* Returns the current samples per unit of this time axis view helper
*
* @return the current samples per unit of this time axis view helper
*/
gdouble get_samples_per_unit() { return _samples_per_unit; }
-
+
/**
* Sets the color of the items contained uopn this view helper
*
* @param color the new base color
*/
void apply_color (Gdk::Color&) ;
-
+
//---------------------------------------------------------------------------------------//
// Child ImageFrameTimeAxisGroup Accessors/Mutators
-
+
/**
* Adds an ImageFrameTimeAxisGroup to the list of items upon this time axis view helper
* the new ImageFrameTimeAxisGroup is returned
@@ -129,7 +129,7 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
ImageFrameTimeAxisGroup* add_imageframe_group(std::string group_id, void* src) ;
-
+
/**
* Returns the named ImageFrameTimeAxisGroup or 0 if the named group does not exist on this view helper
*
@@ -137,7 +137,7 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @return the named ImageFrameTimeAxisGroup, or 0 if it is not held upon this view
*/
ImageFrameTimeAxisGroup* get_named_imageframe_group(std::string group_id) ;
-
+
/**
* Removes and returns the named ImageFrameTimeAxisGroup from the list of ImageFrameTimeAxisGroup held by this view helper
*
@@ -146,38 +146,38 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @see add_imageframe_group
*/
ImageFrameTimeAxisGroup* remove_named_imageframe_group(std::string group_id, void* src) ;
-
+
/**
* Removes the specified ImageFrameTimeAxisGroup from the list of ImageFrameTimeAxisGroups upon this TimeAxis.
*
* @param iftag the ImageFrameView to remove
*/
void remove_imageframe_group(ImageFrameTimeAxisGroup* iftag, void* src) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Selected group methods
-
+
/**
* Sets the currently selected group upon this time axis
*
* @param ifv the item to set selected
*/
void set_selected_imageframe_group(ImageFrameTimeAxisGroup* iftag) ;
-
+
/**
* Clears the currently selected image frame group unpo this time axis
*
*/
void clear_selected_imageframe_group() ;
-
+
/**
* Returns the currently selected group upon this time axis
*
* @return the currently selected group upon this time axis
- */
+ */
ImageFrameTimeAxisGroup* get_selected_imageframe_group() const ;
-
+
/**
* Sets the duration of the selected ImageFrameView to the specified number of seconds
@@ -185,10 +185,10 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @param sec the duration to set the ImageFrameView to, in seconds
*/
void set_imageframe_duration_sec(double sec) ;
-
+
//---------------------------------------------------------------------------------------//
// Selected item methods
-
+
/**
* Sets the currently selected image frame view item
*
@@ -196,23 +196,23 @@ class ImageFrameTimeAxisView : public sigc::trackable
* @param ifv the selected item
*/
void set_selected_imageframe_view(ImageFrameTimeAxisGroup* iftag, ImageFrameView* ifv) ;
-
+
/**
* Clears the currently selected image frame view item
*
* @param clear_group set true if the selected parent group of the item should be cleared also
*/
void clear_selected_imageframe_item(bool clear_group) ;
-
+
/**
* Returns the currently selected image frame view item upon this time axis
*
* @return the currently selected image frame view item
*/
ImageFrameView* get_selected_imageframe_view() const ;
-
-
+
+
/**
* Removes the currently selected ImageFrameTimeAxisGroup
*
@@ -221,16 +221,16 @@ class ImageFrameTimeAxisView : public sigc::trackable
*/
void remove_selected_imageframe_item(void* src) ;
-
+
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted when and ImageFrameGroup is added to this time axis */
sigc::signal<void,ImageFrameTimeAxisGroup*,void*> ImageFrameGroupAdded ;
-
+
/** Emitted when an ImageFrameGroup is removed from this time axis */
sigc::signal<void,std::string,void*> ImageFrameGroupRemoved ;
-
+
protected:
@@ -240,36 +240,36 @@ class ImageFrameTimeAxisView : public sigc::trackable
*
*/
void reset_samples_per_unit() ;
-
+
/**
* The list of ImageFrameViews held by this view helper */
typedef std::list<ImageFrameTimeAxisGroup *> ImageFrameGroupList ;
ImageFrameGroupList imageframe_groups ;
-
+
/** the currently selected time axis item upon this time axis */
ImageFrameTimeAxisGroup* selected_imageframe_group ;
-
+
/**
* thecurrently selected image frame view
* we keep this here so that we only have one per view, not one per group
*/
ImageFrameView* selected_imageframe_view ;
-
-
-
+
+
+
/* the TimeAxisView that this object is acting as the view helper for */
ImageFrameTimeAxis& _trackview ;
-
+
ArdourCanvas::Group canvas_group ;
ArdourCanvas::SimpleRect canvas_rect; /* frame around the whole thing */
-
+
/** the current samples per unit */
double _samples_per_unit ;
-
+
/* XXX why are these different? */
Gdk::Color region_color ;
uint32_t stream_base_color ;
-
+
} ; /* class ImageFrameTimeAxisView */
#endif /* __ardour_imageframe_time_axis_view_h__ */
diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc
index 0b3b01dcba..5ce4c4577b 100644
--- a/gtk2_ardour/imageframe_view.cc
+++ b/gtk2_ardour/imageframe_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,11 +76,11 @@ ImageFrameView::ImageFrameView(const string & item_id,
{
the_parent_group = item_group ;
set_name_text(item_id) ;
-
+
image_data_width = width ;
image_data_height = height ;
image_data_num_channels = num_channels ;
-
+
//This should be art_free'd once the ArtPixBuf is destroyed - this should happen when we destroy the imageframe canvas item
unsigned char* the_rgb_data = (unsigned char*) art_alloc(width*height*num_channels) ;
memcpy(the_rgb_data, rgb_data, (width*height*num_channels)) ;
@@ -88,11 +88,11 @@ ImageFrameView::ImageFrameView(const string & item_id,
ArtPixBuf* pbuf ;
pbuf = art_pixbuf_new_rgba(the_rgb_data, width, height, (num_channels * width));
imageframe = 0 ;
-
+
//calculate our image width based on the track height
double im_ratio = (double)width/(double)height ;
double im_width = ((double)(trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
-
+
imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
frame_handle_start->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start, this));
@@ -101,7 +101,7 @@ ImageFrameView::ImageFrameView(const string & item_id,
frame_handle_start->raise_to_top();
frame_handle_end->raise_to_top();
-
+
set_position(start, this) ;
set_duration(duration, this) ;
}
@@ -115,11 +115,11 @@ ImageFrameView::~ImageFrameView()
GoingAway (this);
// destroy any marker items we have associated with this item
-
+
for(MarkerViewList::iterator iter = marker_view_list.begin(); iter != marker_view_list.end(); ++iter)
{
MarkerView* mv = (*iter) ;
-
+
MarkerViewList::iterator next = iter ;
next++ ;
@@ -138,11 +138,11 @@ ImageFrameView::~ImageFrameView()
mv->set_marked_item(0) ;
delete mv ;
mv = 0 ;
-
- // set our iterator to next, as we have invalided the current iterator with the call to erase
+
+ // set our iterator to next, as we have invalided the current iterator with the call to erase
iter = next ;
}
-
+
// if we are the currently selected item withi the parent track, we need to se-select
if(the_parent_group)
{
@@ -171,7 +171,7 @@ bool
ImageFrameView::set_position(nframes64_t pos, void* src, double* delta)
{
nframes64_t old_pos = frame_position ;
-
+
// do the standard stuff
bool ret = TimeAxisViewItem::set_position(pos, src, delta) ;
@@ -183,14 +183,14 @@ ImageFrameView::set_position(nframes64_t pos, void* src, double* delta)
// calculate the offset of the marker
MarkerView* mv = (MarkerView*)*i ;
nframes64_t marker_old_pos = mv->get_position() ;
-
+
mv->set_position(pos + (marker_old_pos - old_pos), src) ;
}
}
-
+
return(ret) ;
}
-
+
/**
* Sets the duration of this item
*
@@ -203,20 +203,20 @@ ImageFrameView::set_duration(nframes64_t dur, void* src)
{
/* do the standard stuff */
bool ret = TimeAxisViewItem::set_duration(dur, src) ;
-
+
// eveything went ok with the standard stuff?
if(ret)
{
/* handle setting the sizes of our canvas itesm based on the new duration */
imageframe->property_drawwidth() = trackview.editor.frame_to_pixel(get_duration());
}
-
+
return(ret) ;
}
//---------------------------------------------------------------------------------------//
// Parent Component Methods
-
+
/**
* Sets the parent ImageFrameTimeAxisGroup of thie item
* each Item must be part of exactly one group (or 'scene') upon the timeline
@@ -228,7 +228,7 @@ ImageFrameView::set_time_axis_group(ImageFrameTimeAxisGroup* group)
{
the_parent_group = group ;
}
-
+
/**
* Returns the parent group of this item
*
@@ -243,7 +243,7 @@ ImageFrameView::get_time_axis_group()
//---------------------------------------------------------------------------------------//
// ui methods
-
+
/**
* Set the height of this item
*
@@ -265,7 +265,7 @@ ImageFrameView::set_height (gdouble h)
name_pixbuf->raise_to_top();
frame_handle_start->raise_to_top();
frame_handle_end->raise_to_top();
-
+
name_pixbuf->property_y() = h - TimeAxisViewItem::NAME_Y_OFFSET;
frame->property_y2() = h;
@@ -287,12 +287,12 @@ void
ImageFrameView::add_marker_view_item(MarkerView* item, void* src)
{
marker_view_list.push_back(item) ;
-
+
item->GoingAway.connect(bind(mem_fun(*this, &ImageFrameView::remove_marker_view_item), (void*)this));
-
+
MarkerViewAdded(item, src) ; /* EMIT_SIGNAL */
}
-
+
/**
* Removes the named marker view from the list of marker view associated with this item
* The Marker view is not destroyed on removal, so the caller must handle the item themself
@@ -306,7 +306,7 @@ ImageFrameView::remove_named_marker_view_item(const string & markerId, void* src
{
MarkerView* mv = 0 ;
MarkerViewList::iterator i = marker_view_list.begin() ;
-
+
while(i != marker_view_list.end())
{
if (((MarkerView*)*i)->get_item_name() == markerId)
@@ -314,9 +314,9 @@ ImageFrameView::remove_named_marker_view_item(const string & markerId, void* src
mv = (*i) ;
marker_view_list.erase(i) ;
-
+
MarkerViewRemoved(mv,src) ; /* EMIT_SIGNAL */
-
+
// iterator is now invalid, but since we should only ever have
// one item with the specified name, things are ok, and we can
// break from the while loop
@@ -324,10 +324,10 @@ ImageFrameView::remove_named_marker_view_item(const string & markerId, void* src
}
i++ ;
}
-
+
return(mv) ;
}
-
+
/**
* Removes item from the list of marker views assocaited with this item
* This method will do nothing if item if not assiciated with this item
@@ -341,13 +341,13 @@ ImageFrameView::remove_marker_view_item(MarkerView* mv, void* src)
ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameView::remove_marker_view_item), mv, src));
MarkerViewList::iterator i ;
-
+
if((i = find (marker_view_list.begin(), marker_view_list.end(), mv)) != marker_view_list.end()) {
marker_view_list.erase(i) ;
MarkerViewRemoved (mv, src) ; /* EMIT_SIGNAL */
}
}
-
+
/**
* Determines if the named marker is one of those associated with this item
*
@@ -357,17 +357,17 @@ bool
ImageFrameView::has_marker_view_item(const string & mname)
{
bool result = false ;
-
+
for (MarkerViewList::const_iterator ci = marker_view_list.begin(); ci != marker_view_list.end(); ++ci)
{
if (((MarkerView*)*ci)->get_item_name() == mname)
{
result = true ;
-
+
// found the item, so we can break the for loop
break ;
}
}
-
+
return(result) ;
}
diff --git a/gtk2_ardour/imageframe_view.h b/gtk2_ardour/imageframe_view.h
index 2026853654..281e09ebb8 100644
--- a/gtk2_ardour/imageframe_view.h
+++ b/gtk2_ardour/imageframe_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ class ImageFrameView : public TimeAxisViewItem
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new ImageFrameView upon the canvas
*
@@ -77,12 +77,12 @@ class ImageFrameView : public TimeAxisViewItem
* Reposible for removing and destroying all marker items associated with this item
*/
~ImageFrameView() ;
-
+
static sigc::signal<void,ImageFrameView*> GoingAway;
-
+
//---------------------------------------------------------------------------------------//
// Position and duration Accessors/Mutators
-
+
/**
* Set the position of this item to the specified value
*
@@ -91,7 +91,7 @@ class ImageFrameView : public TimeAxisViewItem
* @return true if the position change was a success, false otherwise
*/
virtual bool set_position(nframes64_t pos, void* src, double* delta = 0) ;
-
+
/**
* Sets the duration of this item
*
@@ -100,10 +100,10 @@ class ImageFrameView : public TimeAxisViewItem
* @return true if the duration change was succesful, false otherwise
*/
virtual bool set_duration(nframes64_t dur, void* src) ;
-
+
//---------------------------------------------------------------------------------------//
// Parent Component Methods
-
+
/**
* Sets the parent ImageFrameTimeAxisGroup of thie item
* each Item must be part of exactly one group (or 'scene') upon the timeline
@@ -111,25 +111,25 @@ class ImageFrameView : public TimeAxisViewItem
* @param group the new parent group
*/
void set_time_axis_group(ImageFrameTimeAxisGroup* group) ;
-
+
/**
* Returns the parent group of this item
*
* @return the parent group of this item
*/
ImageFrameTimeAxisGroup* get_time_axis_group() ;
-
+
//---------------------------------------------------------------------------------------//
// ui methods
-
+
/**
* Set the height of this item
*
* @param h the new height
*/
virtual void set_height(gdouble h) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// MarkerView methods
@@ -140,7 +140,7 @@ class ImageFrameView : public TimeAxisViewItem
* @param src the identity of the object that initiated the change
*/
void add_marker_view_item(MarkerView* item, void* src) ;
-
+
/**
* Removes the named marker view from the list of marker view associated with this item
* The Marker view is not destroyed on removal, so the caller must handle the item themself
@@ -150,7 +150,7 @@ class ImageFrameView : public TimeAxisViewItem
* @return the removed marker item
*/
MarkerView* remove_named_marker_view_item(const std::string & markId, void* src) ;
-
+
/**
* Removes item from the list of marker views assocaited with this item
* This method will do nothing if item if not assiciated with this item
@@ -160,7 +160,7 @@ class ImageFrameView : public TimeAxisViewItem
* @param src the identity of the object that initiated the change
*/
void remove_marker_view_item(MarkerView* item, void* src) ;
-
+
/**
* Determines if the named marker is one of those associated with this item
*
@@ -168,13 +168,13 @@ class ImageFrameView : public TimeAxisViewItem
*/
bool has_marker_view_item(const std::string & markId) ;
-
+
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted when a marker Item is added to this Item */
sigc::signal<void,MarkerView*,void*> MarkerViewAdded ;
-
+
/** Emitted when a Marker Item is added to this Item */
sigc::signal<void,MarkerView*,void*> MarkerViewRemoved ;
@@ -182,31 +182,31 @@ class ImageFrameView : public TimeAxisViewItem
/** the list of MarkerViews associated with this item */
typedef std::list<MarkerView*> MarkerViewList ;
MarkerViewList marker_view_list ;
-
-
+
+
/** The parent group that this item is a member of */
ImageFrameTimeAxisGroup* the_parent_group ;
-
+
// ------- Image data -----------
-
+
/** the image data that we display */
//unsigned char* the_rgb_data ;
-
+
/** The width of the image contained within the_rgb_data */
uint32_t image_data_width ;
-
+
/** The height of the image contained within the_rgb_data */
uint32_t image_data_height ;
-
+
/** the number of channels contained in the_rgb_data */
uint32_t image_data_num_channels ;
-
-
+
+
// ------- Our canvas element -----------
-
+
/** the CanvasImageFrame to display the image */
ArdourCanvas::ImageFrame* imageframe ;
-
+
} ; /* class ImageFrameView */
#endif /* __gtk_ardour_imageframe_view_h__ */
diff --git a/gtk2_ardour/interactive-item.h b/gtk2_ardour/interactive-item.h
index 25406bd766..a37b3be3dc 100644
--- a/gtk2_ardour/interactive-item.h
+++ b/gtk2_ardour/interactive-item.h
@@ -41,16 +41,16 @@ public:
*/
class InteractiveText : public Text, public InteractiveItem {
public:
- InteractiveText(Group& parent, InteractiveItem* parent_item, double x, double y, const Glib::ustring& text)
- : Text(parent, x, y, text)
+ InteractiveText(Group& parent, InteractiveItem* parent_item, double x, double y, const Glib::ustring& text)
+ : Text(parent, x, y, text)
, _parent_item(parent_item)
{}
-
+
InteractiveText(Group& parent, InteractiveItem* parent_item)
: Text(parent)
, _parent_item(parent_item)
{}
-
+
bool on_event(GdkEvent* ev) {
if(_parent_item) {
return _parent_item->on_event(ev);
@@ -58,7 +58,7 @@ public:
return false;
}
}
-
+
protected:
InteractiveItem* _parent_item;
};
@@ -67,11 +67,11 @@ class InteractiveRect: public SimpleRect, public InteractiveItem
{
public:
InteractiveRect(Group& parent, InteractiveItem* parent_item,
- double x1, double y1, double x2, double y2)
- : SimpleRect(parent, x1, y1, x2, y2)
+ double x1, double y1, double x2, double y2)
+ : SimpleRect(parent, x1, y1, x2, y2)
, _parent_item(parent_item)
{}
-
+
bool on_event(GdkEvent* ev) {
if (_parent_item) {
return _parent_item->on_event(ev);
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index 430714f1ae..519445f12a 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2007 Paul Davis
+ Copyright (C) 2002-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session& session, boost::shared_
_port_group.reset (new PortGroup (""));
_ports[_ours].add_group (_port_group);
-
+
setup_all_ports ();
}
@@ -71,7 +71,7 @@ IOSelector::setup_ports (int dim)
if (dim == _other) {
_ports[_other].gather (_session, _find_inputs_for_io_outputs);
-
+
} else {
_port_group->clear ();
@@ -124,7 +124,7 @@ IOSelector::get_state (ARDOUR::BundleChannel c[2]) const
/* since we are talking about an IO, our ports should all have an associated Port *,
so the above call should never fail */
assert (f);
-
+
if (!f->connected_to (*j)) {
/* if any one thing is not connected, all bets are off */
return PortMatrixNode::NOT_ASSOCIATED;
@@ -190,13 +190,13 @@ IOSelectorWindow::on_show ()
Gtk::Window::on_show ();
pair<uint32_t, uint32_t> const pm_max = _selector.max_size ();
resize_window_to_proportion_of_monitor (this, pm_max.first, pm_max.second);
-}
+}
void
IOSelectorWindow::io_name_changed (void* src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &IOSelectorWindow::io_name_changed), src));
-
+
string title;
if (!_selector.find_inputs_for_io_outputs()) {
@@ -214,7 +214,7 @@ PortInsertUI::PortInsertUI (Gtk::Window* parent, ARDOUR::Session& sess, boost::s
{
output_selector.set_min_height_divisor (2);
input_selector.set_min_height_divisor (2);
-
+
pack_start (output_selector, true, true);
pack_start (input_selector, true, true);
}
@@ -245,7 +245,7 @@ PortInsertWindow::PortInsertWindow (ARDOUR::Session& sess, boost::shared_ptr<ARD
string title = _("ardour: ");
title += pi->name();
set_title (title);
-
+
ok_button.set_name ("IOSelectorButton");
if (!can_cancel) {
ok_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::CLOSE, Gtk::ICON_SIZE_BUTTON)));
@@ -266,7 +266,7 @@ PortInsertWindow::PortInsertWindow (ARDOUR::Session& sess, boost::shared_ptr<ARD
cancel_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::cancel));
signal_delete_event().connect (mem_fun (*this, &PortInsertWindow::wm_delete), false);
-
+
going_away_connection = pi->GoingAway.connect (mem_fun (*this, &PortInsertWindow::plugin_going_away));
}
@@ -281,7 +281,7 @@ void
PortInsertWindow::plugin_going_away ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &PortInsertWindow::plugin_going_away));
-
+
going_away_connection.disconnect ();
delete_when_idle (this);
}
diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h
index 02a09a5196..f8822cf1af 100644
--- a/gtk2_ardour/io_selector.h
+++ b/gtk2_ardour/io_selector.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2007 Paul Davis
+ Copyright (C) 2002-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ class IOSelector : public PortMatrix
std::string channel_noun () const {
return _("port");
}
-
+
uint32_t n_io_ports () const;
boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
void setup_ports (int);
@@ -80,10 +80,10 @@ class IOSelectorWindow : public Gtk::Window
protected:
void on_map ();
void on_show ();
-
+
private:
IOSelector _selector;
-
+
void io_name_changed (void *src);
bool wm_delete (GdkEventAny*);
};
@@ -91,9 +91,9 @@ class IOSelectorWindow : public Gtk::Window
class PortInsertUI : public Gtk::VBox
{
- public:
+ public:
PortInsertUI (Gtk::Window*, ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>);
-
+
void redisplay ();
void finished (IOSelector::Result);
@@ -104,20 +104,20 @@ class PortInsertUI : public Gtk::VBox
class PortInsertWindow : public ArdourDialog
{
- public:
+ public:
PortInsertWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>, bool can_cancel = false);
-
+
protected:
void on_map ();
-
+
private:
PortInsertUI _portinsertui;
Gtk::VBox vbox;
-
+
Gtk::Button ok_button;
Gtk::Button cancel_button;
Gtk::Frame button_frame;
-
+
void cancel ();
void accept ();
diff --git a/gtk2_ardour/itest.cc b/gtk2_ardour/itest.cc
index 97c8937f39..29d15aee98 100644
--- a/gtk2_ardour/itest.cc
+++ b/gtk2_ardour/itest.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ using namespace Gtkmm2ext;
using namespace Glib;
struct ModelColumns : public TreeModel::ColumnRecord {
- ModelColumns() {
+ ModelColumns() {
add (used);
add (text);
add (port);
@@ -60,12 +60,12 @@ fill_it (RefPtr<TreeStore> model, TreeView* display, ModelColumns* columns)
display->set_model (RefPtr<TreeStore>(0));
model->clear ();
-
+
const char ** ports;
typedef map<string,vector<pair<string,string> > > PortMap;
PortMap portmap;
PortMap::iterator i;
-
+
ports = jack_get_ports (jack, "", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput);
if (ports == 0) {
@@ -73,7 +73,7 @@ fill_it (RefPtr<TreeStore> model, TreeView* display, ModelColumns* columns)
}
/* find all the client names and group their ports into a list-by-client */
-
+
for (int n = 0; ports[n]; ++n) {
pair<string,vector<pair<string,string> > > newpair;
@@ -86,10 +86,10 @@ fill_it (RefPtr<TreeStore> model, TreeView* display, ModelColumns* columns)
pos = str.find (':');
- newpair.first = str.substr (0, pos);
+ newpair.first = str.substr (0, pos);
portname = str.substr (pos+1);
- /* this may or may not succeed at actually inserting.
+ /* this may or may not succeed at actually inserting.
we don't care, however: we just want an iterator
that gives us either the inserted element or
the existing one with the same name.
@@ -117,7 +117,7 @@ fill_it (RefPtr<TreeStore> model, TreeView* display, ModelColumns* columns)
for (vector<pair<string,string> >::iterator s = i->second.begin(); s != i->second.end(); ++s) {
/* s->first is a port name */
-
+
TreeModel::Row row = *(model->append (parent.children()));
row[columns->used] = ((random()%2) == 1);
@@ -172,14 +172,14 @@ main (int argc, char* argv[])
RefPtr<TreeStore> modelA = TreeStore::create (columns);
RefPtr<TreeStore> modelB = TreeStore::create (columns);
-
+
displayA.set_model (modelA);
displayA.append_column ("Use", columns.used);
displayA.append_column ("Source/Port", columns.text);
displayA.set_reorderable (true);
displayA.add_object_drag (columns.port.index(), "ports");
displayA.signal_object_drop.connect (ptr_fun (object_drop));
-
+
displayA.get_selection()->set_mode (SELECTION_MULTIPLE);
displayA.get_selection()->set_select_function (bind (ptr_fun (selection_filter), &columns));
displayA.get_selection()->signal_changed().connect (bind (ptr_fun (selection_changed), modelA, &displayA, &columns));
@@ -203,14 +203,14 @@ main (int argc, char* argv[])
vpacker.pack_start (hpacker);
vpacker.pack_start (rescan, false, false);
-
+
win.add (vpacker);
win.set_size_request (500, 400);
win.show_all ();
-
+
rescan.signal_clicked().connect (bind (ptr_fun (fill_it), modelA, &displayA, &columns));
rescan.signal_clicked().connect (bind (ptr_fun (fill_it), modelB, &displayB, &columns));
-
+
fill_it (modelA, &displayA, &columns);
fill_it (modelB, &displayB, &columns);
diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc
index 1cbe6bee0f..a368b6a8de 100644
--- a/gtk2_ardour/keyboard.cc
+++ b/gtk2_ardour/keyboard.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,15 +63,15 @@ guint Keyboard::SecondaryModifier = GDK_MOD1_MASK; // Alt/Option
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
guint Keyboard::Level4Modifier = GDK_CONTROL_MASK; // Control
guint Keyboard::CopyModifier = GDK_MOD1_MASK; // Alt/Option
-guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
+guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
guint Keyboard::button2_modifiers = Keyboard::SecondaryModifier|Keyboard::Level4Modifier;
#else
guint Keyboard::PrimaryModifier = GDK_CONTROL_MASK; // Control
guint Keyboard::SecondaryModifier = GDK_MOD1_MASK; // Alt/Option
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
guint Keyboard::Level4Modifier = GDK_MOD4_MASK; // Mod4/Windows
-guint Keyboard::CopyModifier = GDK_CONTROL_MASK;
-guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
+guint Keyboard::CopyModifier = GDK_CONTROL_MASK;
+guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
guint Keyboard::button2_modifiers = 0; /* not used */
#endif
@@ -92,7 +92,7 @@ map<AccelKey,pair<string,string>,Keyboard::AccelKeyLess> Keyboard::release_keys;
GdkModifierType Keyboard::RelevantModifierKeyMask;
void
-Keyboard::magic_widget_grab_focus ()
+Keyboard::magic_widget_grab_focus ()
{
_some_magic_widget_has_focus = true;
}
@@ -137,7 +137,7 @@ Keyboard::~Keyboard ()
gtk_key_snooper_remove (snooper_id);
}
-XMLNode&
+XMLNode&
Keyboard::get_state (void)
{
XMLNode* node = new XMLNode ("Keyboard");
@@ -157,30 +157,30 @@ Keyboard::get_state (void)
return *node;
}
-int
+int
Keyboard::set_state (const XMLNode& node)
{
const XMLProperty* prop;
if ((prop = node.property ("edit-button")) != 0) {
sscanf (prop->value().c_str(), "%d", &edit_but);
- }
+ }
if ((prop = node.property ("edit-modifier")) != 0) {
sscanf (prop->value().c_str(), "%d", &edit_mod);
- }
+ }
if ((prop = node.property ("delete-button")) != 0) {
sscanf (prop->value().c_str(), "%d", &delete_but);
- }
+ }
if ((prop = node.property ("delete-modifier")) != 0) {
sscanf (prop->value().c_str(), "%d", &delete_mod);
- }
+ }
if ((prop = node.property ("snap-modifier")) != 0) {
sscanf (prop->value().c_str(), "%d", &snap_mod);
- }
+ }
return 0;
}
@@ -198,14 +198,14 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
bool ret = false;
#if 0
- cerr << "snoop widget " << widget << " key " << event->keyval << " type: " << event->type
+ cerr << "snoop widget " << widget << " key " << event->keyval << " type: " << event->type
<< " state " << std::hex << event->state << std::dec
<< endl;
#endif
#if KBD_DEBUG
if (debug_keyboard) {
- cerr << "snoop widget " << widget << " key " << event->keyval << " type: " << event->type
+ cerr << "snoop widget " << widget << " key " << event->keyval << " type: " << event->type
<< endl;
}
#endif
@@ -219,7 +219,7 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
} else {
keyval = event->keyval;
}
-
+
if (event->type == GDK_KEY_PRESS) {
if (find (state.begin(), state.end(), keyval) == state.end()) {
@@ -235,7 +235,7 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
for (map<AccelKey,two_strings,AccelKeyLess>::iterator k = release_keys.begin(); k != release_keys.end(); ++k) {
const AccelKey& ak (k->first);
-
+
if (keyval == ak.get_key() && (Gdk::ModifierType)((event->state & Keyboard::RelevantModifierKeyMask) | Gdk::RELEASE_MASK) == ak.get_mod()) {
cerr << "Suppress auto repeat\n";
ret = true;
@@ -247,11 +247,11 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
} else if (event->type == GDK_KEY_RELEASE) {
State::iterator i;
-
+
if ((i = find (state.begin(), state.end(), keyval)) != state.end()) {
state.erase (i);
sort (state.begin(), state.end());
- }
+ }
for (map<AccelKey,two_strings,AccelKeyLess>::iterator k = release_keys.begin(); k != release_keys.end(); ++k) {
@@ -313,13 +313,13 @@ Keyboard::leave_window (GdkEventCrossing *ev, Gtk::Window* /*win*/)
cerr << "INFERIOR crossing ... out\n";
}
break;
-
+
case GDK_NOTIFY_VIRTUAL:
if (debug_keyboard) {
cerr << "VIRTUAL crossing ... out\n";
}
/* fallthru */
-
+
default:
if (debug_keyboard) {
cerr << "REAL CROSSING ... out\n";
@@ -382,8 +382,8 @@ Keyboard::set_snap_modifier (guint mod)
bool
Keyboard::is_edit_event (GdkEventButton *ev)
{
- return (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_BUTTON_RELEASE) &&
- (ev->button == Keyboard::edit_button()) &&
+ return (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_BUTTON_RELEASE) &&
+ (ev->button == Keyboard::edit_button()) &&
((ev->state & RelevantModifierKeyMask) == Keyboard::edit_modifier());
}
@@ -391,31 +391,31 @@ bool
Keyboard::is_button2_event (GdkEventButton* ev)
{
#ifdef GTKOSX
- return (ev->button == 2) ||
- ((ev->button == 1) &&
+ return (ev->button == 2) ||
+ ((ev->button == 1) &&
((ev->state & Keyboard::button2_modifiers) == Keyboard::button2_modifiers));
#else
return ev->button == 2;
-#endif
+#endif
}
bool
Keyboard::is_delete_event (GdkEventButton *ev)
{
- return (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_BUTTON_RELEASE) &&
- (ev->button == Keyboard::delete_button()) &&
+ return (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_BUTTON_RELEASE) &&
+ (ev->button == Keyboard::delete_button()) &&
((ev->state & RelevantModifierKeyMask) == Keyboard::delete_modifier());
}
bool
Keyboard::is_context_menu_event (GdkEventButton *ev)
{
- return (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_BUTTON_RELEASE) &&
- (ev->button == 3) &&
+ return (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_BUTTON_RELEASE) &&
+ (ev->button == 3) &&
((ev->state & RelevantModifierKeyMask) == 0);
}
-bool
+bool
Keyboard::no_modifiers_active (guint state)
{
return (state & RelevantModifierKeyMask) == 0;
@@ -448,7 +448,7 @@ Keyboard::selection_type (guint state)
}
-static void
+static void
accel_map_changed (GtkAccelMap* /*map*/,
gchar* /*path*/,
guint /*key*/,
@@ -479,7 +479,7 @@ Keyboard::save_keybindings ()
{
if (can_save_keybindings && bindings_changed_after_save_became_legal) {
Gtk::AccelMap::save (user_keybindings_path);
- }
+ }
}
void
@@ -494,7 +494,7 @@ Keyboard::setup_keybindings ()
ARDOUR::find_bindings_files (binding_files);
/* set up the per-user bindings path */
-
+
strs.push_back (Glib::get_home_dir());
strs.push_back (".ardour3");
strs.push_back ("ardour.bindings");
@@ -513,16 +513,16 @@ Keyboard::setup_keybindings ()
*/
if (!keybindings_path.empty() && keybindings_path.find (".bindings") == string::npos) {
-
+
// just a style name - allow user to
- // specify the layout type.
-
+ // specify the layout type.
+
char* layout;
-
+
if ((layout = getenv ("ARDOUR_KEYBOARD_LAYOUT")) != 0 && layout[0] != '\0') {
-
+
/* user-specified keyboard layout */
-
+
keybindings_path += '-';
keybindings_path += layout;
@@ -532,23 +532,23 @@ Keyboard::setup_keybindings ()
keybindings_path += "-us";
}
-
+
keybindings_path += ".bindings";
- }
+ }
if (keybindings_path.empty()) {
/* no path or binding name given: check the user one first */
if (!Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
-
+
keybindings_path = "";
} else {
-
+
keybindings_path = user_keybindings_path;
}
- }
+ }
/* if we still don't have a path at this point, use the default */
@@ -559,19 +559,19 @@ Keyboard::setup_keybindings ()
while (true) {
if (!Glib::path_is_absolute (keybindings_path)) {
-
+
/* not absolute - look in the usual places */
sys::path keybindings_file;
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
if ( ! find_file_in_search_path (spath, keybindings_path, keybindings_file)) {
-
+
if (keybindings_path == default_bindings) {
error << _("Default keybindings not found - Ardour will be hard to use!") << endmsg;
return;
} else {
- warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
+ warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
keybindings_path)
<< endmsg;
keybindings_path = default_bindings;
@@ -583,11 +583,11 @@ Keyboard::setup_keybindings ()
keybindings_path = keybindings_file.to_string();
break;
-
+
}
} else {
-
+
/* path is absolute already */
if (!Glib::file_test (keybindings_path, Glib::FILE_TEST_EXISTS)) {
@@ -595,7 +595,7 @@ Keyboard::setup_keybindings ()
error << _("Default keybindings not found - Ardour will be hard to use!") << endmsg;
return;
} else {
- warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
+ warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
keybindings_path)
<< endmsg;
keybindings_path = default_bindings;
@@ -644,9 +644,9 @@ Keyboard::load_keybindings (string path)
vector<string> groups;
vector<string> names;
vector<AccelKey> bindings;
-
+
ActionManager::get_all_actions (groups, names, bindings);
-
+
vector<string>::iterator g;
vector<AccelKey>::iterator b;
vector<string>::iterator n;
@@ -654,19 +654,19 @@ Keyboard::load_keybindings (string path)
release_keys.clear ();
bool show_bindings = (getenv ("ARDOUR_SHOW_BINDINGS") != 0);
-
+
for (n = names.begin(), b = bindings.begin(), g = groups.begin(); n != names.end(); ++n, ++b, ++g) {
-
+
if (show_bindings) {
-
+
cerr << "Action: " << (*n) << " Group: " << (*g) << " binding = ";
-
+
if ((*b).get_key() != GDK_VoidSymbol) {
cerr << (*b).get_key() << " w/mod = " << hex << (*b).get_mod() << dec << " = " << (*b).get_abbrev();
} else {
cerr << "unbound";
}
-
+
cerr << endl;
}
}
diff --git a/gtk2_ardour/keyboard.h b/gtk2_ardour/keyboard.h
index cff45b11f2..db55b08b5e 100644
--- a/gtk2_ardour/keyboard.h
+++ b/gtk2_ardour/keyboard.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc
index 4a7d861297..6b1aec7f4e 100644
--- a/gtk2_ardour/keyeditor.cc
+++ b/gtk2_ardour/keyeditor.cc
@@ -29,7 +29,7 @@ KeyEditor::KeyEditor ()
: ArdourDialog (_("Shortcut Editor"), false)
, unbind_button (_("Remove shortcut"))
, unbind_box (BUTTONBOX_END)
-
+
{
can_bind = false;
last_state = 0;
@@ -46,9 +46,9 @@ KeyEditor::KeyEditor ()
view.set_enable_search (false);
view.set_rules_hint (true);
view.set_name (X_("KeyEditorTree"));
-
+
view.get_selection()->signal_changed().connect (mem_fun (*this, &KeyEditor::action_selected));
-
+
scroller.add (view);
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
@@ -68,7 +68,7 @@ KeyEditor::KeyEditor ()
get_vbox()->pack_start (unbind_box, false, false);
unbind_box.show ();
unbind_button.show ();
-
+
}
get_vbox()->set_border_width (12);
@@ -83,15 +83,15 @@ void
KeyEditor::unbind ()
{
TreeModel::iterator i = view.get_selection()->get_selected();
-
+
unbind_button.set_sensitive (false);
if (i != model->children().end()) {
string path = (*i)[columns.path];
-
+
if (!(*i)[columns.bindable]) {
return;
- }
+ }
bool result = AccelMap::change_entry (path,
0,
@@ -125,16 +125,16 @@ KeyEditor::action_selected ()
}
TreeModel::iterator i = view.get_selection()->get_selected();
-
+
unbind_button.set_sensitive (false);
if (i != model->children().end()) {
string path = (*i)[columns.path];
-
+
if (!(*i)[columns.bindable]) {
return;
- }
+ }
string binding = (*i)[columns.binding];
@@ -163,10 +163,10 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
if (i != model->children().end()) {
string path = (*i)[columns.path];
-
+
if (!(*i)[columns.bindable]) {
goto out;
- }
+ }
possibly_translate_keyval_to_make_legal_accelerator (ev->keyval);
@@ -180,7 +180,7 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
AccelKey key;
known = ActionManager::lookup_entry (path, key);
-
+
if (known) {
(*i)[columns.binding] = ActionManager::ui_manager->get_accel_group()->name (key.get_key(), Gdk::ModifierType (key.get_mod()));
} else {
@@ -204,9 +204,9 @@ KeyEditor::populate ()
typedef std::map<string,TreeIter> NodeMap;
NodeMap nodes;
NodeMap::iterator r;
-
+
ActionManager::get_all_actions (labels, paths, keys, bindings);
-
+
vector<string>::iterator k;
vector<string>::iterator p;
vector<string>::iterator l;
@@ -217,11 +217,11 @@ KeyEditor::populate ()
TreeModel::Row row;
vector<string> parts;
-
+
parts.clear ();
split (*p, parts, '/');
-
+
if (parts.empty()) {
continue;
}
@@ -241,17 +241,17 @@ KeyEditor::populate ()
row = *(model->append (parent.children()));
} else {
-
+
row = *(model->append ((*r->second)->children()));
}
-
+
/* add this action */
row[columns.action] = (*l);
row[columns.path] = (*p);
row[columns.bindable] = true;
-
+
if (*k == ActionManager::unbound_string) {
row[columns.binding] = string();
} else {
@@ -261,7 +261,7 @@ KeyEditor::populate ()
/* Gtk/Quartz maps:
NSAlternate/NSOption key to Mod1
- NSCommand key to Meta
+ NSCommand key to Meta
*/
replace_all (label, "<Meta>", _("Command-"));
@@ -269,7 +269,7 @@ KeyEditor::populate ()
replace_all (label, "<Shift>", _("Shift-"));
replace_all (label, "<Control>", _("Control-"));
row[columns.binding] = label;
-#else
+#else
row[columns.binding] = (*k);
#endif
}
diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h
index 085bfbb6d9..e7d2a3e9f7 100644
--- a/gtk2_ardour/keyeditor.h
+++ b/gtk2_ardour/keyeditor.h
@@ -15,7 +15,7 @@ class KeyEditor : public ArdourDialog
{
public:
KeyEditor ();
-
+
protected:
void on_show ();
void on_unmap ();
diff --git a/gtk2_ardour/latency_gui.cc b/gtk2_ardour/latency_gui.cc
index 08c59dc64d..6ff189e35f 100644
--- a/gtk2_ardour/latency_gui.cc
+++ b/gtk2_ardour/latency_gui.cc
@@ -36,7 +36,7 @@ LatencyBarController::get_label (int&)
} else {
s << std::fixed << std::setprecision (2) << (nframes / (_latency_gui->sample_rate / 1000.0)) << " msecs";
}
-
+
return s.str ();
}
@@ -57,7 +57,7 @@ LatencyGUI::LatencyGUI (Latent& l, nframes64_t sr, nframes64_t psz)
unit_strings = I18N (_unit_strings);
}
- set_popdown_strings (units_combo, unit_strings);
+ set_popdown_strings (units_combo, unit_strings);
units_combo.set_active_text (unit_strings.front());
w = manage (new Image (Stock::ADD, ICON_SIZE_BUTTON));
@@ -144,14 +144,14 @@ LatencyDialog::LatencyDialog (const Glib::ustring& title, Latent& l, nframes64_t
: ArdourDialog (title, false, true),
lwidget (l, sr, psz)
{
-
+
get_vbox()->pack_start (lwidget);
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::APPLY, RESPONSE_REJECT);
add_button (Stock::OK, RESPONSE_ACCEPT);
show_all ();
-
+
while (true) {
int ret = run ();
diff --git a/gtk2_ardour/latency_gui.h b/gtk2_ardour/latency_gui.h
index 9d36103ed7..9844bfaf8f 100644
--- a/gtk2_ardour/latency_gui.h
+++ b/gtk2_ardour/latency_gui.h
@@ -28,12 +28,12 @@ public:
LatencyBarController (Gtk::Adjustment& adj, LatencyGUI* g)
: BarController (adj, boost::shared_ptr<PBD::IgnorableControllable> (new PBD::IgnorableControllable ())),
_latency_gui (g) {}
-
+
private:
LatencyGUI* _latency_gui;
-
+
std::string get_label (int&);
-};
+};
class LatencyGUI : public Gtk::VBox
{
diff --git a/gtk2_ardour/level_meter.cc b/gtk2_ardour/level_meter.cc
index e0a8f8fb51..392aec20bf 100644
--- a/gtk2_ardour/level_meter.cc
+++ b/gtk2_ardour/level_meter.cc
@@ -100,7 +100,7 @@ LevelMeter::update_meters ()
if (!_meter) {
return 0.0f;
}
-
+
for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
if ((*i).packed) {
peak = _meter->peak_power (n);
@@ -123,12 +123,12 @@ LevelMeter::parameter_changed (string p)
ENSURE_GUI_THREAD (bind (mem_fun(*this, &LevelMeter::parameter_changed), p));
if (p == "meter-hold") {
-
+
vector<MeterInfo>::iterator i;
uint32_t n;
-
+
for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
-
+
(*i).meter->set_hold_count ((uint32_t) floor(Config->get_meter_hold()));
}
}
@@ -160,7 +160,7 @@ LevelMeter::setup_meters (int len, int initial_width)
if (!_meter) {
return; /* do it later or never */
}
-
+
int32_t nmidi = _meter->input_streams().n_midi();
uint32_t nmeters = _meter->input_streams().n_total();
regular_meter_width = initial_width;
@@ -223,7 +223,7 @@ LevelMeter::meter_button_release (GdkEventButton* ev, uint32_t /*which*/)
}
return true;
}
-
+
void LevelMeter::clear_meters ()
{
diff --git a/gtk2_ardour/level_meter.h b/gtk2_ardour/level_meter.h
index a2bbd5f4a1..bf0e081cce 100644
--- a/gtk2_ardour/level_meter.h
+++ b/gtk2_ardour/level_meter.h
@@ -74,10 +74,10 @@ class LevelMeter : public Gtk::HBox
struct MeterInfo {
Gtkmm2ext::FastMeter *meter;
gint16 width;
- int length;
+ int length;
bool packed;
-
- MeterInfo() {
+
+ MeterInfo() {
meter = 0;
width = 0;
length = 0;
@@ -92,7 +92,7 @@ class LevelMeter : public Gtk::HBox
float max_peak;
sigc::connection _configuration_connection;
-
+
void hide_all_meters ();
gint meter_button_release (GdkEventButton*, uint32_t);
diff --git a/gtk2_ardour/lineset.cc b/gtk2_ardour/lineset.cc
index 772824a533..835c82920c 100644
--- a/gtk2_ardour/lineset.cc
+++ b/gtk2_ardour/lineset.cc
@@ -179,7 +179,7 @@ LineSet::add_line(double coord, double width, uint32_t color)
Line l(coord, width, color);
Lines::iterator it = std::lower_bound(lines.begin(), lines.end(), l, line_compare);
-
+
/* overlap checking */
if (it != lines.end()) {
if (l.coord + l.width > it->coord) {
@@ -195,7 +195,7 @@ LineSet::add_line(double coord, double width, uint32_t color)
}
++it;
}
-
+
lines.insert(it, l);
region_needs_update(coord, coord + width);
}
@@ -228,13 +228,13 @@ LineSet::remove_until(double coord)
{
if (!lines.empty()) {
double first = lines.front().coord;
-
+
// code
region_needs_update(first, coord);
}
}
-
+
void
LineSet::remove_from(double coord)
{
@@ -253,7 +253,7 @@ LineSet::clear()
if (!lines.empty()) {
double coord1 = lines.front().coord;
double coord2 = lines.back().coord + lines.back().width;
-
+
lines.clear();
region_needs_update(coord1, coord2);
}
@@ -300,10 +300,10 @@ LineSet::line_at(double coord)
Line dummy(coord);
cached_pos = lower_bound(lines.begin(), lines.end(), dummy, line_compare);
-
+
/* The iterator found should point to the element after the one we want. */
--cached_pos;
-
+
if (cached_pos != lines.end()) {
if (cached_pos->coord <= coord) {
if (cached_pos->coord + cached_pos->width >= coord) {
@@ -356,7 +356,7 @@ LineSet::update_lines(bool need_redraw)
LineSet::bounds_vfunc(&redraw.x0, &redraw.y0, &redraw.x1, &redraw.y1);
i2w(redraw.x0, redraw.y0);
i2w(redraw.x1, redraw.y1);
-
+
if (orientation == Vertical) {
redraw.x1 = redraw.x0 + update_region2;
redraw.x0 += update_region1;
@@ -401,7 +401,7 @@ LineSet::update_bounds()
item->y1 = new_b.y0;
item->x2 = new_b.x1;
item->y2 = new_b.y1;
-
+
/* Update bounding box used in rendering function */
cv.w2c(new_b.x0, new_b.y0, bbox.x0, bbox.y0);
cv.w2c(new_b.x1, new_b.y1, bbox.x1, bbox.y1);
@@ -428,7 +428,7 @@ LineSet::update_bounds()
redraw.y1 = max(old_b.y1, new_b.y1);
redraw_request(redraw);
}
-
+
if (new_b.x1 > old_b.x1) {
// we have a larger area ==> possibly more lines
request_lines(old_b.x1, new_b.x1);
@@ -470,7 +470,7 @@ LineSet::update_bounds()
redraw.x1 = max(old_b.x1, new_b.x1);
redraw_request(redraw);
}
-
+
if (new_b.y1 > old_b.y1) {
// we have a larger area ==> possibly more lines
request_lines(old_b.y1, new_b.y1);
@@ -604,7 +604,7 @@ LineSet::render_vfunc(GnomeCanvasBuf* buf)
/**
* The first and the last line in this render have to be handled separately from those in between, because those lines
- * may be cut off at the ends.
+ * may be cut off at the ends.
*/
if (orientation == Vertical) {
@@ -633,7 +633,7 @@ LineSet::render_vfunc(GnomeCanvasBuf* buf)
for (; it != end; ++it) {
pos0 = ((int) floor(it->coord)) + offset;
pos1 = pos0 + ((int) floor(it->width));
-
+
if (pos1 > rect.x0) {
pos0 = max(pos0, rect.x0);
paint_vert(buf, *it, pos0, rect.y0, pos1, rect.y1);
@@ -641,7 +641,7 @@ LineSet::render_vfunc(GnomeCanvasBuf* buf)
break;
}
}
-
+
// render what's between the first and last lines
for (; it != end; ++it) {
pos0 = ((int) floor(it->coord)) + offset;
@@ -675,7 +675,7 @@ LineSet::render_vfunc(GnomeCanvasBuf* buf)
for (; it != end; ++it) {
pos0 = ((int) floor(it->coord)) + offset;
pos1 = pos0 + ((int) floor(it->width));
-
+
if (pos1 > rect.y0) {
pos0 = max(pos0, rect.y0);
paint_horiz(buf, *it, rect.x0, pos0, rect.x1, pos1);
@@ -683,7 +683,7 @@ LineSet::render_vfunc(GnomeCanvasBuf* buf)
break;
}
}
-
+
// render what's between the first and last lines
for (; it != end; ++it) {
pos0 = ((int) floor(it->coord)) + offset;
@@ -775,7 +775,7 @@ LineSet::region_needs_update(double coord1, double coord2)
* Don't know why this happens
*/
bool LineSet::on_event(GdkEvent* /*p1*/)
-{
+{
return false;
}
diff --git a/gtk2_ardour/lineset.h b/gtk2_ardour/lineset.h
index 08b3371121..e4f836717f 100644
--- a/gtk2_ardour/lineset.h
+++ b/gtk2_ardour/lineset.h
@@ -82,7 +82,7 @@ public:
/** Remove the line at coord
*/
void remove_line(double coord);
-
+
/** Remove all lines in a coordinate range
*/
void remove_lines(double c1, double c2);
@@ -90,7 +90,7 @@ public:
/** Remove all lines with a coordinate lower than coord
*/
void remove_until(double coord);
-
+
/** Remove all lines with a coordinate equal to or higher than coord.
*/
void remove_from(double coord);
@@ -127,7 +127,7 @@ public:
/* debug */
void print_lines();
-
+
protected:
struct Line {
Line(double c, double w, uint32_t color);
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index 7aeb8b3301..b04d179c59 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
preemph_check_button (_("Pre-Emphasis"))
{
-
+
i_am_the_modifier = 0;
number_label.set_name ("LocationEditNumberLabel");
@@ -85,7 +85,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
ARDOUR_UI::instance()->tooltips().set_tip(start_set_button, _("Set value to Playhead"));
ARDOUR_UI::instance()->tooltips().set_tip(end_set_button, _("Set value to Playhead"));
-
+
isrc_label.set_text ("ISRC: ");
isrc_label.set_size_request (30, -1);
performer_label.set_text ("Performer: ");
@@ -112,7 +112,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
cd_track_details_hbox.pack_start (composer_label, false, false);
cd_track_details_hbox.pack_start (composer_entry, true, true);
- isrc_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::isrc_entry_changed));
+ isrc_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::isrc_entry_changed));
performer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::performer_entry_changed));
composer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::composer_entry_changed));
scms_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::scms_toggled));
@@ -123,31 +123,31 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
item_table.attach (number_label, 0, 1, 0, 1, FILL, FILL, 3, 0);
-
+
start_hbox.pack_start (start_go_button, false, false);
start_hbox.pack_start (start_clock, false, false);
start_hbox.pack_start (start_set_button, false, false);
item_table.attach (start_hbox, 2, 3, 0, 1, FILL, FILL, 4, 0);
-
+
start_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), LocStart));
start_go_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::go_button_pressed), LocStart));
start_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocStart));
start_clock.ChangeAborted.connect (bind (mem_fun (*this, &LocationEditRow::change_aborted), LocStart));
-
+
end_hbox.pack_start (end_go_button, false, false);
end_hbox.pack_start (end_clock, false, false);
end_hbox.pack_start (end_set_button, false, false);
-
+
//item_table.attach (end_hbox, 2, 3, 0, 1, 0, 0, 4, 0);
-
+
end_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), LocEnd));
end_go_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::go_button_pressed), LocEnd));
end_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocEnd));
end_clock.ChangeAborted.connect (bind (mem_fun (*this, &LocationEditRow::change_aborted), LocEnd));
-
+
// item_table.attach (length_clock, 3, 4, 0, 1, 0, 0, 4, 0);
length_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocLength));
length_clock.ChangeAborted.connect (bind (mem_fun (*this, &LocationEditRow::change_aborted), LocLength));
@@ -155,10 +155,10 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
// item_table.attach (cd_check_button, 4, 5, 0, 1, 0, Gtk::FILL, 4, 0);
// item_table.attach (hide_check_button, 5, 6, 0, 1, 0, Gtk::FILL, 4, 0);
// item_table.attach (remove_button, 7, 8, 0, 1, 0, Gtk::FILL, 4, 0);
-
+
cd_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::cd_toggled));
hide_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::hide_toggled));
-
+
remove_button.signal_clicked().connect(mem_fun(*this, &LocationEditRow::remove_button_pressed));
pack_start(item_table, true, true);
@@ -187,8 +187,8 @@ LocationEditRow::set_session (Session *sess)
start_clock.set_session (session);
end_clock.set_session (session);
- length_clock.set_session (session);
-
+ length_clock.set_session (session);
+
}
void
@@ -220,7 +220,7 @@ LocationEditRow::set_location (Location *loc)
item_table.attach (hide_check_button, 6, 7, 0, 1, FILL, Gtk::FILL, 4, 0);
}
hide_check_button.set_active (location->is_hidden());
-
+
if (location->is_auto_loop() || location-> is_auto_punch()) {
// use label instead of entry
@@ -230,7 +230,7 @@ LocationEditRow::set_location (Location *loc)
if (!name_label.get_parent()) {
item_table.attach (name_label, 1, 2, 0, 1, FILL, FILL, 4, 0);
}
-
+
name_label.show();
} else {
@@ -238,7 +238,7 @@ LocationEditRow::set_location (Location *loc)
name_entry.set_text (location->name());
name_entry.set_size_request (100, -1);
name_entry.set_editable (true);
- name_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::name_entry_changed));
+ name_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::name_entry_changed));
if (!name_entry.get_parent()) {
item_table.attach (name_entry, 1, 2, 0, 1, FILL | EXPAND, FILL, 4, 0);
@@ -252,7 +252,7 @@ LocationEditRow::set_location (Location *loc)
item_table.attach (remove_button, 7, 8, 0, 1, FILL, FILL, 4, 0);
}
- /* XXX i can't find a way to hide the button without messing up
+ /* XXX i can't find a way to hide the button without messing up
the row spacing, so make it insensitive (paul).
*/
@@ -325,13 +325,13 @@ void
LocationEditRow::isrc_entry_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::isrc_entry_changed));
-
+
if (i_am_the_modifier || !location) return;
if (isrc_entry.get_text() != "" ) {
location->cd_info["isrc"] = isrc_entry.get_text();
-
+
} else {
location->cd_info.erase("isrc");
}
@@ -341,7 +341,7 @@ void
LocationEditRow::performer_entry_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::performer_entry_changed));
-
+
if (i_am_the_modifier || !location) return;
if (performer_entry.get_text() != "") {
@@ -355,7 +355,7 @@ void
LocationEditRow::composer_entry_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &LocationEditRow::composer_entry_changed));
-
+
if (i_am_the_modifier || !location) return;
if (composer_entry.get_text() != "") {
@@ -370,7 +370,7 @@ void
LocationEditRow::set_button_pressed (LocationPart part)
{
if (!location) return;
-
+
switch (part) {
case LocStart:
location->set_start (session->transport_frame ());
@@ -404,7 +404,7 @@ void
LocationEditRow::clock_changed (LocationPart part)
{
if (i_am_the_modifier || !location) return;
-
+
switch (part) {
case LocStart:
location->set_start (start_clock.current_time());
@@ -424,7 +424,7 @@ void
LocationEditRow::change_aborted (LocationPart /*part*/)
{
if (i_am_the_modifier || !location) return;
-
+
set_location(location);
}
@@ -434,7 +434,7 @@ LocationEditRow::cd_toggled ()
if (i_am_the_modifier || !location) {
return;
}
-
+
//if (cd_check_button.get_active() == location->is_cd_marker()) {
// return;
//}
@@ -466,16 +466,16 @@ LocationEditRow::cd_toggled ()
if (location->cd_info.find("preemph") != location->cd_info.end()) {
preemph_check_button.set_active(true);
}
-
+
if (!cd_track_details_hbox.get_parent()) {
item_table.attach (cd_track_details_hbox, 1, 8, 1, 2, FILL | EXPAND, FILL, 4, 0);
}
// item_table.resize(2, 7);
cd_track_details_hbox.show_all();
-
+
} else if (cd_track_details_hbox.get_parent()){
-
- item_table.remove (cd_track_details_hbox);
+
+ item_table.remove (cd_track_details_hbox);
// item_table.resize(1, 7);
redraw_ranges(); /* EMIT_SIGNAL */
}
@@ -509,7 +509,7 @@ LocationEditRow::scms_toggled ()
} else {
location->cd_info.erase("scms");
}
-
+
}
void
@@ -530,13 +530,13 @@ LocationEditRow::end_changed (ARDOUR::Location *loc)
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::end_changed), loc));
if (!location) return;
-
+
// update end and length
i_am_the_modifier++;
end_clock.set (location->end());
length_clock.set (location->length());
-
+
i_am_the_modifier--;
}
@@ -546,7 +546,7 @@ LocationEditRow::start_changed (ARDOUR::Location *loc)
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::start_changed), loc));
if (!location) return;
-
+
// update end and length
i_am_the_modifier++;
@@ -557,7 +557,7 @@ LocationEditRow::start_changed (ARDOUR::Location *loc)
} else {
cd_check_button.set_sensitive (true);
}
-
+
i_am_the_modifier--;
}
@@ -565,7 +565,7 @@ void
LocationEditRow::name_changed (ARDOUR::Location *loc)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::name_changed), loc));
-
+
if (!location) return;
// update end and length
@@ -580,9 +580,9 @@ LocationEditRow::name_changed (ARDOUR::Location *loc)
void
LocationEditRow::location_changed (ARDOUR::Location *loc)
-{
+{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::location_changed), loc));
-
+
if (!location) return;
i_am_the_modifier++;
@@ -603,7 +603,7 @@ void
LocationEditRow::flags_changed (ARDOUR::Location *loc, void *src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationEditRow::flags_changed), loc, src));
-
+
if (!location) return;
i_am_the_modifier++;
@@ -626,7 +626,7 @@ LocationUI::LocationUI ()
add_range_button (_("Add New Range"))
{
i_am_the_modifier = 0;
-
+
WindowTitle title(Glib::get_application_name());
title += _("Locations");
@@ -647,13 +647,13 @@ LocationUI::LocationUI ()
location_rows_scroller.set_name ("LocationLocRowsScroller");
location_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
location_rows_scroller.set_size_request (-1, 130);
-
+
newest_location = 0;
loc_frame_box.set_spacing (5);
loc_frame_box.set_border_width (5);
loc_frame_box.set_name("LocationFrameBox");
-
+
loc_frame_box.pack_start (location_rows_scroller, true, true);
add_location_button.set_name ("LocationAddLocationButton");
@@ -664,13 +664,13 @@ LocationUI::LocationUI ()
loc_frame.add (loc_frame_box);
loc_range_panes.pack1(loc_frame, true, false);
-
+
range_rows.set_name("LocationRangeRows");
range_rows_scroller.add (range_rows);
range_rows_scroller.set_name ("LocationRangeRowsScroller");
range_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
range_rows_scroller.set_size_request (-1, 130);
-
+
range_frame_box.set_spacing (5);
range_frame_box.set_name("LocationFrameBox");
range_frame_box.set_border_width (5);
@@ -684,15 +684,15 @@ LocationUI::LocationUI ()
range_frame.add (range_frame_box);
loc_range_panes.pack2(range_frame, true, false);
location_vpacker.pack_start (loc_range_panes, true, true);
-
+
location_hpacker.pack_start (location_vpacker, true, true);
add_location_button.signal_clicked().connect (mem_fun(*this, &LocationUI::add_new_location));
add_range_button.signal_clicked().connect (mem_fun(*this, &LocationUI::add_new_range));
-
+
//add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_RELEASE_MASK);
-
+
}
LocationUI::~LocationUI()
@@ -731,7 +731,7 @@ void LocationUI::location_remove_requested (ARDOUR::Location *loc)
{
// must do this to prevent problems when destroying
// the effective sender of this event
-
+
Glib::signal_idle().connect (bind (mem_fun(*this, &LocationUI::do_location_remove), loc));
}
@@ -749,7 +749,7 @@ void
LocationUI::location_added (Location* location)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationUI::location_added), location));
-
+
if (location->is_auto_punch()) {
punch_edit_row.set_location(location);
}
@@ -765,7 +765,7 @@ void
LocationUI::location_removed (Location* location)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationUI::location_removed), location));
-
+
if (location->is_auto_punch()) {
punch_edit_row.set_location(0);
}
@@ -788,7 +788,7 @@ LocationUI::map_locations (Locations::LocationList& locations)
{
Locations::LocationList::iterator i;
Location* location;
- gint n;
+ gint n;
int mark_n = 0;
Locations::LocationList temp = locations;
LocationSortByStart cmp;
@@ -799,7 +799,7 @@ LocationUI::map_locations (Locations::LocationList& locations)
Box_Helpers::BoxList & loc_children = location_rows.children();
Box_Helpers::BoxList & range_children = range_rows.children();
LocationEditRow * erow;
-
+
for (n = 0, i = locations.begin(); i != locations.end(); ++n, ++i) {
location = *i;
@@ -846,7 +846,7 @@ LocationUI::add_new_location()
session->locations()->next_available_name(markername,"mark");
Location *location = new Location (where, where, markername, Location::IsMark);
if (Config->get_name_new_markers()) {
- newest_location = location;
+ newest_location = location;
}
session->begin_reversible_command (_("add marker"));
XMLNode &before = session->locations()->get_state();
@@ -855,7 +855,7 @@ LocationUI::add_new_location()
session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
session->commit_reversible_command ();
}
-
+
}
void
@@ -881,7 +881,7 @@ void
LocationUI::refresh_location_list_s (Change ignored)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LocationUI::refresh_location_list_s), ignored));
-
+
refresh_location_list ();
}
@@ -903,7 +903,7 @@ LocationUI::refresh_location_list ()
if (session) {
session->locations()->apply (*this, &LocationUI::map_locations);
}
-
+
}
void
@@ -925,7 +925,7 @@ void
LocationUI::session_gone()
{
ENSURE_GUI_THREAD(mem_fun(*this, &LocationUI::session_gone));
-
+
hide_all();
using namespace Box_Helpers;
diff --git a/gtk2_ardour/location_ui.h b/gtk2_ardour/location_ui.h
index dabd945f95..87977c80ba 100644
--- a/gtk2_ardour/location_ui.h
+++ b/gtk2_ardour/location_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999-2002 Paul Davis
+ Copyright (C) 1999-2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,9 +51,9 @@ class LocationEditRow : public Gtk::HBox
void set_number (int);
void focus_name();
-
- sigc::signal<void,ARDOUR::Location*> remove_requested;
- sigc::signal<void> redraw_ranges;
+
+ sigc::signal<void,ARDOUR::Location*> remove_requested;
+ sigc::signal<void> redraw_ranges;
protected:
@@ -66,14 +66,14 @@ class LocationEditRow : public Gtk::HBox
ARDOUR::Location *location;
ARDOUR::Session *session;
-
-
+
+
Gtk::Table item_table;
-
+
Gtk::Entry name_entry;
Gtk::Label name_label;
Gtk::Label number_label;
-
+
Gtk::HBox start_hbox;
Gtk::Button start_set_button;
Gtk::Button start_go_button;
@@ -105,12 +105,12 @@ class LocationEditRow : public Gtk::HBox
guint32 i_am_the_modifier;
int number;
-
+
void name_entry_changed ();
void isrc_entry_changed ();
void performer_entry_changed ();
void composer_entry_changed ();
-
+
void set_button_pressed (LocationPart part);
void go_button_pressed (LocationPart part);
@@ -129,13 +129,13 @@ class LocationEditRow : public Gtk::HBox
void name_changed (ARDOUR::Location *);
void location_changed (ARDOUR::Location *);
void flags_changed (ARDOUR::Location *, void *src);
-
+
sigc::connection start_changed_connection;
sigc::connection end_changed_connection;
sigc::connection name_changed_connection;
sigc::connection changed_connection;
sigc::connection flags_changed_connection;
-
+
};
@@ -152,7 +152,7 @@ class LocationUI : public ArdourDialog
private:
ARDOUR::LocationStack* locations;
ARDOUR::Location *newest_location;
-
+
void session_gone();
Gtk::VBox location_vpacker;
@@ -160,9 +160,9 @@ class LocationUI : public ArdourDialog
LocationEditRow loop_edit_row;
LocationEditRow punch_edit_row;
-
+
Gtk::VPaned loc_range_panes;
-
+
Gtk::Frame loc_frame;
Gtk::VBox loc_frame_box;
Gtk::Button add_location_button;
@@ -186,12 +186,12 @@ class LocationUI : public ArdourDialog
void location_redraw_ranges ();
gint do_location_remove (ARDOUR::Location *);
-
+
guint32 i_am_the_modifier;
void add_new_location();
void add_new_range();
-
+
void refresh_location_list ();
void refresh_location_list_s (ARDOUR::Change);
void location_removed (ARDOUR::Location *);
diff --git a/gtk2_ardour/logmeter.h b/gtk2_ardour/logmeter.h
index 0bbce787b2..d861509080 100644
--- a/gtk2_ardour/logmeter.h
+++ b/gtk2_ardour/logmeter.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ inline float
log_meter (float db)
{
gfloat def = 0.0f; /* Meter deflection %age */
-
+
if (db < -70.0f) {
def = 0.0f;
} else if (db < -60.0f) {
@@ -56,8 +56,8 @@ log_meter (float db)
} else {
def = 115.0f;
}
-
- /* 115 is the deflection %age that would be
+
+ /* 115 is the deflection %age that would be
when db=6.0. this is an arbitrary
endpoint for our scaling.
*/
diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc
index 94cf0e61f3..f6718940b3 100644
--- a/gtk2_ardour/lv2_plugin_ui.cc
+++ b/gtk2_ardour/lv2_plugin_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -106,7 +106,7 @@ LV2PluginUI::start_updating(GdkEventAny*)
{
if (!_output_ports.empty()) {
_screen_update_connection.disconnect();
- _screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
+ _screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
(mem_fun(*this, &LV2PluginUI::output_update));
}
return false;
@@ -138,7 +138,7 @@ LV2PluginUI::output_update()
uint32_t index = _output_ports[i];
parameter_changed(index, _lv2->get_parameter(index));
}
-
+
}
LV2PluginUI::LV2PluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<LV2Plugin> lv2p)
@@ -194,7 +194,7 @@ LV2PluginUI::lv2ui_instantiate(const Glib::ustring& title)
if (is_external_ui) {
free(features_dst);
}
-
+
uint32_t num_ports = slv2_plugin_get_num_ports(_lv2->slv2_plugin());
for (uint32_t i = 0; i < num_ports; ++i) {
if (_lv2->parameter_is_output(i) && _lv2->parameter_is_control(i) && is_update_wanted(i)) {
@@ -214,7 +214,7 @@ LV2PluginUI::lv2ui_instantiate(const Glib::ustring& title)
g_external_uis.push_back(_external_ui_ptr);
}
}
-
+
_values = new float[num_ports];
for (uint32_t i = 0; i < num_ports; ++i) {
bool ok;
@@ -226,7 +226,7 @@ LV2PluginUI::lv2ui_instantiate(const Glib::ustring& title)
}
}
}
-
+
_lv2->ParameterChanged.connect(mem_fun(*this, &LV2PluginUI::parameter_changed));
}
@@ -300,7 +300,7 @@ LV2PluginUI::on_window_show(const Glib::ustring& title)
LV2_EXTERNAL_UI_SHOW(_external_ui_ptr);
_screen_update_connection.disconnect();
- _screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
+ _screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
(mem_fun(*this, &LV2PluginUI::output_update));
return false;
}
diff --git a/gtk2_ardour/lv2_plugin_ui.h b/gtk2_ardour/lv2_plugin_ui.h
index 011b70e44b..0a10693de2 100644
--- a/gtk2_ardour/lv2_plugin_ui.h
+++ b/gtk2_ardour/lv2_plugin_ui.h
@@ -62,7 +62,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
boost::shared_ptr<ARDOUR::LV2Plugin> _lv2;
std::vector<int> _output_ports;
sigc::connection _screen_update_connection;
-
+
Gtk::Widget* _gui_widget;
SLV2UIInstance _inst;
float* _values;
@@ -73,14 +73,14 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
Gtk::Window* _win_ptr;
static void on_external_ui_closed(LV2UI_Controller controller);
-
+
static void lv2_ui_write(
LV2UI_Controller controller,
uint32_t port_index,
uint32_t buffer_size,
uint32_t format,
const void* buffer);
-
+
void lv2ui_instantiate(const Glib::ustring& title);
void parameter_changed(uint32_t, float);
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index 2afb40ab3e..0923ff39d0 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -1,6 +1,6 @@
/*
Copyright (C) 2001-2007 Paul Davis
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -81,7 +81,7 @@ Please consider the possibilities, and perhaps (re)start JACK."));
win.add_button (Stock::QUIT, RESPONSE_CLOSE);
win.set_default_response (RESPONSE_CLOSE);
-
+
win.show_all ();
win.set_position (Gtk::WIN_POS_CENTER);
@@ -165,7 +165,7 @@ fixup_bundle_environment ()
}
path += dir_path;
path += "/../Plugins";
-
+
setenv ("LADSPA_PATH", path.c_str(), 1);
cstr = getenv ("VAMP_PATH");
@@ -177,7 +177,7 @@ fixup_bundle_environment ()
}
path += dir_path;
path += "/../Frameworks";
-
+
setenv ("VAMP_PATH", path.c_str(), 1);
cstr = getenv ("ARDOUR_CONTROL_SURFACE_PATH");
@@ -189,7 +189,7 @@ fixup_bundle_environment ()
}
path += dir_path;
path += "/../Surfaces";
-
+
setenv ("ARDOUR_CONTROL_SURFACE_PATH", path.c_str(), 1);
cstr = getenv ("LV2_PATH");
@@ -201,7 +201,7 @@ fixup_bundle_environment ()
}
path += dir_path;
path += "/../Plugins";
-
+
setenv ("LV2_PATH", path.c_str(), 1);
path = dir_path;
@@ -211,12 +211,12 @@ fixup_bundle_environment ()
path = dir_path;
path += "/../Resources/locale";
-
+
localedir = strdup (path.c_str());
/* write a pango.rc file and tell pango to use it. we'd love
to put this into the Ardour.app bundle and leave it there,
- but the user may not have write permission. so ...
+ but the user may not have write permission. so ...
we also have to make sure that the user ardour directory
actually exists ...
@@ -228,7 +228,7 @@ fixup_bundle_environment ()
catch (const sys::filesystem_error& ex) {
error << _("Could not create user configuration directory") << endmsg;
}
-
+
sys::path pangopath = user_config_directory();
pangopath /= "pango.rc";
path = pangopath.to_string();
@@ -244,7 +244,7 @@ fixup_bundle_environment ()
pangopath /= "..";
pangopath /= "Resources";
pangopath /= "pango.modules";
-
+
pangorc << pangopath.to_string() << endl;
pangorc.close ();
@@ -257,7 +257,7 @@ fixup_bundle_environment ()
setenv ("CHARSETALIASDIR", path.c_str(), 1);
// font config
-
+
path = dir_path;
path += "/../Resources/fonts.conf";
@@ -272,10 +272,10 @@ fixup_bundle_environment ()
if (getenv ("ARDOUR_WITH_JACK")) {
// JACK driver dir
-
+
path = dir_path;
path += "/../Frameworks";
-
+
setenv ("JACK_DRIVER_DIR", path.c_str(), 1);
}
}
@@ -307,7 +307,7 @@ int main (int argc, char *argv[])
#endif
{
vector<Glib::ustring> null_file_list;
-
+
#ifdef __APPLE__
fixup_bundle_environment ();
#endif
@@ -346,17 +346,17 @@ int main (int argc, char *argv[])
if (curvetest_file) {
return curvetest (curvetest_file);
}
-
- cout << _("Ardour/GTK ")
+
+ cout << _("Ardour/GTK ")
<< VERSIONSTRING
<< _(" (built using ")
<< svn_revision
#ifdef __GNUC__
- << _(" and GCC version ") << __VERSION__
+ << _(" and GCC version ") << __VERSION__
#endif
<< ')'
<< endl;
-
+
if (just_version) {
exit (0);
}
@@ -380,7 +380,7 @@ int main (int argc, char *argv[])
cerr << _("Cannot install SIGPIPE error handler") << endl;
}
- try {
+ try {
ui = new ARDOUR_UI (&argc, &argv);
} catch (failed_constructor& err) {
error << _("could not create ARDOUR GUI") << endmsg;
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index bc97128102..3df253b4ac 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@
using namespace std;
using namespace ARDOUR;
-Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
+Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
Type type, nframes_t frame, bool handle_events)
: editor (ed), _parent(&parent), _type(type)
@@ -55,7 +55,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
^ |
| V
(0,5) (6,5)
- \ /
+ \ /
(3,10)
@@ -72,17 +72,17 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
Start:
- 0,0\
- | \
+ 0,0\
+ | \
| \ 6,6
| /
| /
- 0,12
+ 0,12
End:
/12,0
- / |
+ / |
/ |
6,6 |
\ |
@@ -90,15 +90,15 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
\ |
12,12
-
+
TransportStart:
0,0
- | \
- | \
- | \
+ | \
+ | \
+ | \
| \
- | \
+ | \
0,13 --- 13,13
TransportEnd:
@@ -110,7 +110,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
/ |
/ |
0,13 ------ 13,13
-
+
PunchIn:
@@ -118,23 +118,23 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
| /
| /
| /
- | /
- | /
- | /
+ | /
+ | /
+ | /
0,13
PunchOut
0,0 -->-13,0
- \ |
+ \ |
\ |
\ |
\ |
\ |
\ |
13,13
-
-
+
+
*/
switch (type) {
@@ -144,10 +144,10 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (6.0, 0.0));
points->push_back (Gnome::Art::Point (6.0, 5.0));
- points->push_back (Gnome::Art::Point (3.0, 10.0));
- points->push_back (Gnome::Art::Point (0.0, 5.0));
- points->push_back (Gnome::Art::Point (0.0, 0.0));
-
+ points->push_back (Gnome::Art::Point (3.0, 10.0));
+ points->push_back (Gnome::Art::Point (0.0, 5.0));
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
+
shift = 3;
label_offset = 8.0;
break;
@@ -157,11 +157,11 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (3.0, 0.0));
- points->push_back (Gnome::Art::Point (6.0, 5.0));
- points->push_back (Gnome::Art::Point (6.0, 10.0));
- points->push_back (Gnome::Art::Point (0.0, 10.0));
- points->push_back (Gnome::Art::Point (0.0, 5.0));
- points->push_back (Gnome::Art::Point (3.0, 0.0));
+ points->push_back (Gnome::Art::Point (6.0, 5.0));
+ points->push_back (Gnome::Art::Point (6.0, 10.0));
+ points->push_back (Gnome::Art::Point (0.0, 10.0));
+ points->push_back (Gnome::Art::Point (0.0, 5.0));
+ points->push_back (Gnome::Art::Point (3.0, 0.0));
shift = 3;
label_offset = 8.0;
@@ -169,10 +169,10 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
case Start:
points = new ArdourCanvas::Points ();
- points->push_back (Gnome::Art::Point (0.0, 0.0));
- points->push_back (Gnome::Art::Point (6.5, 6.5));
- points->push_back (Gnome::Art::Point (0.0, 13.0));
- points->push_back (Gnome::Art::Point (0.0, 0.0));
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
+ points->push_back (Gnome::Art::Point (6.5, 6.5));
+ points->push_back (Gnome::Art::Point (0.0, 13.0));
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
shift = 0;
label_offset = 13.0;
@@ -181,21 +181,21 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
case End:
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (6.5, 6.5));
- points->push_back (Gnome::Art::Point (13.0, 0.0));
- points->push_back (Gnome::Art::Point (13.0, 13.0));
- points->push_back (Gnome::Art::Point (6.5, 6.5));
-
+ points->push_back (Gnome::Art::Point (13.0, 0.0));
+ points->push_back (Gnome::Art::Point (13.0, 13.0));
+ points->push_back (Gnome::Art::Point (6.5, 6.5));
+
shift = 13;
label_offset = 6.0;
break;
case LoopStart:
points = new ArdourCanvas::Points ();
- points->push_back (Gnome::Art::Point (0.0, 0.0));
- points->push_back (Gnome::Art::Point (13.0, 13.0));
- points->push_back (Gnome::Art::Point (0.0, 13.0));
- points->push_back (Gnome::Art::Point (0.0, 0.0));
-
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
+ points->push_back (Gnome::Art::Point (13.0, 13.0));
+ points->push_back (Gnome::Art::Point (0.0, 13.0));
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
+
shift = 0;
label_offset = 12.0;
break;
@@ -203,10 +203,10 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
case LoopEnd:
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (13.0, 0.0));
- points->push_back (Gnome::Art::Point (13.0, 13.0));
- points->push_back (Gnome::Art::Point (0.0, 13.0));
+ points->push_back (Gnome::Art::Point (13.0, 13.0));
+ points->push_back (Gnome::Art::Point (0.0, 13.0));
points->push_back (Gnome::Art::Point (13.0, 0.0));
-
+
shift = 13;
label_offset = 0.0;
break;
@@ -214,25 +214,25 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
case PunchIn:
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0));
- points->push_back (Gnome::Art::Point (13.0, 0.0));
- points->push_back (Gnome::Art::Point (0.0, 13.0));
- points->push_back (Gnome::Art::Point (0.0, 0.0));
+ points->push_back (Gnome::Art::Point (13.0, 0.0));
+ points->push_back (Gnome::Art::Point (0.0, 13.0));
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
shift = 0;
label_offset = 13.0;
break;
-
+
case PunchOut:
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0));
- points->push_back (Gnome::Art::Point (12.0, 0.0));
- points->push_back (Gnome::Art::Point (12.0, 12.0));
- points->push_back (Gnome::Art::Point (0.0, 0.0));
+ points->push_back (Gnome::Art::Point (12.0, 0.0));
+ points->push_back (Gnome::Art::Point (12.0, 12.0));
+ points->push_back (Gnome::Art::Point (0.0, 0.0));
shift = 13;
label_offset = 0.0;
break;
-
+
}
frame_position = frame;
@@ -252,24 +252,24 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
/* setup name pixbuf sizes */
name_font = get_font_for_style (N_("MarkerText"));
-
+
Gtk::Window win;
Gtk::Label foo;
win.add (foo);
-
+
Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */
int width;
int height;
-
+
layout->set_font_description (*name_font);
Gtkmm2ext::get_ink_pixel_size (layout, width, height);
name_height = height + 6;
-
+
name_pixbuf = new ArdourCanvas::Pixbuf(*group);
name_pixbuf->property_x() = label_offset;
-
+
set_name (annotation.c_str());
-
+
editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
mark->set_data ("marker", this);
@@ -339,7 +339,7 @@ Marker::show_line ()
}
}
-void
+void
Marker::hide_line ()
{
if (line) {
@@ -358,12 +358,12 @@ Marker::set_name (const string& new_name)
{
uint32_t pb_width;
double font_size;
-
+
font_size = name_font->get_size() / Pango::SCALE;
pb_width = new_name.length() * font_size;
-
+
Glib::RefPtr<Gdk::Pixbuf> buf = Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, true, 8, pb_width, name_height);
-
+
cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, pb_width, name_height);
cairo_t *cr = cairo_create (surface);
cairo_text_extents_t te;
@@ -372,21 +372,21 @@ Marker::set_name (const string& new_name)
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, font_size);
cairo_text_extents (cr, new_name.c_str(), &te);
-
+
cairo_move_to (cr, 0.5,
0.5 - te.height / 2 - te.y_bearing + name_height / 2);
cairo_show_text (cr, new_name.c_str());
-
+
unsigned char* src = cairo_image_surface_get_data (surface);
convert_bgra_to_rgba(src, buf->get_pixels(), pb_width, name_height);
-
+
cairo_destroy(cr);
name_pixbuf->property_pixbuf() = buf;
-
+
if (_type == End || _type == LoopEnd || _type == PunchOut) {
name_pixbuf->property_x() = -(te.width);
}
-
+
}
void
@@ -408,7 +408,7 @@ void
Marker::reposition ()
{
set_position (frame_position);
-}
+}
void
Marker::show ()
@@ -431,7 +431,7 @@ Marker::set_color_rgba (uint32_t color)
/***********************************************************************/
-TempoMarker::TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
+TempoMarker::TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
ARDOUR::TempoSection& temp)
: Marker (editor, parent, rgba, text, Tempo, 0, false),
_tempo (temp)
@@ -446,8 +446,8 @@ TempoMarker::~TempoMarker ()
/***********************************************************************/
-MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
- ARDOUR::MeterSection& m)
+MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
+ ARDOUR::MeterSection& m)
: Marker (editor, parent, rgba, text, Meter, 0, false),
_meter (m)
{
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index a379f010c9..3802348567 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ class Marker : public PBD::Destructible
};
- Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const std::string& text, Type,
+ Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const std::string& text, Type,
nframes_t frame = 0, bool handle_events = true);
virtual ~Marker ();
@@ -68,12 +68,12 @@ class Marker : public PBD::Destructible
void set_position (nframes64_t);
void set_name (const std::string&);
void set_color_rgba (uint32_t rgba);
-
+
nframes64_t position() const { return frame_position; }
ArdourCanvas::Group * get_parent() { return _parent; }
void reparent (ArdourCanvas::Group & parent);
-
+
void hide ();
void show ();
@@ -97,7 +97,7 @@ class Marker : public PBD::Destructible
unsigned char shift; /* should be double, but its always small and integral */
Type _type;
int name_height;
-
+
void reposition ();
};
diff --git a/gtk2_ardour/marker_selection.h b/gtk2_ardour/marker_selection.h
index ae6417f6c6..d2aacceacf 100644
--- a/gtk2_ardour/marker_selection.h
+++ b/gtk2_ardour/marker_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
#include "marker.h"
-struct MarkerSelection : public std::list<Marker*>
+struct MarkerSelection : public std::list<Marker*>
{
void range (nframes64_t& start, nframes64_t& end);
};
diff --git a/gtk2_ardour/marker_time_axis.cc b/gtk2_ardour/marker_time_axis.cc
index f7867e49b0..d3517bd673 100644
--- a/gtk2_ardour/marker_time_axis.cc
+++ b/gtk2_ardour/marker_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Canvas&
{
/* the TimeAxisView these markers are associated with */
marked_time_axis = tav ;
-
+
_color = unique_random_color() ;
time_axis_name = name ;
@@ -80,7 +80,7 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Canvas&
// set the initial time axis text label
label_view() ;
-
+
// set the initial height of this time axis
set_height(hSmall) ;
}
@@ -105,18 +105,18 @@ MarkerTimeAxis::~MarkerTimeAxis()
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
void
MarkerTimeAxis::set_height (uint32_t h)
{
VisualTimeAxis::set_height(h) ;
-
+
// tell out view helper of the change too
if (view != 0)
{
view->set_height((double) height) ;
}
-
+
// tell those interested that we have had our height changed
gui_changed("track_height",(void*)0) ; /* EMIT_SIGNAL */
}
@@ -161,7 +161,7 @@ MarkerTimeAxis::popup_marker_time_axis_edit_menu(int button, int32_t time, Marke
{
marker_item_menu->set_sensitive(false) ;
}
-
+
marker_menu->popup(button,time) ;
}
@@ -205,7 +205,7 @@ MarkerTimeAxis::build_display_menu()
items.push_back(MenuElem (_("Height"), *size_menu));
items.push_back(MenuElem (_("Color"), mem_fun(*this, &MarkerTimeAxis::select_track_color)));
items.push_back(SeparatorElem()) ;
-
+
items.push_back(MenuElem (_("Remove"), bind(mem_fun(*this, &MarkerTimeAxis::remove_this_time_axis), (void*)this)));
}
@@ -221,7 +221,7 @@ MarkerTimeAxis::build_marker_menu()
marker_menu = manage(new Menu) ;
marker_menu->set_name ("ArdourContextMenu");
MenuList& items = marker_menu->items();
-
+
marker_item_menu = manage(new Menu) ;
marker_item_menu->set_name ("ArdourContextMenu");
MenuList& marker_sub_items = marker_item_menu->items() ;
@@ -230,7 +230,7 @@ MarkerTimeAxis::build_marker_menu()
Menu* duration_menu = manage(new Menu) ;
duration_menu->set_name ("ArdourContextMenu");
MenuList& duration_items = duration_menu->items() ;
-
+
if(view)
{
duration_items.push_back(MenuElem (_("1 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.0))) ;
@@ -246,7 +246,7 @@ MarkerTimeAxis::build_marker_menu()
marker_sub_items.push_back(SeparatorElem()) ;
marker_sub_items.push_back(MenuElem (_("Remove Marker"), bind(mem_fun(view, &MarkerTimeAxisView::remove_selected_marker_view),(void*)this))) ;
-
+
items.push_back(MenuElem(_("Marker"), *marker_item_menu)) ;
items.push_back(MenuElem (_("Rename Track"), mem_fun(*this,&MarkerTimeAxis::start_time_axis_rename))) ;
diff --git a/gtk2_ardour/marker_time_axis.h b/gtk2_ardour/marker_time_axis.h
index 5c66b56c16..05b95bddaa 100644
--- a/gtk2_ardour/marker_time_axis.h
+++ b/gtk2_ardour/marker_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ class MarkerTimeAxis : public VisualTimeAxis
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new MarkerTimeAxis
*
@@ -66,24 +66,24 @@ class MarkerTimeAxis : public VisualTimeAxis
* @param tav the associated track view that this MarkerTimeAxis is marking up
*/
MarkerTimeAxis(PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas, const std::string & name, TimeAxisView* tav) ;
-
+
/**
* Destructor
* Responsible for destroying any marker items upon this time axis
*/
virtual ~MarkerTimeAxis() ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Sets the height of this TrackView to one of the defined TrackHeights
*
* @param h the number of pixels to set the height to
*/
virtual void set_height(uint32_t h) ;
-
+
/**
* Sets the number of samples per unit that are used.
* This is used to determine the sizes of items upon this time axis
@@ -91,8 +91,8 @@ class MarkerTimeAxis : public VisualTimeAxis
* @param spu the number of samples per unit
*/
virtual void set_samples_per_unit(double spu) ;
-
-
+
+
/**
* Show the popup edit menu
*
@@ -102,8 +102,8 @@ class MarkerTimeAxis : public VisualTimeAxis
* @param with_item true if an item has been selected upon the time axis, used to set context menu
*/
void popup_marker_time_axis_edit_menu(int button, int32_t time, MarkerView* clicked_mv, bool with_item) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
@@ -113,7 +113,7 @@ class MarkerTimeAxis : public VisualTimeAxis
* @return the view helper of this TimeAxis
*/
MarkerTimeAxisView* get_view() ;
-
+
/**
* Returns the TimeAxisView that this markerTimeAxis is marking up
*
@@ -123,18 +123,18 @@ class MarkerTimeAxis : public VisualTimeAxis
private:
-
+
/**
* convenience method to select a new track color and apply it to the view and view items
*
*/
void select_track_color() ;
-
+
/**
* Handles the building of the popup menu
*/
virtual void build_display_menu() ;
-
+
/**
* handles the building of the MarkerView sub menu
*/
@@ -142,17 +142,17 @@ class MarkerTimeAxis : public VisualTimeAxis
/** The associated TimeAxis that this MarkerTimeAxis is marking up */
TimeAxisView* marked_time_axis ;
-
+
/** Our time axis view helper */
MarkerTimeAxisView *view ;
- /** the popup menu available by clicking upon this time axis */
+ /** the popup menu available by clicking upon this time axis */
Gtk::Menu *marker_menu ;
-
+
/** specialized sub menu available when clicking upon and item upon this time axis */
Gtk::Menu *marker_item_menu ;
-
-
+
+
} ; /* class MarkerTimeAxis */
#endif /* __ardour_imageframe_time_axis_h__ */
diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc
index e9a15fb5a5..417ac5c8dc 100644
--- a/gtk2_ardour/marker_time_axis_view.cc
+++ b/gtk2_ardour/marker_time_axis_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ using namespace Editing;
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Construct a new MarkerTimeAxisView helper time axis helper
*
@@ -61,7 +61,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
canvas_rect->property_y2() = (double)20;
canvas_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerTrack.get();
canvas_rect->property_fill_color_rgba() = stream_base_color;
-
+
canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
_samples_per_unit = _trackview.editor.get_current_zoom() ;
@@ -80,17 +80,17 @@ MarkerTimeAxisView::~MarkerTimeAxisView()
for(MarkerViewList::iterator iter = marker_view_list.begin(); iter != marker_view_list.end(); ++iter)
{
MarkerView* mv = (*iter) ;
-
+
MarkerViewList::iterator next = iter ;
next++ ;
marker_view_list.erase(iter) ;
delete mv ;
mv = 0 ;
-
+
iter = next ;
}
-
+
delete canvas_rect;
canvas_rect = 0 ;
@@ -113,7 +113,7 @@ MarkerTimeAxisView::set_height(gdouble h)
if (h < 10.0 || h > 1000.0) {
return -1;
}
-
+
canvas_rect->property_y2() = h;
for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i) {
@@ -140,7 +140,7 @@ MarkerTimeAxisView::set_position(gdouble x, gdouble y)
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
int
@@ -149,7 +149,7 @@ MarkerTimeAxisView::set_samples_per_unit(gdouble spp)
if(spp < 1.0) {
return -1 ;
}
-
+
_samples_per_unit = spp ;
for(MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
@@ -178,7 +178,7 @@ MarkerTimeAxisView::apply_color(Gdk::Color& color)
//---------------------------------------------------------------------------------------//
// Child MarkerView Accessors/Mutators
-
+
/**
* Adds a marker view to the list of items upon this time axis view helper
* the new MarkerView is returned
@@ -189,7 +189,7 @@ MarkerTimeAxisView::apply_color(Gdk::Color& color)
* @param start the position the new item should be placed upon the time line
* @param duration the duration the new item should be placed upon the timeline
* @param src the identity of the object that initiated the change
- */
+ */
MarkerView*
MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
{
@@ -197,7 +197,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type,
{
return(0) ;
}
-
+
MarkerView* mv = new MarkerView(canvas_group,
&_trackview,
ifv,
@@ -207,14 +207,14 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type,
mark_id,
start,
dur) ;
-
+
ifv->add_marker_view_item(mv, src) ;
marker_view_list.push_front(mv) ;
-
+
mv->GoingAway.connect(bind (mem_fun(*this,&MarkerTimeAxisView::remove_marker_view), (void*)this)) ;
-
+
MarkerViewAdded(mv,src) ; /* EMIT_SIGNAL */
-
+
return(mv) ;
}
@@ -228,7 +228,7 @@ MarkerView*
MarkerTimeAxisView::get_named_marker_view(std::string item_id)
{
MarkerView* mv = 0 ;
-
+
for(MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
{
if(((MarkerView*)*i)->get_item_name() == item_id)
@@ -252,14 +252,14 @@ void
MarkerTimeAxisView::remove_selected_marker_view(void* src)
{
std::string removed ;
-
+
if (selected_time_axis_item)
{
MarkerViewList::iterator i ;
if((i = find (marker_view_list.begin(), marker_view_list.end(), selected_time_axis_item)) != marker_view_list.end())
{
marker_view_list.erase(i) ;
-
+
MarkerViewRemoved(selected_time_axis_item->get_item_name(),src) ; /* EMIT_SIGNAL */
delete(selected_time_axis_item) ;
@@ -283,24 +283,24 @@ MarkerView*
MarkerTimeAxisView::remove_named_marker_view(std::string item_id, void* src)
{
MarkerView* mv = 0 ;
-
+
MarkerViewList::iterator i = marker_view_list.begin() ;
-
+
for(MarkerViewList::iterator iter = marker_view_list.begin(); iter != marker_view_list.end(); ++iter)
{
if(((MarkerView*)*i)->get_item_name() == item_id)
{
mv = ((MarkerView*)*i) ;
marker_view_list.erase(i) ;
-
+
MarkerViewRemoved(mv->get_item_name(), src) ; /* EMIT_SIGNAL */
-
+
// break from the for loop
break;
}
i++ ;
}
-
+
return(mv) ;
}
@@ -314,12 +314,12 @@ void
MarkerTimeAxisView::remove_marker_view(MarkerView* mv, void* src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &MarkerTimeAxisView::remove_marker_view), mv, src));
-
+
MarkerViewList::iterator i;
if((i = find (marker_view_list.begin(), marker_view_list.end(), mv)) != marker_view_list.end()) {
marker_view_list.erase(i) ;
-
+
// Assume this remove happened locally, else use remove_named_marker_time_axis
// let listeners know that the named MarkerTimeAxis has been removed
MarkerViewRemoved(mv->get_item_name(), src) ; /* EMIT_SIGNAL */
@@ -365,7 +365,7 @@ MarkerTimeAxisView::clear_selected_time_axis_item()
{
selected_time_axis_item = 0 ;
}
-
+
/**
* Returnsthe currently selected item upon this time axis
*
diff --git a/gtk2_ardour/marker_time_axis_view.h b/gtk2_ardour/marker_time_axis_view.h
index ae7cddfd59..caf022178b 100644
--- a/gtk2_ardour/marker_time_axis_view.h
+++ b/gtk2_ardour/marker_time_axis_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,44 +38,44 @@ class TimeAxisViewItem ;
/**
* A view helper for handling MarkerView objects.
* This object is responsible for the time axis canvas view, and
- * maintains the list of items that have been added to it
+ * maintains the list of items that have been added to it
*/
class MarkerTimeAxisView : public sigc::trackable
{
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Construct a new MarkerTimeAxisView helper time axis helper
*
* @param mta the TimeAxsiView that this objbect is the helper for
*/
MarkerTimeAxisView(MarkerTimeAxis& mta) ;
-
+
/**
* Destructor
* Reposinsibly for destroying all marker items that may have been added to this time axis view
*
*/
~MarkerTimeAxisView () ;
-
+
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
-
+
/**
* Returns the TimeAxisView thatt his object is acting as a helper for
*
* @return the TimeAxisView that this object is acting as a view helper for
*/
MarkerTimeAxis& trackview() { return _trackview; }
-
+
/**
*
*/
ArdourCanvas::Item *canvas_item() { return canvas_group; }
-
-
+
+
//---------------------------------------------------------------------------------------//
// ui methods & data
@@ -85,7 +85,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @param height the new height
*/
int set_height(gdouble height) ;
-
+
/**
* Sets the position of this view helper on the canvas
*
@@ -93,22 +93,22 @@ class MarkerTimeAxisView : public sigc::trackable
* @param y the y position upon the canvas
*/
int set_position(gdouble x, gdouble y) ;
-
+
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
int set_samples_per_unit(gdouble spu) ;
-
+
/**
* Returns the current samples per unit of this time axis view helper
*
* @return the current samples per unit of this time axis view helper
*/
gdouble get_samples_per_unit() { return _samples_per_unit; }
-
+
/**
* Sets the color of the items contained upon this view helper
*
@@ -118,7 +118,7 @@ class MarkerTimeAxisView : public sigc::trackable
//---------------------------------------------------------------------------------------//
// Child MarkerView Accessors/Mutators
-
+
/**
* Adds a marker view to the list of items upon this time axis view helper
* the new MarkerView is returned
@@ -131,7 +131,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src) ;
-
+
/**
* Returns the named MarkerView or 0 if the named marker does not exist
*
@@ -139,7 +139,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @return the named MarkerView, or 0 if it is not held upon this view
*/
MarkerView* get_named_marker_view(std::string item_id) ;
-
+
/**
* Removes the currently selected MarverView
* Note that this method actually destroys the MarkerView too.
@@ -149,7 +149,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @see add_marker_view
*/
void remove_selected_marker_view(void* src) ;
-
+
/**
* Removes and returns the named MarkerView from the list of MarkerView held by this view helper
*
@@ -158,7 +158,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @see add_marker_view
*/
MarkerView* remove_named_marker_view(std::string item_id, void* src) ;
-
+
/**
* Removes mv from the list of MarkerView upon this TimeAxis
*
@@ -166,7 +166,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
void remove_marker_view(MarkerView* item, void* src) ;
-
+
//---------------------------------------------------------------------------------------//
// Selected item methods
@@ -176,21 +176,21 @@ class MarkerTimeAxisView : public sigc::trackable
* @param mv the item to set selected
*/
void set_selected_time_axis_item(MarkerView* mv) ;
-
+
/**
* Clears any selected item upon this time axis
*
*/
void clear_selected_time_axis_item() ;
-
+
/**
* Returnsthe currently selected item upon this time axis
*
* @return the currently selected item pon this time axis
*/
MarkerView* get_selected_time_axis_item() ;
-
-
+
+
/**
* Sets the duration of the selected MarkerView to the specified number of seconds
*
@@ -200,30 +200,30 @@ class MarkerTimeAxisView : public sigc::trackable
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted when a MarkerView is Added */
sigc::signal<void,MarkerView*,void*> MarkerViewAdded ;
-
+
/** Emitted when a MarkerView Item is removed */
sigc::signal<void,std::string,void*> MarkerViewRemoved ;
-
+
private:
/**
* convenience method to re-get the samples per unit and tell items upon this view
*
*/
void reset_samples_per_unit() ;
-
+
/** The list of items held by this time axis view helper */
typedef std::list<MarkerView *> MarkerViewList ;
MarkerViewList marker_view_list;
-
+
/** the currently selected time axis item upon this time axis */
MarkerView* selected_time_axis_item ;
-
+
/* the TimeAxisView that this object is acting as the view helper for */
MarkerTimeAxis& _trackview ;
-
+
ArdourCanvas::Group *canvas_group ;
ArdourCanvas::SimpleRect *canvas_rect ; /* frame around the whole thing */
@@ -233,7 +233,7 @@ class MarkerTimeAxisView : public sigc::trackable
/* XXX why are these different? */
Gdk::Color region_color;
uint32_t stream_base_color;
-
+
}; /* class MarkerTimeAxisView */
#endif /* __ardour_marker_time_axis_view_h__ */
diff --git a/gtk2_ardour/marker_view.cc b/gtk2_ardour/marker_view.cc
index d82554f891..e3875cf2fb 100644
--- a/gtk2_ardour/marker_view.cc
+++ b/gtk2_ardour/marker_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,11 +35,11 @@ sigc::signal<void,MarkerView*> MarkerView::GoingAway;
/**
* Constructs a new MarkerView
- *
+ *
* @param parent the parent canvas item
* @param tv the parent TimeAxisView of this item
* @param tavi the TimeAxisViewItem that this item is to be assciated (marking) with
- * @param spu the current samples per unit
+ * @param spu the current samples per unit
* @param base_color
* @param mark_type the marker type/name text, eg fade out, pan up etc.
* @param mark_id unique name/id of this item
@@ -68,7 +68,7 @@ MarkerView::MarkerView(ArdourCanvas::Group *parent,
frame_handle_start->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_start_handle_event), frame_handle_start, this));
frame_handle_end->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_end_handle_event), frame_handle_end, this));
group->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_item_view_event), group, this));
-
+
set_position(start, this) ;
set_duration(duration, this) ;
}
@@ -86,12 +86,12 @@ MarkerView::~MarkerView()
}
}
-
+
//---------------------------------------------------------------------------------------//
// Marker Type Methods
/**
- * Sets the marker Type text of this this MarkerItem, eg fade_out, pan up etc.
+ * Sets the marker Type text of this this MarkerItem, eg fade_out, pan up etc.
*
* @param type_text the marker type text of this item
*/
@@ -101,9 +101,9 @@ MarkerView::set_mark_type_text(std::string type_text)
mark_type_text = type_text ;
MarkTypeChanged(mark_type_text, this) ; /* EMIT_SIGNAL */
}
-
+
/**
- * Returns the marker Type of this this MarkerItem, eg fade_out, pan up etc.
+ * Returns the marker Type of this this MarkerItem, eg fade_out, pan up etc.
*
* @return the marker type text of this item
*/
@@ -122,7 +122,7 @@ MarkerView::set_marked_item(ImageFrameView* item)
{
ImageFrameView* temp = marked_item ;
marked_item = item ;
-
+
MarkedItemChanged(marked_item, this) ; /* EMIT_SIGNAL */
return(temp) ;
}
diff --git a/gtk2_ardour/marker_view.h b/gtk2_ardour/marker_view.h
index 6c49a4dc0f..80ab8e60a7 100644
--- a/gtk2_ardour/marker_view.h
+++ b/gtk2_ardour/marker_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,21 +36,21 @@ class ImageFrameView ;
* MarkerView defines a marker item that may be placed upon a MarkerTimeAxis.
*
* The aim of the MarkerView is to provide additional timing details for visual based time axis.
- * The MarkerView item is associated with one other TimeAxisViewItem and has a start and a duration.
+ * The MarkerView item is associated with one other TimeAxisViewItem and has a start and a duration.
*/
class MarkerView : public TimeAxisViewItem
{
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Constructs a new MarkerView
- *
+ *
* @param parent the parent canvas item
* @param tv the parent TimeAxisView of this item
* @param marked the Item that this item is to be assciated (marking) with
- * @param spu the current samples per unit
+ * @param spu the current samples per unit
* @param base_color
* @param mark_type the marker type/name text, eg fade out, pan up etc.
* @param mark_id unique name/id of this item
@@ -72,27 +72,27 @@ class MarkerView : public TimeAxisViewItem
* Destroys this Marker Item and removes the association between itself and the item it is marking.
*/
~MarkerView() ;
-
+
static sigc::signal<void,MarkerView*> GoingAway;
-
+
//---------------------------------------------------------------------------------------//
// Marker Type Methods
-
+
/**
- * Sets the marker Type text of this this MarkerItem, eg fade_out, pan up etc.
+ * Sets the marker Type text of this this MarkerItem, eg fade_out, pan up etc.
*
* @param type_text the marker type text of this item
*/
void set_mark_type_text(std::string type_text) ;
-
+
/**
- * Returns the marker Type of this this MarkerItem, eg fade_out, pan up etc.
+ * Returns the marker Type of this this MarkerItem, eg fade_out, pan up etc.
*
* @return the marker type text of this item
*/
std::string get_mark_type_text() const ;
-
+
//---------------------------------------------------------------------------------------//
// Marked Item Methods
@@ -102,7 +102,7 @@ class MarkerView : public TimeAxisViewItem
* @return the time axis item being marked by this item
*/
ImageFrameView* get_marked_item() ;
-
+
/**
* Sets the time axis item being marker by this item
*
@@ -110,17 +110,17 @@ class MarkerView : public TimeAxisViewItem
* @return the previously marked item, or 0 if no previous marked item exists
*/
ImageFrameView* set_marked_item(ImageFrameView* item) ;
-
+
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted when the mark type text is changed */
sigc::signal<void,std::string,void*> MarkTypeChanged ;
-
+
/** Emitted when the Marked Item is changed */
sigc::signal<void,ImageFrameView*,void*> MarkedItemChanged ;
-
+
protected:
private:
@@ -129,7 +129,7 @@ class MarkerView : public TimeAxisViewItem
/* a pointer to the time axis item this marker is assoiated(marking up) with */
ImageFrameView* marked_item ;
-
+
} ; /* class MarkerView */
diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc
index 4119b7ce05..03f0630eb9 100644
--- a/gtk2_ardour/midi_channel_selector.cc
+++ b/gtk2_ardour/midi_channel_selector.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
Author: Hans Baier
This program is free software; you can redistribute it and/or modify
@@ -31,15 +31,15 @@ using namespace ARDOUR;
MidiChannelSelector::MidiChannelSelector(int n_rows, int n_columns, int start_row, int start_column)
: Table(n_rows, n_columns, true)
, _recursion_counter(0)
-{
+{
assert(n_rows >= 4);
assert(n_rows >= start_row + 4);
assert(n_columns >=4);
assert(n_columns >= start_column + 4);
-
+
property_column_spacing() = 0;
property_row_spacing() = 0;
-
+
uint8_t channel_nr = 0;
for (int row = 0; row < 4; ++row) {
for (int column = 0; column < 4; ++column) {
@@ -103,10 +103,10 @@ SingleMidiChannelSelector::SingleMidiChannelSelector(uint8_t active_channel)
void
SingleMidiChannelSelector::button_toggled(ToggleButton* button, uint8_t channel)
-{
+{
++_recursion_counter;
if (_recursion_counter == 1) {
- // if the current button is active it must
+ // if the current button is active it must
// be different from the first one
if (button->get_active()) {
if (_last_active_button) {
@@ -131,15 +131,15 @@ MidiMultipleChannelSelector::MidiMultipleChannelSelector(ChannelMode mode, uint1
_select_all.add(*manage(new Label(_("All"))));
_select_all.signal_clicked().connect(
bind(mem_fun(this, &MidiMultipleChannelSelector::select_all), true));
-
+
_select_none.add(*manage(new Label(_("None"))));
_select_none.signal_clicked().connect(
bind(mem_fun(this, &MidiMultipleChannelSelector::select_all), false));
-
+
_invert_selection.add(*manage(new Label(_("Invert"))));
_invert_selection.signal_clicked().connect(
mem_fun(this, &MidiMultipleChannelSelector::invert_selection));
-
+
_force_channel.add(*manage(new Label(_("Force"))));
_force_channel.signal_toggled().connect(
mem_fun(this, &MidiMultipleChannelSelector::force_channels_button_toggled));
@@ -151,7 +151,7 @@ MidiMultipleChannelSelector::MidiMultipleChannelSelector(ChannelMode mode, uint1
attach(_select_none, 5, 6, 1, 2);
attach(_invert_selection, 5, 6, 2, 3);
attach(_force_channel, 5, 6, 3, 4);
-
+
set_selected_channels(mask);
}
@@ -181,21 +181,21 @@ MidiMultipleChannelSelector::set_channel_mode(ChannelMode mode, uint16_t mask)
}
}
-uint16_t
-MidiMultipleChannelSelector::get_selected_channels() const
-{
+uint16_t
+MidiMultipleChannelSelector::get_selected_channels() const
+{
uint16_t selected_channels = 0;
for (uint16_t i = 0; i < 16; i++) {
const ToggleButton* button = &_buttons[i / 4][i % 4];
if (button->get_active()) {
selected_channels |= (1L << i);
- }
+ }
}
-
- return selected_channels;
+
+ return selected_channels;
}
-void
+void
MidiMultipleChannelSelector::set_selected_channels(uint16_t selected_channels)
{
for (uint16_t i = 0; i < 16; i++) {
@@ -223,7 +223,7 @@ MidiMultipleChannelSelector::button_toggled(ToggleButton */*button*/, uint8_t ch
--_recursion_counter;
}
-void
+void
MidiMultipleChannelSelector::force_channels_button_toggled()
{
if (_force_channel.get_active()) {
@@ -242,13 +242,13 @@ MidiMultipleChannelSelector::force_channels_button_toggled()
found_first_active = true;
active_channel = i;
}
- }
+ }
}
-
+
if (!found_first_active) {
_buttons[0][0].set_active(true);
}
-
+
_select_all.set_sensitive(false);
_select_none.set_sensitive(false);
_invert_selection.set_sensitive(false);
@@ -262,7 +262,7 @@ MidiMultipleChannelSelector::force_channels_button_toggled()
}
}
-void
+void
MidiMultipleChannelSelector::select_all(bool on)
{
if (_channel_mode == ForceChannel)
@@ -277,7 +277,7 @@ MidiMultipleChannelSelector::select_all(bool on)
mode_changed.emit(_channel_mode, get_selected_channels());
}
-void
+void
MidiMultipleChannelSelector::invert_selection(void)
{
if (_channel_mode == ForceChannel)
diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h
index f604d0ccd3..42c3d55045 100644
--- a/gtk2_ardour/midi_channel_selector.h
+++ b/gtk2_ardour/midi_channel_selector.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
Author: Hans Baier
This program is free software; you can redistribute it and/or modify
@@ -35,12 +35,12 @@ 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;
-
+
sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
-
+
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];
@@ -52,11 +52,11 @@ class SingleMidiChannelSelector : public MidiChannelSelector
{
public:
SingleMidiChannelSelector(uint8_t active_channel = 0);
-
+
uint8_t get_active_channel() const { return _active_channel; }
-
+
sigc::signal<void, uint8_t> channel_selected;
-
+
protected:
virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
@@ -69,29 +69,29 @@ class MidiMultipleChannelSelector : public MidiChannelSelector
public:
MidiMultipleChannelSelector(ARDOUR::ChannelMode mode = ARDOUR::FilterChannels,
uint16_t initial_selection = 0xFFFF);
-
+
virtual ~MidiMultipleChannelSelector();
-
+
void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
/**
- * @return each bit in the returned word represents a midi channel, eg.
+ * @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;
-
+
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);
-
+
Gtk::Button _select_all;
Gtk::Button _select_none;
Gtk::Button _invert_selection;
diff --git a/gtk2_ardour/midi_cut_buffer.h b/gtk2_ardour/midi_cut_buffer.h
index 279d34d244..4281b962bc 100644
--- a/gtk2_ardour/midi_cut_buffer.h
+++ b/gtk2_ardour/midi_cut_buffer.h
@@ -25,7 +25,7 @@ namespace ARDOUR {
class Session;
}
-class MidiCutBuffer : public ARDOUR::AutomatableSequence<ARDOUR::MidiModel::TimeType>
+class MidiCutBuffer : public ARDOUR::AutomatableSequence<ARDOUR::MidiModel::TimeType>
{
public:
typedef ARDOUR::MidiModel::TimeType TimeType;
@@ -35,7 +35,7 @@ class MidiCutBuffer : public ARDOUR::AutomatableSequence<ARDOUR::MidiModel::Time
TimeType origin() const { return _origin; }
void set_origin (TimeType);
-
+
void set (const Evoral::Sequence<TimeType>::Notes&);
private:
diff --git a/gtk2_ardour/midi_list_editor.cc b/gtk2_ardour/midi_list_editor.cc
index d4a751192a..44a44dfb11 100644
--- a/gtk2_ardour/midi_list_editor.cc
+++ b/gtk2_ardour/midi_list_editor.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
@@ -55,7 +55,7 @@ MidiListEditor::MidiListEditor (Session& s, boost::shared_ptr<MidiRegion> r)
renderer->property_editable() = true;
renderer->signal_edited().connect (mem_fun (*this, &MidiListEditor::edited));
}
-
+
scroller.add (view);
scroller.set_policy (POLICY_NEVER, POLICY_AUTOMATIC);
@@ -109,7 +109,7 @@ MidiListEditor::redisplay_model ()
BBT_Time bbt;
BBT_Time dur;
stringstream ss;
-
+
session.tempo_map().bbt_time (region->position(), bbt);
dur.bars = 0;
@@ -117,7 +117,7 @@ MidiListEditor::redisplay_model ()
dur.ticks = 0;
session.tempo_map().bbt_duration_at (region->position(), dur, 0);
-
+
ss << bbt;
row[columns.start] = ss.str();
ss << dur;
@@ -125,7 +125,7 @@ MidiListEditor::redisplay_model ()
session.tempo_map().bbt_time (region->position(), bbt);
/* XXX get end point */
-
+
ss << bbt;
row[columns.end] = ss.str();
@@ -133,4 +133,4 @@ MidiListEditor::redisplay_model ()
}
view.set_model (model);
-}
+}
diff --git a/gtk2_ardour/midi_list_editor.h b/gtk2_ardour/midi_list_editor.h
index d52c1d83ac..96a04ada7c 100644
--- a/gtk2_ardour/midi_list_editor.h
+++ b/gtk2_ardour/midi_list_editor.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
@@ -44,7 +44,7 @@ class MidiListEditor : public ArdourDialog
private:
struct MidiListModelColumns : public Gtk::TreeModel::ColumnRecord {
- MidiListModelColumns() {
+ MidiListModelColumns() {
add (channel);
add (note);
add (note_name);
@@ -63,7 +63,7 @@ class MidiListEditor : public ArdourDialog
Gtk::TreeModelColumn<std::string> end;
Gtk::TreeModelColumn<boost::shared_ptr<NoteType> > _note;
};
-
+
ARDOUR::Session& session;
MidiListModelColumns columns;
Glib::RefPtr<Gtk::ListStore> model;
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index 3e2fd5470d..d76c173af1 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -109,7 +109,7 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &
, _pressed_button(0)
, _sort_needed (true)
, _optimization_iterator (_events.end())
-
+
{
_note_group->raise_to_top();
}
@@ -137,7 +137,7 @@ MidiRegionView::MidiRegionView (const MidiRegionView& other)
UINT_TO_RGBA (other.fill_color, &r, &g, &b, &a);
c.set_rgb_p (r/255.0, g/255.0, b/255.0);
-
+
init (c, false);
}
@@ -186,7 +186,7 @@ MidiRegionView::init (Gdk::Color const & basic_color, bool wfd)
region_sync_changed ();
region_resized (BoundsChanged);
region_locked ();
-
+
reset_width_dependent_items (_pixel_width);
set_colors ();
@@ -203,7 +203,7 @@ MidiRegionView::init (Gdk::Color const & basic_color, bool wfd)
midi_view()->signal_channel_mode_changed().connect(
mem_fun(this, &MidiRegionView::midi_channel_mode_changed));
-
+
midi_view()->signal_midi_patch_settings_changed().connect(
mem_fun(this, &MidiRegionView::midi_patch_settings_changed));
}
@@ -232,7 +232,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
switch (ev->type) {
case GDK_SCROLL:
fine = Keyboard::modifier_state_equals (ev->scroll.state, Keyboard::Level4Modifier);
-
+
if (ev->scroll.direction == GDK_SCROLL_UP) {
change_velocities (true, fine, false);
return true;
@@ -265,7 +265,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
bool end = (ev->key.keyval == GDK_period);
bool shorter = Keyboard::modifier_state_contains (ev->key.state, Keyboard::PrimaryModifier);
fine = Keyboard::modifier_state_contains (ev->key.state, Keyboard::SecondaryModifier);
-
+
change_note_lengths (fine, shorter, start, end);
return true;
@@ -297,10 +297,10 @@ MidiRegionView::canvas_event(GdkEvent* ev)
return true;
} else if (ev->key.keyval == GDK_Down) {
-
+
bool allow_smush = Keyboard::modifier_state_contains (ev->key.state, Keyboard::SecondaryModifier);
fine = Keyboard::modifier_state_contains (ev->key.state, Keyboard::TertiaryModifier);
-
+
if (Keyboard::modifier_state_contains (ev->key.state, Keyboard::PrimaryModifier)) {
change_velocities (false, fine, allow_smush);
} else {
@@ -309,7 +309,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
return true;
} else if (ev->key.keyval == GDK_Left) {
-
+
nudge_notes (false);
return true;
@@ -471,7 +471,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
} else if (_pressed_button != 1) {
return false;
}
-
+
switch (_mouse_state) {
case Pressed: // Clicked
switch (editor.current_mouse_mode()) {
@@ -482,7 +482,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
case MouseRange:
create_note_at(event_x, event_y, _default_note_length);
break;
- default:
+ default:
break;
}
_mouse_state = None;
@@ -498,7 +498,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
const double x = drag_rect->property_x1();
const double length = trackview.editor().pixel_to_frame(
drag_rect->property_x2() - drag_rect->property_x1());
-
+
create_note_at(x, drag_rect->property_y1(), frames_to_beats(length));
}
@@ -506,7 +506,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
drag_rect = 0;
default: break;
}
-
+
default: break;
}
@@ -591,8 +591,8 @@ MidiRegionView::display_model(boost::shared_ptr<MidiModel> model)
redisplay_model();
}
}
-
-
+
+
void
MidiRegionView::start_delta_command(string name)
{
@@ -632,7 +632,7 @@ MidiRegionView::delta_remove_note(ArdourCanvas::CanvasNoteEvent* ev)
}
void
-MidiRegionView::diff_add_change (ArdourCanvas::CanvasNoteEvent* ev,
+MidiRegionView::diff_add_change (ArdourCanvas::CanvasNoteEvent* ev,
MidiModel::DiffCommand::Property property,
uint8_t val)
{
@@ -642,7 +642,7 @@ MidiRegionView::diff_add_change (ArdourCanvas::CanvasNoteEvent* ev,
}
void
-MidiRegionView::diff_add_change (ArdourCanvas::CanvasNoteEvent* ev,
+MidiRegionView::diff_add_change (ArdourCanvas::CanvasNoteEvent* ev,
MidiModel::DiffCommand::Property property,
Evoral::MusicalTime val)
{
@@ -650,7 +650,7 @@ MidiRegionView::diff_add_change (ArdourCanvas::CanvasNoteEvent* ev,
_diff_command->change (ev->note(), property, val);
}
}
-
+
void
MidiRegionView::apply_delta()
{
@@ -662,9 +662,9 @@ MidiRegionView::apply_delta()
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
_marked_for_selection.insert((*i)->note());
}
-
+
_model->apply_command(trackview.session(), _delta_command);
- _delta_command = 0;
+ _delta_command = 0;
midi_view()->midi_track()->diskstream()->playlist_modified();
_marked_for_selection.clear();
@@ -679,7 +679,7 @@ MidiRegionView::apply_diff ()
}
_model->apply_command(trackview.session(), _diff_command);
- _diff_command = 0;
+ _diff_command = 0;
midi_view()->midi_track()->diskstream()->playlist_modified();
_marked_for_velocity.clear();
@@ -696,9 +696,9 @@ MidiRegionView::apply_delta_as_subcommand()
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
_marked_for_selection.insert((*i)->note());
}
-
+
_model->apply_command_as_subcommand(trackview.session(), _delta_command);
- _delta_command = 0;
+ _delta_command = 0;
midi_view()->midi_track()->diskstream()->playlist_modified();
_marked_for_selection.clear();
@@ -716,9 +716,9 @@ MidiRegionView::apply_diff_as_subcommand()
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
_marked_for_selection.insert((*i)->note());
}
-
+
_model->apply_command_as_subcommand(trackview.session(), _diff_command);
- _diff_command = 0;
+ _diff_command = 0;
midi_view()->midi_track()->diskstream()->playlist_modified();
_marked_for_selection.clear();
@@ -741,10 +741,10 @@ MidiRegionView::find_canvas_note (boost::shared_ptr<NoteType> note)
if (_optimization_iterator != _events.end()) {
++_optimization_iterator;
}
-
+
if (_optimization_iterator != _events.end() && (*_optimization_iterator)->note() == note) {
return *_optimization_iterator;
- }
+ }
for (_optimization_iterator = _events.begin(); _optimization_iterator != _events.end(); ++_optimization_iterator) {
if ((*_optimization_iterator)->note() == note) {
@@ -771,12 +771,12 @@ MidiRegionView::redisplay_model()
for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
(*i)->invalidate ();
}
-
+
_model->read_lock();
-
+
MidiModel::Notes& notes (_model->notes());
_optimization_iterator = _events.begin();
-
+
for (MidiModel::Notes::iterator n = notes.begin(); n != notes.end(); ++n) {
boost::shared_ptr<NoteType> note (*n);
@@ -784,14 +784,14 @@ MidiRegionView::redisplay_model()
bool visible;
if (note_in_region_range (note, visible)) {
-
+
if ((cne = find_canvas_note (note)) != 0) {
-
+
cne->validate ();
-
+
CanvasNote* cn;
CanvasHit* ch;
-
+
if ((cn = dynamic_cast<CanvasNote*>(cne)) != 0) {
update_note (cn);
} else if ((ch = dynamic_cast<CanvasHit*>(cne)) != 0) {
@@ -803,23 +803,23 @@ MidiRegionView::redisplay_model()
} else {
cne->hide ();
}
-
+
} else {
-
+
add_note (note, visible);
}
-
+
} else {
-
+
if ((cne = find_canvas_note (note)) != 0) {
cne->validate ();
cne->hide ();
}
}
}
-
+
/* remove note items that are no longer valid */
-
+
for (Events::iterator i = _events.begin(); i != _events.end(); ) {
if (!(*i)->valid ()) {
delete *i;
@@ -828,12 +828,12 @@ MidiRegionView::redisplay_model()
++i;
}
}
-
+
display_sysexes();
display_program_changes();
-
+
_model->read_unlock();
-
+
_marked_for_selection.clear ();
_marked_for_velocity.clear ();
@@ -880,7 +880,7 @@ MidiRegionView::display_program_changes()
MIDI::Name::PatchPrimaryKey patch_key(msb, lsb, program_number);
- boost::shared_ptr<MIDI::Name::Patch> patch =
+ boost::shared_ptr<MIDI::Name::Patch> patch =
MIDI::Name::MidiPatchManager::instance().find_patch(
_model_name, _custom_device_mode, channel, patch_key);
@@ -896,13 +896,13 @@ MidiRegionView::display_program_changes()
}
}
-void
+void
MidiRegionView::display_sysexes()
{
for (MidiModel::SysExes::const_iterator i = _model->sysexes().begin(); i != _model->sysexes().end(); ++i) {
Evoral::MusicalTime time = (*i)->time();
assert(time >= 0);
-
+
ostringstream str;
str << hex;
for (uint32_t b = 0; b < (*i)->size(); ++b) {
@@ -912,23 +912,23 @@ MidiRegionView::display_sysexes()
}
}
string text = str.str();
-
+
ArdourCanvas::Group* const group = (ArdourCanvas::Group*)get_canvas_group();
const double x = trackview.editor().frame_to_pixel(beats_to_frames(time));
-
+
double height = midi_stream_view()->contents_height();
-
+
boost::shared_ptr<CanvasSysEx> sysex = boost::shared_ptr<CanvasSysEx>(
new CanvasSysEx(*this, *group, text, height, x, 1.0));
-
+
// Show unless program change is beyond the region bounds
if (time - _region->start() >= _region->length() || time < _region->start()) {
sysex->hide();
} else {
sysex->show();
}
-
+
_sys_exes.push_back(sysex);
}
}
@@ -954,13 +954,13 @@ void
MidiRegionView::region_resized (Change what_changed)
{
RegionView::region_resized(what_changed);
-
+
if (what_changed & ARDOUR::PositionChanged) {
set_duration(_region->length(), 0);
if (_enable_display) {
redisplay_model();
}
- }
+ }
}
void
@@ -981,11 +981,11 @@ MidiRegionView::set_height (double height)
const double old_height = _height;
RegionView::set_height(height);
_height = height - FUDGE;
-
+
apply_note_range(midi_stream_view()->lowest_note(),
midi_stream_view()->highest_note(),
height != old_height + FUDGE);
-
+
if (name_pixbuf) {
name_pixbuf->raise_to_top();
}
@@ -1013,18 +1013,18 @@ MidiRegionView::apply_note_range (uint8_t min, uint8_t max, bool force)
CanvasNoteEvent* event = *i;
boost::shared_ptr<NoteType> note (event->note());
- if (note->note() < _current_range_min ||
+ if (note->note() < _current_range_min ||
note->note() > _current_range_max) {
event->hide();
} else {
event->show();
}
-
+
if (CanvasNote* cnote = dynamic_cast<CanvasNote*>(event)) {
const double y1 = midi_stream_view()->note_to_y(note->note());
const double y2 = y1 + floor(midi_stream_view()->note_height());
-
+
cnote->property_y1() = y1;
cnote->property_y2() = y2;
@@ -1033,9 +1033,9 @@ MidiRegionView::apply_note_range (uint8_t min, uint8_t max, bool force)
double x = trackview.editor().frame_to_pixel(
beats_to_frames(note->time()) - _region->start());
const double diamond_size = midi_stream_view()->note_height() / 2.0;
- double y = midi_stream_view()->note_to_y(event->note()->note())
+ double y = midi_stream_view()->note_to_y(event->note()->note())
+ ((diamond_size-2.0) / 4.0);
-
+
chit->set_height (diamond_size);
chit->move (x - chit->x1(), y - chit->y1());
chit->show ();
@@ -1136,7 +1136,7 @@ MidiRegionView::extend_active_notes()
}
}
-void
+void
MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note)
{
if (!trackview.editor().sound_notes()) {
@@ -1145,10 +1145,10 @@ MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note)
RouteUI* route_ui = dynamic_cast<RouteUI*> (&trackview);
assert(route_ui);
-
+
route_ui->midi_track()->write_immediate_event(
note->on_event().size(), note->on_event().buffer());
-
+
const double note_length_beats = (note->off_event().time() - note->on_event().time());
nframes_t note_length_ms = beats_to_frames(note_length_beats)
* (1000 / (double)route_ui->session().nominal_frame_rate());
@@ -1161,7 +1161,7 @@ MidiRegionView::play_midi_note_off(boost::shared_ptr<NoteType> note)
{
RouteUI* route_ui = dynamic_cast<RouteUI*> (&trackview);
assert(route_ui);
-
+
route_ui->midi_track()->write_immediate_event(
note->off_event().size(), note->off_event().buffer());
@@ -1173,7 +1173,7 @@ MidiRegionView::note_in_region_range(const boost::shared_ptr<NoteType> note, boo
{
const nframes64_t note_start_frames = beats_to_frames(note->time());
- bool outside = (note_start_frames - _region->start() >= _region->length()) ||
+ bool outside = (note_start_frames - _region->start() >= _region->length()) ||
(note_start_frames < _region->start());
visible = (note->note() >= midi_stream_view()->lowest_note()) &&
@@ -1192,7 +1192,7 @@ MidiRegionView::update_note (CanvasNote* ev)
const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start());
const double y1 = midi_stream_view()->note_to_y(note->note());
- const double note_endpixel =
+ const double note_endpixel =
trackview.editor().frame_to_pixel(note_end_frames - _region->start());
ev->property_x1() = x;
@@ -1203,7 +1203,7 @@ MidiRegionView::update_note (CanvasNote* ev)
ev->property_x2() = trackview.editor().frame_to_pixel(_region->length());
}
ev->property_y2() = y1 + floor(midi_stream_view()->note_height());
-
+
if (note->length() == 0) {
if (_active_notes) {
assert(note->note() < 128);
@@ -1248,14 +1248,14 @@ void
MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
{
CanvasNoteEvent* event = 0;
-
+
assert(note->time() >= 0);
assert(midi_view()->note_mode() == Sustained || midi_view()->note_mode() == Percussive);
ArdourCanvas::Group* const group = (ArdourCanvas::Group*)get_canvas_group();
if (midi_view()->note_mode() == Sustained) {
-
+
CanvasNote* ev_rect = new CanvasNote(*this, *group, note);
update_note (ev_rect);
@@ -1287,7 +1287,7 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
if (event) {
if (_marked_for_selection.find(note) != _marked_for_selection.end()) {
note_selected(event, true);
- }
+ }
if (_marked_for_velocity.find(note) != _marked_for_velocity.end()) {
event->show_velocity();
@@ -1304,11 +1304,11 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
}
void
-MidiRegionView::add_note (uint8_t channel, uint8_t number, uint8_t velocity,
+MidiRegionView::add_note (uint8_t channel, uint8_t number, uint8_t velocity,
Evoral::MusicalTime pos, Evoral::MusicalTime len)
{
boost::shared_ptr<NoteType> new_note (new NoteType (channel, pos, len, number, velocity));
-
+
start_delta_command (_("step add"));
delta_add_note (new_note, true, false);
apply_delta();
@@ -1329,28 +1329,28 @@ void
MidiRegionView::add_pgm_change(PCEvent& program, const string& displaytext)
{
assert(program.time >= 0);
-
+
ArdourCanvas::Group* const group = (ArdourCanvas::Group*)get_canvas_group();
const double x = trackview.editor().frame_to_pixel(beats_to_frames(program.time));
-
+
double height = midi_stream_view()->contents_height();
-
+
boost::shared_ptr<CanvasProgramChange> pgm_change = boost::shared_ptr<CanvasProgramChange>(
new CanvasProgramChange(*this, *group,
- displaytext,
- height,
- x, 1.0,
- _model_name,
- _custom_device_mode,
+ displaytext,
+ height,
+ x, 1.0,
+ _model_name,
+ _custom_device_mode,
program.time, program.channel, program.value));
-
+
// Show unless program change is beyond the region bounds
if (program.time - _region->start() >= _region->length() || program.time < _region->start()) {
pgm_change->hide();
} else {
pgm_change->show();
}
-
+
_pgm_changes.push_back(pgm_change);
}
@@ -1373,7 +1373,7 @@ MidiRegionView::get_patch_key_at(double time, uint8_t channel, MIDI::Name::Patch
lsb = lsb_control->get_float(true, time);
cerr << " got lsb " << lsb;
}
-
+
Evoral::Parameter program_change(MidiPgmChangeAutomation, channel, 0);
boost::shared_ptr<Evoral::Control> program_control = _model->control(program_change);
float program_number = -1.0;
@@ -1381,7 +1381,7 @@ MidiRegionView::get_patch_key_at(double time, uint8_t channel, MIDI::Name::Patch
program_number = program_control->get_float(true, time);
cerr << " got program " << program_number << endl;
}
-
+
key.msb = (int) floor(msb + 0.5);
key.lsb = (int) floor(lsb + 0.5);
key.program_number = (int) floor(program_number + 0.5);
@@ -1389,7 +1389,7 @@ MidiRegionView::get_patch_key_at(double time, uint8_t channel, MIDI::Name::Patch
}
-void
+void
MidiRegionView::alter_program_change(PCEvent& old_program, const MIDI::Name::PatchPrimaryKey& new_patch)
{
// TODO: Get the real event here and alter them at the original times
@@ -1405,13 +1405,13 @@ MidiRegionView::alter_program_change(PCEvent& old_program, const MIDI::Name::Pat
if (lsb_control != 0) {
lsb_control->set_float(float(new_patch.lsb), true, old_program.time);
}
-
+
Evoral::Parameter program_change(MidiPgmChangeAutomation, old_program.channel, 0);
boost::shared_ptr<Evoral::Control> program_control = _model->control(program_change);
-
+
assert(program_control != 0);
program_control->set_float(float(new_patch.program_number), true, old_program.time);
-
+
redisplay_model();
}
@@ -1422,37 +1422,37 @@ MidiRegionView::program_selected(CanvasProgramChange& program, const MIDI::Name:
alter_program_change(program_change_event, new_patch);
}
-void
+void
MidiRegionView::previous_program(CanvasProgramChange& program)
{
MIDI::Name::PatchPrimaryKey key;
get_patch_key_at(program.event_time(), program.channel(), key);
-
- boost::shared_ptr<MIDI::Name::Patch> patch =
+
+ boost::shared_ptr<MIDI::Name::Patch> patch =
MIDI::Name::MidiPatchManager::instance().previous_patch(
_model_name,
- _custom_device_mode,
- program.channel(),
+ _custom_device_mode,
+ program.channel(),
key);
-
+
PCEvent program_change_event(program.event_time(), program.program(), program.channel());
if (patch) {
alter_program_change(program_change_event, patch->patch_primary_key());
}
}
-void
+void
MidiRegionView::next_program(CanvasProgramChange& program)
{
MIDI::Name::PatchPrimaryKey key;
get_patch_key_at(program.event_time(), program.channel(), key);
-
- boost::shared_ptr<MIDI::Name::Patch> patch =
+
+ boost::shared_ptr<MIDI::Name::Patch> patch =
MIDI::Name::MidiPatchManager::instance().next_patch(
_model_name,
- _custom_device_mode,
- program.channel(),
- key);
+ _custom_device_mode,
+ program.channel(),
+ key);
PCEvent program_change_event(program.event_time(), program.program(), program.channel());
if (patch) {
@@ -1544,7 +1544,7 @@ MidiRegionView::note_selected(ArdourCanvas::CanvasNoteEvent* ev, bool add, bool
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
if ((*i)->note()->end_time() > latest) {
latest = (*i)->note()->end_time();
- }
+ }
if ((*i)->note()->time() < earliest) {
earliest = (*i)->note()->time();
}
@@ -1557,21 +1557,21 @@ MidiRegionView::note_selected(ArdourCanvas::CanvasNoteEvent* ev, bool add, bool
if (ev->note()->time() < earliest) {
earliest = ev->note()->time();
}
-
- for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
-
+
+ for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
+
/* find notes entirely within OR spanning the earliest..latest range */
-
+
if (((*i)->note()->time() >= earliest && (*i)->note()->end_time() <= latest) ||
((*i)->note()->time() <= earliest && (*i)->note()->end_time() >= latest)) {
add_to_selection (*i);
- }
+ }
#if 0
/* if events were guaranteed to be time sorted, we could do this.
but as of sept 10th 2009, they no longer are.
*/
-
+
if ((*i)->note()->time() > latest) {
break;
}
@@ -1604,7 +1604,7 @@ MidiRegionView::update_drag_selection(double x1, double x2, double y1, double y2
for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
/* check if any corner of the note is inside the rect
-
+
Notes:
1) this is computing "touched by", not "contained by" the rect.
2) this does not require that events be sorted in time.
@@ -1642,7 +1642,7 @@ MidiRegionView::remove_from_selection (CanvasNoteEvent* ev)
ev->selected (false);
ev->hide_velocity ();
-
+
if (_selection.empty()) {
PublicEditor& editor (trackview.editor());
editor.get_selection().remove (this);
@@ -1696,9 +1696,9 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, double dt, int8_t dnote)
/*
cerr << "dnote: " << (int) dnote << endl;
- cerr << "lowest note (streamview): " << int(midi_stream_view()->lowest_note())
+ cerr << "lowest note (streamview): " << int(midi_stream_view()->lowest_note())
<< " highest note (streamview): " << int(midi_stream_view()->highest_note()) << endl;
- cerr << "lowest note (selection): " << int(lowest_note_in_selection) << " highest note(selection): "
+ cerr << "lowest note (selection): " << int(lowest_note_in_selection) << " highest note(selection): "
<< int(highest_note_in_selection) << endl;
cerr << "selection size: " << _selection.size() << endl;
cerr << "Highest note in selection: " << (int) highest_note_in_selection << endl;
@@ -1708,7 +1708,7 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, double dt, int8_t dnote)
if (highest_note_in_selection + dnote > 127) {
highest_note_difference = highest_note_in_selection - 127;
}
-
+
start_diff_command(_("move notes"));
for (Selection::iterator i = _selection.begin(); i != _selection.end() ; ++i) {
@@ -1734,7 +1734,7 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, double dt, int8_t dnote)
// keep notes in standard midi range
clamp_to_0_127(new_pitch);
-
+
// keep original pitch if note is dragged outside valid midi range
if ((original_pitch != 0 && new_pitch == 0)
|| (original_pitch != 127 && new_pitch == 127)) {
@@ -1748,7 +1748,7 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, double dt, int8_t dnote)
}
apply_diff();
-
+
// care about notes being moved beyond the upper/lower bounds on the canvas
if (lowest_note_in_selection < midi_stream_view()->lowest_note() ||
highest_note_in_selection > midi_stream_view()->highest_note()) {
@@ -1871,7 +1871,7 @@ MidiRegionView::update_resizing (bool at_front, double delta_x, bool relative)
current_x = delta_x - get_end_position_pixels ();
}
}
-
+
if (at_front) {
resize_rect->property_x1() = snap_to_pixel(current_x);
resize_rect->property_x2() = canvas_note->x2();
@@ -1908,7 +1908,7 @@ MidiRegionView::commit_resizing (bool at_front, double delta_x, bool relative)
current_x = region_start + delta_x;
}
}
-
+
current_x = snap_pixel_to_frame (current_x);
current_x = frames_to_beats (current_x);
@@ -2008,11 +2008,11 @@ MidiRegionView::trim_note (CanvasNoteEvent* event, Evoral::MusicalTime front_del
} else {
Evoral::MusicalTime new_pos = event->note()->time() + front_delta;
-
+
if (new_pos < event->note()->end_time()) {
new_start = event->note()->time() + front_delta;
/* start moved toward the end, so move the end point back to where it used to be */
- new_length = event->note()->length() - front_delta;
+ new_length = event->note()->length() - front_delta;
change_start = true;
change_length = true;
}
@@ -2026,7 +2026,7 @@ MidiRegionView::trim_note (CanvasNoteEvent* event, Evoral::MusicalTime front_del
if (event->note()->length() < -end_delta) {
can_change = false;
}
- }
+ }
if (can_change) {
new_length = event->note()->length() + end_delta;
@@ -2054,7 +2054,7 @@ MidiRegionView::change_note_time (CanvasNoteEvent* event, Evoral::MusicalTime de
new_time = 0;
} else {
new_time = event->note()->time() + delta;
- }
+ }
} else {
new_time = event->note()->time() + delta;
}
@@ -2093,14 +2093,14 @@ MidiRegionView::change_velocities (bool up, bool fine, bool allow_smush)
}
start_diff_command(_("change velocities"));
-
+
for (Selection::iterator i = _selection.begin(); i != _selection.end();) {
Selection::iterator next = i;
++next;
change_note_velocity (*i, delta, true);
i = next;
}
-
+
apply_diff();
}
@@ -2113,7 +2113,7 @@ MidiRegionView::transpose (bool up, bool fine, bool allow_smush)
}
int8_t delta;
-
+
if (fine) {
delta = 1;
} else {
@@ -2171,13 +2171,13 @@ MidiRegionView::change_note_lengths (bool fine, bool shorter, bool start, bool e
if (shorter) {
delta = -delta;
}
-
+
start_diff_command (_("change note lengths"));
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ) {
Selection::iterator next = i;
++next;
-
+
/* note the negation of the delta for start */
trim_note (*i, (start ? -delta : 0), (end ? delta : 0));
@@ -2195,8 +2195,8 @@ MidiRegionView::nudge_notes (bool forward)
return;
}
- /* pick a note as the point along the timeline to get the nudge distance.
- its not necessarily the earliest note, so we may want to pull the notes out
+ /* pick a note as the point along the timeline to get the nudge distance.
+ its not necessarily the earliest note, so we may want to pull the notes out
into a vector and sort before using the first one.
*/
@@ -2209,23 +2209,23 @@ MidiRegionView::nudge_notes (bool forward)
/* no nudge distance set - use grid */
nframes64_t next_pos = ref_point;
-
+
if (forward) {
/* XXX need check on max_frames, but that needs max_frames64 or something */
next_pos += 1;
- } else {
+ } else {
if (next_pos == 0) {
return;
}
next_pos -= 1;
}
-
+
cerr << "ref point was " << ref_point << " next was " << next_pos;
trackview.editor().snap_to (next_pos, (forward ? 1 : -1), false);
distance = ref_point - next_pos;
cerr << " final is " << next_pos << " distance = " << distance << endl;
- }
-
+ }
+
if (distance == 0) {
return;
}
@@ -2279,7 +2279,7 @@ MidiRegionView::note_left (ArdourCanvas::CanvasNoteEvent*)
PublicEditor& editor (trackview.editor());
editor.hide_verbose_canvas_cursor ();
}
-
+
void
MidiRegionView::switch_source(boost::shared_ptr<Source> src)
@@ -2301,7 +2301,7 @@ MidiRegionView::set_frame_color()
}
}
-void
+void
MidiRegionView::midi_channel_mode_changed(ChannelMode mode, uint16_t mask)
{
switch (mode) {
@@ -2322,7 +2322,7 @@ MidiRegionView::midi_channel_mode_changed(ChannelMode mode, uint16_t mask)
_last_channel_selection = mask;
}
-void
+void
MidiRegionView::midi_patch_settings_changed(std::string model, std::string custom_device_mode)
{
_model_name = model;
@@ -2347,7 +2347,7 @@ MidiRegionView::cut_copy_clear (Editing::CutCopyOp op)
default:
break;
}
-
+
start_delta_command();
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
@@ -2381,7 +2381,7 @@ MidiRegionView::selection_as_cut_buffer () const
MidiCutBuffer* cb = new MidiCutBuffer (trackview.session());
cb->set (notes);
-
+
return cb;
}
@@ -2409,7 +2409,7 @@ MidiRegionView::paste (nframes64_t pos, float times, const MidiCutBuffer& mcb)
for (int n = 0; n < (int) times; ++n) {
for (NoteList::const_iterator i = mcb.notes().begin(); i != mcb.notes().end(); ++i) {
-
+
boost::shared_ptr<NoteType> copied_note (new NoteType (*((*i).get())));
copied_note->set_time (paste_pos_beats + copied_note->time() - beat_delta);
@@ -2435,7 +2435,7 @@ MidiRegionView::paste (nframes64_t pos, float times, const MidiCutBuffer& mcb)
_region->set_length (end_frame, this);
trackview.session().add_command (new MementoCommand<Region>(*_region, &before, &_region->get_state()));
}
-
+
apply_delta ();
}
@@ -2484,7 +2484,7 @@ MidiRegionView::goto_next_note ()
/* use the first one */
unique_select (_events.front());
-
+
}
void
@@ -2516,7 +2516,7 @@ MidiRegionView::goto_previous_note ()
}
void
-MidiRegionView::selection_as_notelist (NoteList& selected)
+MidiRegionView::selection_as_notelist (NoteList& selected)
{
time_sort_events ();
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index a2c56a2473..36b7c99f54 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -72,7 +72,7 @@ class MidiRegionView : public RegionView
boost::shared_ptr<ARDOUR::MidiRegion>,
double initial_samples_per_unit,
Gdk::Color const & basic_color);
-
+
MidiRegionView (const MidiRegionView& other);
MidiRegionView (const MidiRegionView& other, boost::shared_ptr<ARDOUR::MidiRegion>);
@@ -89,14 +89,14 @@ class MidiRegionView : public RegionView
inline MidiStreamView* midi_stream_view() const
{ return midi_view()->midi_view(); }
- void add_note (uint8_t channel, uint8_t number, uint8_t velocity,
+ void add_note (uint8_t channel, uint8_t number, uint8_t velocity,
Evoral::MusicalTime pos, Evoral::MusicalTime len);
void set_height (double);
void apply_note_range(uint8_t lowest, uint8_t highest, bool force=false);
inline ARDOUR::ColorMode color_mode() const { return midi_view()->color_mode(); }
-
+
void set_frame_color();
void redisplay_model();
@@ -110,41 +110,41 @@ class MidiRegionView : public RegionView
void paste (nframes64_t pos, float times, const MidiCutBuffer&);
struct PCEvent {
- PCEvent(double a_time, uint8_t a_value, uint8_t a_channel)
+ PCEvent(double a_time, uint8_t a_value, uint8_t a_channel)
: time(a_time), value(a_value), channel(a_channel) {}
double time;
uint8_t value;
uint8_t channel;
};
-
+
/** Add a new program change flag to the canvas.
* @param program the MidiRegionView::PCEvent to add
* @param the text to display in the flag
*/
void add_pgm_change(PCEvent& program, const std::string& displaytext);
-
+
/** Look up the given time and channel in the 'automation' and set keys accordingly.
* @param time the time of the program change event
* @param channel the MIDI channel of the event
- * @key a reference to an instance of MIDI::Name::PatchPrimaryKey whose fields will
+ * @key a reference to an instance of MIDI::Name::PatchPrimaryKey whose fields will
* will be set according to the result of the lookup
*/
void get_patch_key_at(double time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key);
-
+
/** Change the 'automation' data of old_program to new values which correspond to new_patch.
* @param old_program the program change event which is to be altered
* @param new_patch the new lsb, msb and program number which are to be set
*/
void alter_program_change(PCEvent& old_program, const MIDI::Name::PatchPrimaryKey& new_patch);
-
+
/** Alter a given program to the new given one.
* (Called on context menu select on CanvasProgramChange)
*/
void program_selected(
- ArdourCanvas::CanvasProgramChange& program,
+ ArdourCanvas::CanvasProgramChange& program,
const MIDI::Name::PatchPrimaryKey& new_patch);
-
+
/** Alter a given program to be its predecessor in the MIDNAM file.
*/
void previous_program(ArdourCanvas::CanvasProgramChange& program);
@@ -152,11 +152,11 @@ class MidiRegionView : public RegionView
/** Alters a given program to be its successor in the MIDNAM file.
*/
void next_program(ArdourCanvas::CanvasProgramChange& program);
-
+
/** Displays all program change events in the region as flags on the canvas.
*/
void display_program_changes();
-
+
/** Displays all system exclusive events in the region as flags on the canvas.
*/
void display_sysexes();
@@ -190,7 +190,7 @@ class MidiRegionView : public RegionView
void note_deselected(ArdourCanvas::CanvasNoteEvent* ev);
void delete_selection();
size_t selection_size() { return _selection.size(); }
-
+
void move_selection(double dx, double dy);
void note_dropped(ArdourCanvas::CanvasNoteEvent* ev, double d_pixels, int8_t d_note);
@@ -231,7 +231,7 @@ class MidiRegionView : public RegionView
* @param relative whether velocity is relative or absolute
*/
void change_velocity(ArdourCanvas::CanvasNoteEvent* ev, int8_t velocity, bool relative=false);
-
+
/** Change the channel of the selection.
* @param channel - the channel number of the new channel, zero-based
*/
@@ -251,7 +251,7 @@ class MidiRegionView : public RegionView
ArdourCanvas::CanvasNote *canvas_note;
ArdourCanvas::SimpleRect *resize_rect;
};
-
+
/** Snap a region relative pixel coordinate to pixel units.
* @param x a pixel coordinate relative to region start
* @return the snapped pixel coordinate relative to region start
@@ -269,10 +269,10 @@ class MidiRegionView : public RegionView
* @return the snapped nframes64_t coordinate relative to region start
*/
nframes64_t snap_frame_to_frame(nframes64_t x);
-
+
/** Convert a timestamp in beats to frames (both relative to region start) */
nframes64_t beats_to_frames(double beats) const;
-
+
/** Convert a timestamp in frames to beats (both relative to region start) */
double frames_to_beats(nframes64_t beats) const;
@@ -297,12 +297,12 @@ class MidiRegionView : public RegionView
double samples_per_unit,
Gdk::Color& basic_color,
TimeAxisViewItem::Visibility);
-
+
void region_resized (ARDOUR::Change);
-
+
void set_flags (XMLNode *);
void store_flags ();
-
+
void reset_width_dependent_items (double pixel_width);
private:
@@ -310,7 +310,7 @@ class MidiRegionView : public RegionView
* and schedule the playback of the corresponding NoteOff event.
*/
void play_midi_note(boost::shared_ptr<NoteType> note);
-
+
/** Play the NoteOff-Event of the given note immediately
* (scheduled by @ref play_midi_note()).
*/
@@ -321,10 +321,10 @@ class MidiRegionView : public RegionView
bool canvas_event(GdkEvent* ev);
bool note_canvas_event(GdkEvent* ev);
-
+
void midi_channel_mode_changed(ARDOUR::ChannelMode mode, uint16_t mask);
void midi_patch_settings_changed(std::string model, std::string custom_device_mode);
-
+
void change_note_velocity(ArdourCanvas::CanvasNoteEvent* ev, int8_t vel, bool relative=false);
void change_note_note(ArdourCanvas::CanvasNoteEvent* ev, int8_t note, bool relative=false);
void change_note_time(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::TimeType, bool relative=false);
@@ -343,17 +343,17 @@ class MidiRegionView : public RegionView
double _default_note_length;
uint8_t _current_range_min;
uint8_t _current_range_max;
-
+
/// MIDNAM information of the current track: Model name of MIDNAM file
std::string _model_name;
-
+
/// MIDNAM information of the current track: CustomDeviceMode
- std::string _custom_device_mode;
+ std::string _custom_device_mode;
typedef std::list<ArdourCanvas::CanvasNoteEvent*> Events;
typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasProgramChange> > PgmChanges;
typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasSysEx> > SysExes;
-
+
boost::shared_ptr<ARDOUR::MidiModel> _model;
Events _events;
PgmChanges _pgm_changes;
@@ -378,7 +378,7 @@ class MidiRegionView : public RegionView
/** New notes (created in the current command) which should be selected
* when they appear after the command is applied. */
std::set< boost::shared_ptr<NoteType> > _marked_for_selection;
-
+
/** New notes (created in the current command) which should have visible velocity
* when they appear after the command is applied. */
std::set< boost::shared_ptr<NoteType> > _marked_for_velocity;
@@ -393,8 +393,8 @@ class MidiRegionView : public RegionView
void update_note (ArdourCanvas::CanvasNote*);
void update_hit (ArdourCanvas::CanvasHit*);
-
-};
+
+};
#endif /* __gtk_ardour_midi_region_view_h__ */
diff --git a/gtk2_ardour/midi_scroomer.cc b/gtk2_ardour/midi_scroomer.cc
index 0299e8d2d5..cccc03c507 100644
--- a/gtk2_ardour/midi_scroomer.cc
+++ b/gtk2_ardour/midi_scroomer.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -85,7 +85,7 @@ MidiScroomer::on_expose_event(GdkEventExpose* ev)
for (int note = lnote; note < hnote + 1; ++note) {
double y = height - note * note2y;
bool draw = false;
-
+
switch (note % 12) {
case 1:
case 6:
@@ -103,7 +103,7 @@ MidiScroomer::on_expose_event(GdkEventExpose* ev)
default:
break;
}
-
+
if(draw) {
cc->set_line_width(1.4 * note2y);
cc->move_to(0, y);
diff --git a/gtk2_ardour/midi_scroomer.h b/gtk2_ardour/midi_scroomer.h
index a0021de926..30f77b79e1 100644
--- a/gtk2_ardour/midi_scroomer.h
+++ b/gtk2_ardour/midi_scroomer.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/midi_selection.h b/gtk2_ardour/midi_selection.h
index bd6851870e..de99392127 100644
--- a/gtk2_ardour/midi_selection.h
+++ b/gtk2_ardour/midi_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc
index 09abaeb749..01297abf89 100644
--- a/gtk2_ardour/midi_streamview.cc
+++ b/gtk2_ardour/midi_streamview.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2007 Paul Davis
+ Copyright (C) 2001-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -75,7 +75,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
midi_underlay_group = new ArdourCanvas::Group (*canvas_group);
midi_underlay_group->lower_to_bottom();
- /* put the note lines in the timeaxisview's group, so it
+ /* put the note lines in the timeaxisview's group, so it
can be put below ghost regions from MIDI underlays*/
_note_lines = new ArdourCanvas::LineSet(*canvas_group, ArdourCanvas::LineSet::Horizontal);
@@ -91,10 +91,10 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
_note_lines->lower_to_bottom();
ColorsChanged.connect(mem_fun(*this, &MidiStreamView::draw_note_lines));
-
+
note_range_adjustment.set_page_size(_highest_note - _lowest_note);
note_range_adjustment.set_value(_lowest_note);
-
+
note_range_adjustment.signal_value_changed().connect(
mem_fun(*this, &MidiStreamView::note_range_adjustment_changed));
}
@@ -109,7 +109,7 @@ veto_note_range(uint8_t& min, uint8_t& max)
/* Legal notes, thanks */
clamp_to_0_127(min);
clamp_to_0_127(max);
-
+
/* Always display at least one octave in [0, 127] */
if (max == 127) {
if (min > (127 - 11)) {
@@ -138,11 +138,11 @@ MidiStreamView::create_region_view (boost::shared_ptr<Region> r, bool /*wfd*/, b
return 0;
}
- RegionView* region_view = new MidiRegionView (canvas_group, _trackview, region,
+ RegionView* region_view = new MidiRegionView (canvas_group, _trackview, region,
_samples_per_unit, region_color);
-
+
region_view->init (region_color, false);
-
+
return region_view;
}
@@ -157,11 +157,11 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wfd,
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if ((*i)->region() == r) {
-
+
/* great. we already have a MidiRegionView for this Region. use it again. */
(*i)->set_valid (true);
-
+
display_region(dynamic_cast<MidiRegionView*>(*i), wfd);
return 0;
@@ -172,15 +172,15 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wfd,
if (region_view == 0) {
return 0;
}
-
+
region_views.push_front (region_view);
-
+
/* display events and find note range */
display_region (region_view, wfd);
/* catch regionview going away */
region->GoingAway.connect (bind (mem_fun (*this, &MidiStreamView::remove_region_view), region));
-
+
RegionViewAdded (region_view);
return region_view;
@@ -216,7 +216,7 @@ MidiStreamView::display_diskstream (boost::shared_ptr<Diskstream> ds)
draw_note_lines();
NoteRangeChanged();
}
-
+
void
MidiStreamView::update_contents_metrics(boost::shared_ptr<Region> r)
{
@@ -266,13 +266,13 @@ MidiStreamView::redisplay_diskstream ()
_data_note_min = 60;
_data_note_max = 71;
}
-
+
// Extend visible range to show newly recorded data, if necessary
_lowest_note = std::min(_lowest_note, _data_note_min);
_highest_note = std::max(_highest_note, _data_note_max);
-
+
veto_note_range(_lowest_note, _highest_note);
-
+
// Flag region views as invalid and disable drawing
for (i = region_views.begin(); i != region_views.end(); ++i) {
(*i)->set_valid(false);
@@ -299,7 +299,7 @@ MidiStreamView::update_contents_height ()
_note_lines->property_y2() = height;
draw_note_lines();
}
-
+
void
MidiStreamView::draw_note_lines()
{
@@ -311,7 +311,7 @@ MidiStreamView::draw_note_lines()
for (int i = lowest_note(); i <= highest_note(); ++i) {
y = floor(note_to_y(i));
-
+
_note_lines->add_line(prev_y, 1.0, ARDOUR_UI::config()->canvasvar_PianoRollBlackOutline.get());
switch (i % 12) {
@@ -359,7 +359,7 @@ MidiStreamView::apply_note_range(uint8_t lowest, uint8_t highest, bool to_region
note_range_adjustment.set_page_size(_highest_note - _lowest_note);
note_range_adjustment.set_value(_lowest_note);
draw_note_lines();
-
+
if (to_region_views) {
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
((MidiRegionView*)(*i))->apply_note_range(lowest, highest);
@@ -369,14 +369,14 @@ MidiStreamView::apply_note_range(uint8_t lowest, uint8_t highest, bool to_region
NoteRangeChanged();
}
-void
+void
MidiStreamView::update_note_range(uint8_t note_num)
{
assert(note_num <= 127);
_data_note_min = min(_data_note_min, note_num);
_data_note_max = max(_data_note_max, note_num);
}
-
+
void
MidiStreamView::setup_rec_box ()
{
@@ -384,8 +384,8 @@ MidiStreamView::setup_rec_box ()
if (_trackview.session().transport_rolling()) {
- if (!rec_active &&
- _trackview.session().record_status() == Session::Recording &&
+ if (!rec_active &&
+ _trackview.session().record_status() == Session::Recording &&
_trackview.get_diskstream()->record_enabled()) {
if (use_rec_regions && rec_regions.size() == rec_rects.size()) {
@@ -393,7 +393,7 @@ MidiStreamView::setup_rec_box ()
/* add a new region, but don't bother if they set use_rec_regions mid-record */
MidiRegion::SourceList sources;
-
+
for (list<sigc::connection>::iterator prc = rec_data_ready_connections.begin(); prc != rec_data_ready_connections.end(); ++prc) {
(*prc).disconnect();
}
@@ -404,28 +404,28 @@ MidiStreamView::setup_rec_box ()
assert(mds);
sources.push_back(mds->write_source());
-
- rec_data_ready_connections.push_back (mds->write_source()->ViewDataRangeReady.connect (bind (mem_fun (*this, &MidiStreamView::rec_data_range_ready), boost::weak_ptr<Source>(mds->write_source()))));
+
+ rec_data_ready_connections.push_back (mds->write_source()->ViewDataRangeReady.connect (bind (mem_fun (*this, &MidiStreamView::rec_data_range_ready), boost::weak_ptr<Source>(mds->write_source()))));
// handle multi
-
+
jack_nframes_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->position() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
}
-
+
boost::shared_ptr<MidiRegion> region (boost::dynamic_pointer_cast<MidiRegion>
(RegionFactory::create (sources, start, 1 , "", 0, Region::DefaultFlags, false)));
assert(region);
region->block_property_changes ();
region->set_position (_trackview.session().transport_frame(), this);
rec_regions.push_back (make_pair(region, (RegionView*)0));
-
+
// rec regions are destroyed in setup_rec_box
/* we add the region later */
}
-
+
/* start a new rec box */
boost::shared_ptr<MidiTrack> mt = _trackview.midi_track(); /* we know what it is already */
@@ -436,10 +436,10 @@ MidiStreamView::setup_rec_box ()
uint32_t fill_color;
assert(_trackview.midi_track()->mode() == Normal);
-
+
xend = xstart;
fill_color = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
-
+
ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
rec_rect->property_x1() = xstart;
rec_rect->property_y1() = 1.0;
@@ -448,16 +448,16 @@ MidiStreamView::setup_rec_box ()
rec_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
rec_rect->property_fill_color_rgba() = fill_color;
rec_rect->lower_to_bottom();
-
+
RecBoxInfo recbox;
recbox.rectangle = rec_rect;
recbox.start = _trackview.session().transport_frame();
recbox.length = 0;
-
+
rec_rects.push_back (recbox);
-
+
screen_update_connection.disconnect();
- screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &MidiStreamView::update_rec_box));
+ screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &MidiStreamView::update_rec_box));
rec_updating = true;
rec_active = true;
@@ -470,7 +470,7 @@ MidiStreamView::setup_rec_box ()
rec_updating = false;
}
-
+
} else {
// cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
@@ -487,12 +487,12 @@ MidiStreamView::setup_rec_box ()
rec_updating = false;
rec_active = false;
-
+
/* remove temp regions */
-
+
for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin(); iter != rec_regions.end();) {
list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator tmp;
-
+
tmp = iter;
++tmp;
@@ -500,7 +500,7 @@ MidiStreamView::setup_rec_box ()
iter = tmp;
}
-
+
rec_regions.clear();
// cerr << "\tclear " << rec_rects.size() << " rec rects\n";
@@ -510,9 +510,9 @@ MidiStreamView::setup_rec_box ()
RecBoxInfo &rect = (*iter);
delete rect.rectangle;
}
-
+
rec_rects.clear();
-
+
}
}
}
@@ -533,34 +533,34 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
tmp = iter;
++tmp;
-
+
boost::shared_ptr<MidiRegion> region = boost::dynamic_pointer_cast<MidiRegion>(iter->first);
if (!region || !iter->second) {
iter = tmp;
continue;
}
-
+
if (!canvas_item_visible (rec_rects[n].rectangle)) {
/* rect already hidden, this region is done */
iter = tmp;
continue;
}
-
+
nframes_t origlen = region->length();
-
+
if (region == rec_regions.back().first && rec_active) {
if (start >= region->midi_source(0)->timeline_position()) {
-
+
nframes_t nlen = start + dur - region->position();
if (nlen != region->length()) {
-
+
region->freeze ();
region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
region->set_length (start + dur - region->position(), this);
region->thaw ("updated");
-
+
if (origlen == 1) {
/* our special initial length */
iter->second = add_region_view_internal (region, false);
@@ -579,7 +579,7 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
// FIXME: slooooooooow!
const boost::shared_ptr<MidiRegionView::NoteType> note = data->note_at(i);
-
+
if (note->length() > 0 && note->end_time() + region->position() > start)
mrv->resolve_note(note->note(), note->end_time());
@@ -600,13 +600,13 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
mrv->add_note (note, !update_range);
}
-
+
mrv->extend_active_notes();
}
}
} else {
-
+
nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
if (nlen != region->length()) {
@@ -617,12 +617,12 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
region->set_length (nlen, this);
region->thaw ("updated");
-
+
if (origlen == 1) {
/* our special initial length */
iter->second = add_region_view_internal (region, false);
}
-
+
/* also hide rect */
ArdourCanvas::Item * rect = rec_rects[n].rectangle;
rect->hide();
@@ -643,11 +643,11 @@ void
MidiStreamView::rec_data_range_ready (jack_nframes_t start, jack_nframes_t dur, boost::weak_ptr<Source> weak_src)
{
// this is called from the butler thread for now
-
+
ENSURE_GUI_THREAD(bind (mem_fun (*this, &MidiStreamView::rec_data_range_ready), start, dur, weak_src));
-
+
boost::shared_ptr<SMFSource> src (boost::dynamic_pointer_cast<SMFSource>(weak_src.lock()));
-
+
this->update_rec_regions (src->model(), start, dur);
}
@@ -657,7 +657,7 @@ MidiStreamView::color_handler ()
//case cMidiTrackBase:
if (_trackview.is_midi_track()) {
//canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
- }
+ }
//case cMidiBusBase:
if (!_trackview.is_midi_track()) {
diff --git a/gtk2_ardour/midi_streamview.h b/gtk2_ardour/midi_streamview.h
index 2b7a7b02fa..87fc003283 100644
--- a/gtk2_ardour/midi_streamview.h
+++ b/gtk2_ardour/midi_streamview.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001, 2006 Paul Davis
+ Copyright (C) 2001, 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -73,29 +73,29 @@ class MidiStreamView : public StreamView
inline uint8_t lowest_note() const { return _lowest_note; }
inline uint8_t highest_note() const { return _highest_note; }
-
+
void update_note_range(uint8_t note_num);
-
+
void redisplay_diskstream ();
-
+
inline double contents_height() const
{ return (_trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2); }
-
+
inline double note_to_y(uint8_t note) const
{ return contents_height()
- (note + 1 - lowest_note()) * note_height() + 1; }
-
+
inline uint8_t y_to_note(double y) const
{ return (uint8_t)((contents_height() - y - 1)
/ contents_height() * (double)contents_note_range())
+ lowest_note(); }
-
+
inline double note_height() const
{ return contents_height() / (double)contents_note_range(); }
-
+
inline uint8_t contents_note_range() const
{ return highest_note() - lowest_note() + 1; }
-
+
sigc::signal<void> NoteRangeChanged;
RegionView* create_region_view (boost::shared_ptr<ARDOUR::Region>, bool, bool);
@@ -106,13 +106,13 @@ class MidiStreamView : public StreamView
void rec_data_range_ready (
jack_nframes_t start,
jack_nframes_t dur,
- boost::weak_ptr<ARDOUR::Source> src);
+ boost::weak_ptr<ARDOUR::Source> src);
void update_rec_regions (
boost::shared_ptr<ARDOUR::MidiModel> data,
jack_nframes_t start,
jack_nframes_t dur);
-
+
RegionView* add_region_view_internal (
boost::shared_ptr<ARDOUR::Region>,
bool wait_for_waves,
@@ -120,7 +120,7 @@ class MidiStreamView : public StreamView
void display_region(MidiRegionView* region_view, bool load_model);
void display_diskstream (boost::shared_ptr<ARDOUR::Diskstream> ds);
-
+
void update_contents_height ();
void draw_note_lines();
void apply_note_range(uint8_t lowest, uint8_t highest, bool to_region_views);
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index b281ba0529..8460b6ab37 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -89,7 +89,7 @@ using namespace PBD;
using namespace Gtk;
using namespace sigc;
using namespace Editing;
-
+
// Minimum height at which a control is displayed
static const uint32_t MIDI_CONTROLS_BOX_MIN_HEIGHT = 162;
static const uint32_t KEYBOARD_MIN_HEIGHT = 140;
@@ -98,7 +98,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
boost::shared_ptr<Route> rt, Canvas& canvas)
: AxisView(sess) // virtually inherited
, RouteTimeAxisView(ed, sess, rt, canvas)
- , _ignore_signals(false)
+ , _ignore_signals(false)
, _range_scroomer(0)
, _piano_roll_header(0)
, _note_mode(Sustained)
@@ -122,7 +122,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
solo_button->set_active (false);
step_edit_insert_position = 0;
-
+
if (is_midi_track()) {
controls_ebox.set_name ("MidiTimeAxisViewControlsBaseUnselected");
_note_mode = midi_track()->note_mode();
@@ -137,7 +137,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
ensure_xml_node ();
set_state (*xml_node);
-
+
_route->processors_changed.connect (mem_fun(*this, &MidiTimeAxisView::processors_changed));
if (is_track()) {
@@ -157,21 +157,21 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
_view->RegionViewAdded.connect (mem_fun(*this, &MidiTimeAxisView::region_view_added));
_view->attach ();
}
-
+
HBox* midi_controls_hbox = manage(new HBox());
-
+
MIDI::Name::MidiPatchManager& patch_manager = MIDI::Name::MidiPatchManager::instance();
MIDI::Name::MasterDeviceNames::Models::const_iterator m = patch_manager.all_models().begin();
for (; m != patch_manager.all_models().end(); ++m) {
_model_selector.append_text(m->c_str());
}
-
+
_model_selector.signal_changed().connect(mem_fun(*this, &MidiTimeAxisView::model_changed));
-
+
_custom_device_mode_selector.signal_changed().connect(
mem_fun(*this, &MidiTimeAxisView::custom_device_mode_changed));
-
+
// TODO: persist the choice
// this initializes the comboboxes and sends out the signal
_model_selector.set_active(0);
@@ -181,11 +181,11 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
_midi_controls_box.pack_start(_model_selector, true, false);
_midi_controls_box.pack_start(_custom_device_mode_selector, true, false);
}
-
+
_midi_controls_box.pack_start(*midi_controls_hbox, true, true);
-
+
controls_vbox.pack_start(_midi_controls_box, false, false);
-
+
boost::shared_ptr<MidiDiskstream> diskstream = midi_track()->midi_diskstream();
// restore channel selector settings
@@ -223,9 +223,9 @@ void MidiTimeAxisView::model_changed()
{
std::list<std::string> device_modes = MIDI::Name::MidiPatchManager::instance()
.custom_device_mode_names_by_model(_model_selector.get_active_text());
-
+
_custom_device_mode_selector.clear_items();
-
+
for (std::list<std::string>::const_iterator i = device_modes.begin();
i != device_modes.end(); ++i) {
cerr << "found custom device mode " << *i << " thread_id: " << pthread_self() << endl;
@@ -238,7 +238,7 @@ void MidiTimeAxisView::model_changed()
void MidiTimeAxisView::custom_device_mode_changed()
{
_midi_patch_settings_changed.emit(_model_selector.get_active_text(),
- _custom_device_mode_selector.get_active_text());
+ _custom_device_mode_selector.get_active_text());
}
MidiStreamView*
@@ -252,7 +252,7 @@ MidiTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent)
{
ensure_xml_node ();
xml_node->add_property ("shown-editor", "yes");
-
+
guint32 ret = TimeAxisView::show_at (y, nth, parent);
return ret;
}
@@ -276,7 +276,7 @@ MidiTimeAxisView::set_height (uint32_t h)
} else {
_midi_controls_box.hide();
}
-
+
if (height >= KEYBOARD_MIN_HEIGHT) {
if (is_track() && _range_scroomer)
_range_scroomer->show();
@@ -301,11 +301,11 @@ MidiTimeAxisView::append_extra_display_menu_items ()
Menu *range_menu = manage(new Menu);
MenuList& range_items = range_menu->items();
range_menu->set_name ("ArdourContextMenu");
-
+
range_items.push_back (MenuElem (_("Show Full Range"), bind (
mem_fun(*this, &MidiTimeAxisView::set_note_range),
MidiStreamView::FullRange)));
-
+
range_items.push_back (MenuElem (_("Fit Contents"), bind (
mem_fun(*this, &MidiTimeAxisView::set_note_range),
MidiStreamView::ContentsRange)));
@@ -322,20 +322,20 @@ Gtk::Menu*
MidiTimeAxisView::build_def_channel_menu ()
{
using namespace Menu_Helpers;
-
+
if (default_channel_menu == 0) {
default_channel_menu = manage (new Menu ());
- }
-
+ }
+
uint8_t defchn = midi_track()->default_channel();
MenuList& def_channel_items = default_channel_menu->items();
RadioMenuItem* item;
RadioMenuItem::Group dc_group;
-
+
for (int i = 0; i < 16; ++i) {
char buf[4];
snprintf (buf, sizeof (buf), "%d", i+1);
-
+
def_channel_items.push_back (RadioMenuElem (dc_group, buf,
bind (mem_fun (*this, &MidiTimeAxisView::set_default_channel), i)));
item = dynamic_cast<RadioMenuItem*>(&def_channel_items.back());
@@ -372,17 +372,17 @@ MidiTimeAxisView::build_automation_action_menu ()
RouteTimeAxisView::build_automation_action_menu ();
MenuList& automation_items = automation_action_menu->items();
-
+
automation_items.push_back (SeparatorElem());
- automation_items.push_back (MenuElem (_("Controller..."),
+ automation_items.push_back (MenuElem (_("Controller..."),
mem_fun(*this, &MidiTimeAxisView::add_cc_track)));
- automation_items.push_back (MenuElem (_("Program Change"),
+ automation_items.push_back (MenuElem (_("Program Change"),
sigc::bind(mem_fun(*this, &MidiTimeAxisView::add_parameter_track),
- Evoral::Parameter(MidiPgmChangeAutomation))));
- automation_items.push_back (MenuElem (_("Bender"),
+ Evoral::Parameter(MidiPgmChangeAutomation))));
+ automation_items.push_back (MenuElem (_("Bender"),
sigc::bind(mem_fun(*this, &MidiTimeAxisView::add_parameter_track),
Evoral::Parameter(MidiPitchBenderAutomation))));
- automation_items.push_back (MenuElem (_("Pressure"),
+ automation_items.push_back (MenuElem (_("Pressure"),
sigc::bind(mem_fun(*this, &MidiTimeAxisView::add_parameter_track),
Evoral::Parameter(MidiChannelPressureAutomation))));
}
@@ -429,15 +429,15 @@ MidiTimeAxisView::build_color_mode_menu()
bind (mem_fun (*this, &MidiTimeAxisView::set_color_mode), ChannelColors)));
_channel_color_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
_channel_color_mode_item->set_active(_color_mode == ChannelColors);
-
+
items.push_back (RadioMenuElem (mode_group, _("Track Color"),
bind (mem_fun (*this, &MidiTimeAxisView::set_color_mode), TrackColor)));
_channel_color_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
_channel_color_mode_item->set_active(_color_mode == TrackColor);
-
+
return mode_menu;
}
-
+
void
MidiTimeAxisView::set_note_mode(NoteMode mode)
{
@@ -527,7 +527,7 @@ MidiTimeAxisView::add_cc_track()
AddMidiCCTrackDialog dialog;
dialog.set_transient_for (_editor);
response = dialog.run();
-
+
if (response == Gtk::RESPONSE_ACCEPT)
param = dialog.parameter();
}
@@ -546,11 +546,11 @@ MidiTimeAxisView::add_parameter_track(const Evoral::Parameter& param)
error << "MidiTimeAxisView: unknown automation child "
<< ARDOUR::EventTypeMap::instance().to_symbol(param) << endmsg;
return;
- }
+ }
// create the parameter lane for each selected channel
uint16_t selected_channels = _channel_selector.get_selected_channels();
-
+
for (uint8_t i = 0; i < 16; i++) {
if (selected_channels & (0x0001 << i)) {
Evoral::Parameter param_with_channel(param.type(), i, param.id());
@@ -575,7 +575,7 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
return;
boost::shared_ptr<AutomationControl> c = _route->get_control (param);
-
+
assert(c);
boost::shared_ptr<AutomationTimeAxisView> track(new AutomationTimeAxisView (_session,
@@ -585,7 +585,7 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
true,
parent_canvas,
_route->describe_parameter(param)));
-
+
add_automation_child(param, track, show);
}
@@ -608,7 +608,7 @@ MidiTimeAxisView::route_active_changed ()
} else {
throw; // wha?
-
+
if (_route->active()) {
controls_ebox.set_name ("BusControlsBaseUnselected");
controls_base_selected_name = "BusControlsBaseSelected";
@@ -660,7 +660,7 @@ MidiTimeAxisView::check_step_edit ()
uint32_t size;
incoming.read_prefix (&time, &type, &size);
-
+
if (size > bufsize) {
delete [] buf;
bufsize = size;
@@ -668,7 +668,7 @@ MidiTimeAxisView::check_step_edit ()
}
incoming.read_contents (size, buf);
-
+
if ((buf[0] & 0xf0) == MIDI_CMD_NOTE_ON) {
if (step_edit_region == 0) {
@@ -682,22 +682,22 @@ MidiTimeAxisView::check_step_edit ()
fatal << X_("programming error: no view found for new MIDI region") << endmsg;
/*NOTREACHED*/
}
- }
+ }
if (step_edit_region_view) {
bool success;
Evoral::MusicalTime beats = _editor.get_grid_type_as_beats (success, step_edit_insert_position);
-
+
if (!success) {
continue;
}
-
+
step_edit_region_view->add_note (buf[0] & 0xf, buf[1], buf[2], step_edit_beat_pos, beats);
step_edit_beat_pos += beats;
}
}
-
+
}
}
@@ -716,7 +716,7 @@ MidiTimeAxisView::add_region (nframes64_t pos)
real_editor->begin_reversible_command (_("create region"));
XMLNode &before = playlist()->get_state();
-
+
nframes64_t start = pos;
real_editor->snap_to (start, -1);
const Meter& m = _session.tempo_map().meter_at(start);
@@ -725,10 +725,10 @@ MidiTimeAxisView::add_region (nframes64_t pos)
const boost::shared_ptr<MidiDiskstream> diskstream =
boost::dynamic_pointer_cast<MidiDiskstream>(view()->trackview().track()->diskstream());
-
+
boost::shared_ptr<Source> src = _session.create_midi_source_for_session (*diskstream.get());
-
- boost::shared_ptr<Region> region = (RegionFactory::create (src, 0, (nframes_t) length,
+
+ boost::shared_ptr<Region> region = (RegionFactory::create (src, 0, (nframes_t) length,
PBD::basename_nosuffix(src->name())));
playlist()->add_region (region, start);
@@ -738,4 +738,4 @@ MidiTimeAxisView::add_region (nframes64_t pos)
real_editor->commit_reversible_command();
return region;
-}
+}
diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h
index d71c156f48..85dcd2b9ea 100644
--- a/gtk2_ardour/midi_time_axis.h
+++ b/gtk2_ardour/midi_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -79,15 +79,15 @@ class MidiTimeAxisView : public RouteTimeAxisView
ARDOUR::ColorMode color_mode() const { return _color_mode; }
void update_range();
-
- sigc::signal<void, ARDOUR::ChannelMode, uint16_t>& signal_channel_mode_changed() {
- return _channel_selector.mode_changed;
+
+ sigc::signal<void, ARDOUR::ChannelMode, uint16_t>& signal_channel_mode_changed() {
+ return _channel_selector.mode_changed;
}
-
+
sigc::signal<void, std::string, std::string>& signal_midi_patch_settings_changed() {
return _midi_patch_settings_changed;
}
-
+
void start_step_editing ();
void stop_step_editing ();
void check_step_edit ();
@@ -95,10 +95,10 @@ class MidiTimeAxisView : public RouteTimeAxisView
private:
sigc::signal<void, std::string, std::string> _midi_patch_settings_changed;
-
+
void model_changed();
void custom_device_mode_changed();
-
+
void append_extra_display_menu_items ();
void build_automation_action_menu ();
Gtk::Menu* build_note_mode_menu();
@@ -111,7 +111,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
void route_active_changed ();
void add_insert_to_subplugin_menu (ARDOUR::Processor *);
-
+
bool _ignore_signals;
Gtk::Menu _subplugin_menu;
MidiScroomer* _range_scroomer;
diff --git a/gtk2_ardour/midi_util.h b/gtk2_ardour/midi_util.h
index 0dedbc14ce..2c158b1767 100644
--- a/gtk2_ardour/midi_util.h
+++ b/gtk2_ardour/midi_util.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007 Paul Davis
+ Copyright (C) 2007 Paul Davis
Author: Dave Robillard
This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@ inline static void clamp_to_0_127(uint8_t &val)
val = 127;
} else if ((192 <= val) && (val < 255)) {
val = 0;
- }
+ }
}
#endif /* __gtk_ardour_midi_util_h__ */
diff --git a/gtk2_ardour/mixer_group_tabs.cc b/gtk2_ardour/mixer_group_tabs.cc
index aaaefae17d..f466381d2b 100644
--- a/gtk2_ardour/mixer_group_tabs.cc
+++ b/gtk2_ardour/mixer_group_tabs.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ MixerGroupTabs::MixerGroupTabs (Mixer_UI* m)
_mixer (m),
_menu (0)
{
-
+
}
@@ -43,7 +43,7 @@ list<GroupTabs::Tab>
MixerGroupTabs::compute_tabs () const
{
list<Tab> tabs;
-
+
Tab tab;
tab.from = 0;
tab.group = 0;
@@ -94,7 +94,7 @@ MixerGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
} else {
cairo_set_source_rgba (cr, 1, 1, 1, 0.2);
}
-
+
cairo_arc (cr, tab.from + arc_radius, _height, arc_radius, M_PI, 3 * M_PI / 2);
cairo_line_to (cr, tab.to - arc_radius, 0);
cairo_arc (cr, tab.to - arc_radius, _height, arc_radius, 3 * M_PI / 2, 2 * M_PI);
@@ -123,37 +123,37 @@ void
MixerGroupTabs::reflect_tabs (list<Tab> const & tabs)
{
list<Tab>::const_iterator j = tabs.begin ();
-
+
int32_t x = 0;
TreeModel::Children rows = _mixer->track_model->children ();
for (TreeModel::Children::iterator i = rows.begin(); i != rows.end(); ++i) {
MixerStrip* s = (*i)[_mixer->track_columns.strip];
-
+
if (s->route()->is_master() || s->route()->is_control() || !s->marked_for_display()) {
continue;
}
-
+
if (j == tabs.end()) {
-
+
/* already run out of tabs, so no edit group */
s->route()->set_route_group (0, this);
-
+
} else {
-
+
if (x >= j->to) {
/* this tab finishes before this track starts, so onto the next tab */
++j;
}
-
+
double const h = x + s->get_width() / 2;
-
+
if (j->from < h && j->to > h) {
s->route()->set_route_group (j->group, this);
} else {
s->route()->set_route_group (0, this);
}
-
+
}
x += s->get_width ();
@@ -166,12 +166,12 @@ MixerGroupTabs::get_menu (RouteGroup* g)
if (g == 0) {
return 0;
}
-
+
using namespace Menu_Helpers;
-
+
delete _menu;
_menu = new Menu;
-
+
MenuList& items = _menu->items ();
items.push_back (MenuElem (_("Edit..."), bind (mem_fun (*this, &MixerGroupTabs::edit_group), g)));
items.push_back (MenuElem (_("Subgroup"), bind (mem_fun (*this, &MixerGroupTabs::make_subgroup), g)));
diff --git a/gtk2_ardour/mixer_group_tabs.h b/gtk2_ardour/mixer_group_tabs.h
index 6f92c834e8..eb604e3c92 100644
--- a/gtk2_ardour/mixer_group_tabs.h
+++ b/gtk2_ardour/mixer_group_tabs.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 4b3cb3649f..17761798c2 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -86,15 +86,15 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, bool in_mixer)
, bottom_button_table (1, 2)
, meter_point_label (_("pre"))
, comment_button (_("Comments"))
-
+
{
init ();
-
+
if (!_mixer_owned) {
/* the editor mixer strip: don't destroy it every time
the underlying route goes away.
*/
-
+
self_destruct = false;
}
}
@@ -112,7 +112,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
, bottom_button_table (1, 2)
, meter_point_label (_("pre"))
, comment_button (_("Comments"))
-
+
{
init ();
set_button_names ();
@@ -164,14 +164,14 @@ MixerStrip::init ()
meter_point_button.add (meter_point_label);
meter_point_button.set_name ("MixerStripMeterPreButton");
meter_point_label.set_name ("MixerStripMeterPreButton");
-
+
/* TRANSLATORS: this string should be longest of the strings
used to describe meter points. In english, it's "input".
*/
set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5);
-
+
bottom_button_table.attach (meter_point_button, 1, 2, 0, 1);
-
+
meter_point_button.signal_button_press_event().connect (mem_fun (gpm, &GainMeter::meter_press), false);
meter_point_button.signal_button_release_event().connect (mem_fun (gpm, &GainMeter::meter_release), false);
@@ -194,7 +194,7 @@ MixerStrip::init ()
bottom_button_table.set_col_spacings (0);
bottom_button_table.set_homogeneous (true);
bottom_button_table.attach (group_button, 0, 1, 0, 1);
-
+
name_button.add (name_label);
name_button.set_name ("MixerNameButton");
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
@@ -208,7 +208,7 @@ MixerStrip::init ()
comment_button.set_name ("MixerCommentButton");
comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked));
-
+
global_vpacker.set_border_width (0);
global_vpacker.set_spacing (0);
@@ -302,7 +302,7 @@ MixerStrip::init ()
Gdk::KEY_RELEASE_MASK);
set_flags (get_flags() | Gtk::CAN_FOCUS);
-
+
SwitchIO.connect (mem_fun (*this, &MixerStrip::switch_io));
}
@@ -350,7 +350,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
}
if (_mixer_owned && (route()->is_master() || route()->is_control())) {
-
+
if (scrollbar_height == 0) {
HScrollbar scrollbar;
Gtk::Requisition requisition(scrollbar.size_request ());
@@ -391,11 +391,11 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
case MeterInput:
meter_point_label.set_text (_("input"));
break;
-
+
case MeterPreFader:
meter_point_label.set_text (_("pre"));
break;
-
+
case MeterPostFader:
meter_point_label.set_text (_("post"));
break;
@@ -403,7 +403,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
delete route_ops_menu;
route_ops_menu = 0;
-
+
ARDOUR_UI::instance()->tooltips().set_tip (comment_button, _route->comment().empty() ?
_("Click to Add/Edit Comments"):
_route->comment());
@@ -532,7 +532,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
_width_owner = owner;
ensure_xml_node ();
-
+
_width = w;
if (_width_owner == this) {
@@ -588,7 +588,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
gpm.short_astyle_string(gain_automation->automation_style()));
((Gtk::Label*)gpm.gain_automation_state_button.get_child())->set_text (
gpm.short_astate_string(gain_automation->automation_state()));
-
+
if (_route->panner()) {
((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (
panners.short_astyle_string(_route->panner()->automation_style()));
@@ -638,12 +638,12 @@ MixerStrip::output_press (GdkEventButton *ev)
case 1:
edit_output_configuration ();
break;
-
+
case 3:
{
output_menu.set_name ("ArdourContextMenu");
citems.clear();
-
+
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_output)));
citems.push_back (SeparatorElem());
@@ -679,7 +679,7 @@ MixerStrip::edit_output_configuration ()
{
if (output_selector == 0) {
output_selector = new IOSelectorWindow (_session, _route->output());
- }
+ }
if (output_selector->is_visible()) {
output_selector->get_toplevel()->get_window()->raise();
@@ -693,7 +693,7 @@ MixerStrip::edit_input_configuration ()
{
if (input_selector == 0) {
input_selector = new IOSelectorWindow (_session, _route->input());
- }
+ }
if (input_selector->is_visible()) {
input_selector->get_toplevel()->get_window()->raise();
@@ -710,7 +710,7 @@ MixerStrip::input_press (GdkEventButton *ev)
MenuList& citems = input_menu.items();
input_menu.set_name ("ArdourContextMenu");
citems.clear();
-
+
if (!_session.engine().connected()) {
MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
msg.run ();
@@ -794,17 +794,17 @@ MixerStrip::maybe_add_bundle_to_input_menu (boost::shared_ptr<Bundle> b, ARDOUR:
if (b->ports_are_outputs() == false ||
route()->input()->default_type() != b->type() ||
b->nchannels() != _route->n_inputs().get (b->type ())) {
-
+
return;
}
MenuList& citems = input_menu.items();
-
+
std::string n = b->name ();
replace_all (n, "_", " ");
-
+
citems.push_back (CheckMenuElem (n, bind (mem_fun(*this, &MixerStrip::bundle_input_toggled), b)));
-
+
if (std::find (current.begin(), current.end(), b) != current.end()) {
ignore_toggle = true;
dynamic_cast<CheckMenuItem *> (&citems.back())->set_active (true);
@@ -820,17 +820,17 @@ MixerStrip::maybe_add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, ARDOUR
if (b->ports_are_inputs() == false ||
route()->output()->default_type() != b->type() ||
b->nchannels() != _route->n_outputs().get (b->type ())) {
-
+
return;
}
MenuList& citems = output_menu.items();
-
+
std::string n = b->name ();
replace_all (n, "_", " ");
-
+
citems.push_back (CheckMenuElem (n, bind (mem_fun(*this, &MixerStrip::bundle_output_toggled), b)));
-
+
if (std::find (current.begin(), current.end(), b) != current.end()) {
ignore_toggle = true;
dynamic_cast<CheckMenuItem *> (&citems.back())->set_active (true);
@@ -883,7 +883,7 @@ MixerStrip::connect_to_pan ()
/*
* Output port labelling
* =====================
- *
+ *
* Case 1: Each output has one connection, all connections are to system:playback_%i
* out 1 -> system:playback_1
* out 2 -> system:playback_2
@@ -894,7 +894,7 @@ MixerStrip::connect_to_pan ()
* out 1 -> ardour:track_x/in 1
* out 2 -> ardour:track_x/in 2
* Display as: track_x
- *
+ *
* Case 3: Each output has one connection, all connections are to Jack client "program x"
* out 1 -> program x:foo
* out 2 -> program x:foo
@@ -902,7 +902,7 @@ MixerStrip::connect_to_pan ()
*
* Case 4: No connections (Disconnected)
* Display as: -
- *
+ *
* Default case (unusual routing):
* Display as: *number of connections*
*
@@ -926,13 +926,13 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
uint32_t io_index;
Port *port;
vector<string> connections;
-
+
uint32_t total_connection_count = 0;
uint32_t io_connection_count = 0;
uint32_t ardour_connection_count = 0;
uint32_t system_connection_count = 0;
uint32_t other_connection_count = 0;
-
+
ostringstream label;
string label_string;
char * label_cstr;
@@ -945,25 +945,25 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
string other_connection_type;
string system_ports;
string system_port;
-
+
ostringstream tooltip;
char * tooltip_cstr;
-
+
tooltip << route->name();
if (for_input) {
io_count = route->n_inputs().n_total();
} else {
io_count = route->n_outputs().n_total();
- }
-
+ }
+
for (io_index = 0; io_index < io_count; ++io_index) {
if (for_input) {
port = route->input()->nth (io_index);
} else {
port = route->output()->nth (io_index);
}
-
+
port->get_connections(connections);
io_connection_count = 0;
@@ -976,7 +976,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
} else {
tooltip << ", " << connection_name;
}
-
+
if (connection_name.find("ardour:") == 0) {
if (ardour_track_name.empty()) {
// "ardour:Master/in 1" -> "ardour:Master/"
@@ -985,7 +985,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
ardour_track_name = connection_name.substr(0, slash + 1);
}
}
-
+
if (connection_name.find(ardour_track_name) == 0) {
++ardour_connection_count;
}
@@ -997,48 +997,48 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
// "system:playback_123" -> "123"
system_port = connection_name.substr(16);
}
-
+
if (system_ports.empty()) {
system_ports += system_port;
} else {
system_ports += "/" + system_port;
}
-
+
++system_connection_count;
} else {
if (other_connection_type.empty()) {
// "jamin:in 1" -> "jamin:"
other_connection_type = connection_name.substr(0, connection_name.find(":") + 1);
}
-
+
if (connection_name.find(other_connection_type) == 0) {
++other_connection_count;
}
}
-
+
++total_connection_count;
++io_connection_count;
}
- }
-
+ }
+
if (io_connection_count != 1) {
each_io_has_one_connection = false;
}
}
-
+
if (total_connection_count == 0) {
tooltip << endl << _("Disconnected");
}
-
+
tooltip_cstr = new char[tooltip.str().size() + 1];
strcpy(tooltip_cstr, tooltip.str().c_str());
-
+
if (for_input) {
ARDOUR_UI::instance()->set_tip (&input_button, tooltip_cstr, "");
} else {
ARDOUR_UI::instance()->set_tip (&output_button, tooltip_cstr, "");
- }
-
+ }
+
if (each_io_has_one_connection) {
if ((total_connection_count == ardour_connection_count)) {
// all connections are to the same track in ardour
@@ -1061,7 +1061,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
have_label = true;
}
}
-
+
if (!have_label) {
if (total_connection_count == 0) {
// Disconnected
@@ -1071,7 +1071,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
label << "*" << total_connection_count << "*";
}
}
-
+
switch (width) {
case Wide:
label_string = label.str().substr(0, 6);
@@ -1080,10 +1080,10 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
label_string = label.str().substr(0, 3);
break;
}
-
+
label_cstr = new char[label_string.size() + 1];
strcpy(label_cstr, label_string.c_str());
-
+
if (for_input) {
input_label.set_text (label_cstr);
} else {
@@ -1116,7 +1116,7 @@ void
MixerStrip::diskstream_changed ()
{
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_diskstream_display));
-}
+}
void
MixerStrip::input_changed (IOChange /*change*/, void */*src*/)
@@ -1133,15 +1133,15 @@ MixerStrip::output_changed (IOChange /*change*/, void */*src*/)
}
-void
-MixerStrip::comment_editor_done_editing()
+void
+MixerStrip::comment_editor_done_editing()
{
string str = comment_area->get_buffer()->get_text();
if (_route->comment() != str) {
_route->set_comment (str, this);
switch (_width) {
-
+
case Wide:
if (! str.empty()) {
comment_button.modify_bg (STATE_NORMAL, color());
@@ -1151,7 +1151,7 @@ MixerStrip::comment_editor_done_editing()
((Gtk::Label*)comment_button.get_child())->set_text (_("Comments"));
}
break;
-
+
case Narrow:
if (! str.empty()) {
comment_button.modify_bg (STATE_NORMAL, color());
@@ -1159,11 +1159,11 @@ MixerStrip::comment_editor_done_editing()
} else {
comment_button.unset_bg (STATE_NORMAL);
((Gtk::Label*)comment_button.get_child())->set_text (_("Cmt"));
- }
+ }
break;
}
-
- ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
+
+ ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
str.empty() ? _("Click to Add/Edit Comments") : str);
}
@@ -1186,8 +1186,8 @@ MixerStrip::comment_button_clicked ()
comment_window->get_size (cw_width, cw_height);
comment_window->get_position(x, y);
comment_window->move(x, y - (cw_height / 2) - 45);
- /*
- half the dialog height minus the comments button height
+ /*
+ half the dialog height minus the comments button height
with some window decoration fudge thrown in.
*/
@@ -1223,7 +1223,7 @@ void
MixerStrip::comment_changed (void *src)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::comment_changed), src));
-
+
if (src != this) {
ignore_comment_edit = true;
if (comment_area) {
@@ -1247,26 +1247,26 @@ MixerStrip::select_route_group (GdkEventButton *ev)
if (ev->button == 1) {
if (group_menu == 0) {
-
+
group_menu = new RouteGroupMenu (
_session,
(RouteGroup::Property) (RouteGroup::Gain | RouteGroup::Mute | RouteGroup::Solo)
);
-
+
group_menu->GroupSelected.connect (mem_fun (*this, &MixerStrip::set_route_group));
}
group_menu->popup (1, ev->time);
}
-
+
return true;
-}
+}
void
MixerStrip::route_group_changed (void *ignored)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::route_group_changed), ignored));
-
+
RouteGroup *rg = _route->route_group();
if (rg) {
@@ -1289,11 +1289,11 @@ MixerStrip::route_group_changed (void *ignored)
}
-void
+void
MixerStrip::route_gui_changed (string what_changed, void* ignored)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::route_gui_changed), what_changed, ignored));
-
+
if (what_changed == "color") {
if (set_color_from_route () == 0) {
show_route_color ();
@@ -1422,13 +1422,13 @@ MixerStrip::hide_clicked ()
{
// LAME fix to reset the button status for when it is redisplayed (part 1)
hide_button.set_sensitive(false);
-
+
if (_embedded) {
Hiding(); /* EMIT_SIGNAL */
} else {
_mixer.hide_strip (this);
}
-
+
// (part 2)
hide_button.set_sensitive(true);
}
@@ -1457,7 +1457,7 @@ MixerStrip::map_frozen ()
break;
}
}
-
+
hide_redirect_editors ();
}
@@ -1474,9 +1474,9 @@ MixerStrip::hide_processor_editor (boost::weak_ptr<Processor> p)
if (!processor) {
return;
}
-
+
void* gui = processor->get_gui ();
-
+
if (gui) {
static_cast<Gtk::Widget*>(gui)->hide ();
}
@@ -1514,7 +1514,7 @@ MixerStrip::route_active_changed ()
gpm.set_meter_strip_name ("AudioBusMetricsInactive");
}
gpm.set_fader_name ("AudioBusFader");
-
+
/* (no MIDI busses yet) */
}
}
@@ -1548,7 +1548,7 @@ MixerStrip::meter_changed (void *src)
case MeterPreFader:
meter_point_label.set_text (_("pre"));
break;
-
+
case MeterPostFader:
meter_point_label.set_text (_("post"));
break;
@@ -1580,16 +1580,16 @@ MixerStrip::switch_io (boost::shared_ptr<Route> target)
revert_to_default_display ();
return;
}
-
+
boost::shared_ptr<Send> send;
if (_current_delivery && (send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
send->set_metering (false);
}
-
+
_current_delivery = _route->internal_send_for (target);
- cerr << "internal send from " << _route->name() << " to " << target->name() << " = "
+ cerr << "internal send from " << _route->name() << " to " << target->name() << " = "
<< _current_delivery << endl;
if (_current_delivery) {
@@ -1604,7 +1604,7 @@ MixerStrip::switch_io (boost::shared_ptr<Route> target)
gain_meter().set_controls (_route, _route->shared_peak_meter(), _route->amp());
panner_ui().set_panner (_route->main_outs()->panner());
}
-
+
gain_meter().setup_meters ();
panner_ui().setup_pan ();
}
@@ -1614,13 +1614,13 @@ void
MixerStrip::revert_to_default_display ()
{
show_sends_button->set_active (false);
-
+
boost::shared_ptr<Send> send;
if (_current_delivery && (send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
send->set_metering (false);
}
-
+
_current_delivery = _route->main_outs();
gain_meter().set_controls (_route, _route->shared_peak_meter(), _route->amp());
@@ -1666,7 +1666,7 @@ MixerStrip::set_button_names ()
}
}
break;
-
+
}
}
@@ -1683,22 +1683,22 @@ MixerStrip::on_key_press_event (GdkEventKey* ev)
mute_press (&fake);
return true;
break;
-
+
case GDK_s:
solo_press (&fake);
return true;
break;
-
+
case GDK_r:
rec_enable_press (&fake);
return true;
break;
-
+
case GDK_e:
show_sends_press (&fake);
return true;
- break;
-
+ break;
+
case GDK_g:
if (ev->state & Keyboard::PrimaryModifier) {
step_gain_down ();
@@ -1713,7 +1713,7 @@ MixerStrip::on_key_press_event (GdkEventKey* ev)
_route->set_gain (1.0, this);
}
return true;
-
+
default:
break;
}
@@ -1735,26 +1735,26 @@ MixerStrip::on_key_release_event (GdkEventKey* ev)
mute_release (&fake);
return true;
break;
-
+
case GDK_s:
solo_release (&fake);
return true;
break;
-
+
case GDK_r:
rec_enable_release (&fake);
return true;
break;
-
+
case GDK_e:
show_sends_release (&fake);
return true;
- break;
-
+ break;
+
case GDK_g:
return true;
break;
-
+
default:
break;
}
diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h
index d1ab3c398e..afacd4a328 100644
--- a/gtk2_ardour/mixer_strip.h
+++ b/gtk2_ardour/mixer_strip.h
@@ -92,7 +92,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void fast_update ();
void set_embedded (bool);
-
+
ARDOUR::RouteGroup* route_group() const;
void set_route (boost::shared_ptr<ARDOUR::Route>);
void set_button_names ();
@@ -142,7 +142,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
ProcessorBox processor_box;
GainMeter gpm;
PannerUI panners;
-
+
Gtk::Table button_table;
Gtk::Table middle_button_table;
Gtk::Table bottom_button_table;
@@ -163,10 +163,10 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
Gtk::Label output_label;
sigc::connection newplug_connection;
-
+
gint mark_update_safe ();
guint32 mode_switch_in_progress;
-
+
Gtk::Button name_button;
ArdourDialog* comment_window;
@@ -189,7 +189,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
Gtk::Menu output_menu;
void maybe_add_bundle_to_output_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
-
+
void bundle_input_toggled (boost::shared_ptr<ARDOUR::Bundle>);
void bundle_output_toggled (boost::shared_ptr<ARDOUR::Bundle>);
@@ -259,7 +259,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void revert_to_default_display ();
static int scrollbar_height;
-
+
void update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);
};
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index aa4c4119c6..51578ad2b4 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2004 Paul Davis
+ Copyright (C) 2000-2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -199,16 +199,16 @@ Mixer_UI::Mixer_UI ()
list_hpane.add1(list_vpacker);
list_hpane.add2(global_hpacker);
- rhs_pane1.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler),
+ rhs_pane1.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler),
static_cast<Gtk::Paned*> (&rhs_pane1)));
- list_hpane.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler),
+ list_hpane.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler),
static_cast<Gtk::Paned*> (&list_hpane)));
-
+
global_vpacker.pack_start (list_hpane, true, true);
add (global_vpacker);
set_name ("MixerWindow");
-
+
WindowTitle title(Glib::get_application_name());
title += _("Mixer");
set_title (title.get_string());
@@ -273,10 +273,10 @@ Mixer_UI::show_window ()
/* now reset each strips width so the right widgets are shown */
MixerStrip* ms;
-
+
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator ri;
-
+
for (ri = rows.begin(); ri != rows.end(); ++ri) {
ms = (*ri)[track_columns.strip];
ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
@@ -299,7 +299,7 @@ void
Mixer_UI::add_strip (RouteList& routes)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), routes));
-
+
MixerStrip* strip;
no_track_list_redisplay = true;
@@ -314,7 +314,7 @@ Mixer_UI::add_strip (RouteList& routes)
strip = new MixerStrip (*this, *session, route);
strips.push_back (strip);
-
+
Config->get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
if (strip->width_owner() != strip) {
@@ -322,7 +322,7 @@ Mixer_UI::add_strip (RouteList& routes)
}
show_strip (strip);
-
+
TreeModel::Row row = *(track_model->append());
row[track_columns.text] = route->name();
row[track_columns.visible] = strip->marked_for_display();
@@ -332,7 +332,7 @@ Mixer_UI::add_strip (RouteList& routes)
if (route->order_key (N_("signal")) == -1) {
route->set_order_key (N_("signal"), track_model->children().size()-1);
}
-
+
route->NameChanged.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip));
strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip));
@@ -343,7 +343,7 @@ Mixer_UI::add_strip (RouteList& routes)
no_track_list_redisplay = false;
redisplay_track_list ();
-
+
strip_redisplay_does_not_sync_order_keys = false;
}
@@ -427,7 +427,7 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
editing. XXX it needs improving so that we don't select the strip
at the same time.
*/
-
+
if (_selection.selected (strip->route())) {
_selection.remove (strip->route());
} else {
@@ -465,7 +465,7 @@ Mixer_UI::connect_to_session (Session* sess)
session->config.ParameterChanged.connect (mem_fun (*this, &Mixer_UI::parameter_changed));
route_groups_changed ();
-
+
_plugin_selector->set_session (session);
if (_visible) {
@@ -481,14 +481,14 @@ void
Mixer_UI::disconnect_from_session ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &Mixer_UI::disconnect_from_session));
-
+
group_model->clear ();
_selection.clear ();
WindowTitle title(Glib::get_application_name());
title += _("Mixer");
set_title (title.get_string());
-
+
stop_updating ();
}
@@ -497,9 +497,9 @@ Mixer_UI::show_strip (MixerStrip* ms)
{
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
-
+
MixerStrip* strip = (*i)[track_columns.strip];
if (strip == ms) {
(*i)[track_columns.visible] = true;
@@ -513,9 +513,9 @@ Mixer_UI::hide_strip (MixerStrip* ms)
{
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
-
+
MixerStrip* strip = (*i)[track_columns.strip];
if (strip == ms) {
(*i)[track_columns.visible] = false;
@@ -560,11 +560,11 @@ Mixer_UI::set_all_strips_visibility (bool yn)
TreeModel::Row row = (*i);
MixerStrip* strip = row[track_columns.strip];
-
+
if (strip == 0) {
continue;
}
-
+
if (strip->route()->is_master() || strip->route()->is_control()) {
continue;
}
@@ -578,7 +578,7 @@ Mixer_UI::set_all_strips_visibility (bool yn)
void
-Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
+Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
{
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
@@ -603,13 +603,13 @@ Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
case 0:
(*i)[track_columns.visible] = yn;
break;
-
+
case 1:
if (at) { /* track */
(*i)[track_columns.visible] = yn;
}
break;
-
+
case 2:
if (!at) { /* bus */
(*i)[track_columns.visible] = yn;
@@ -669,7 +669,7 @@ void
Mixer_UI::track_list_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&)
{
// never reset order keys because of a property change
- strip_redisplay_does_not_reset_order_keys = true;
+ strip_redisplay_does_not_reset_order_keys = true;
session->set_remote_control_ids();
redisplay_track_list ();
strip_redisplay_does_not_reset_order_keys = false;
@@ -710,7 +710,7 @@ Mixer_UI::redisplay_track_list ()
if (!strip_redisplay_does_not_reset_order_keys) {
strip->route()->set_order_key (N_("signal"), order);
- }
+ }
if (strip->packed()) {
@@ -745,13 +745,13 @@ Mixer_UI::redisplay_track_list ()
}
}
}
-
+
if (!strip_redisplay_does_not_reset_order_keys && !strip_redisplay_does_not_sync_order_keys) {
session->sync_order_keys (N_("signal"));
}
// Rebind all of the midi controls automatically
-
+
if (auto_rebinding)
auto_rebind_midi_controls ();
@@ -762,7 +762,7 @@ void
Mixer_UI::strip_width_changed ()
{
_group_tabs->set_dirty ();
-
+
#ifdef GTKOSX
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
@@ -776,13 +776,13 @@ Mixer_UI::strip_width_changed ()
}
bool visible = (*i)[track_columns.visible];
-
+
if (visible) {
strip->queue_draw();
}
}
#endif
-
+
}
void
@@ -800,14 +800,14 @@ Mixer_UI::set_auto_rebinding( bool val )
}
}
-void
-Mixer_UI::toggle_auto_rebinding()
+void
+Mixer_UI::toggle_auto_rebinding()
{
if (auto_rebinding)
{
set_auto_rebinding( FALSE );
}
-
+
else
{
set_auto_rebinding( TRUE );
@@ -816,8 +816,8 @@ Mixer_UI::toggle_auto_rebinding()
auto_rebind_midi_controls();
}
-void
-Mixer_UI::auto_rebind_midi_controls ()
+void
+Mixer_UI::auto_rebind_midi_controls ()
{
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
@@ -827,7 +827,7 @@ Mixer_UI::auto_rebind_midi_controls ()
pos = 1; // 0 is reserved for the master strip
for (i = rows.begin(); i != rows.end(); ++i) {
MixerStrip* strip = (*i)[track_columns.strip];
-
+
if ( (*i)[track_columns.visible] == true ) { // add bindings for
// make the actual binding
//cout<<"Auto Binding: Visible Strip Found: "<<strip->name()<<endl;
@@ -864,7 +864,7 @@ Mixer_UI::auto_rebind_midi_controls ()
}
} // for
-
+
}
struct SignalOrderRouteSorter {
@@ -882,7 +882,7 @@ Mixer_UI::initial_track_display ()
SignalOrderRouteSorter sorter;
copy.sort (sorter);
-
+
no_track_list_redisplay = true;
track_model->clear ();
@@ -917,7 +917,7 @@ Mixer_UI::track_display_button_press (GdkEventButton* ev)
TreeViewColumn* column;
int cellx;
int celly;
-
+
if (!track_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
return false;
}
@@ -961,7 +961,7 @@ Mixer_UI::build_track_menu ()
track_menu = new Menu;
track_menu->set_name ("ArdourContextMenu");
MenuList& items = track_menu->items();
-
+
items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Mixer_UI::show_all_routes)));
items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Mixer_UI::hide_all_routes)));
items.push_back (MenuElem (_("Show All Audio Tracks"), mem_fun(*this, &Mixer_UI::show_all_audiotracks)));
@@ -975,16 +975,16 @@ void
Mixer_UI::strip_name_changed (MixerStrip* mx)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::strip_name_changed), mx));
-
+
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
if ((*i)[track_columns.strip] == mx) {
(*i)[track_columns.text] = mx->route()->name();
return;
}
- }
+ }
error << _("track display list item for renamed strip not found!") << endmsg;
}
@@ -1003,7 +1003,7 @@ Mixer_UI::build_route_group_context_menu ()
items.push_back (MenuElem (_("Disable All"), mem_fun(*this, &Mixer_UI::disable_all_route_groups)));
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Add group"), mem_fun(*this, &Mixer_UI::new_route_group)));
-
+
}
bool
@@ -1041,8 +1041,8 @@ Mixer_UI::group_display_button_press (GdkEventButton* ev)
return true;
}
}
-
- }
+
+ }
break;
case 1:
@@ -1059,7 +1059,7 @@ Mixer_UI::group_display_button_press (GdkEventButton* ev)
default:
break;
}
-
+
return false;
}
@@ -1113,7 +1113,7 @@ Mixer_UI::remove_selected_route_group ()
TreeView::Selection::ListHandle_Path::iterator i = rows.begin();
TreeIter iter;
-
+
/* selection mode is single, so rows.begin() is it */
if ((iter = group_model->get_iter (*i))) {
@@ -1136,7 +1136,7 @@ Mixer_UI::group_flags_changed (void* src, RouteGroup* group)
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::group_flags_changed), src, group));
/* force an update of any mixer strips that are using this group,
- otherwise mix group names don't change in mixer strips
+ otherwise mix group names don't change in mixer strips
*/
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
@@ -1144,13 +1144,13 @@ Mixer_UI::group_flags_changed (void* src, RouteGroup* group)
(*i)->route_group_changed(0);
}
}
-
+
TreeModel::iterator i;
TreeModel::Children rows = group_model->children();
Glib::RefPtr<TreeSelection> selection = group_display.get_selection();
in_group_row_change = true;
-
+
for (i = rows.begin(); i != rows.end(); ++i) {
if ((*i)[group_columns.group] == group) {
(*i)[group_columns.visible] = !group->is_hidden ();
@@ -1171,18 +1171,18 @@ Mixer_UI::route_group_name_edit (const Glib::ustring& path, const Glib::ustring&
TreeIter iter;
if ((iter = group_model->get_iter (path))) {
-
+
if ((group = (*iter)[group_columns.group]) == 0) {
return;
}
-
+
if (new_text != group->name()) {
group->set_name (new_text);
}
}
}
-void
+void
Mixer_UI::route_group_row_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter)
{
RouteGroup* group;
@@ -1207,7 +1207,7 @@ Mixer_UI::route_group_row_change (const Gtk::TreeModel::Path&, const Gtk::TreeMo
hide_strip (*i);
}
}
- }
+ }
Glib::ustring name = (*iter)[group_columns.text];
@@ -1236,7 +1236,7 @@ Mixer_UI::add_route_group (RouteGroup* group)
}
group->FlagsChanged.connect (bind (mem_fun(*this, &Mixer_UI::group_flags_changed), group));
-
+
if (focus) {
TreeViewColumn* col = group_display.get_column (0);
CellRendererText* name_cell = dynamic_cast<CellRendererText*>(group_display.get_column_cell_renderer (0));
@@ -1288,12 +1288,12 @@ Mixer_UI::set_state (const XMLNode& node)
{
const XMLProperty* prop;
XMLNode* geometry;
-
+
m_width = default_width;
m_height = default_height;
m_root_x = 1;
m_root_y = 1;
-
+
if ((geometry = find_named_node (node, "geometry")) != 0) {
XMLProperty* prop;
@@ -1316,7 +1316,7 @@ Mixer_UI::set_state (const XMLNode& node)
}
if (prop) {
m_root_x = atoi (prop->value());
-
+
}
if ((prop = geometry->property ("y_pos")) == 0) {
prop = geometry->property ("y-pos");
@@ -1352,7 +1352,7 @@ Mixer_UI::get_state (void)
if (is_realized()) {
Glib::RefPtr<Gdk::Window> win = get_window();
-
+
get_window_pos_and_size ();
XMLNode* geometry = new XMLNode ("geometry");
@@ -1365,7 +1365,7 @@ Mixer_UI::get_state (void)
geometry->add_property(X_("x_pos"), string(buf));
snprintf(buf, sizeof(buf), "%d", m_root_y);
geometry->add_property(X_("y_pos"), string(buf));
-
+
// written only for compatibility, they are not used.
snprintf(buf, sizeof(buf), "%d", 0);
geometry->add_property(X_("x_off"), string(buf));
@@ -1388,7 +1388,7 @@ Mixer_UI::get_state (void)
}
-void
+void
Mixer_UI::pane_allocation_handler (Allocation&, Gtk::Paned* which)
{
int pos;
@@ -1480,10 +1480,10 @@ Mixer_UI::parameter_changed (string const & p)
}
}
}
-
+
void
Mixer_UI::set_route_group_activation (RouteGroup* g, bool a)
{
g->set_active (a, this);
}
-
+
diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h
index 41609e8de2..c7378404ef 100644
--- a/gtk2_ardour/mixer_ui.h
+++ b/gtk2_ardour/mixer_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ class Mixer_UI : public Gtk::Window
~Mixer_UI();
void connect_to_session (ARDOUR::Session *);
-
+
PluginSelector& plugin_selector() { return *_plugin_selector; }
void set_strip_width (Width);
@@ -84,7 +84,7 @@ class Mixer_UI : public Gtk::Window
ARDOUR::Session *session;
bool _visible;
-
+
Gtk::HBox global_hpacker;
Gtk::VBox global_vpacker;
Gtk::ScrolledWindow scroller;
@@ -108,7 +108,7 @@ class Mixer_UI : public Gtk::Window
// for restoring window geometry.
int m_root_x, m_root_y, m_width, m_height;
-
+
void set_window_pos_and_size ();
void get_window_pos_and_size ();
@@ -116,7 +116,7 @@ class Mixer_UI : public Gtk::Window
bool on_key_release_event (GdkEventKey*);
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
-
+
std::list<MixerStrip *> strips;
bool strip_scroller_button_release (GdkEventButton*);
@@ -144,7 +144,7 @@ class Mixer_UI : public Gtk::Window
gint stop_updating ();
void disconnect_from_session ();
-
+
sigc::connection fast_screen_update_connection;
void fast_update_strips ();
@@ -154,7 +154,7 @@ class Mixer_UI : public Gtk::Window
bool no_track_list_redisplay;
bool track_display_button_press (GdkEventButton*);
void strip_width_changed ();
-
+
void track_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
void track_list_delete (const Gtk::TreeModel::Path&);
void track_list_reorder (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* new_order);
@@ -164,7 +164,7 @@ class Mixer_UI : public Gtk::Window
void set_all_strips_visibility (bool yn);
void set_all_audio_visibility (int tracks, bool yn);
-
+
void hide_all_routes ();
void show_all_routes ();
void show_all_audiobus ();
@@ -199,7 +199,7 @@ class Mixer_UI : public Gtk::Window
void group_flags_changed (void *src, ARDOUR::RouteGroup *);
/* various treeviews */
-
+
struct TrackDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
TrackDisplayModelColumns () {
add (text);
@@ -214,7 +214,7 @@ class Mixer_UI : public Gtk::Window
};
struct GroupDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
- GroupDisplayModelColumns() {
+ GroupDisplayModelColumns() {
add (visible);
add (text);
add (group);
diff --git a/gtk2_ardour/mtest.cc b/gtk2_ardour/mtest.cc
index e3f3855010..1f9442e966 100644
--- a/gtk2_ardour/mtest.cc
+++ b/gtk2_ardour/mtest.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ make_action (Glib::RefPtr<ActionGroup> group, string name, string label, RefPtr<
act->set_accel_group (accels);
cerr << "action " << name << " has path " << act->get_accel_path() << endl;
-
+
return act;
}
@@ -64,12 +64,12 @@ make_action (Glib::RefPtr<ActionGroup> group, string name, string label)
return act;
}
-bool
+bool
lookup_entry (const ustring accel_path, Gtk::AccelKey& key)
{
GtkAccelKey gkey;
bool known = gtk_accel_map_lookup_entry (accel_path.c_str(), &gkey);
-
+
if (known) {
key = AccelKey (gkey.accel_key, Gdk::ModifierType (gkey.accel_mods));
} else {
@@ -83,9 +83,9 @@ RefPtr<ActionGroup>
copy_actions (const RefPtr<ActionGroup> src)
{
RefPtr<ActionGroup> grp = ActionGroup::create (src->get_name());
-
+
ListHandle<RefPtr<Action> > group_actions = src->get_actions();
-
+
for (ListHandle<RefPtr<Action> >::iterator a = group_actions.begin(); a != group_actions.end(); ++a) {
RefPtr<Action> act = Action::create ((*a)->get_name(), (*a)->property_label());
grp->add (act);
@@ -129,7 +129,7 @@ main (int argc, char* argv[])
uimanager->add_ui_from_file ("mtest.menus");
other_uimanager->add_ui_from_file ("mtest_other.menus");
-
+
// AccelMap::load ("mtest.bindings");
RefPtr<AccelGroup> accels = hidden.get_accel_group();
@@ -142,7 +142,7 @@ main (int argc, char* argv[])
make_action (shared_actions, "Bar", "bar", accels, bind (sigc::ptr_fun (printit), "barshared"), GDK_p, Gdk::CONTROL_MASK);
RefPtr<Action> act = make_action (shared_actions, "Baz", "baz", accels, bind (sigc::ptr_fun (printit), "baz-shared"), GDK_p, Gdk::SHIFT_MASK);
-
+
act->connect_proxy (button);
act->connect_proxy (other_button);
diff --git a/gtk2_ardour/nag.cc b/gtk2_ardour/nag.cc
index c8f6c35c17..7ae1b6e809 100644
--- a/gtk2_ardour/nag.cc
+++ b/gtk2_ardour/nag.cc
@@ -40,13 +40,13 @@ its development with either a one-time donation or subscription. Nothing\n\
will happen if you choose not to do so. However Ardour's continuing development\n\
relies on a stable, sustainable income stream. Thanks for using Ardour!"));
}
-
+
button_box.pack_start (donate_button);
button_box.pack_start (subscribe_button);
button_box.pack_start (existing_button);
button_box.pack_start (next_time_button);
button_box.pack_start (never_again_button);
-
+
get_vbox()->set_spacing (12);
get_vbox()->pack_start (message);
get_vbox()->pack_start (button_box);
@@ -100,7 +100,7 @@ NagScreen::maybe_nag (std::string why)
}
maybe_subscribed = is_subscribed (really_subscribed);
-
+
if (really_subscribed) {
return 0;
}
@@ -114,7 +114,7 @@ NagScreen::mark_never_again ()
Glib::ustring path;
path = Glib::build_filename (user_config_directory().to_string(), ".nevernag");
-
+
ofstream nagfile (path.c_str());
}
@@ -124,7 +124,7 @@ NagScreen::mark_subscriber ()
Glib::ustring path;
path = Glib::build_filename (user_config_directory().to_string(), ".askedaboutsub");
-
+
ofstream subsfile (path.c_str());
}
@@ -134,7 +134,7 @@ NagScreen::mark_affirmed_subscriber ()
Glib::ustring path;
path = Glib::build_filename (user_config_directory().to_string(), ".isubscribe");
-
+
ofstream subsfile (path.c_str());
}
@@ -145,7 +145,7 @@ NagScreen::is_subscribed (bool& really)
really = false;
- /* what we'd really like here is a way to query paypal
+ /* what we'd really like here is a way to query paypal
for someone's subscription status. thats a bit complicated
so for now, just see if they ever told us they were
subscribed. we try to trust our users :)
diff --git a/gtk2_ardour/nag.h b/gtk2_ardour/nag.h
index 5872e28f3b..664cff76fe 100644
--- a/gtk2_ardour/nag.h
+++ b/gtk2_ardour/nag.h
@@ -11,7 +11,7 @@ class NagScreen : public ArdourDialog
{
public:
~NagScreen();
-
+
static NagScreen* maybe_nag (std::string context);
void nag ();
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h
index 37ae91d0cb..f5509c760c 100644
--- a/gtk2_ardour/option_editor.h
+++ b/gtk2_ardour/option_editor.h
@@ -99,13 +99,13 @@ public:
void add_to_page (OptionEditorPage *);
protected:
-
+
Gtk::VBox* _box; ///< constituent box for subclasses to add widgets to
};
/** Base class for components which provide UI to change an option */
class Option : public OptionEditorComponent {
-
+
public:
/** Construct an Option.
* @param i Option id (e.g. "plugins-stop-with-transport")
@@ -124,16 +124,16 @@ public:
set_state_from_config ();
}
}
-
+
virtual void set_state_from_config () = 0;
virtual void add_to_page (OptionEditorPage*) = 0;
std::string id () const {
return _id;
}
-
+
private:
-
+
std::string _id;
std::string _name;
};
@@ -142,15 +142,15 @@ private:
class BoolOption : public Option {
public:
-
+
BoolOption (std::string const &, std::string const &, sigc::slot<bool>, sigc::slot<bool, bool>);
void set_state_from_config ();
void add_to_page (OptionEditorPage*);
-
+
private:
void toggled ();
-
+
sigc::slot<bool> _get; ///< slot to get the configuration variable's value
sigc::slot<bool, bool> _set; ///< slot to set the configuration variable's value
Gtk::CheckButton* _button; ///< UI button
@@ -164,24 +164,24 @@ public:
EntryOption (std::string const &, std::string const &, sigc::slot<std::string>, sigc::slot<bool, std::string>);
void set_state_from_config ();
void add_to_page (OptionEditorPage*);
-
+
private:
void activated ();
-
+
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
Gtk::Label* _label; ///< UI label
Gtk::Entry* _entry; ///< UI entry
};
-
+
/** Component which provides the UI to handle an enumerated option using a GTK CheckButton.
* The template parameter is the enumeration.
*/
template <class T>
class ComboOption : public Option {
-
+
public:
/** Construct an ComboOption.
@@ -211,7 +211,7 @@ public:
while (r < _options.size() && _get () != _options[r]) {
++r;
}
-
+
if (r < _options.size()) {
_combo->set_active (r);
}
@@ -230,7 +230,7 @@ public:
_options.push_back (e);
_combo->append_text (o);
}
-
+
void changed () {
uint32_t const r = _combo->get_active_row_number ();
if (r < _options.size()) {
@@ -239,7 +239,7 @@ public:
}
private:
-
+
sigc::slot<T> _get;
sigc::slot<bool, T> _set;
Gtk::Label* _label;
@@ -288,14 +288,14 @@ public:
_spin = manage (new Gtk::SpinButton);
_spin->set_range (min, max);
_spin->set_increments (step, page);
-
+
_box = manage (new Gtk::HBox);
_box->pack_start (*_spin, true, true);
_box->set_spacing (4);
if (unit.length()) {
_box->pack_start (*manage (new Gtk::Label (unit)), false, false);
}
-
+
_spin->signal_value_changed().connect (sigc::mem_fun (*this, &SpinOption::changed));
}
@@ -308,12 +308,12 @@ public:
{
add_widgets_to_page (p, _label, _box);
}
-
+
void changed ()
{
_set (static_cast<T> (_spin->get_value ()) * _scale);
}
-
+
private:
sigc::slot<T> _get;
sigc::slot<bool, T> _set;
@@ -347,9 +347,9 @@ public:
void add_option (std::string const &, OptionEditorComponent *);
protected:
-
+
ARDOUR::Configuration* _config;
-
+
private:
void parameter_changed (std::string const &);
diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc
index 4437a9d224..4f702f6486 100644
--- a/gtk2_ardour/opts.cc
+++ b/gtk2_ardour/opts.cc
@@ -1,6 +1,6 @@
/*
Copyright (C) 2001 Paul Davis
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -54,8 +54,8 @@ print_help (const char *execname)
<< _(" -c, --name name Use a specific jack client name, default is ardour\n")
<< _(" -d, --disable-plugins Disable all plugins in an existing session\n")
<< _(" -n, --show-splash Show splash screen\n")
- << _(" -m, --menus file Use \"file\" for Ardour menus\n")
- << _(" -N, --new session-name Create a new session from the command line\n")
+ << _(" -m, --menus file Use \"file\" for Ardour menus\n")
+ << _(" -N, --new session-name Create a new session from the command line\n")
<< _(" -O, --no-hw-optimizations Disable h/w specific optimizations\n")
<< _(" -S, --sync Draw the gui synchronously \n")
#ifdef VST_SUPPORT
@@ -115,7 +115,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
switch (c) {
case 0:
break;
-
+
case 'v':
just_version = true;
break;
@@ -127,7 +127,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
case 'b':
show_key_actions = true;
break;
-
+
case 'd':
ARDOUR::Session::set_disable_all_loaded_plugins (true);
break;
@@ -144,7 +144,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
//undocumented OS X finder -psn_XXXXX argument
finder_invoked_ardour = true;
break;
-
+
case 'S':
// ; just pass this through to gtk it will figure it out
break;
@@ -157,7 +157,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
case 'O':
try_hw_optimization = false;
break;
-
+
case 'V':
#ifdef VST_SUPPORT
use_vst = false;
diff --git a/gtk2_ardour/opts.h b/gtk2_ardour/opts.h
index 71cd687b8b..3b3f08816f 100644
--- a/gtk2_ardour/opts.h
+++ b/gtk2_ardour/opts.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 2001 Paul Davis
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
diff --git a/gtk2_ardour/panner.cc b/gtk2_ardour/panner.cc
index 80b401acfe..8c5524b414 100644
--- a/gtk2_ardour/panner.cc
+++ b/gtk2_ardour/panner.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@ PannerBar::expose (GdkEventExpose* ev)
GdkPoint points[3];
// left
-
+
points[0].x = 0;
points[0].y = 0;
points[1].x = triangle_size;
points[1].y = 0;
-
+
points[2].x = 0;
points[2].y = triangle_size;
@@ -71,11 +71,11 @@ PannerBar::expose (GdkEventExpose* ev)
points[1].x = (darea.get_width()/2 + triangle_size);
points[1].y = 0;
-
+
points[2].x = darea.get_width()/2;
points[2].y = triangle_size - 1;
- gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);
+ gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);
// right
@@ -84,7 +84,7 @@ PannerBar::expose (GdkEventExpose* ev)
points[1].x = darea.get_width();
points[1].y = 0;
-
+
points[2].x = darea.get_width();
points[2].y = triangle_size;
@@ -198,7 +198,7 @@ PannerBar::get_label (int& x)
if (ARDOUR::Panner::equivalent (value, 0.5)) {
/* centre: only display text during a drag */
-
+
if (!grabbed) {
return "";
}
@@ -206,19 +206,19 @@ PannerBar::get_label (int& x)
} else {
/* non-centre: display text on the side of the panner which has more space */
-
+
Glib::RefPtr<Pango::Context> p = get_pango_context ();
Glib::RefPtr<Pango::Layout> l = Pango::Layout::create (p);
l->set_text (value_as_string (value));
Pango::Rectangle const ext = l->get_ink_extents ();
-
+
if (value < 0.5) {
x = (darea.get_width() - 4 - ext.get_width() / Pango::SCALE);
} else {
x = 4;
}
}
-
+
return value_as_string (value);
}
diff --git a/gtk2_ardour/panner.h b/gtk2_ardour/panner.h
index a553e97f30..61d63dd762 100644
--- a/gtk2_ardour/panner.h
+++ b/gtk2_ardour/panner.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc
index b6c601cdef..7917604b62 100644
--- a/gtk2_ardour/panner2d.cc
+++ b/gtk2_ardour/panner2d.cc
@@ -50,7 +50,7 @@ Panner2d::Target::Target (float xa, float ya, const char *txt)
}
Panner2d::Target::~Target ()
-{
+{
if (text) {
free (text);
}
@@ -74,7 +74,7 @@ Panner2d::Panner2d (boost::shared_ptr<Panner> p, int32_t h)
panner->StateChanged.connect (mem_fun(*this, &Panner2d::handle_state_change));
panner->Changed.connect (mem_fun(*this, &Panner2d::handle_position_change));
-
+
drag_target = 0;
set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
}
@@ -96,7 +96,7 @@ Panner2d::reset (uint32_t n_inputs)
while (pucks.size() < n_inputs) {
add_puck ("", 0.0, 0.0);
}
-
+
while (pucks.size() > n_inputs) {
pucks.erase (pucks.begin());
}
@@ -108,14 +108,14 @@ Panner2d::reset (uint32_t n_inputs)
switch (n_inputs) {
case 0:
break;
-
+
case 1:
pucks[0]->set_text ("");
pucks[0]->x.set_value (0.0);
pucks[0]->y.set_value (0.5);
pucks[0]->visible = true;
break;
-
+
case 2:
pucks[0]->set_text ("R");
pucks[0]->visible = true;
@@ -126,13 +126,13 @@ Panner2d::reset (uint32_t n_inputs)
}
pucks[1]->visible = true;
break;
-
+
default:
for (uint32_t i = 0; i < n_inputs; ++i) {
char buf[64];
snprintf (buf, sizeof (buf), "%" PRIu32, i);
pucks[i]->set_text (buf);
-
+
if (existing_pucks < i) {
float x, y;
panner->streampanner (i).get_position (x, y);
@@ -144,13 +144,13 @@ Panner2d::reset (uint32_t n_inputs)
}
break;
}
-
+
/* add all outputs */
-
+
while (targets.size() < panner->nouts()) {
add_target (0.0, 0.0);
}
-
+
while (targets.size() > panner->nouts()) {
targets.erase (targets.begin());
}
@@ -168,7 +168,7 @@ Panner2d::reset (uint32_t n_inputs)
targets[n]->y.set_value (panner->output(n).y);
targets[n]->visible = true;
}
-
+
allow_x_motion (true);
allow_y_motion (true);
allow_target_motion (true);
@@ -208,7 +208,7 @@ Panner2d::add_puck (const char* text, float x, float y)
pucks.insert (newpair);
puck->visible = true;
-
+
return 0;
}
@@ -257,7 +257,7 @@ Panner2d::remove_target (int which)
targets.erase (i);
queue_draw ();
}
-}
+}
void
Panner2d::handle_state_change ()
@@ -302,10 +302,10 @@ Panner2d::move_target (int which, float x, float y)
target = i->second;
target->x.set_value (x);
target->y.set_value (y);
-
+
queue_draw ();
}
-}
+}
void
Panner2d::move_puck (int which, float x, float y)
@@ -317,10 +317,10 @@ Panner2d::move_puck (int which, float x, float y)
target = i->second;
target->x.set_value (x);
target->y.set_value (y);
-
+
queue_draw ();
}
-}
+}
void
Panner2d::show_puck (int which)
@@ -422,9 +422,9 @@ Panner2d::find_closest_object (gdouble x, gdouble y, int& which, bool& is_puck)
which = pwhich;
}
}
-
+
return closest;
-}
+}
bool
Panner2d::on_motion_notify_event (GdkEventMotion *ev)
@@ -497,28 +497,28 @@ Panner2d::on_expose_event (GdkEventExpose *event)
if (puck->visible) {
/* redraw puck */
-
+
fx = min (puck->x.get_value(), 1.0);
fx = max (fx, -1.0f);
x = (gint) floor (width * fx - 4);
-
+
fy = min (puck->y.get_value(), 1.0);
fy = max (fy, -1.0f);
y = (gint) floor (height * fy - 4);
-
+
cairo_arc (cr, x, y, arc_radius, 0, 2.0 * M_PI);
cairo_set_source_rgb (cr, 0.8, 0.2, 0.1);
cairo_close_path (cr);
cairo_fill (cr);
/* arrow */
-
+
if (height > 100.0f) {
float endx, endy;
endx = x;
endy = y;
-
+
cairo_save (cr);
cairo_translate (cr, x, y);
cairo_rotate (cr, puck->azimuth.get_value());
@@ -533,9 +533,9 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_move_to (cr, 0.0, 0.0);
cairo_line_to (cr, endx, endy);
cairo_stroke (cr);
-
+
/* arrow head */
-
+
cairo_move_to (cr, endx - 10.0, endy + 10.0);
cairo_line_to (cr, endx, endy);
cairo_line_to (cr, endx - 10.0, endy - 10.0);
@@ -551,7 +551,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
}
/* redraw any visible targets */
-
+
int n = 0;
for (Targets::iterator i = targets.begin(); i != targets.end(); ++i) {
@@ -560,11 +560,11 @@ Panner2d::on_expose_event (GdkEventExpose *event)
++n;
if (target->visible) {
-
+
fx = min (target->x.get_value(), 1.0);
fx = max (fx, -1.0f);
x = (gint) floor (width * fx);
-
+
fy = min (target->y.get_value(), 1.0);
fy = max (fy, -1.0f);
y = (gint) floor (height * fy);
@@ -608,7 +608,7 @@ Panner2d::on_button_press_event (GdkEventButton *ev)
default:
break;
}
-
+
return FALSE;
}
@@ -641,7 +641,7 @@ Panner2d::on_button_release_event (GdkEventButton *ev)
} else {
ret = handle_motion (x, y, state);
}
-
+
drag_target = 0;
break;
@@ -656,7 +656,7 @@ Panner2d::on_button_release_event (GdkEventButton *ev)
} else {
ret = handle_motion (x, y, state);
}
-
+
drag_target = 0;
break;
@@ -699,7 +699,7 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
need_move = true;
}
}
-
+
if (allow_y || drag_is_puck) {
float new_y;
y = min (evy, height - 1);
@@ -710,22 +710,22 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
need_move = true;
}
}
-
+
if (need_move) {
-
+
if (drag_is_puck) {
-
+
panner->streampanner(drag_index).set_position (
drag_target->x.get_value(), drag_target->y.get_value(), false);
-
+
} else {
-
+
TargetMoved (drag_index);
}
queue_draw ();
}
-
+
} else if ((state & GDK_BUTTON2_MASK) && !(state & GDK_BUTTON1_MASK)) {
@@ -735,7 +735,7 @@ Panner2d::handle_motion (gint evx, gint evy, GdkModifierType state)
int xdelta = drag_x - evx;
int ydelta = drag_x - evy;
-
+
drag_target->azimuth.set_value (drag_target->azimuth.get_value() + (2 * M_PI) * ((float)ydelta)/height * ((float) -xdelta)/height);
queue_draw ();
}
@@ -777,7 +777,7 @@ Panner2dWindow::Panner2dWindow (boost::shared_ptr<Panner> p, int32_t h, uint32_t
set_title (_("Panner"));
widget.set_size_request (h, h);
-
+
button_box.set_spacing (6);
button_box.pack_start (reset_button, false, false);
button_box.pack_start (bypass_button, false, false);
@@ -801,7 +801,7 @@ Panner2dWindow::Panner2dWindow (boost::shared_ptr<Panner> p, int32_t h, uint32_t
hpacker.pack_start (widget, false, false);
hpacker.pack_start (left_side, false, false);
hpacker.show ();
-
+
add (hpacker);
reset (inputs);
widget.show ();
diff --git a/gtk2_ardour/panner2d.h b/gtk2_ardour/panner2d.h
index e70f9faea5..91f4851746 100644
--- a/gtk2_ardour/panner2d.h
+++ b/gtk2_ardour/panner2d.h
@@ -52,7 +52,7 @@ class Panner2d : public Gtk::DrawingArea
public:
Panner2d (boost::shared_ptr<ARDOUR::Panner>, int32_t height);
~Panner2d ();
-
+
void allow_x_motion(bool);
void allow_y_motion(bool);
void allow_target_motion (bool);
@@ -73,7 +73,7 @@ class Panner2d : public Gtk::DrawingArea
Gtk::Adjustment& azimuth (uint32_t which);
boost::shared_ptr<ARDOUR::Panner> get_panner() const { return panner; }
-
+
sigc::signal<void,int> PuckMoved;
sigc::signal<void,int> TargetMoved;
@@ -117,7 +117,7 @@ class Panner2d : public Gtk::DrawingArea
int height;
bool bypassflag;
-
+
gint compute_x (float);
gint compute_y (float);
@@ -134,7 +134,7 @@ class Panner2dWindow : public Gtk::Window
{
public:
Panner2dWindow (boost::shared_ptr<ARDOUR::Panner>, int32_t height, uint32_t inputs);
-
+
void reset (uint32_t n_inputs);
private:
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index cb1ee82508..ca10dd4300 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -131,18 +131,18 @@ PannerUI::PannerUI (Session& s)
set_width(Narrow);
}
-
+
void
PannerUI::set_panner (boost::shared_ptr<Panner> p)
{
connections.clear ();
-
+
delete pan_astyle_menu;
pan_astyle_menu = 0;
delete pan_astate_menu;
pan_astate_menu = 0;
-
+
_panner = p;
delete panner;
@@ -151,7 +151,7 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p)
if (!_panner) {
return;
}
-
+
connections.push_back (_panner->Changed.connect (mem_fun(*this, &PannerUI::panner_changed)));
connections.push_back (_panner->LinkStateChanged.connect (mem_fun(*this, &PannerUI::update_pan_linkage)));
connections.push_back (_panner->StateChanged.connect (mem_fun(*this, &PannerUI::update_pan_state)));
@@ -163,7 +163,7 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p)
update_pan_linkage ();
pan_automation_state_changed ();
-#if WHERE_DOES_THIS_LIVE
+#if WHERE_DOES_THIS_LIVE
pan_bar_packer.show();
panning_viewport.show();
panning_up.show();
@@ -224,8 +224,8 @@ PannerUI::build_astyle_menu ()
}
boost::shared_ptr<PBD::Controllable>
-PannerUI::get_controllable()
-{
+PannerUI::get_controllable()
+{
return pan_bars[0]->get_controllable();
}
@@ -261,12 +261,12 @@ void
PannerUI::update_pan_linkage ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &PannerUI::update_pan_linkage));
-
+
bool x = _panner->linked();
bool bx = panning_link_button.get_active();
if (x != bx) {
-
+
ignore_toggle = true;
panning_link_button.set_active (x);
ignore_toggle = false;
@@ -305,7 +305,7 @@ PannerUI::~PannerUI ()
for (vector<Adjustment*>::iterator i = pan_adjustments.begin(); i != pan_adjustments.end(); ++i) {
delete (*i);
}
-
+
for (vector<PannerBar*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
delete (*i);
}
@@ -408,12 +408,12 @@ PannerUI::setup_pan ()
_panner->pan_control( asz )->Changed.connect (bind (mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz));
-
+
bc->set_name ("PanSlider");
bc->set_shadow_type (Gtk::SHADOW_NONE);
-
+
boost::shared_ptr<AutomationControl> ac = _panner->pan_control (asz);
-
+
if (asz) {
bc->StartGesture.connect (mem_fun (*ac, &AutomationControl::start_touch));
bc->StopGesture.connect (mem_fun (*ac, &AutomationControl::stop_touch));
@@ -449,11 +449,11 @@ PannerUI::setup_pan ()
panner = new Panner2d (_panner, 61);
panner->set_name ("MixerPanZone");
panner->show ();
-
+
panner->signal_button_press_event().connect
(bind (mem_fun(*this, &PannerUI::pan_button_event), (uint32_t) 0), false);
}
-
+
update_pan_sensitive ();
panner->reset (nouts);
if (big_window) {
@@ -508,7 +508,7 @@ PannerUI::build_pan_menu (uint32_t which)
items.clear ();
items.push_back (CheckMenuElem (_("Mute")));
-
+
/* set state first, connect second */
(dynamic_cast<CheckMenuItem*> (&items.back()))->set_active (_panner->streampanner(which).muted());
@@ -563,7 +563,7 @@ PannerUI::effective_pan_display ()
}
switch (_panner->nouts()) {
- case 0:
+ case 0:
case 1:
/* relax */
break;
@@ -628,9 +628,9 @@ PannerUI::pan_adjustment_changed (uint32_t which)
xpos = _panner->pan_control( which )->get_value();
/* add a kinda-sorta detent for the middle */
-
+
if (val != 0.5 && Panner::equivalent (val, 0.5)) {
- /* this is going to be reentrant, so just
+ /* this is going to be reentrant, so just
return after it.
*/
@@ -639,11 +639,11 @@ PannerUI::pan_adjustment_changed (uint32_t which)
in_pan_update = false;
return;
}
-
+
if (!Panner::equivalent (val, xpos)) {
_panner->streampanner(which).set_position (val);
- /* XXX
+ /* XXX
the panner objects have no access to the session,
so do this here. ick.
*/
@@ -656,7 +656,7 @@ void
PannerUI::pan_value_changed (uint32_t which)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &PannerUI::pan_value_changed), which));
-
+
if (_panner->npanners() > 1 && which < _panner->npanners()) {
float xpos;
float val = pan_adjustments[which]->get_value ();
@@ -669,7 +669,7 @@ PannerUI::pan_value_changed (uint32_t which)
in_pan_update = false;
}
}
-}
+}
void
PannerUI::update_pan_bars (bool only_if_aplay)
@@ -688,7 +688,7 @@ PannerUI::update_pan_bars (bool only_if_aplay)
if (only_if_aplay) {
boost::shared_ptr<AutomationList> alist (_panner->streampanner(n).pan_control()->alist());
-
+
if (!alist->automation_playback()) {
continue;
}
@@ -696,7 +696,7 @@ PannerUI::update_pan_bars (bool only_if_aplay)
_panner->streampanner(n).get_effective_position (xpos);
val = (*i)->get_value ();
-
+
if (!Panner::equivalent (val, xpos)) {
(*i)->set_value (xpos);
}
@@ -706,7 +706,7 @@ PannerUI::update_pan_bars (bool only_if_aplay)
}
void
-PannerUI::update_pan_sensitive ()
+PannerUI::update_pan_sensitive ()
{
bool sensitive = !(_panner->automation_state() & Play);
@@ -777,7 +777,7 @@ void
PannerUI::pan_automation_style_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &PannerUI::pan_automation_style_changed));
-
+
switch (_width) {
case Wide:
pan_automation_style_button.set_label (astyle_string(_panner->automation_style()));
@@ -792,7 +792,7 @@ void
PannerUI::pan_automation_state_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &PannerUI::pan_automation_state_changed));
-
+
bool x;
switch (_width) {
diff --git a/gtk2_ardour/panner_ui.h b/gtk2_ardour/panner_ui.h
index 119dda208c..ce4781fe11 100644
--- a/gtk2_ardour/panner_ui.h
+++ b/gtk2_ardour/panner_ui.h
@@ -128,7 +128,7 @@ class PannerUI : public Gtk::HBox
void build_astyle_menu ();
void panner_changed ();
-
+
void hide_pans ();
void panner_moved (int which);
diff --git a/gtk2_ardour/piano_roll_header.cc b/gtk2_ardour/piano_roll_header.cc
index c6784bf853..cfdf2bcd67 100644
--- a/gtk2_ardour/piano_roll_header.cc
+++ b/gtk2_ardour/piano_roll_header.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -60,8 +60,8 @@ PianoRollHeader::Color::set(const PianoRollHeader::Color& c)
b = c.b;
}
-PianoRollHeader::PianoRollHeader(MidiStreamView& v)
- : _view(v)
+PianoRollHeader::PianoRollHeader(MidiStreamView& v)
+ : _view(v)
, _highlighted_note(no_note)
, _clicked_note(no_note)
, _dragging(false)
@@ -90,7 +90,7 @@ create_path(Cairo::RefPtr<Cairo::Context> cr, double x[], double y[], int start,
}
}
-inline void
+inline void
render_rect(Cairo::RefPtr<Cairo::Context> cr, int /*note*/, double x[], double y[],
PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow)
{
@@ -441,10 +441,10 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev)
std::stringstream s;
double y = floor(_view.note_to_y(i)) - 0.5f;
double note_height = floor(_view.note_to_y(i - 1)) - y;
-
+
int cn = i / 12;
s << "C" << cn;
-
+
//cr->get_text_extents(s.str(), te);
cr->set_source_rgb(0.30f, 0.30f, 0.30f);
cr->move_to(2.0f, y + note_height - 1.0f - (note_height - font_size) / 2.0f);
@@ -501,7 +501,7 @@ PianoRollHeader::on_button_press_event (GdkEventButton* ev)
_active_notes[note] = true;
_clicked_note = note;
send_note_on(note);
-
+
invalidate_note_range(note, note);
} else {
_clicked_note = no_note;
@@ -524,7 +524,7 @@ PianoRollHeader::on_button_release_event (GdkEventButton* ev)
_active_notes[note] = false;
_clicked_note = no_note;
send_note_off(note);
-
+
invalidate_note_range(note, note);
}
}
@@ -545,7 +545,7 @@ bool
PianoRollHeader::on_leave_notify_event (GdkEventCrossing*)
{
invalidate_note_range(_highlighted_note, _highlighted_note);
-
+
if (_clicked_note != no_note) {
_active_notes[_clicked_note] = false;
send_note_off(_clicked_note);
@@ -639,7 +639,7 @@ void
PianoRollHeader::on_size_allocate(Gtk::Allocation& a)
{
DrawingArea::on_size_allocate(a);
-
+
_black_note_width = floor(0.7 * get_width()) + 0.5f;
}
diff --git a/gtk2_ardour/piano_roll_header.h b/gtk2_ardour/piano_roll_header.h
index f005538d4a..7369303e5d 100644
--- a/gtk2_ardour/piano_roll_header.h
+++ b/gtk2_ardour/piano_roll_header.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ public:
Color();
Color(double _r, double _g, double _b);
inline void set(const Color& c);
-
+
double r;
double g;
double b;
@@ -97,7 +97,7 @@ private:
uint8_t _clicked_note;
double _grab_y;
bool _dragging;
-
+
double _note_height;
double _black_note_width;
};
diff --git a/gtk2_ardour/playlist_selection.h b/gtk2_ardour/playlist_selection.h
index a29be49793..4fcf1c64c8 100644
--- a/gtk2_ardour/playlist_selection.h
+++ b/gtk2_ardour/playlist_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc
index dd62240e44..b4f884a0a7 100644
--- a/gtk2_ardour/playlist_selector.cc
+++ b/gtk2_ardour/playlist_selector.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ PlaylistSelector::PlaylistSelector ()
: ArdourDialog ("playlist selector")
{
rui = 0;
-
+
set_position (WIN_POS_MOUSE);
set_name ("PlaylistSelectorWindow");
set_modal(true);
@@ -116,7 +116,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
select_connection.disconnect ();
model->clear ();
-
+
session->foreach_playlist (this, &PlaylistSelector::add_playlist_to_map);
this_ds = rui->get_diskstream();
@@ -126,7 +126,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
others[columns.text] = _("Other tracks");
boost::shared_ptr<Playlist> proxy = others[columns.playlist];
proxy.reset ();
-
+
for (DSPL_Map::iterator x = dspl_map.begin(); x != dspl_map.end(); ++x) {
boost::shared_ptr<Diskstream> ds = session->diskstream_by_id (x->first);
@@ -144,7 +144,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
} else {
nodename = ds->name().c_str();
}
-
+
TreeModel::Row row;
TreeModel::Row* selected_row = 0;
TreePath this_path;
@@ -162,9 +162,9 @@ PlaylistSelector::show_for (RouteUI* ruix)
}
/* Now insert all the playlists for this diskstream/track in a subtree */
-
+
list<boost::shared_ptr<Playlist> > *pls = x->second;
-
+
for (list<boost::shared_ptr<Playlist> >::iterator p = pls->begin(); p != pls->end(); ++p) {
TreeModel::Row child_row;
@@ -175,9 +175,9 @@ PlaylistSelector::show_for (RouteUI* ruix)
if (*p == this_ds->playlist()) {
selected_row = &child_row;
- }
+ }
}
-
+
if (selected_row != 0) {
tree.get_selection()->select (*selected_row);
}
@@ -224,7 +224,7 @@ PlaylistSelector::add_playlist_to_map (boost::shared_ptr<Playlist> pl)
if (pl->frozen()) {
return;
}
-
+
if ((apl = boost::dynamic_pointer_cast<AudioPlaylist> (pl)) == 0) {
return;
}
@@ -234,7 +234,7 @@ PlaylistSelector::add_playlist_to_map (boost::shared_ptr<Playlist> pl)
if ((x = dspl_map.find (apl->get_orig_diskstream_id())) == dspl_map.end()) {
pair<PBD::ID,list<boost::shared_ptr<Playlist> >*> newp (apl->get_orig_diskstream_id(), new list<boost::shared_ptr<Playlist> >);
-
+
x = dspl_map.insert (dspl_map.end(), newp);
}
@@ -273,24 +273,24 @@ PlaylistSelector::selection_changed ()
}
if ((playlist = ((*iter)[columns.playlist])) != 0) {
-
+
boost::shared_ptr<AudioTrack> at;
boost::shared_ptr<AudioPlaylist> apl;
-
+
if ((at = rui->audio_track()) == 0) {
/* eh? */
return;
}
-
+
if ((apl = boost::dynamic_pointer_cast<AudioPlaylist> (playlist)) == 0) {
/* eh? */
return;
}
-
+
at->diskstream()->use_playlist (apl);
hide ();
}
}
-
+
diff --git a/gtk2_ardour/playlist_selector.h b/gtk2_ardour/playlist_selector.h
index 757e7fc523..828607284f 100644
--- a/gtk2_ardour/playlist_selector.h
+++ b/gtk2_ardour/playlist_selector.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ namespace ARDOUR {
class RouteUI;
-class PlaylistSelector : public ArdourDialog
+class PlaylistSelector : public ArdourDialog
{
public:
PlaylistSelector ();
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc
index dd5e024ddf..ae8d4946fb 100644
--- a/gtk2_ardour/plugin_eq_gui.cc
+++ b/gtk2_ardour/plugin_eq_gui.cc
@@ -52,7 +52,7 @@ PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
set_buffer_size(4096, 16384);
//set_buffer_size(4096, 4096);
- _log_coeff = (1.0 - 2.0 * (1000.0/(_samplerate/2.0))) / powf(1000.0/(_samplerate/2.0), 2.0);
+ _log_coeff = (1.0 - 2.0 * (1000.0/(_samplerate/2.0))) / powf(1000.0/(_samplerate/2.0), 2.0);
_log_max = log10f(1 + _log_coeff);
@@ -66,7 +66,7 @@ PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
_analysis_area->signal_expose_event().connect( sigc::mem_fun (*this, &PluginEqGui::expose_analysis_area));
_analysis_area->signal_size_allocate().connect( sigc::mem_fun (*this, &PluginEqGui::resize_analysis_area));
-
+
// dB selection
dBScaleModel = Gtk::ListStore::create(dBColumns);
@@ -96,12 +96,12 @@ PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
dBScaleCombo -> signal_changed().connect( sigc::mem_fun(*this, &PluginEqGui::change_dB_scale) );
- Gtk::Label *dBComboLabel = new Gtk::Label("dB scale");
+ Gtk::Label *dBComboLabel = new Gtk::Label("dB scale");
Gtk::HBox *dBSelectBin = new Gtk::HBox(false, 5);
dBSelectBin->add( *manage(dBComboLabel));
dBSelectBin->add( *manage(dBScaleCombo));
-
+
// Phase checkbutton
_phase_button = new Gtk::CheckButton("Show phase");
_phase_button->set_active(true);
@@ -128,7 +128,7 @@ PluginEqGui::~PluginEqGui()
delete _signal_output_fft;
_plugin->deactivate();
-
+
// all gui objects are *manage'd by the inherited Table object
}
@@ -189,7 +189,7 @@ PluginEqGui::change_dB_scale()
_min_dB = row[dBColumns.dBMin];
_max_dB = row[dBColumns.dBMax];
_step_dB = row[dBColumns.dBStep];
-
+
redraw_scales();
}
@@ -204,7 +204,7 @@ PluginEqGui::redraw_scales()
_analysis_scale_surface = 0;
}
- _analysis_area->queue_draw();
+ _analysis_area->queue_draw();
// TODO: Add graph legend!
}
@@ -221,9 +221,9 @@ PluginEqGui::set_buffer_size(uint32_t size, uint32_t signal_size)
FFT *tmp3 = _signal_output_fft;
try {
- _impulse_fft = new FFT(size);
- _signal_input_fft = new FFT(signal_size);
- _signal_output_fft = new FFT(signal_size);
+ _impulse_fft = new FFT(size);
+ _signal_input_fft = new FFT(signal_size);
+ _signal_output_fft = new FFT(signal_size);
} catch( ... ) {
// Don't care about lost memory, we're screwed anyhow
_impulse_fft = tmp1;
@@ -235,7 +235,7 @@ PluginEqGui::set_buffer_size(uint32_t size, uint32_t signal_size)
delete tmp1;
delete tmp2;
delete tmp3;
-
+
_buffer_size = size;
_signal_buffer_size = signal_size;
@@ -254,7 +254,7 @@ PluginEqGui::set_buffer_size(uint32_t size, uint32_t signal_size)
_collect_bufferset.set_count(chanCount);
}
-void
+void
PluginEqGui::resize_analysis_area(Gtk::Allocation& size)
{
_analysis_width = (float)size.get_width();
@@ -289,7 +289,7 @@ PluginEqGui::signal_collect_callback(ARDOUR::BufferSet *in, ARDOUR::BufferSet *o
for (uint32_t i = 0; i < _plugin_insert->input_streams().n_audio(); ++i) {
_signal_input_fft ->analyze(in ->get_audio(i).data(), FFT::HANN);
}
-
+
for (uint32_t i = 0; i < _plugin_insert->output_streams().n_audio(); ++i) {
_signal_output_fft->analyze(out->get_audio(i).data(), FFT::HANN);
}
@@ -300,7 +300,7 @@ PluginEqGui::signal_collect_callback(ARDOUR::BufferSet *in, ARDOUR::BufferSet *o
_signal_analysis_running = false;
// This signals calls expose_analysis_area()
- _analysis_area->queue_draw();
+ _analysis_area->queue_draw();
}
void
@@ -326,7 +326,7 @@ PluginEqGui::run_impulse_analysis()
// Gather all output, taking latency into account.
_impulse_fft->reset();
-
+
// Silence collect buffers to copy data to, can't use silence() because consecutive calls won't work
for (uint32_t i = 0; i < outputs; ++i) {
ARDOUR::AudioBuffer &buf = _collect_bufferset.get_audio(i);
@@ -361,7 +361,7 @@ PluginEqGui::run_impulse_analysis()
//std::cerr << (++C) << ": copying " << length << " frames to _collect_bufferset.get_audio(i)+" << target_offset << " from bufferset at offset " << f << std::endl;
for (uint32_t i = 0; i < outputs; ++i) {
memcpy(_collect_bufferset.get_audio(i).data(target_offset),
- _bufferset.get_audio(i).data() + f,
+ _bufferset.get_audio(i).data() + f,
length * sizeof(float));
}
@@ -394,7 +394,7 @@ PluginEqGui::run_impulse_analysis()
_impulse_fft->calculate();
// This signals calls expose_analysis_area()
- _analysis_area->queue_draw();
+ _analysis_area->queue_draw();
}
bool
@@ -409,8 +409,8 @@ void
PluginEqGui::draw_analysis_scales(cairo_t *ref_cr)
{
// TODO: check whether we need rounding
- _analysis_scale_surface = cairo_surface_create_similar(cairo_get_target(ref_cr),
- CAIRO_CONTENT_COLOR,
+ _analysis_scale_surface = cairo_surface_create_similar(cairo_get_target(ref_cr),
+ CAIRO_CONTENT_COLOR,
_analysis_width,
_analysis_height);
@@ -425,9 +425,9 @@ PluginEqGui::draw_analysis_scales(cairo_t *ref_cr)
if (_phase_button->get_active()) {
draw_scales_phase(_analysis_area, cr);
}
-
+
cairo_destroy(cr);
-
+
}
void
@@ -440,7 +440,7 @@ PluginEqGui::redraw_analysis_area()
if (_analysis_scale_surface == 0) {
draw_analysis_scales(cr);
}
-
+
cairo_copy_page(cr);
@@ -462,7 +462,7 @@ PluginEqGui::redraw_analysis_area()
#define PHASE_PROPORTION 0.5
-void
+void
PluginEqGui::draw_scales_phase(Gtk::Widget */*w*/, cairo_t *cr)
{
float y;
@@ -485,16 +485,16 @@ PluginEqGui::draw_scales_phase(Gtk::Widget */*w*/, cairo_t *cr)
cairo_text_extents(cr, buf, &t_ext);
cairo_move_to(cr, _analysis_width - t_ext.width - t_ext.x_bearing - 2.0, y - extents.descent);
cairo_show_text(cr, buf);
-
+
if (i == 0)
continue;
-
+
cairo_set_source_rgba(cr, .8, .9, 0.2, 0.6/(float)i);
cairo_move_to(cr, 0.0, y);
cairo_line_to(cr, _analysis_width, y);
-
+
y = _analysis_height/2.0 + (float)i*(_analysis_height/8.0)*PHASE_PROPORTION;
// label
@@ -514,7 +514,7 @@ PluginEqGui::draw_scales_phase(Gtk::Widget */*w*/, cairo_t *cr)
}
}
-void
+void
PluginEqGui::plot_impulse_phase(Gtk::Widget *w, cairo_t *cr)
{
float x,y;
@@ -533,7 +533,7 @@ PluginEqGui::plot_impulse_phase(Gtk::Widget *w, cairo_t *cr)
x *= _analysis_width;
y = _analysis_height/2.0 - (_impulse_fft->phase_at_bin(i)/M_PI)*(_analysis_height/2.0)*PHASE_PROPORTION;
-
+
if ( i == 0 ) {
cairo_move_to(cr, x, y);
@@ -548,8 +548,8 @@ PluginEqGui::plot_impulse_phase(Gtk::Widget *w, cairo_t *cr)
avgY = 0;
avgNum = 0;
-
- }
+
+ }
prevX = rint(x);
avgY += y;
@@ -564,7 +564,7 @@ void
PluginEqGui::draw_scales_power(Gtk::Widget */*w*/, cairo_t *cr)
{
static float scales[] = { 30.0, 70.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 5000.0, 10000.0, 15000.0, 20000.0, -1.0 };
-
+
float divisor = _samplerate / 2.0 / _impulse_fft->bins();
float x;
@@ -634,8 +634,8 @@ PluginEqGui::draw_scales_power(Gtk::Widget */*w*/, cairo_t *cr)
}
}
-
-
+
+
for (float dB = - _step_dB; dB > _min_dB; dB -= _step_dB ) {
snprintf(buf, 256, "%0.0f", dB );
@@ -663,7 +663,7 @@ power_to_dB(float a)
return 10.0 * log10f(a);
}
-void
+void
PluginEqGui::plot_impulse_amplitude(Gtk::Widget *w, cairo_t *cr)
{
float x,y;
@@ -701,7 +701,7 @@ PluginEqGui::plot_impulse_amplitude(Gtk::Widget *w, cairo_t *cr)
avgY = 0;
avgNum = 0;
-
+
}
prevX = rint(x);
@@ -735,7 +735,7 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
float power_out = power_to_dB(_signal_output_fft->power_at_bin(i));
float power_in = power_to_dB(_signal_input_fft ->power_at_bin(i));
float power = power_out - power_in;
-
+
// for SaBer
/*
double p = 10.0 * log10( 1.0 + (double)_signal_output_fft->power_at_bin(i) - (double)
@@ -775,7 +775,7 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
avgY = 0;
avgNum = 0;
-
+
}
prevX = rint(x);
@@ -785,5 +785,5 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
cairo_stroke(cr);
-
+
}
diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h
index 6b17735250..462cae7aa8 100644
--- a/gtk2_ardour/plugin_eq_gui.h
+++ b/gtk2_ardour/plugin_eq_gui.h
@@ -37,8 +37,8 @@ class PluginEqGui : public Gtk::Table
public:
PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert>);
~PluginEqGui();
-
-
+
+
private:
// Setup
@@ -92,7 +92,7 @@ class PluginEqGui : public Gtk::Table
nframes_t _buffer_size;
nframes_t _signal_buffer_size;
- // buffers
+ // buffers
ARDOUR::BufferSet _bufferset;
ARDOUR::BufferSet _collect_bufferset;
diff --git a/gtk2_ardour/plugin_interest.h b/gtk2_ardour/plugin_interest.h
index 9f6b293325..047fe708c0 100644
--- a/gtk2_ardour/plugin_interest.h
+++ b/gtk2_ardour/plugin_interest.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index 7ebe778ecb..50176d8d07 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -152,7 +152,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
table->attach (*filter_box, 0, 7, 5, 6, FILL|EXPAND, FILL, 5, 5);
- table->attach(*btn_add, 1, 2, 6, 7, FILL, FILL, 5, 5);
+ table->attach(*btn_add, 1, 2, 6, 7, FILL, FILL, 5, 5);
table->attach(*btn_remove, 3, 4, 6, 7, FILL, FILL, 5, 5);
table->attach(*btn_update, 5, 6, 6, 7, FILL, FILL, 5, 5);
@@ -172,7 +172,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
plugin_display.signal_button_press_event().connect_notify (mem_fun(*this, &PluginSelector::row_clicked));
plugin_display.get_selection()->signal_changed().connect (mem_fun(*this, &PluginSelector::display_selection_changed));
plugin_display.grab_focus();
-
+
btn_update->signal_clicked().connect (mem_fun(*this, &PluginSelector::btn_update_clicked));
btn_add->signal_clicked().connect(mem_fun(*this, &PluginSelector::btn_add_clicked));
btn_remove->signal_clicked().connect(mem_fun(*this, &PluginSelector::btn_remove_clicked));
@@ -192,7 +192,7 @@ void
PluginSelector::set_session (Session* s)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginSelector::set_session), s));
-
+
session = s;
if (session) {
@@ -211,7 +211,7 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
}
if (!filterstr.empty()) {
-
+
if (mode == _("Name contains")) {
compstr = info->name;
} else if (mode == _("Category contains")) {
@@ -237,7 +237,7 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
compstr = info->creator;
} else if (mode == _("Library contains")) {
compstr = info->path;
- }
+ }
if (compstr.empty()) {
return false;
@@ -260,7 +260,7 @@ PluginSelector::setup_filter_string (string& filterstr)
{
filterstr = filter_entry.get_text ();
transform (filterstr.begin(), filterstr.end(), filterstr.begin(), ::toupper);
-}
+}
void
PluginSelector::refill ()
@@ -310,15 +310,15 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte
newrow[plugin_columns.audio_ins] = buf;
snprintf (buf, sizeof(buf), "%d", (*i)->n_inputs.n_midi());
newrow[plugin_columns.midi_ins] = buf;
-
- snprintf (buf, sizeof(buf), "%d", (*i)->n_outputs.n_audio());
+
+ snprintf (buf, sizeof(buf), "%d", (*i)->n_outputs.n_audio());
newrow[plugin_columns.audio_outs] = buf;
- snprintf (buf, sizeof(buf), "%d", (*i)->n_outputs.n_midi());
+ snprintf (buf, sizeof(buf), "%d", (*i)->n_outputs.n_midi());
newrow[plugin_columns.midi_outs] = buf;
newrow[plugin_columns.plugin] = *i;
}
- }
+ }
}
void
@@ -352,7 +352,7 @@ void
PluginSelector::au_refiller (const std::string& filterstr)
#else
PluginSelector::au_refiller (const std::string&)
-#endif
+#endif
{
#ifdef HAVE_AUDIOUNITS
refiller (manager->au_plugin_info(), filterstr, "AU");
@@ -393,7 +393,7 @@ void
PluginSelector::btn_remove_clicked()
{
TreeModel::iterator iter = added_list.get_selection()->get_selected();
-
+
amodel->erase(iter);
if (amodel->children().empty()) {
set_response_sensitive (RESPONSE_APPLY, false);
@@ -448,7 +448,7 @@ PluginSelector::run ()
if (interested_object && !plugins.empty()) {
interested_object->use_plugins (plugins);
}
-
+
break;
default:
@@ -474,7 +474,7 @@ PluginSelector::filter_entry_changed ()
refill ();
}
-void
+void
PluginSelector::filter_mode_changed ()
{
std::string mode = filter_mode.get_active_text ();
@@ -507,7 +507,7 @@ struct PluginMenuCompare {
/* same creator ... compare names */
if (strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
return true;
- }
+ }
}
return false;
}
@@ -524,7 +524,7 @@ PluginSelector::plugin_menu()
if (!_menu) {
_menu = new Menu();
_menu->set_name("ArdourContextMenu");
- }
+ }
MenuList& items = _menu->items();
Menu* favs = new Menu();
@@ -561,9 +561,9 @@ PluginSelector::plugin_menu()
if (manager->is_a_favorite_plugin (*i)) {
favs->items().push_back (MenuElem ((*i)->name, (bind (mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i))));
}
-
+
/* stupid LADSPA creator strings */
-
+
while (pos < creator.length() && (isalnum (creator[pos]) || isspace (creator[pos]))) ++pos;
creator = creator.substr (0, pos);
@@ -575,10 +575,10 @@ PluginSelector::plugin_menu()
submenu_map.insert (pair<Glib::ustring,Menu*> (creator, submenu));
submenu->set_name("ArdourContextMenu");
}
-
+
submenu->items().push_back (MenuElem ((*i)->name, (bind (mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i))));
}
-
+
return *_menu;
}
@@ -596,7 +596,7 @@ PluginSelector::plugin_chosen_from_menu (const PluginInfoPtr& pi)
interested_object = 0;
}
-void
+void
PluginSelector::favorite_changed (const Glib::ustring& path)
{
PluginInfoPtr pi;
@@ -606,9 +606,9 @@ PluginSelector::favorite_changed (const Glib::ustring& path)
}
in_row_change = true;
-
+
TreeModel::iterator iter = plugin_model->get_iter (path);
-
+
if (iter) {
bool favorite = !(*iter)[plugin_columns.favorite];
@@ -620,13 +620,13 @@ PluginSelector::favorite_changed (const Glib::ustring& path)
/* save new favorites list */
pi = (*iter)[plugin_columns.plugin];
-
+
if (favorite) {
manager->add_favorite (pi->type, pi->unique_id);
} else {
manager->remove_favorite (pi->type, pi->unique_id);
}
-
+
manager->save_favorites ();
}
in_row_change = false;
diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h
index bd9bd12008..dc09c30645 100644
--- a/gtk2_ardour/plugin_selector.h
+++ b/gtk2_ardour/plugin_selector.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ class PluginSelector : public ArdourDialog
PluginSelector (ARDOUR::PluginManager *);
void set_interested_object (PluginInterestedObject&);
-
+
int run (); // XXX should we try not to overload the non-virtual Gtk::Dialog::run() ?
void set_session (ARDOUR::Session*);
@@ -62,7 +62,7 @@ class PluginSelector : public ArdourDialog
void filter_button_clicked ();
void filter_entry_changed ();
void filter_mode_changed ();
-
+
struct PluginColumns : public Gtk::TreeModel::ColumnRecord {
PluginColumns () {
add (favorite);
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 43c98b0ef2..5af2c1ad0d 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -93,7 +93,7 @@ PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert
case ARDOUR::AudioUnit:
have_gui = create_audiounit_editor (insert);
break;
-
+
case ARDOUR::LADSPA:
error << _("Eh? LADSPA plugins don't have editors!") << endmsg;
break;
@@ -113,12 +113,12 @@ PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert
throw failed_constructor ();
}
- }
+ }
if (!have_gui) {
GenericPluginUI* pu = new GenericPluginUI (insert, scrollable);
-
+
_pluginui = pu;
add( *pu );
@@ -127,7 +127,7 @@ PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert
hbox->pack_start( *pu);
// TODO: this should be nicer
hbox->pack_start( eqgui_bin );
-
+
add (*manage(hbox));
*/
@@ -143,7 +143,7 @@ PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)), false);
death_connection = insert->GoingAway.connect (mem_fun(*this, &PluginUIWindow::plugin_going_away));
-
+
gint h = _pluginui->get_preferred_height ();
gint w = _pluginui->get_preferred_width ();
@@ -156,7 +156,7 @@ PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert
}
}
- set_default_size (w, h);
+ set_default_size (w, h);
}
PluginUIWindow::~PluginUIWindow ()
@@ -250,7 +250,7 @@ bool
PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert> insert)
#else
PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert>)
-#endif
+#endif
{
#ifndef VST_SUPPORT
return false;
@@ -264,7 +264,7 @@ PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert>)
throw failed_constructor ();
} else {
VSTPluginUI* vpu = new VSTPluginUI (insert, vp);
-
+
_pluginui = vpu;
add (*vpu);
vpu->package (*this);
@@ -280,7 +280,7 @@ bool
PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert> insert)
#else
PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert>)
-#endif
+#endif
{
#if !defined(HAVE_AUDIOUNITS) || !defined(GTKOSX)
return false;
@@ -302,7 +302,7 @@ void
PluginUIWindow::app_activated (bool yn)
#else
PluginUIWindow::app_activated (bool)
-#endif
+#endif
{
#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
cerr << "APP activated ? " << yn << endl;
@@ -318,7 +318,7 @@ PluginUIWindow::app_activated (bool)
hide ();
_pluginui->deactivate ();
}
- }
+ }
#endif
}
@@ -330,7 +330,7 @@ PluginUIWindow::create_lv2_editor(boost::shared_ptr<PluginInsert> insert)
#else
boost::shared_ptr<LV2Plugin> vp;
-
+
if ((vp = boost::dynamic_pointer_cast<LV2Plugin> (insert->plugin())) == 0) {
error << _("create_lv2_editor called on non-LV2 plugin") << endmsg;
throw failed_constructor ();
@@ -362,7 +362,7 @@ void
PluginUIWindow::plugin_going_away ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &PluginUIWindow::plugin_going_away));
-
+
if (_pluginui) {
_pluginui->stop_updating(0);
}
@@ -406,7 +406,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
focus_out_image = new Image (get_icon (X_("computer_keyboard")));
focus_in_image = new Image (get_icon (X_("computer_keyboard_active")));
-
+
focus_button.add (*focus_out_image);
ARDOUR_UI::instance()->set_tip (&focus_button, _("Click to allow the plugin to receive keyboard events that Ardour would normally use as a shortcut"), "");
@@ -547,17 +547,17 @@ PlugUIBase::focus_toggled (GdkEventButton*)
void
PlugUIBase::toggle_plugin_analysis()
{
- if (plugin_analysis_expander.get_expanded() &&
+ if (plugin_analysis_expander.get_expanded() &&
!plugin_analysis_expander.get_child()) {
// Create the GUI
PluginEqGui *foo = new PluginEqGui(insert);
plugin_analysis_expander.add( *foo );
plugin_analysis_expander.show_all();
- }
-
+ }
+
Gtk::Widget *gui;
- if (!plugin_analysis_expander.get_expanded() &&
+ if (!plugin_analysis_expander.get_expanded() &&
(gui = plugin_analysis_expander.get_child())) {
// Hide & remove
gui->hide();
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 91e93dcae0..a80a3971df 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -82,7 +82,7 @@ class PlugUIBase : public virtual sigc::trackable
virtual gint get_preferred_width () = 0;
virtual bool start_updating(GdkEventAny*) = 0;
virtual bool stop_updating(GdkEventAny*) = 0;
-
+
virtual void activate () {}
virtual void deactivate () {}
@@ -127,10 +127,10 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
public:
GenericPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> plug, bool scrollable=false);
~GenericPluginUI ();
-
+
gint get_preferred_height () { return prefheight; }
gint get_preferred_width () { return -1; }
-
+
bool start_updating(GdkEventAny*);
bool stop_updating(GdkEventAny*);
@@ -139,7 +139,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
Gtk::HBox settings_box;
Gtk::HBox hpacker;
-
+
Gtk::Table button_table;
Gtk::Table output_table;
@@ -160,8 +160,8 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
bool min_unbound;
bool max_unbound;
bool packed;
-
- MeterInfo (int /*i*/) {
+
+ MeterInfo (int /*i*/) {
meter = 0;
packed = false;
min = 1.0e10;
@@ -170,7 +170,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
max_unbound = false;
}
};
-
+
static const int32_t initial_button_rows = 6;
static const int32_t initial_button_cols = 1;
static const int32_t initial_output_rows = 1;
@@ -182,9 +182,9 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
boost::shared_ptr<ARDOUR::AutomationControl> control;
Evoral::Parameter parameter() { return control->parameter(); }
-
+
/* input */
-
+
Gtk::ComboBoxText* combo;
std::map<std::string, float>* combo_map;
Gtk::ToggleButton* button;
@@ -195,7 +195,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
bool update_pending;
char ignore_change;
Gtk::Button automate_button;
-
+
/* output */
Gtk::EventBox *display;
@@ -206,13 +206,13 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
MeterInfo * meterinfo;
ControlUI ();
- ~ControlUI();
+ ~ControlUI();
};
-
+
std::vector<ControlUI*> output_controls;
sigc::connection screen_update_connection;
void output_update();
-
+
void build ();
ControlUI* build_control_ui (guint32 port_index, boost::shared_ptr<ARDOUR::AutomationControl>);
std::vector<std::string> setup_scale_values(guint32 port_index, ControlUI* cui);
@@ -292,7 +292,7 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
Gtk::Socket socket;
Gtk::HBox preset_box;
Gtk::VBox vpacker;
-
+
bool configure_handler (GdkEventConfigure*, Gtk::Socket*);
void save_plugin_setting ();
};
diff --git a/gtk2_ardour/point_selection.h b/gtk2_ardour/point_selection.h
index 342a6505d8..0b89f34454 100644
--- a/gtk2_ardour/point_selection.h
+++ b/gtk2_ardour/point_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
#include "automation_selectable.h"
-struct PointSelection : public std::list<AutomationSelectable>
+struct PointSelection : public std::list<AutomationSelectable>
{
};
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index 94bb2c49e7..1537ea88ee 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ using namespace ARDOUR;
PortGroup::PortGroup (std::string const & n)
: name (n), _visible (true)
{
-
+
}
void
@@ -112,7 +112,7 @@ PortGroup::remove_bundle (boost::shared_ptr<Bundle> b)
i->changed_connection.disconnect ();
_bundles.erase (i);
-
+
Changed ();
}
@@ -186,7 +186,7 @@ PortGroup::io_from_bundle (boost::shared_ptr<ARDOUR::Bundle> b) const
PortGroupList::PortGroupList ()
: _type (DataType::AUDIO), _signals_suspended (false), _pending_change (false)
{
-
+
}
void
@@ -206,11 +206,11 @@ PortGroupList::maybe_add_processor_to_bundle (boost::weak_ptr<Processor> wp, boo
}
boost::shared_ptr<IOProcessor> iop = boost::dynamic_pointer_cast<IOProcessor> (p);
-
+
if (iop) {
boost::shared_ptr<IO> io = inputs ? iop->input() : iop->output();
-
+
if (io && used_io.find (io) == used_io.end()) {
rb->add_processor_bundle (io->bundle ());
used_io.insert (io);
@@ -241,11 +241,11 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
/* keep track of IOs that we have taken bundles from, so that maybe_add_processor... below
can avoid taking the same IO from both Route::output() and the main_outs Delivery */
-
+
set<boost::shared_ptr<IO> > used_io;
boost::shared_ptr<IO> io = inputs ? (*i)->input() : (*i)->output();
used_io.insert (io);
-
+
boost::shared_ptr<RouteBundle> rb (new RouteBundle (io->bundle()));
(*i)->foreach_processor (bind (mem_fun (*this, &PortGroupList::maybe_add_processor_to_bundle), rb, inputs, used_io));
@@ -258,7 +258,7 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
g = track;
} else if (!boost::dynamic_pointer_cast<MidiTrack>(*i)) {
g = bus;
- }
+ }
} else if (_type == DataType::MIDI) {
@@ -268,8 +268,8 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
}
/* No MIDI busses yet */
- }
-
+ }
+
if (g) {
TimeAxisView* tv = PublicEditor::instance().axis_view_from_route (i->get());
@@ -283,7 +283,7 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
/* Bundles owned by the session. We only add the mono ones and the User ones
otherwise there is duplication of the same ports within the matrix */
-
+
boost::shared_ptr<BundleList> b = session.bundles ();
for (BundleList::iterator i = b->begin(); i != b->end(); ++i) {
if ((*i)->ports_are_inputs() == inputs && (*i)->type() == _type) {
@@ -291,7 +291,7 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
if ((*i)->nchannels() == 1 || boost::dynamic_pointer_cast<UserBundle> (*i)) {
system->add_bundle (*i);
}
-
+
}
}
@@ -307,7 +307,7 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
std::vector<std::string> extra_system;
std::vector<std::string> extra_other;
- const char **ports = session.engine().get_ports ("", _type.to_jack_type(), inputs ?
+ const char **ports = session.engine().get_ports ("", _type.to_jack_type(), inputs ?
JackPortIsInput : JackPortIsOutput);
if (ports) {
@@ -318,11 +318,11 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
client_matching_string += ':';
while (ports[n]) {
-
+
std::string const p = ports[n];
if (!system->has_port(p) && !bus->has_port(p) && !track->has_port(p) && !ardour->has_port(p) && !other->has_port(p)) {
-
+
if (port_has_prefix (p, "system:") ||
port_has_prefix (p, "alsa_pcm") ||
port_has_prefix (p, "ardour:")) {
@@ -331,7 +331,7 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs)
extra_other.push_back (p);
}
}
-
+
++n;
}
@@ -405,7 +405,7 @@ PortGroupList::common_prefix_before (std::vector<std::string> const & p, std::st
return fp;
}
-
+
std::string
PortGroupList::common_prefix (std::vector<std::string> const & p) const
@@ -443,11 +443,11 @@ PortGroup::BundleList const &
PortGroupList::bundles () const
{
_bundles.clear ();
-
+
for (PortGroupList::List::const_iterator i = begin (); i != end (); ++i) {
std::copy ((*i)->bundles().begin(), (*i)->bundles().end(), std::back_inserter (_bundles));
}
-
+
return _bundles;
}
@@ -455,7 +455,7 @@ uint32_t
PortGroupList::total_visible_channels () const
{
uint32_t n = 0;
-
+
for (PortGroupList::List::const_iterator i = begin(); i != end(); ++i) {
if ((*i)->visible()) {
n += (*i)->total_channels ();
@@ -470,9 +470,9 @@ void
PortGroupList::add_group (boost::shared_ptr<PortGroup> g)
{
_groups.push_back (g);
-
+
g->Changed.connect (sigc::mem_fun (*this, &PortGroupList::emit_changed));
-
+
_bundle_changed_connections.push_back (
g->BundleChanged.connect (sigc::hide (sigc::mem_fun (*this, &PortGroupList::emit_changed)))
);
@@ -499,7 +499,7 @@ PortGroupList::emit_changed ()
Changed ();
}
}
-
+
void
PortGroupList::suspend_signals ()
{
@@ -544,7 +544,7 @@ void
RouteBundle::reread_component_bundles ()
{
suspend_signals ();
-
+
remove_channels ();
set_name (_route->name());
@@ -556,7 +556,7 @@ RouteBundle::reread_component_bundles ()
add_port_to_channel (i, pl[j]);
}
}
-
+
for (std::vector<boost::shared_ptr<Bundle> >::iterator i = _processor.begin(); i != _processor.end(); ++i) {
add_channels_from_bundle (*i);
}
@@ -569,7 +569,7 @@ RouteBundle::add_processor_bundle (boost::shared_ptr<Bundle> p)
{
p->Changed.connect (sigc::hide (sigc::mem_fun (*this, &RouteBundle::reread_component_bundles)));
_processor.push_back (p);
-
+
reread_component_bundles ();
}
-
+
diff --git a/gtk2_ardour/port_group.h b/gtk2_ardour/port_group.h
index dbdcfc06ca..cf6fba8e53 100644
--- a/gtk2_ardour/port_group.h
+++ b/gtk2_ardour/port_group.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
*/
-#ifndef __gtk_ardour_port_group_h__
-#define __gtk_ardour_port_group_h__
+#ifndef __gtk_ardour_port_group_h__
+#define __gtk_ardour_port_group_h__
#include <vector>
#include <string>
@@ -87,7 +87,7 @@ public:
BundleList const & bundles () const {
return _bundles;
}
-
+
private:
void bundle_changed (ARDOUR::Bundle::Change);
@@ -154,7 +154,7 @@ public:
private:
void reread_component_bundles ();
-
+
boost::shared_ptr<ARDOUR::Bundle> _route;
std::vector<boost::shared_ptr<ARDOUR::Bundle> > _processor;
};
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 0e35427a28..b8fe7d3333 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ PortMatrix::PortMatrix (Window* parent, Session& session, DataType type)
for (int i = 0; i < 2; ++i) {
_ports[i].set_type (type);
-
+
/* watch for the content of _ports[] changing */
_ports[i].Changed.connect (mem_fun (*this, &PortMatrix::setup));
}
@@ -78,13 +78,13 @@ PortMatrix::PortMatrix (Window* parent, Session& session, DataType type)
/* and also ports */
_session.engine().PortRegisteredOrUnregistered.connect (mem_fun (*this, &PortMatrix::setup_all_ports));
-
+
reconnect_to_routes ();
attach (*_body, 0, 1, 0, 1);
attach (_vscroll, 1, 2, 0, 1, SHRINK);
attach (_hscroll, 0, 1, 1, 2, FILL | EXPAND, SHRINK);
-
+
show_all ();
}
@@ -140,7 +140,7 @@ PortMatrix::set_type (DataType t)
_type = t;
_ports[0].set_type (_type);
_ports[1].set_type (_type);
-
+
setup_all_ports ();
}
@@ -185,7 +185,7 @@ PortMatrix::disassociate_all ()
for (uint32_t j = 0; j < i->bundle->nchannels(); ++j) {
for (PortGroup::BundleList::iterator k = b.begin(); k != b.end(); ++k) {
for (uint32_t l = 0; l < k->bundle->nchannels(); ++l) {
-
+
BundleChannel c[2] = {
BundleChannel (i->bundle, j),
BundleChannel (k->bundle, l)
@@ -217,7 +217,7 @@ PortMatrix::select_arrangement ()
maintain notional `signal flow' vaguely from left to right. Subclasses
should choose where to put ports based on signal flowing from _ports[0]
to _ports[1] */
-
+
if (N[0] > N[1]) {
_row_index = 0;
@@ -254,12 +254,12 @@ PortMatrix::popup_menu (
)
{
using namespace Menu_Helpers;
-
+
delete _menu;
_menu = new Menu;
_menu->set_name ("ArdourContextMenu");
-
+
MenuList& items = _menu->items ();
boost::shared_ptr<PortGroup> pg[2];
@@ -286,8 +286,8 @@ PortMatrix::popup_menu (
snprintf (buf, sizeof (buf), _("Add %s"), channel_noun().c_str());
sub.push_back (MenuElem (buf, bind (mem_fun (*this, &PortMatrix::add_channel_proxy), w)));
}
-
-
+
+
if (can_rename_channels (bc[dim].bundle)) {
snprintf (buf, sizeof (buf), _("Rename '%s'..."), bc[dim].bundle->channel_name (bc[dim].channel).c_str());
sub.push_back (
@@ -299,7 +299,7 @@ PortMatrix::popup_menu (
}
sub.push_back (SeparatorElem ());
-
+
if (can_remove_channels (bc[dim].bundle)) {
snprintf (buf, sizeof (buf), _("Remove '%s'"), bc[dim].bundle->channel_name (bc[dim].channel).c_str());
sub.push_back (
@@ -308,7 +308,7 @@ PortMatrix::popup_menu (
bind (mem_fun (*this, &PortMatrix::remove_channel_proxy), w, bc[dim].channel)
)
);
- }
+ }
if (_show_only_bundles) {
snprintf (buf, sizeof (buf), _("%s all"), disassociation_verb().c_str());
@@ -319,7 +319,7 @@ PortMatrix::popup_menu (
bc[dim].bundle->channel_name (bc[dim].channel).c_str()
);
}
-
+
sub.push_back (
MenuElem (buf, bind (mem_fun (*this, &PortMatrix::disassociate_all_on_channel), w, bc[dim].channel, dim))
);
@@ -335,13 +335,13 @@ PortMatrix::popup_menu (
}
need_separator = false;
-
+
for (int dim = 0; dim < 2; ++dim) {
if (pg[dim]) {
boost::weak_ptr<PortGroup> wp (pg[dim]);
-
+
if (pg[dim]->visible()) {
if (dim == 0) {
if (pg[dim]->name.empty()) {
@@ -389,7 +389,7 @@ PortMatrix::popup_menu (
_inhibit_toggle_show_only_bundles = true;
i->set_active (!_show_only_bundles);
_inhibit_toggle_show_only_bundles = false;
-
+
_menu->popup (1, t);
}
@@ -456,7 +456,7 @@ void
PortMatrix::setup_all_ports ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &PortMatrix::setup_all_ports));
-
+
setup_ports (0);
setup_ports (1);
}
@@ -467,7 +467,7 @@ PortMatrix::toggle_show_only_bundles ()
if (_inhibit_toggle_show_only_bundles) {
return;
}
-
+
_show_only_bundles = !_show_only_bundles;
_body->setup ();
setup_scrollbars ();
@@ -512,7 +512,7 @@ PortMatrix::on_scroll_event (GdkEventScroll* ev)
{
double const h = _hscroll.get_value ();
double const v = _vscroll.get_value ();
-
+
switch (ev->direction) {
case GDK_SCROLL_UP:
_vscroll.set_value (v - PortMatrixComponent::grid_spacing ());
diff --git a/gtk2_ardour/port_matrix.h b/gtk2_ardour/port_matrix.h
index b3d94055eb..a4366897c6 100644
--- a/gtk2_ardour/port_matrix.h
+++ b/gtk2_ardour/port_matrix.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ public:
ARDOUR::DataType type () const {
return _type;
}
-
+
void disassociate_all ();
void setup_scrollbars ();
void popup_menu (
@@ -105,7 +105,7 @@ public:
PortGroupList const * ports (int d) const {
return &_ports[d];
}
-
+
void setup ();
virtual void setup_ports (int) = 0;
void setup_all_ports ();
@@ -133,7 +133,7 @@ public:
virtual void rename_channel (ARDOUR::BundleChannel) {}
virtual std::string disassociation_verb () const = 0;
virtual std::string channel_noun () const { return _("channel"); }
-
+
enum Result {
Cancelled,
Accepted
@@ -151,7 +151,7 @@ protected:
inputs and outputs should put outputs in list 0 and inputs in list 1. */
PortGroupList _ports[2];
ARDOUR::Session& _session;
-
+
private:
void hscroll_changed ();
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index 08849ee165..b3398d850f 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ PortMatrixBody::PortMatrixBody (PortMatrix* p)
_column_labels = new PortMatrixColumnLabels (p, this);
_row_labels = new PortMatrixRowLabels (p, this);
_grid = new PortMatrixGrid (p, this);
-
+
add_events (Gdk::LEAVE_NOTIFY_MASK | Gdk::POINTER_MOTION_MASK);
}
@@ -57,7 +57,7 @@ PortMatrixBody::on_expose_event (GdkEventExpose* event)
);
bool intersects;
-
+
Gdk::Rectangle r = exposure;
/* the get_pixmap call may cause things to be rerendered and sizes to change,
so fetch the pixmap before calculating where to put it */
@@ -131,7 +131,7 @@ PortMatrixBody::on_expose_event (GdkEventExpose* event)
set_cairo_clip (cr, _column_labels->parent_rectangle ());
_column_labels->draw_extra (cr);
cairo_restore (cr);
-
+
cairo_destroy (cr);
return true;
@@ -205,7 +205,7 @@ PortMatrixBody::compute_rectangles ()
grid_rect.set_width (x);
row_rect.set_x (x);
row_rect.set_width (_alloc_width - x);
-
+
} else if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
@@ -224,7 +224,7 @@ PortMatrixBody::compute_rectangles ()
col_rect.set_width (grid_rect.get_width () + col_overhang);
col_rect.set_x (row_rect.get_width() + grid_rect.get_width() - col_rect.get_width());
col_rect.set_y (row_rect.get_height());
-
+
}
_row_labels->set_parent_rectangle (row_rect);
@@ -236,21 +236,21 @@ void
PortMatrixBody::setup ()
{
/* Discard any old connections to bundles */
-
+
for (list<sigc::connection>::iterator i = _bundle_connections.begin(); i != _bundle_connections.end(); ++i) {
i->disconnect ();
}
_bundle_connections.clear ();
/* Connect to bundles so that we find out when their names change */
-
+
PortGroup::BundleList r = _matrix->rows()->bundles ();
for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) {
-
+
_bundle_connections.push_back (
i->bundle->Changed.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_row_labels)))
);
-
+
}
PortGroup::BundleList c = _matrix->columns()->bundles ();
@@ -259,7 +259,7 @@ PortMatrixBody::setup ()
i->bundle->Changed.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_column_labels)))
);
}
-
+
_column_labels->setup ();
_row_labels->setup ();
_grid->setup ();
@@ -325,7 +325,7 @@ PortMatrixBody::on_button_press_event (GdkEventButton* ev)
_row_labels->parent_to_component_y (ev->y),
ev->button, ev->time
);
-
+
} else if (Gdk::Region (_column_labels->parent_rectangle()).point_in (ev->x, ev->y)) {
_column_labels->button_press (
@@ -346,7 +346,7 @@ PortMatrixBody::on_button_release_event (GdkEventButton* ev)
_row_labels->clear_channel_highlights ();
_column_labels->clear_channel_highlights ();
-
+
} else if (Gdk::Region (_grid->parent_rectangle()).point_in (ev->x, ev->y)) {
_grid->button_release (
@@ -395,14 +395,14 @@ bool
PortMatrixBody::on_motion_notify_event (GdkEventMotion* ev)
{
if (Gdk::Region (_grid->parent_rectangle()).point_in (ev->x, ev->y)) {
-
+
_grid->motion (
_grid->parent_to_component_x (ev->x),
_grid->parent_to_component_y (ev->y)
);
-
+
_mouse_over_grid = true;
-
+
} else {
if (_mouse_over_grid) {
set_mouseover (PortMatrixNode ());
@@ -422,7 +422,7 @@ PortMatrixBody::set_mouseover (PortMatrixNode const & n)
PortMatrixNode old = _mouseover;
_mouseover = n;
-
+
_grid->mouseover_changed (old);
_row_labels->mouseover_changed (old);
_column_labels->mouseover_changed (old);
@@ -480,6 +480,6 @@ PortMatrixBody::max_size () const
pair<uint32_t, uint32_t> const col = _column_labels->dimensions ();
pair<uint32_t, uint32_t> const row = _row_labels->dimensions ();
pair<uint32_t, uint32_t> const grid = _grid->dimensions ();
-
+
return make_pair (std::max (row.first, _column_labels->overhang()) + grid.first, col.second + grid.second);
}
diff --git a/gtk2_ardour/port_matrix_body.h b/gtk2_ardour/port_matrix_body.h
index bbc72ddc7e..9195608d28 100644
--- a/gtk2_ardour/port_matrix_body.h
+++ b/gtk2_ardour/port_matrix_body.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ public:
void set_yoffset (uint32_t);
void rebuild_and_draw_grid ();
-
+
void set_mouseover (PortMatrixNode const &);
PortMatrixNode mouseover () const {
return _mouseover;
@@ -73,7 +73,7 @@ protected:
bool on_button_release_event (GdkEventButton *);
bool on_leave_notify_event (GdkEventCrossing *);
bool on_motion_notify_event (GdkEventMotion *);
-
+
private:
void compute_rectangles ();
void rebuild_and_draw_column_labels ();
diff --git a/gtk2_ardour/port_matrix_column_labels.cc b/gtk2_ardour/port_matrix_column_labels.cc
index 6dec2524d0..fa3d3dd030 100644
--- a/gtk2_ardour/port_matrix_column_labels.cc
+++ b/gtk2_ardour/port_matrix_column_labels.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,13 +54,13 @@ PortMatrixColumnLabels::compute_dimensions ()
for (PortGroupList::List::const_iterator i = _matrix->columns()->begin(); i != _matrix->columns()->end(); ++i) {
PortGroup::BundleList const c = _matrix->columns()->bundles();
for (PortGroup::BundleList::const_iterator j = c.begin (); j != c.end(); ++j) {
-
+
cairo_text_extents_t ext;
cairo_text_extents (cr, j->bundle->name().c_str(), &ext);
if (ext.width > _longest_bundle_name) {
_longest_bundle_name = ext.width;
}
-
+
if (ext.height > _highest_text) {
_highest_text = ext.height;
}
@@ -76,7 +76,7 @@ PortMatrixColumnLabels::compute_dimensions ()
if (ext.width > _longest_channel_name) {
_longest_channel_name = ext.width;
}
-
+
if (ext.height > _highest_text) {
_highest_text = ext.height;
}
@@ -127,10 +127,10 @@ PortMatrixColumnLabels::render (cairo_t* cr)
cairo_fill (cr);
/* PORT GROUP NAME */
-
+
double x = 0;
double y = 0;
-
+
if (_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT) {
x = slanted_height() / tan (angle());
y = _highest_group_name + name_pad();
@@ -157,7 +157,7 @@ PortMatrixColumnLabels::render (cairo_t* cr)
if (w == 0) {
continue;
}
-
+
/* rectangle */
set_source_rgb (cr, get_a_group_colour (g));
double const rh = _highest_group_name + 2 * name_pad();
@@ -167,18 +167,18 @@ PortMatrixColumnLabels::render (cairo_t* cr)
cairo_rectangle (cr, x, _height - rh, w, rh);
}
cairo_fill (cr);
-
+
string const upper = Glib::ustring ((*i)->name).uppercase ();
pair<string, double> const display = fit_to_pixels (cr, upper, w);
-
+
/* plot it */
set_source_rgb (cr, text_colour());
cairo_move_to (cr, x + (w - display.second) / 2, y);
cairo_show_text (cr, display.first.c_str());
-
+
x += w;
++g;
-
+
}
/* BUNDLE PARALLELOGRAM-TYPE-THING AND NAME */
@@ -189,13 +189,13 @@ PortMatrixColumnLabels::render (cairo_t* cr)
for (PortGroupList::List::const_iterator i = _matrix->columns()->begin(); i != _matrix->columns()->end(); ++i) {
if ((*i)->visible ()) {
-
+
PortGroup::BundleList const & bundles = (*i)->bundles ();
for (PortGroup::BundleList::const_iterator j = bundles.begin (); j != bundles.end(); ++j) {
Gdk::Color c = j->has_colour ? j->colour : get_a_bundle_colour (N);
render_bundle_name (cr, background_colour (), c, x, 0, j->bundle);
-
+
if (_matrix->show_only_bundles()) {
x += grid_spacing();
} else {
@@ -211,7 +211,7 @@ PortMatrixColumnLabels::render (cairo_t* cr)
}
}
-
+
/* PORT NAMES */
@@ -221,16 +221,16 @@ PortMatrixColumnLabels::render (cairo_t* cr)
for (PortGroupList::List::const_iterator i = _matrix->columns()->begin(); i != _matrix->columns()->end(); ++i) {
if ((*i)->visible ()) {
-
+
PortGroup::BundleList const & bundles = (*i)->bundles ();
for (PortGroup::BundleList::const_iterator j = bundles.begin (); j != bundles.end(); ++j) {
-
+
for (uint32_t k = 0; k < j->bundle->nchannels(); ++k) {
Gdk::Color c = j->has_colour ? j->colour : get_a_bundle_colour (N);
render_channel_name (cr, background_colour (), c, x, 0, ARDOUR::BundleChannel (j->bundle, k));
x += grid_spacing();
}
-
+
++N;
}
@@ -280,10 +280,10 @@ vector<pair<double, double> >
PortMatrixColumnLabels::port_name_shape (double xoff, double yoff) const
{
vector<pair<double, double> > shape;
-
+
double const lc = _longest_channel_name + name_pad();
double const w = grid_spacing();
-
+
if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
double x_ = xoff + slanted_height() / tan (angle()) + w;
@@ -297,9 +297,9 @@ PortMatrixColumnLabels::port_name_shape (double xoff, double yoff) const
x_ += w * pow (sin (angle()), 2);
y_ += w * sin (angle()) * cos (angle());
shape.push_back (make_pair (x_, y_));
-
+
} else {
-
+
double x_ = xoff;
double y_ = yoff + _height;
shape.push_back (make_pair (x_, y_));
@@ -329,7 +329,7 @@ PortMatrixColumnLabels::render_bundle_name (
} else {
w = b->nchannels() * grid_spacing();
}
-
+
double x_ = xoff;
uint32_t y = yoff;
@@ -355,7 +355,7 @@ PortMatrixColumnLabels::render_bundle_name (
cairo_stroke (cr);
set_source_rgb (cr, text_colour());
-
+
if (_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT) {
double rl = 0;
@@ -369,16 +369,16 @@ PortMatrixColumnLabels::render_bundle_name (
xoff + basic_text_x_pos (0) + rl * cos (angle()),
yoff + _height - rl * sin (angle())
);
-
+
} else {
-
+
cairo_move_to (
cr,
xoff + basic_text_x_pos (0),
yoff + slanted_height() - name_pad() * sin (angle())
);
}
-
+
cairo_save (cr);
cairo_rotate (cr, -angle());
cairo_show_text (cr, b->name().c_str());
@@ -397,15 +397,15 @@ PortMatrixColumnLabels::render_channel_name (
cairo_line_to (cr, shape[i].first, shape[i].second);
}
cairo_line_to (cr, shape[0].first, shape[0].second);
-
+
set_source_rgb (cr, bg_colour);
cairo_fill_preserve (cr);
set_source_rgb (cr, fg_colour);
cairo_set_line_width (cr, label_border_width());
cairo_stroke (cr);
-
+
set_source_rgb (cr, text_colour());
-
+
if (_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT) {
cairo_move_to (
@@ -413,8 +413,8 @@ PortMatrixColumnLabels::render_channel_name (
xoff + basic_text_x_pos(bc.channel),
yoff + _height - name_pad() * sin (angle())
);
-
- } else {
+
+ } else {
double const rl = 3 * name_pad() + _longest_bundle_name;
cairo_move_to (
@@ -423,15 +423,15 @@ PortMatrixColumnLabels::render_channel_name (
yoff + slanted_height() - rl * sin (angle())
);
}
-
+
cairo_save (cr);
cairo_rotate (cr, -angle());
-
+
cairo_show_text (
cr,
bc.bundle->channel_name(bc.channel).c_str()
);
-
+
cairo_restore (cr);
}
@@ -462,13 +462,13 @@ PortMatrixColumnLabels::queue_draw_for (ARDOUR::BundleChannel const & bc)
grid_spacing() + _height * tan (angle()) + 2,
_height + 2
);
-
+
} else {
-
+
double const x = channel_x (bc);
double const lc = _longest_channel_name + name_pad();
double const h = lc * sin (angle ()) + grid_spacing() * sin (angle()) * cos (angle());
-
+
if (_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT) {
_body->queue_draw_area (
@@ -477,20 +477,20 @@ PortMatrixColumnLabels::queue_draw_for (ARDOUR::BundleChannel const & bc)
grid_spacing() + lc * cos (angle()) + 2,
h + 2
);
-
+
} else if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
-
+
double const x_ = x + slanted_height() / tan (angle()) - lc * cos (angle());
-
+
_body->queue_draw_area (
component_to_parent_x (x_) - 1,
component_to_parent_y (0) - 1,
grid_spacing() + lc * cos (angle()) + 2,
h + 2
);
-
+
}
-
+
}
}
@@ -518,7 +518,7 @@ PortMatrixColumnLabels::button_press (double x, double y, int b, uint32_t t)
}
pair<boost::shared_ptr<PortGroup>, ARDOUR::BundleChannel> gc = position_to_group_and_channel (cx / grid_spacing(), _matrix->columns());
-
+
if (b == 1) {
if (group_name && gc.first) {
@@ -526,7 +526,7 @@ PortMatrixColumnLabels::button_press (double x, double y, int b, uint32_t t)
} else if (gc.second.bundle) {
_body->highlight_associated_channels (_matrix->column_index(), gc.second);
}
-
+
} else if (b == 3) {
_matrix->popup_menu (
diff --git a/gtk2_ardour/port_matrix_column_labels.h b/gtk2_ardour/port_matrix_column_labels.h
index 8dba7801be..3b1c5a128c 100644
--- a/gtk2_ardour/port_matrix_column_labels.h
+++ b/gtk2_ardour/port_matrix_column_labels.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ public:
PortMatrixColumnLabels (PortMatrix *, PortMatrixBody *);
void button_press (double, double, int, uint32_t);
-
+
double component_to_parent_x (double x) const;
double parent_to_component_x (double x) const;
double component_to_parent_y (double y) const;
@@ -47,14 +47,14 @@ public:
uint32_t overhang () const {
return _overhang;
}
-
+
private:
void render_bundle_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>);
void render_channel_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, ARDOUR::BundleChannel const &);
double channel_x (ARDOUR::BundleChannel const &) const;
double channel_y (ARDOUR::BundleChannel const &) const;
void queue_draw_for (ARDOUR::BundleChannel const &);
-
+
void render (cairo_t *);
void compute_dimensions ();
double basic_text_x_pos (int) const;
diff --git a/gtk2_ardour/port_matrix_component.cc b/gtk2_ardour/port_matrix_component.cc
index 2f5a498d41..7b83e5d10f 100644
--- a/gtk2_ardour/port_matrix_component.cc
+++ b/gtk2_ardour/port_matrix_component.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ PortMatrixComponent::PortMatrixComponent (PortMatrix* m, PortMatrixBody* b)
_render_required (true),
_dimension_computation_required (true)
{
-
+
}
/** Destructor */
@@ -125,7 +125,7 @@ uint32_t
PortMatrixComponent::group_size (boost::shared_ptr<const PortGroup> g) const
{
uint32_t s = 0;
-
+
if (g->visible()) {
PortGroup::BundleList const & bundles = g->bundles ();
if (_matrix->show_only_bundles()) {
@@ -160,7 +160,7 @@ PortMatrixComponent::channel_to_position (ARDOUR::BundleChannel bc, PortGroupLis
if (j->bundle == bc.bundle) {
/* found the bundle */
-
+
if (_matrix->show_only_bundles() || !(*i)->visible()) {
return p;
} else {
@@ -212,13 +212,13 @@ PortMatrixComponent::position_to_group_and_channel (uint32_t p, PortGroupList co
for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {
if (_matrix->show_only_bundles()) {
-
+
if (p == 0) {
return make_pair (*i, ARDOUR::BundleChannel (j->bundle, 0));
} else {
p -= 1;
}
-
+
} else {
uint32_t const s = j->bundle->nchannels ();
diff --git a/gtk2_ardour/port_matrix_component.h b/gtk2_ardour/port_matrix_component.h
index 7e5ed3d8a2..d4cc8619b6 100644
--- a/gtk2_ardour/port_matrix_component.h
+++ b/gtk2_ardour/port_matrix_component.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ public:
void require_render () {
_render_required = true;
}
-
+
void require_rebuild () {
_dimension_computation_required = true;
_render_required = true;
@@ -165,7 +165,7 @@ protected:
return Gdk::Color ("#444444");
}
}
-
+
void set_source_rgb (cairo_t *, Gdk::Color const &);
void set_source_rgba (cairo_t *, Gdk::Color const &, double);
uint32_t group_size (boost::shared_ptr<const PortGroup>) const;
@@ -185,7 +185,7 @@ protected:
uint32_t _height; ///< full height of the contents
Gdk::Rectangle _parent_rectangle;
-private:
+private:
GdkPixmap* _pixmap; ///< pixmap
bool _render_required; ///< true if the rendered pixmap is out of date
bool _dimension_computation_required; ///< true if the dimensions are out of date
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc
index 8e2f379add..543efa91ca 100644
--- a/gtk2_ardour/port_matrix_grid.cc
+++ b/gtk2_ardour/port_matrix_grid.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ PortMatrixGrid::PortMatrixGrid (PortMatrix* m, PortMatrixBody* b)
_drag_valid (false),
_moved (false)
{
-
+
}
void
@@ -84,21 +84,21 @@ PortMatrixGrid::render_group_pair (cairo_t* cr, boost::shared_ptr<const PortGrou
/* unfortunately we need to compute the height of the row group here */
uint32_t height = group_size (row) * grid_spacing ();
-
+
uint32_t tx = x;
/* VERTICAL GRID LINES */
-
+
set_source_rgb (cr, grid_colour());
uint32_t N = 0;
-
+
for (PortGroup::BundleList::const_iterator i = column_bundles.begin(); i != column_bundles.end(); ++i) {
cairo_set_line_width (cr, thick_grid_line_width());
cairo_move_to (cr, tx, y);
cairo_line_to (cr, tx, y + height);
cairo_stroke (cr);
-
+
if (!_matrix->show_only_bundles()) {
cairo_set_line_width (cr, thin_grid_line_width());
for (uint32_t j = 0; j < i->bundle->nchannels(); ++j) {
@@ -107,30 +107,30 @@ PortMatrixGrid::render_group_pair (cairo_t* cr, boost::shared_ptr<const PortGrou
cairo_line_to (cr, tx, y + height);
cairo_stroke (cr);
}
-
+
} else {
-
+
tx += grid_spacing ();
-
+
}
-
+
++N;
}
uint32_t const width = tx - x;
uint32_t ty = y;
-
+
/* HORIZONTAL GRID LINES */
-
+
N = 0;
for (PortGroup::BundleList::const_iterator i = row_bundles.begin(); i != row_bundles.end(); ++i) {
-
+
cairo_set_line_width (cr, thick_grid_line_width());
cairo_move_to (cr, x, ty);
cairo_line_to (cr, x + width, ty);
cairo_stroke (cr);
-
+
if (!_matrix->show_only_bundles()) {
cairo_set_line_width (cr, thin_grid_line_width());
for (uint32_t j = 0; j < i->bundle->nchannels(); ++j) {
@@ -145,10 +145,10 @@ PortMatrixGrid::render_group_pair (cairo_t* cr, boost::shared_ptr<const PortGrou
ty += grid_spacing ();
}
-
+
++N;
}
-
+
/* ASSOCIATION INDICATORS */
uint32_t bx = x;
@@ -158,9 +158,9 @@ PortMatrixGrid::render_group_pair (cairo_t* cr, boost::shared_ptr<const PortGrou
for (PortGroup::BundleList::const_iterator i = column_bundles.begin(); i != column_bundles.end(); ++i) {
by = y;
-
+
for (PortGroup::BundleList::const_iterator j = row_bundles.begin(); j != row_bundles.end(); ++j) {
-
+
PortMatrixNode::State s = get_association (PortMatrixNode (
ARDOUR::BundleChannel (i->bundle, 0),
ARDOUR::BundleChannel (j->bundle, 0)
@@ -178,58 +178,58 @@ PortMatrixGrid::render_group_pair (cairo_t* cr, boost::shared_ptr<const PortGrou
default:
break;
}
-
+
by += grid_spacing();
}
-
+
bx += grid_spacing();
-
+
}
} else {
for (PortGroup::BundleList::const_iterator i = column_bundles.begin(); i != column_bundles.end(); ++i) {
by = y;
-
+
for (PortGroup::BundleList::const_iterator j = row_bundles.begin(); j != row_bundles.end(); ++j) {
-
+
tx = bx;
for (uint32_t k = 0; k < i->bundle->nchannels (); ++k) {
-
+
ty = by;
for (uint32_t l = 0; l < j->bundle->nchannels (); ++l) {
-
+
ARDOUR::BundleChannel c[2];
c[_matrix->column_index()] = ARDOUR::BundleChannel (i->bundle, k);
c[_matrix->row_index()] = ARDOUR::BundleChannel (j->bundle, l);
-
+
PortMatrixNode::State const s = _matrix->get_state (c);
-
+
switch (s) {
case PortMatrixNode::ASSOCIATED:
draw_association_indicator (cr, tx, ty);
break;
-
+
case PortMatrixNode::UNKNOWN:
draw_unknown_indicator (cr, tx, ty);
break;
-
+
case PortMatrixNode::NOT_ASSOCIATED:
break;
-
+
default:
break;
}
-
+
ty += grid_spacing();
}
-
+
tx += grid_spacing();
}
-
+
by += j->bundle->nchannels () * grid_spacing();
}
-
+
bx += i->bundle->nchannels () * grid_spacing();
}
}
@@ -248,7 +248,7 @@ PortMatrixGrid::draw_association_indicator (cairo_t* cr, uint32_t x, uint32_t y,
0,
p * 2 * M_PI
);
-
+
cairo_fill (cr);
}
@@ -294,12 +294,12 @@ PortMatrixGrid::button_press (double x, double y, int b, uint32_t t)
{
pair<boost::shared_ptr<PortGroup>, ARDOUR::BundleChannel> px = position_to_group_and_channel (x / grid_spacing(), _matrix->columns());
pair<boost::shared_ptr<PortGroup>, ARDOUR::BundleChannel> py = position_to_group_and_channel (y / grid_spacing(), _matrix->rows());
-
+
if (b == 1) {
_dragging = true;
_drag_valid = (px.second.bundle && py.second.bundle);
-
+
_moved = false;
_drag_start_x = x / grid_spacing ();
_drag_start_y = y / grid_spacing ();
@@ -307,7 +307,7 @@ PortMatrixGrid::button_press (double x, double y, int b, uint32_t t)
} else if (b == 3) {
_matrix->popup_menu (px, py, t);
-
+
}
}
@@ -320,17 +320,17 @@ PortMatrixGrid::get_association (PortMatrixNode node) const
bool have_off_diagonal_association = false;
bool have_diagonal_association = false;
bool have_diagonal_not_association = false;
-
+
for (uint32_t i = 0; i < node.row.bundle->nchannels (); ++i) {
-
+
for (uint32_t j = 0; j < node.column.bundle->nchannels (); ++j) {
-
+
ARDOUR::BundleChannel c[2];
c[_matrix->column_index()] = ARDOUR::BundleChannel (node.row.bundle, i);
c[_matrix->row_index()] = ARDOUR::BundleChannel (node.column.bundle, j);
-
+
PortMatrixNode::State const s = _matrix->get_state (c);
-
+
switch (s) {
case PortMatrixNode::ASSOCIATED:
if (i == j) {
@@ -339,23 +339,23 @@ PortMatrixGrid::get_association (PortMatrixNode node) const
have_off_diagonal_association = true;
}
break;
-
+
case PortMatrixNode::UNKNOWN:
have_unknown = true;
break;
-
+
case PortMatrixNode::NOT_ASSOCIATED:
if (i == j) {
have_diagonal_not_association = true;
}
break;
-
+
default:
break;
}
}
}
-
+
if (have_unknown) {
return PortMatrixNode::UNKNOWN;
} else if (have_diagonal_association && !have_off_diagonal_association && !have_diagonal_not_association) {
@@ -363,7 +363,7 @@ PortMatrixGrid::get_association (PortMatrixNode node) const
} else if (!have_diagonal_association && !have_off_diagonal_association) {
return PortMatrixNode::NOT_ASSOCIATED;
}
-
+
return PortMatrixNode::PARTIAL;
} else {
@@ -382,21 +382,21 @@ void
PortMatrixGrid::set_association (PortMatrixNode node, bool s)
{
if (_matrix->show_only_bundles()) {
-
+
for (uint32_t i = 0; i < node.column.bundle->nchannels(); ++i) {
for (uint32_t j = 0; j < node.row.bundle->nchannels(); ++j) {
-
+
ARDOUR::BundleChannel c[2];
c[_matrix->column_index()] = ARDOUR::BundleChannel (node.column.bundle, i);
c[_matrix->row_index()] = ARDOUR::BundleChannel (node.row.bundle, j);
_matrix->set_state (c, s && (i == j));
}
}
-
+
} else {
-
+
if (node.row.bundle && node.column.bundle) {
-
+
ARDOUR::BundleChannel c[2];
c[_matrix->row_index()] = node.row;
c[_matrix->column_index()] = node.column;
@@ -414,7 +414,7 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/)
if (_drag_valid) {
list<PortMatrixNode> const p = nodes_on_line (_drag_start_x, _drag_start_y, _drag_x, _drag_y);
-
+
if (!p.empty()) {
PortMatrixNode::State const s = get_association (p.front());
for (list<PortMatrixNode>::const_iterator i = p.begin(); i != p.end(); ++i) {
@@ -491,8 +491,8 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
);
}
}
- }
-
+ }
+
set_source_rgba (cr, association_colour (), 0.3);
cairo_move_to (
@@ -500,13 +500,13 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
component_to_parent_x (_drag_start_x * grid_spacing() + grid_spacing() / 2),
component_to_parent_y (_drag_start_y * grid_spacing() + grid_spacing() / 2)
);
-
+
cairo_line_to (
cr,
component_to_parent_x (_drag_x * grid_spacing() + grid_spacing() / 2),
component_to_parent_y (_drag_y * grid_spacing() + grid_spacing() / 2)
);
-
+
cairo_stroke (cr);
}
@@ -555,7 +555,7 @@ PortMatrixGrid::queue_draw_for (PortMatrixNode const &n)
if (n.column.bundle) {
double const x = channel_to_position (n.column, _matrix->columns()) * grid_spacing ();
-
+
_body->queue_draw_area (
component_to_parent_x (x),
_parent_rectangle.get_y(),
@@ -617,7 +617,7 @@ PortMatrixGrid::nodes_on_line (int x0, int y0, int x1, int y1) const
int dx = x1 - x0;
int dy = abs (y1 - y0);
-
+
double err = 0;
double derr = double (dy) / dx;
diff --git a/gtk2_ardour/port_matrix_grid.h b/gtk2_ardour/port_matrix_grid.h
index a8834dbdd4..7172b82699 100644
--- a/gtk2_ardour/port_matrix_grid.h
+++ b/gtk2_ardour/port_matrix_grid.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
*/
-#ifndef __gtk_ardour_port_matrix_grid_h__
-#define __gtk_ardour_port_matrix_grid_h__
+#ifndef __gtk_ardour_port_matrix_grid_h__
+#define __gtk_ardour_port_matrix_grid_h__
#include <string>
#include <vector>
@@ -53,7 +53,7 @@ public:
void draw_extra (cairo_t *);
private:
-
+
void compute_dimensions ();
void render (cairo_t *);
void render_group_pair (cairo_t *, boost::shared_ptr<const PortGroup>, boost::shared_ptr<const PortGroup>, uint32_t, uint32_t);
diff --git a/gtk2_ardour/port_matrix_labels.cc b/gtk2_ardour/port_matrix_labels.cc
index 82909a5d05..e2fe306726 100644
--- a/gtk2_ardour/port_matrix_labels.cc
+++ b/gtk2_ardour/port_matrix_labels.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/port_matrix_labels.h b/gtk2_ardour/port_matrix_labels.h
index f543166031..a977662e80 100644
--- a/gtk2_ardour/port_matrix_labels.h
+++ b/gtk2_ardour/port_matrix_labels.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/port_matrix_row_labels.cc b/gtk2_ardour/port_matrix_row_labels.cc
index fb6ab951dd..47c791afb3 100644
--- a/gtk2_ardour/port_matrix_row_labels.cc
+++ b/gtk2_ardour/port_matrix_row_labels.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ using namespace std;
PortMatrixRowLabels::PortMatrixRowLabels (PortMatrix* m, PortMatrixBody* b)
: PortMatrixLabels (m, b)
{
-
+
}
void
@@ -41,17 +41,17 @@ PortMatrixRowLabels::compute_dimensions ()
GdkPixmap* pm = gdk_pixmap_new (NULL, 1, 1, 24);
gdk_drawable_set_colormap (pm, gdk_colormap_get_system());
cairo_t* cr = gdk_cairo_create (pm);
-
+
_longest_port_name = 0;
_longest_bundle_name = 0;
_height = 0;
_highest_group_name = 0;
for (PortGroupList::List::const_iterator i = _matrix->rows()->begin(); i != _matrix->rows()->end(); ++i) {
-
+
PortGroup::BundleList const r = (*i)->bundles ();
for (PortGroup::BundleList::const_iterator j = r.begin(); j != r.end(); ++j) {
-
+
for (uint32_t k = 0; k < j->bundle->nchannels(); ++k) {
cairo_text_extents_t ext;
cairo_text_extents (cr, j->bundle->channel_name(k).c_str(), &ext);
@@ -68,7 +68,7 @@ PortMatrixRowLabels::compute_dimensions ()
}
_height += group_size (*i) * grid_spacing ();
-
+
cairo_text_extents_t ext;
cairo_text_extents (cr, (*i)->name.c_str(), &ext);
if (ext.height > _highest_group_name) {
@@ -94,7 +94,7 @@ void
PortMatrixRowLabels::render (cairo_t* cr)
{
/* BACKGROUND */
-
+
set_source_rgb (cr, background_colour());
cairo_rectangle (cr, 0, 0, _width, _height);
cairo_fill (cr);
@@ -127,17 +127,17 @@ PortMatrixRowLabels::render (cairo_t* cr)
if (h == 0) {
continue;
}
-
+
/* rectangle */
set_source_rgb (cr, get_a_group_colour (g));
double const rw = _highest_group_name + 2 * name_pad();
cairo_rectangle (cr, x, y, rw, h);
cairo_fill (cr);
-
+
/* hence what abbreviation (or not) we need for the group name */
string const upper = Glib::ustring ((*i)->name).uppercase ();
pair<string, double> display = fit_to_pixels (cr, upper, h);
-
+
/* plot it */
set_source_rgb (cr, text_colour());
cairo_move_to (cr, x + rw - name_pad(), y + (h + display.second) / 2);
@@ -145,7 +145,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
cairo_rotate (cr, - M_PI / 2);
cairo_show_text (cr, display.first.c_str());
cairo_restore (cr);
-
+
y += h;
++g;
}
@@ -158,7 +158,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
for (PortGroupList::List::const_iterator i = _matrix->rows()->begin(); i != _matrix->rows()->end(); ++i) {
if ((*i)->visible ()) {
-
+
PortGroup::BundleList const & bundles = (*i)->bundles ();
for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {
render_bundle_name (cr, background_colour (), j->has_colour ? j->colour : get_a_bundle_colour (N), 0, y, j->bundle);
@@ -173,10 +173,10 @@ PortMatrixRowLabels::render (cairo_t* cr)
} else {
y += grid_spacing();
}
-
+
++N;
}
-
+
} else {
y += grid_spacing ();
@@ -198,7 +198,7 @@ PortMatrixRowLabels::button_press (double x, double y, int b, uint32_t t)
w.second.bundle.reset ();
}
-
+
if (b == 1) {
if (w.second.bundle) {
@@ -248,7 +248,7 @@ double
PortMatrixRowLabels::bundle_name_x () const
{
double x = 0;
-
+
if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
x = _highest_group_name + 2 * name_pad();
} else {
@@ -280,7 +280,7 @@ PortMatrixRowLabels::render_bundle_name (
)
{
double const x = bundle_name_x ();
-
+
int const n = _matrix->show_only_bundles() ? 1 : b->nchannels();
set_source_rgb (cr, bg_colour);
cairo_rectangle (cr, xoff + x, yoff, _longest_bundle_name + name_pad() * 2, grid_spacing() * n);
@@ -314,11 +314,11 @@ PortMatrixRowLabels::render_channel_name (
set_source_rgb (cr, fg_colour);
cairo_set_line_width (cr, label_border_width ());
cairo_stroke (cr);
-
+
cairo_text_extents_t ext;
cairo_text_extents (cr, bc.bundle->channel_name(bc.channel).c_str(), &ext);
double const off = (grid_spacing() - ext.height) / 2;
-
+
set_source_rgb (cr, text_colour());
cairo_move_to (cr, port_name_x() + xoff + name_pad(), yoff + name_pad() + off);
cairo_show_text (cr, bc.bundle->channel_name(bc.channel).c_str());
@@ -350,7 +350,7 @@ PortMatrixRowLabels::queue_draw_for (ARDOUR::BundleChannel const & bc)
);
} else {
_body->queue_draw_area (
- component_to_parent_x (port_name_x()) - 1,
+ component_to_parent_x (port_name_x()) - 1,
component_to_parent_y (channel_y (bc)) - 1,
_longest_port_name + name_pad() * 2 + 2,
grid_spacing() + 2
diff --git a/gtk2_ardour/port_matrix_row_labels.h b/gtk2_ardour/port_matrix_row_labels.h
index 9fcb1ca831..508d45d943 100644
--- a/gtk2_ardour/port_matrix_row_labels.h
+++ b/gtk2_ardour/port_matrix_row_labels.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2009 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ public:
PortMatrixRowLabels (PortMatrix *, PortMatrixBody *);
void button_press (double, double, int, uint32_t);
-
+
double component_to_parent_x (double x) const;
double parent_to_component_x (double x) const;
double component_to_parent_y (double y) const;
@@ -56,7 +56,7 @@ private:
void render_bundle_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>);
double channel_x (ARDOUR::BundleChannel const &) const;
double channel_y (ARDOUR::BundleChannel const &) const;
-
+
void render (cairo_t *);
void compute_dimensions ();
void remove_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, uint32_t);
diff --git a/gtk2_ardour/port_matrix_types.h b/gtk2_ardour/port_matrix_types.h
index cdc458061f..f36821cd90 100644
--- a/gtk2_ardour/port_matrix_types.h
+++ b/gtk2_ardour/port_matrix_types.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,14 +26,14 @@ struct PortMatrixNode
{
PortMatrixNode () {}
PortMatrixNode (ARDOUR::BundleChannel r, ARDOUR::BundleChannel c) : row (r), column (c) {}
-
+
bool operator== (PortMatrixNode const& other) const {
return row == other.row && column == other.column;
}
bool operator!= (PortMatrixNode const& other) const {
return row != other.row || column != other.column;
}
-
+
ARDOUR::BundleChannel row;
ARDOUR::BundleChannel column;
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index b1baf30bf7..67ad782ed5 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -125,7 +125,7 @@ ProcessorBox::ProcessorBox (Session& sess, PluginSelector &plugsel,
RefPtr<TreeSelection> selection = processor_display.get_selection();
selection->set_mode (Gtk::SELECTION_MULTIPLE);
selection->signal_changed().connect (mem_fun (*this, &ProcessorBox::selection_changed));
-
+
processor_display.set_data ("processorbox", this);
processor_display.set_model (model);
processor_display.append_column (X_("notshown"), columns.text);
@@ -211,7 +211,7 @@ ProcessorBox::object_drop (const list<boost::shared_ptr<Processor> >& procs, Gtk
if (processor_display.get_path_at_pos (x, y, path, column, cellx, celly)) {
if ((iter = model->get_iter (path))) {
p = (*iter)[columns.processor];
- }
+ }
}
for (list<boost::shared_ptr<Processor> >::const_iterator i = procs.begin(); i != procs.end(); ++i) {
@@ -221,7 +221,7 @@ ProcessorBox::object_drop (const list<boost::shared_ptr<Processor> >& procs, Gtk
paste_processor_state (nlist, p);
delete &state;
}
-
+
/* since the treeview doesn't take care of this properly, we have to delete the originals
ourselves.
*/
@@ -376,17 +376,17 @@ ProcessorBox::processor_key_release_event (GdkEventKey *ev)
TreeViewColumn* column;
int cellx;
int celly;
-
+
processor_display.get_pointer (x, y);
-
+
if (processor_display.get_path_at_pos (x, y, path, column, cellx, celly)) {
if ((iter = model->get_iter (path))) {
targets.push_back ((*iter)[columns.processor]);
}
}
}
-
-
+
+
switch (ev->keyval) {
case GDK_c:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
@@ -426,7 +426,7 @@ ProcessorBox::processor_key_release_event (GdkEventKey *ev)
}
ret = true;
break;
-
+
default:
break;
}
@@ -516,7 +516,7 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev)
} else {
_placement = PostFader;
}
-
+
show_processor_menu (ev->time);
ret = true;
@@ -674,7 +674,7 @@ ProcessorBox::choose_send ()
return;
}
- /* let the user adjust the IO setup before creation.
+ /* let the user adjust the IO setup before creation.
Note: this dialog is NOT modal - we just leave it to run and it will
return when its Finished signal is emitted - typically when the window
@@ -685,7 +685,7 @@ ProcessorBox::choose_send ()
ios->show_all ();
/* keep a reference to the send so it doesn't get deleted while
- the IOSelectorWindow is doing its stuff
+ the IOSelectorWindow is doing its stuff
*/
_processor_being_created = send;
@@ -843,7 +843,7 @@ ProcessorBox::processor_name (boost::weak_ptr<Processor> weak_processor)
name_display = " (";
}
- if ((send = boost::dynamic_pointer_cast<Send> (processor)) != 0 &&
+ if ((send = boost::dynamic_pointer_cast<Send> (processor)) != 0 &&
!boost::dynamic_pointer_cast<InternalSend>(processor)) {
name_display += '>';
@@ -853,7 +853,7 @@ ProcessorBox::processor_name (boost::weak_ptr<Processor> weak_processor)
string::size_type lbracket, rbracket;
lbracket = send->name().find ('[');
rbracket = send->name().find (']');
-
+
switch (_width) {
case Wide:
name_display += send->name().substr (lbracket+1, lbracket-rbracket-1);
@@ -1036,7 +1036,7 @@ ProcessorBox::cut_processors (const ProcSelection& to_be_removed)
to_cut.push_back (*i);
}
}
-
+
if (_route->remove_processors (to_cut) != 0) {
delete node;
no_processor_redisplay = false;
@@ -1123,7 +1123,7 @@ ProcessorBox::delete_dragged_processors (const list<boost::shared_ptr<Processor>
if (gui) {
static_cast<Gtk::Widget*>(gui)->hide ();
}
-
+
_route->remove_processor(*x);
}
@@ -1216,7 +1216,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
boost::shared_ptr<Processor> p;
try {
- if (type->value() == "meter" ||
+ if (type->value() == "meter" ||
type->value() == "main-outs" ||
type->value() == "amp" ||
type->value() == "intsend" || type->value() == "intreturn") {
@@ -1224,7 +1224,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
continue;
} else if (type->value() == "send") {
-
+
XMLNode n (**niter);
Send::make_unique (n, _session);
p.reset (new Send (_session, _route->mute_master(), n));
@@ -1234,7 +1234,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
XMLNode n (**niter);
Return::make_unique (n, _session);
p.reset (new Return (_session, **niter));
-
+
} else {
/* XXX its a bit limiting to assume that everything else
is a plugin.
@@ -1320,7 +1320,7 @@ ProcessorBox::clear_processors ()
prompt = string_compose (_("Do you really want to remove all processors from %1?\n"
"(this cannot be undone)"), _route->name());
-
+
choices.push_back (_("Cancel"));
choices.push_back (_("Yes, remove them all"));
@@ -1401,7 +1401,7 @@ ProcessorBox::edit_processor (boost::shared_ptr<Processor> processor)
_parent_strip->panner_ui().set_panner (send->panner());
}
#endif
-
+
} else if ((retrn = boost::dynamic_pointer_cast<Return> (processor)) != 0) {
if (!_session.engine().connected()) {
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h
index 5dfbce7789..6a80549132 100644
--- a/gtk2_ardour/processor_box.h
+++ b/gtk2_ardour/processor_box.h
@@ -82,10 +82,10 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
void select_all_plugins ();
void select_all_inserts ();
void select_all_sends ();
-
+
sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorSelected;
sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorUnselected;
-
+
static void register_actions();
private:
@@ -118,13 +118,13 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
ModelColumns columns;
Glib::RefPtr<Gtk::ListStore> model;
-
+
void selection_changed ();
static bool get_colors;
static Gdk::Color* active_processor_color;
static Gdk::Color* inactive_processor_color;
-
+
Gtk::EventBox processor_eventbox;
Gtk::HBox processor_hpacker;
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Processor> > processor_display;
@@ -134,7 +134,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
int x, int y, Glib::RefPtr<Gdk::DragContext>& context);
Width _width;
-
+
Gtk::Menu *send_action_menu;
void build_send_action_menu ();
@@ -177,7 +177,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
void compute_processor_sort_keys ();
std::vector<sigc::connection> processor_active_connections;
std::vector<sigc::connection> processor_name_connections;
-
+
bool processor_drag_in_progress;
void processor_drag_begin (GdkDragContext*);
void processor_drag_end (GdkDragContext*);
@@ -206,7 +206,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
static Glib::RefPtr<Gtk::Action> paste_action;
void paste_processor_state (const XMLNodeList&, boost::shared_ptr<ARDOUR::Processor>);
-
+
void activate_processor (boost::shared_ptr<ARDOUR::Processor>);
void deactivate_processor (boost::shared_ptr<ARDOUR::Processor>);
void edit_processor (boost::shared_ptr<ARDOUR::Processor>);
@@ -239,7 +239,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
static void rb_deactivate_all ();
static void rb_ab_plugins ();
static void rb_edit ();
-
+
void route_name_changed ();
std::string generate_processor_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
};
diff --git a/gtk2_ardour/processor_selection.h b/gtk2_ardour/processor_selection.h
index a7d10894e9..d371493b41 100644
--- a/gtk2_ardour/processor_selection.h
+++ b/gtk2_ardour/processor_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,15 +41,15 @@ class ProcessorSelection {
node->add_child_nocopy (*newchild);
}
- void clear () {
- if (node) {
+ void clear () {
+ if (node) {
delete node;
node = 0;
}
}
bool empty () const { return node == 0 || node->children().empty(); }
-
+
const XMLNode& get_node() const { return *node; }
private:
diff --git a/gtk2_ardour/prompter.cc b/gtk2_ardour/prompter.cc
index 0e1732b237..16428eef19 100644
--- a/gtk2_ardour/prompter.cc
+++ b/gtk2_ardour/prompter.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/prompter.h b/gtk2_ardour/prompter.h
index 4e97e64e6f..0af5fdee7b 100644
--- a/gtk2_ardour/prompter.h
+++ b/gtk2_ardour/prompter.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/public_editor.cc b/gtk2_ardour/public_editor.cc
index 399c71caa9..3955083c70 100644
--- a/gtk2_ardour/public_editor.cc
+++ b/gtk2_ardour/public_editor.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index d7df0e8d2f..d0d63e060b 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@
#include "evoral/types.hpp"
#include "ardour/route_group.h"
-#include "pbd/statefuldestructible.h"
+#include "pbd/statefuldestructible.h"
#include "editing.h"
#include "canvas.h"
@@ -118,10 +118,10 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
* @param t Snap threshold in `units'.
*/
virtual void set_snap_threshold (double t) = 0;
-
+
/** Snap a value according to the current snap setting. */
virtual void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false) = 0;
-
+
/** Undo some transactions.
* @param n Number of transactions to undo.
*/
@@ -154,7 +154,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
rather than regions as black-box objects. For Ardour3, this is aimed at
editing MIDI regions but may expand in the future to other types of regions.
*/
-
+
virtual void set_internal_edit (bool yn) = 0;
/** @return Whether editing is currently in "internal" mode or not
@@ -187,7 +187,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
virtual void transition_to_rolling (bool fwd) = 0;
virtual nframes64_t unit_to_frame (double unit) const = 0;
// XXX remove me when libardour goes nframes64_t
- double frame_to_unit (nframes_t frame) const {
+ double frame_to_unit (nframes_t frame) const {
return frame_to_unit ((nframes64_t) frame);
}
virtual double frame_to_unit (nframes64_t frame) const = 0;
@@ -204,10 +204,10 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
/** Open main export dialog */
virtual void export_audio () = 0;
-
+
/** Open export dialog with current selection pre-selected */
virtual void export_selection () = 0;
-
+
/** Open export dialog with current range pre-selected */
virtual void export_range () = 0;
diff --git a/gtk2_ardour/quantize_dialog.cc b/gtk2_ardour/quantize_dialog.cc
index e8ec314133..5ed867c4c3 100644
--- a/gtk2_ardour/quantize_dialog.cc
+++ b/gtk2_ardour/quantize_dialog.cc
@@ -1,20 +1,20 @@
-/*
+/*
Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+
*/
#include "gtkmm2ext/utils.h"
@@ -195,11 +195,11 @@ QuantizeDialog::grid_size_to_musical_time (const string& txt) const
} else if (txt == _("Beats")) {
return 1.0;
}
-
+
return 1.0;
}
-float
+float
QuantizeDialog::swing () const
{
if (!swing_button.get_active()) {
@@ -209,13 +209,13 @@ QuantizeDialog::swing () const
return swing_adjustment.get_value ();
}
-float
+float
QuantizeDialog::strength () const
{
return strength_adjustment.get_value ();
}
-float
+float
QuantizeDialog::threshold () const
{
return threshold_adjustment.get_value ();
diff --git a/gtk2_ardour/quantize_dialog.h b/gtk2_ardour/quantize_dialog.h
index 71d8eaacff..97cb82c86e 100644
--- a/gtk2_ardour/quantize_dialog.h
+++ b/gtk2_ardour/quantize_dialog.h
@@ -1,16 +1,16 @@
-/*
+/*
Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 06908ca0c1..8c164c75cf 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -60,7 +60,7 @@ public:
t->attach (*l, 0, 1, n, n + 1, EXPAND | FILL, FILL);
t->attach (_mtc_combo, 1, 2, n, n + 1, EXPAND | FILL, EXPAND | FILL);
++n;
-
+
l = manage (new Label (_("MIDI clock:")));
l->set_alignment (1, 0.5);
t->attach (*l, 0, 1, n, n + 1, FILL, FILL);
@@ -102,7 +102,7 @@ public:
_mpc_combo.set_active_text (_rc_config->get_midi_port_name());
} else if (p == "midi-clock-port-name") {
_midi_clock_combo.set_active_text (_rc_config->get_midi_clock_port_name());
- }
+ }
}
void set_state_from_config ()
@@ -132,7 +132,7 @@ public:
{
_rc_config->set_midi_clock_port_name (_midi_clock_combo.get_active_text());
}
-
+
private:
void model_changed (TreeModel::Path const &, TreeModel::iterator const & i)
@@ -145,7 +145,7 @@ private:
}
if (port->input()) {
-
+
if (r[_model.online] == port->input()->offline()) {
port->input()->set_offline (!r[_model.online]);
}
@@ -160,11 +160,11 @@ private:
if (r[_model.trace_output] != port->output()->tracing()) {
port->output()->trace (r[_model.trace_output], &cerr, string (port->name()) + _(" output: "));
}
-
+
}
-
-
+
+
}
void setup_ports_combo (ComboBoxText& c)
@@ -228,7 +228,7 @@ private:
dialog.set_position (WIN_POS_MOUSE);
dialog.show ();
-
+
int const r = dialog.run ();
switch (r) {
@@ -251,17 +251,17 @@ private:
}
XMLNode node (X_("MIDI-port"));
-
+
node.add_property ("tag", dialog.port_name.get_text());
node.add_property ("device", X_("ardour")); // XXX this can't be right for all types
node.add_property ("type", MIDI::PortFactory::default_port_type());
node.add_property ("mode", smod);
-
+
if (MIDI::Manager::instance()->add_port (node) != 0) {
ports_changed ();
}
}
-
+
class MIDIModelColumns : public TreeModelColumnRecord
{
public:
@@ -321,7 +321,7 @@ public:
_box->pack_start (*t, false, false);
}
-
+
void parameter_changed (string const & p)
{
if (p == "click-sound") {
@@ -337,7 +337,7 @@ public:
parameter_changed ("click-emphasis-sound");
}
-private:
+private:
void click_browse_clicked ()
{
@@ -345,7 +345,7 @@ private:
sfdb.show_all ();
sfdb.present ();
-
+
if (sfdb.run () == RESPONSE_OK) {
click_chosen (sfdb.get_filename());
}
@@ -363,7 +363,7 @@ private:
sfdb.show_all ();
sfdb.present ();
-
+
if (sfdb.run () == RESPONSE_OK) {
click_emphasis_chosen (sfdb.get_filename());
}
@@ -463,7 +463,7 @@ public:
{
_rc_config->set_saved_history_depth (_save_undo_spin.get_value_as_int ());
}
-
+
private:
RCConfiguration* _rc_config;
CheckButton _limit_undo_button;
@@ -519,7 +519,7 @@ public:
_delete_button_spin (_delete_button_adjustment),
_edit_button_adjustment (3, 1, 5),
_edit_button_spin (_edit_button_adjustment)
-
+
{
/* internationalize and prepare for use with combos */
@@ -639,7 +639,7 @@ private:
string const txt = _keyboard_layout_selector.get_active_text();
/* XXX: config...? for all this keyboard stuff */
-
+
for (map<string,string>::iterator i = Keyboard::binding_files.begin(); i != Keyboard::binding_files.end(); ++i) {
if (txt == i->first) {
if (Keyboard::load_keybindings (i->second)) {
@@ -652,7 +652,7 @@ private:
void edit_modifier_chosen ()
{
string const txt = _edit_modifier_combo.get_active_text();
-
+
for (int i = 0; modifiers[i].name; ++i) {
if (txt == _(modifiers[i].name)) {
Keyboard::set_edit_modifier (modifiers[i].modifier);
@@ -664,7 +664,7 @@ private:
void delete_modifier_chosen ()
{
string const txt = _delete_modifier_combo.get_active_text();
-
+
for (int i = 0; modifiers[i].name; ++i) {
if (txt == _(modifiers[i].name)) {
Keyboard::set_delete_modifier (modifiers[i].modifier);
@@ -672,11 +672,11 @@ private:
}
}
}
-
+
void snap_modifier_chosen ()
{
string const txt = _snap_modifier_combo.get_active_text();
-
+
for (int i = 0; modifiers[i].name; ++i) {
if (txt == _(modifiers[i].name)) {
Keyboard::set_snap_modifier (modifiers[i].modifier);
@@ -694,7 +694,7 @@ private:
{
Keyboard::set_edit_button (_edit_button_spin.get_value_as_int());
}
-
+
ComboBoxText _keyboard_layout_selector;
ComboBoxText _edit_modifier_combo;
ComboBoxText _delete_modifier_combo;
@@ -740,9 +740,9 @@ public:
{
parameter_changed ("font-scale");
}
-
+
private:
-
+
void dpi_changed ()
{
_rc_config->set_font_scale ((long) floor (_dpi_adjustment.get_value() * 1024));
@@ -774,7 +774,7 @@ public:
parameter_changed ("solo-mute-gain");
-
+
Label* l = manage (new Label (_("Solo mute cut (dB):")));
l->set_name ("OptionsLabel");
@@ -785,7 +785,7 @@ public:
h->pack_start (_db_display, false, false);
set_size_request_to_display_given_text (_db_display, "-99.0", 12, 12);
-
+
_box->pack_start (*h, false, false);
_db_adjustment.signal_value_changed().connect (mem_fun (*this, &SoloMuteOptions::db_changed));
@@ -814,9 +814,9 @@ public:
{
parameter_changed ("solo-mute-gain");
}
-
+
private:
-
+
void db_changed ()
{
_rc_config->set_solo_mute_gain (slider_position_to_gain (_db_adjustment.get_value()));
@@ -856,7 +856,7 @@ public:
void set_state_from_config ()
{
_store->clear ();
-
+
ControlProtocolManager& m = ControlProtocolManager::instance ();
for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
@@ -903,7 +903,7 @@ private:
class ControlSurfacesModelColumns : public TreeModelColumnRecord
{
public:
-
+
ControlSurfacesModelColumns ()
{
add (name);
@@ -931,7 +931,7 @@ RCOptionEditor::RCOptionEditor ()
/* MISC */
add_option (_("Misc"), new OptionEditorHeading (_("Metering")));
-
+
ComboOption<float>* mht = new ComboOption<float> (
"meter-hold",
_("Meter hold time"),
@@ -943,7 +943,7 @@ RCOptionEditor::RCOptionEditor ()
mht->add (MeterHoldShort, _("short"));
mht->add (MeterHoldMedium, _("medium"));
mht->add (MeterHoldLong, _("long"));
-
+
add_option (_("Misc"), mht);
ComboOption<float>* mfo = new ComboOption<float> (
@@ -964,15 +964,15 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("Misc"), mfo);
add_option (_("Misc"), new OptionEditorHeading (_("Undo")));
-
+
add_option (_("Misc"), new UndoOptions (_rc_config));
add_option (_("Misc"), new OptionEditorHeading (_("Misc")));
-
+
#ifndef GTKOSX
/* font scaling does nothing with GDK/Quartz */
add_option (_("Misc"), new FontScalingOptions (_rc_config));
-#endif
+#endif
add_option (_("Misc"),
new BoolOption (
@@ -981,7 +981,7 @@ RCOptionEditor::RCOptionEditor ()
mem_fun (*_rc_config, &RCConfiguration::get_verify_remove_last_capture),
mem_fun (*_rc_config, &RCConfiguration::set_verify_remove_last_capture)
));
-
+
add_option (_("Misc"),
new BoolOption (
"periodic-safety-backups",
@@ -1141,7 +1141,7 @@ RCOptionEditor::RCOptionEditor ()
wfs->add (Logarithmic, _("logarithmic"));
add_option (_("Editor"), wfs);
-
+
ComboOption<WaveformShape>* wfsh = new ComboOption<WaveformShape> (
"waveform-shape",
_("Waveform shape"),
@@ -1159,7 +1159,7 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("Audio"), new OptionEditorHeading (_("Solo")));
- add_option (_("Audio"),
+ add_option (_("Audio"),
new BoolOption (
"solo-control-is-listen-control",
_("Solo controls are Listen controls"),
@@ -1278,23 +1278,23 @@ RCOptionEditor::RCOptionEditor ()
mem_fun (*_rc_config, &RCConfiguration::get_denormal_model),
mem_fun (*_rc_config, &RCConfiguration::set_denormal_model)
);
-
+
dm->add (DenormalNone, _("no processor handling"));
-
+
FPU fpu;
-
+
if (fpu.has_flush_to_zero()) {
dm->add (DenormalFTZ, _("use FlushToZero"));
}
-
+
if (fpu.has_denormals_are_zero()) {
dm->add (DenormalDAZ, _("use DenormalsAreZero"));
}
-
+
if (fpu.has_flush_to_zero() && fpu.has_denormals_are_zero()) {
dm->add (DenormalFTZDAZ, _("use FlushToZero and DenormalsAreZerO"));
}
-
+
add_option (_("Audio"), dm);
add_option (_("Audio"), new OptionEditorHeading (_("Plugins")));
diff --git a/gtk2_ardour/region_editor.h b/gtk2_ardour/region_editor.h
index 394ad6bcfb..596bd44140 100644
--- a/gtk2_ardour/region_editor.h
+++ b/gtk2_ardour/region_editor.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc
index 48bc7e7f4b..b08be91590 100644
--- a/gtk2_ardour/region_gain_line.cc
+++ b/gtk2_ardour/region_gain_line.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,13 +50,13 @@ AudioRegionGainLine::AudioRegionGainLine (const string & name, Session& s, Audio
}
void
-AudioRegionGainLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
+AudioRegionGainLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
{
AutomationLine::start_drag (cp, x, fraction);
if (!rv.audio_region()->envelope_active()) {
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), &rv.audio_region()->get_state(), 0));
rv.audio_region()->set_envelope_active(false);
- }
+ }
}
// This is an extended copy from AutomationList
@@ -75,8 +75,8 @@ AudioRegionGainLine::remove_point (ControlPoint& cp)
rv.audio_region()->set_envelope_active(true);
XMLNode &region_after = rv.audio_region()->get_state();
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), &region_before, &region_after));
- }
-
+ }
+
alist->erase (mr.start, mr.end);
trackview.editor().current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &before, &alist->get_state()));
@@ -85,12 +85,12 @@ AudioRegionGainLine::remove_point (ControlPoint& cp)
}
void
-AudioRegionGainLine::end_drag (ControlPoint* cp)
+AudioRegionGainLine::end_drag (ControlPoint* cp)
{
if (!rv.audio_region()->envelope_active()) {
rv.audio_region()->set_envelope_active(true);
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), 0, &rv.audio_region()->get_state()));
- }
+ }
AutomationLine::end_drag(cp);
}
diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h
index 7950c9b0e7..7033c65604 100644
--- a/gtk2_ardour/region_gain_line.h
+++ b/gtk2_ardour/region_gain_line.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ class AudioRegionGainLine : public AutomationLine
{
public:
AudioRegionGainLine (const std::string & name, ARDOUR::Session&, AudioRegionView&, ArdourCanvas::Group& parent, boost::shared_ptr<ARDOUR::AutomationList>);
-
+
void start_drag (ControlPoint*, nframes_t x, float fraction);
void end_drag (ControlPoint*);
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 59d74d933f..20dd8c1d24 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ RegionSelection::RegionSelection (const RegionSelection& other)
_current_start = other._current_start;
_current_end = other._current_end;
-
+
for (RegionSelection::const_iterator i = other.begin(); i != other.end(); ++i) {
add (*i);
}
@@ -65,10 +65,10 @@ RegionSelection::operator= (const RegionSelection& other)
if (this != &other) {
clear_all();
-
+
_current_start = other._current_start;
_current_end = other._current_end;
-
+
for (RegionSelection::const_iterator i = other.begin(); i != other.end(); ++i) {
add (*i);
}
@@ -112,11 +112,11 @@ RegionSelection::add (RegionView* rv)
if (rv->region()->first_frame() < _current_start || empty()) {
_current_start = rv->region()->first_frame();
}
-
+
if (rv->region()->last_frame() > _current_end || empty()) {
_current_end = rv->region()->last_frame();
}
-
+
push_back (rv);
/* add to layer sorted list */
@@ -148,7 +148,7 @@ RegionSelection::remove (RegionView* rv)
// remove from layer sorted list
_bylayer.remove (rv);
-
+
if (size() == 1) {
/* this is the last one, so when we delete it
@@ -159,37 +159,37 @@ RegionSelection::remove (RegionView* rv)
_current_end = 0;
} else {
-
+
boost::shared_ptr<Region> region ((*r)->region());
-
+
if (region->first_frame() == _current_start) {
-
+
/* reset current start */
-
+
nframes_t ref = max_frames;
-
+
for (RegionSelection::iterator i = begin (); i != end(); ++i) {
if (region->first_frame() < ref) {
ref = region->first_frame();
}
}
-
+
_current_start = ref;
-
+
}
-
+
if (region->last_frame() == _current_end) {
/* reset current end */
-
+
nframes_t ref = 0;
-
+
for (RegionSelection::iterator i = begin (); i != end(); ++i) {
if (region->first_frame() > ref) {
ref = region->first_frame();
}
}
-
+
_current_end = ref;
}
}
@@ -251,7 +251,7 @@ RegionSelection::by_position (list<RegionView*>& foo) const
struct RegionSortByTrack {
bool operator() (const RegionView* a, const RegionView* b) const {
-
+
/* really, track and position */
if (a->get_trackview().order() == b->get_trackview().order()) {
diff --git a/gtk2_ardour/region_selection.h b/gtk2_ardour/region_selection.h
index 305fc69afd..f89eef9eb8 100644
--- a/gtk2_ardour/region_selection.h
+++ b/gtk2_ardour/region_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,26 +45,26 @@ class RegionSelection : public std::list<RegionView*>, public sigc::trackable
bool involves (const TimeAxisView&) const;
void clear_all();
-
+
nframes_t start () const {
return _current_start;
}
/* "end" collides with list<>::end */
- nframes_t end_frame () const {
+ nframes_t end_frame () const {
return _current_end;
}
const std::list<RegionView *>& by_layer() const { return _bylayer; }
void by_position (std::list<RegionView*>&) const;
void by_track (std::list<RegionView*>&) const;
-
+
private:
void remove_it (RegionView*);
void add_to_layer (RegionView *);
-
+
nframes_t _current_start; ///< start position for the selection
nframes_t _current_end; ///< end position for the selection
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index c3d48d4aa2..bb5240f871 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2006 Paul Davis
+ Copyright (C) 2001-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ static const int32_t sync_mark_width = 9;
sigc::signal<void,RegionView*> RegionView::RegionViewGoingAway;
-RegionView::RegionView (ArdourCanvas::Group* parent,
+RegionView::RegionView (ArdourCanvas::Group* parent,
TimeAxisView& tv,
boost::shared_ptr<ARDOUR::Region> r,
double spu,
@@ -101,7 +101,7 @@ RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other
, TimeAxisViewItem (other)
, _time_converter(other._time_converter)
{
- /* this is a pseudo-copy constructor used when dragging regions
+ /* this is a pseudo-copy constructor used when dragging regions
around on the canvas.
*/
@@ -114,7 +114,7 @@ RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other
_height = other._height;
}
-RegionView::RegionView (ArdourCanvas::Group* parent,
+RegionView::RegionView (ArdourCanvas::Group* parent,
TimeAxisView& tv,
boost::shared_ptr<ARDOUR::Region> r,
double spu,
@@ -154,7 +154,7 @@ RegionView::init (Gdk::Color const & basic_color, bool wfd)
if (name_highlight) {
name_highlight->set_data ("regionview", this);
name_highlight->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_name_highlight_event), name_highlight, this));
-
+
frame_handle_start->set_data ("regionview", this);
frame_handle_start->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_frame_handle_event), frame_handle_start, this));
@@ -210,7 +210,7 @@ RegionView::_lock_toggle (ArdourCanvas::Item*, GdkEvent* ev, void* arg)
break;
default:
break;
- }
+ }
return FALSE;
}
@@ -268,7 +268,7 @@ RegionView::region_resized (Change what_changed)
set_duration (_region->length(), 0);
unit_length = _region->length() / samples_per_unit;
-
+
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
(*i)->set_duration (unit_length);
@@ -351,7 +351,7 @@ RegionView::set_duration (nframes64_t frames, void *src)
if (!TimeAxisViewItem::set_duration (frames, src)) {
return false;
}
-
+
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
(*i)->set_duration (_region->length() / samples_per_unit);
}
@@ -363,7 +363,7 @@ void
RegionView::set_colors ()
{
TimeAxisViewItem::set_colors ();
-
+
if (sync_mark) {
sync_mark->property_fill_color_rgba() = fill_color;
sync_line->property_fill_color_rgba() = fill_color;
@@ -390,7 +390,7 @@ RegionView::fake_set_opaque (bool yn)
} else {
fill_opacity = 60;
}
-
+
set_frame_color ();
}
@@ -458,7 +458,7 @@ RegionView::region_sync_changed ()
if (!sync_mark) {
/* points set below */
-
+
sync_mark = new ArdourCanvas::Polygon (*group);
sync_mark->property_fill_color_rgba() = fill_color;
@@ -474,13 +474,13 @@ RegionView::region_sync_changed ()
if (sync_offset == 0) {
/* no sync mark - its the start of the region */
-
+
sync_mark->hide();
sync_line->hide ();
} else {
- if ((sync_dir < 0) || ((sync_dir > 0) && (sync_offset > _region->length()))) {
+ if ((sync_dir < 0) || ((sync_dir > 0) && (sync_offset > _region->length()))) {
/* no sync mark - its out of the bounds of the region */
@@ -492,14 +492,14 @@ RegionView::region_sync_changed ()
/* lets do it */
Points points;
-
+
//points = sync_mark->property_points().get_value();
-
+
double offset = sync_offset / samples_per_unit;
points.push_back (Gnome::Art::Point (offset - ((sync_mark_width-1)/2), 1));
points.push_back (Gnome::Art::Point (offset + ((sync_mark_width-1)/2), 1));
points.push_back (Gnome::Art::Point (offset, sync_mark_width - 1));
- points.push_back (Gnome::Art::Point (offset - ((sync_mark_width-1)/2), 1));
+ points.push_back (Gnome::Art::Point (offset - ((sync_mark_width-1)/2), 1));
sync_mark->property_points().set_value (points);
sync_mark->show ();
@@ -614,7 +614,7 @@ RegionView::update_coverage_frames (LayerDisplay d)
uint32_t const color = frame->property_fill_color_rgba ();
uint32_t const base_alpha = UINT_RGBA_A (color);
-
+
while (t < end) {
t++;
diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h
index 3f2f71eda4..288969616f 100644
--- a/gtk2_ardour/region_view.h
+++ b/gtk2_ardour/region_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2006 Paul Davis
+ Copyright (C) 2001-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ class AutomationRegionView;
class RegionView : public TimeAxisViewItem
{
public:
- RegionView (ArdourCanvas::Group* parent,
+ RegionView (ArdourCanvas::Group* parent,
TimeAxisView& time_view,
boost::shared_ptr<ARDOUR::Region> region,
double samples_per_unit,
@@ -51,36 +51,36 @@ class RegionView : public TimeAxisViewItem
RegionView (const RegionView& other, boost::shared_ptr<ARDOUR::Region> other_region);
~RegionView ();
-
+
virtual void init (Gdk::Color const & base_color, bool wait_for_data);
-
+
boost::shared_ptr<ARDOUR::Region> region() const { return _region; }
-
+
bool is_valid() const { return valid; }
void set_valid (bool yn) { valid = yn; }
-
+
virtual void set_height (double);
virtual void set_samples_per_unit (double);
virtual bool set_duration (nframes64_t, void*);
-
+
void move (double xdelta, double ydelta);
-
+
void raise_to_top ();
void lower_to_bottom ();
bool set_position(nframes64_t pos, void* src, double* delta = 0);
void fake_set_opaque (bool yn);
-
+
virtual void show_region_editor () {}
virtual void hide_region_editor();
-
+
virtual void region_changed (ARDOUR::Change);
-
+
virtual GhostRegion* add_ghost (TimeAxisView&) = 0;
void remove_ghost_in (TimeAxisView&);
void remove_ghost (GhostRegion*);
-
+
uint32_t get_fill_color ();
virtual void entered () {}
@@ -88,22 +88,22 @@ class RegionView : public TimeAxisViewItem
void enable_display(bool yn) { _enable_display = yn; }
virtual void update_coverage_frames (LayerDisplay);
-
+
static sigc::signal<void,RegionView*> RegionViewGoingAway;
-
+
protected:
-
+
/** Allows derived types to specify their visibility requirements
* to the TimeAxisViewItem parent class
*/
- RegionView (ArdourCanvas::Group *,
+ RegionView (ArdourCanvas::Group *,
TimeAxisView&,
boost::shared_ptr<ARDOUR::Region>,
double samples_per_unit,
Gdk::Color const & basic_color,
bool recording,
TimeAxisViewItem::Visibility);
-
+
virtual void region_resized (ARDOUR::Change);
virtual void region_muted ();
void region_locked ();
@@ -121,26 +121,26 @@ class RegionView : public TimeAxisViewItem
virtual void reset_width_dependent_items (double pixel_width);
virtual void color_handler () {}
-
+
boost::shared_ptr<ARDOUR::Region> _region;
-
- ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
- ArdourCanvas::Line* sync_line; ///< polgyon for sync position
+
+ ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
+ ArdourCanvas::Line* sync_line; ///< polgyon for sync position
RegionEditor* editor;
std::vector<ControlPoint *> control_points;
double current_visible_sync_position;
- bool valid; ///< see StreamView::redisplay_diskstream()
- bool _enable_display; ///< see StreamView::redisplay_diskstream()
+ bool valid; ///< see StreamView::redisplay_diskstream()
+ bool _enable_display; ///< see StreamView::redisplay_diskstream()
double _pixel_width;
double _height;
bool in_destructor;
-
+
bool wait_for_data;
sigc::connection data_ready_connection;
-
+
std::vector<GhostRegion*> ghosts;
/** a list of rectangles which are used in stacked display mode to colour
diff --git a/gtk2_ardour/return_ui.cc b/gtk2_ardour/return_ui.cc
index d671e582db..d5e367d8d9 100644
--- a/gtk2_ardour/return_ui.cc
+++ b/gtk2_ardour/return_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,14 +42,14 @@ ReturnUI::ReturnUI (Gtk::Window* parent, boost::shared_ptr<Return> r, Session& s
_hbox.pack_start (_gpm, true, true);
set_name ("ReturnUIFrame");
-
+
_vbox.set_spacing (5);
_vbox.set_border_width (5);
_vbox.pack_start (_hbox, false, false, false);
io = manage (new IOSelector (parent, se, r->output()));
-
+
pack_start (_vbox, false, false);
pack_start (*io, true, true);
@@ -58,10 +58,10 @@ ReturnUI::ReturnUI (Gtk::Window* parent, boost::shared_ptr<Return> r, Session& s
_return->set_metering (true);
_return->input()->changed.connect (mem_fun (*this, &ReturnUI::ins_changed));
-
+
_gpm.setup_meters ();
_gpm.set_fader_name ("ReturnUIFrame");
-
+
// screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (mem_fun (*this, &ReturnUI::update));
fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &ReturnUI::fast_update));
}
@@ -97,7 +97,7 @@ ReturnUI::fast_update ()
_gpm.update_meters ();
}
}
-
+
ReturnUIWindow::ReturnUIWindow (boost::shared_ptr<Return> s, Session& ss)
: ArdourDialog (string("Ardour: return ") + s->name())
{
@@ -109,7 +109,7 @@ ReturnUIWindow::ReturnUIWindow (boost::shared_ptr<Return> s, Session& ss)
get_vbox()->pack_start (hpacker);
set_name ("ReturnUIWindow");
-
+
going_away_connection = s->GoingAway.connect (mem_fun (*this, &ReturnUIWindow::return_going_away));
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
}
diff --git a/gtk2_ardour/return_ui.h b/gtk2_ardour/return_ui.h
index 5dca1b9e29..3a5e3c8f3f 100644
--- a/gtk2_ardour/return_ui.h
+++ b/gtk2_ardour/return_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@ class ReturnUI : public Gtk::HBox
sigc::connection screen_update_connection;
sigc::connection fast_screen_update_connection;
-
+
void ins_changed (ARDOUR::IOChange, void*);
};
diff --git a/gtk2_ardour/rgb_macros.h b/gtk2_ardour/rgb_macros.h
index 5660e90ee6..d5b5722687 100644
--- a/gtk2_ardour/rgb_macros.h
+++ b/gtk2_ardour/rgb_macros.h
@@ -1,9 +1,9 @@
/*
Copyright (C) 2000 EMC Capital Management, Inc.
-
+
Developed by Jon Trowbridge <trow@gnu.org> and
Havoc Pennington <hp@pobox.com>.
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
diff --git a/gtk2_ardour/rhythm_ferret.cc b/gtk2_ardour/rhythm_ferret.cc
index aeaff98a54..44c3d8a9bb 100644
--- a/gtk2_ardour/rhythm_ferret.cc
+++ b/gtk2_ardour/rhythm_ferret.cc
@@ -92,7 +92,7 @@ RhythmFerret::RhythmFerret (PublicEditor& e)
ferret_packer.set_spacing (6);
ferret_packer.set_border_width (6);
-
+
vector<string> strings;
analysis_mode_strings = I18N (_analysis_mode_strings);
@@ -102,7 +102,7 @@ RhythmFerret::RhythmFerret (PublicEditor& e)
onset_function_strings = I18N (_onset_function_strings);
Gtkmm2ext::set_popdown_strings (onset_detection_function_selector, onset_function_strings);
- /* Onset plugin uses complex domain as default function
+ /* Onset plugin uses complex domain as default function
XXX there should be a non-hacky way to set this
*/
onset_detection_function_selector.set_active_text (onset_function_strings[3]);
@@ -124,13 +124,13 @@ RhythmFerret::RhythmFerret (PublicEditor& e)
ferret_packer.pack_start (analyze_button, false, false);
analyze_button.signal_clicked().connect (mem_fun (*this, &RhythmFerret::run_analysis));
-
+
box = manage (new HBox);
box->set_spacing (6);
box->pack_start (detection_threshold_label, false, false);
box->pack_start (detection_threshold_scale, true, true);
perc_onset_packer.pack_start (*box, false, false);
-
+
box = manage (new HBox);
box->set_spacing (6);
box->pack_start (sensitivity_label, false, false);
@@ -142,13 +142,13 @@ RhythmFerret::RhythmFerret (PublicEditor& e)
box->pack_start (onset_function_label, false, false);
box->pack_start (onset_detection_function_selector, true, true);
note_onset_packer.pack_start (*box, false, false);
-
+
box = manage (new HBox);
box->set_spacing (6);
box->pack_start (peak_picker_label, false, false);
box->pack_start (peak_picker_threshold_scale, true, true);
note_onset_packer.pack_start (*box, false, false);
-
+
box = manage (new HBox);
box->set_spacing (6);
box->pack_start (silence_label, false, false);
@@ -158,7 +158,7 @@ RhythmFerret::RhythmFerret (PublicEditor& e)
analysis_mode_changed ();
ferret_frame.add (ferret_packer);
-
+
logo = manage (new Gtk::Image (::get_icon (X_("ferret_02"))));
if (logo) {
@@ -171,7 +171,7 @@ RhythmFerret::RhythmFerret (PublicEditor& e)
lower_hpacker.set_spacing (6);
action_button.signal_clicked().connect (mem_fun (*this, &RhythmFerret::do_action));
-
+
get_vbox()->set_border_width (6);
get_vbox()->set_spacing (6);
get_vbox()->pack_start (upper_hpacker, true, true);
@@ -210,7 +210,7 @@ RhythmFerret::get_analysis_mode () const
if (str == analysis_mode_strings[(int) NoteOnset]) {
return NoteOnset;
- }
+ }
return PercussionOnset;
}
@@ -289,7 +289,7 @@ RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readabl
}
/* merge */
-
+
results.insert (results.end(), these_results.begin(), these_results.end());
these_results.clear ();
}
@@ -323,29 +323,29 @@ RhythmFerret::run_note_onset_analysis (boost::shared_ptr<Readable> readable, nfr
{
try {
OnsetDetector t (session->frame_rate());
-
+
for (uint32_t i = 0; i < readable->n_channels(); ++i) {
-
+
AnalysisFeatureList these_results;
-
+
t.reset ();
-
+
t.set_function (get_note_onset_function());
t.set_silence_threshold (silence_threshold_adjustment.get_value());
t.set_peak_threshold (peak_picker_threshold_adjustment.get_value());
-
+
if (t.run ("", readable.get(), i, these_results)) {
continue;
}
-
+
/* translate all transients to give absolute position */
-
+
for (AnalysisFeatureList::iterator x = these_results.begin(); x != these_results.end(); ++x) {
(*x) += offset;
}
-
+
/* merge */
-
+
results.insert (results.end(), these_results.begin(), these_results.end());
these_results.clear ();
}
@@ -407,7 +407,7 @@ RhythmFerret::do_split_action ()
i = tmp;
}
-
+
session->commit_reversible_command ();
}
diff --git a/gtk2_ardour/rhythm_ferret.h b/gtk2_ardour/rhythm_ferret.h
index 91c10695ad..68d3d5f9e4 100644
--- a/gtk2_ardour/rhythm_ferret.h
+++ b/gtk2_ardour/rhythm_ferret.h
@@ -36,7 +36,7 @@ class RhythmFerret : public ArdourDialog {
DefineTempoMap,
ConformRegion
};
-
+
RhythmFerret (PublicEditor&);
~RhythmFerret ();
@@ -44,7 +44,7 @@ class RhythmFerret : public ArdourDialog {
protected:
void on_hide ();
-
+
private:
PublicEditor& editor;
diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc
index 83a36d083f..4bcc26a35a 100644
--- a/gtk2_ardour/route_group_dialog.cc
+++ b/gtk2_ardour/route_group_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,12 +63,12 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
HBox* hbox = manage (new HBox);
hbox->set_spacing (6);
l = manage (new Label (_("Name:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false ));
-
+
hbox->pack_start (*l, false, true);
hbox->pack_start (_name, true, true);
vbox->pack_start (*hbox, false, true);
-
+
VBox* options_box = manage (new VBox);
options_box->set_spacing (6);
@@ -88,7 +88,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
_edit.set_active (_group->property (RouteGroup::Edit));
gain_toggled ();
-
+
Table* table = manage (new Table (8, 3, false));
table->set_row_spacings (6);
diff --git a/gtk2_ardour/route_group_dialog.h b/gtk2_ardour/route_group_dialog.h
index e35a42f648..35080ba21f 100644
--- a/gtk2_ardour/route_group_dialog.h
+++ b/gtk2_ardour/route_group_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ public:
int do_run ();
-private:
+private:
ARDOUR::RouteGroup* _group;
Gtk::Entry _name;
diff --git a/gtk2_ardour/route_group_menu.cc b/gtk2_ardour/route_group_menu.cc
index cdb264aa9c..6c3e9db73d 100644
--- a/gtk2_ardour/route_group_menu.cc
+++ b/gtk2_ardour/route_group_menu.cc
@@ -39,7 +39,7 @@ void
RouteGroupMenu::rebuild (RouteGroup* curr)
{
using namespace Menu_Helpers;
-
+
items().clear ();
items().push_back (MenuElem (_("New group..."), mem_fun (*this, &RouteGroupMenu::new_group)));
@@ -51,7 +51,7 @@ RouteGroupMenu::rebuild (RouteGroup* curr)
if (curr == 0) {
static_cast<RadioMenuItem*> (&items().back())->set_active ();
}
-
+
_session.foreach_route_group (bind (mem_fun (*this, &RouteGroupMenu::add_item), curr, &group));
}
@@ -61,10 +61,10 @@ RouteGroupMenu::add_item (RouteGroup* rg, RouteGroup* curr, RadioMenuItem::Group
using namespace Menu_Helpers;
items().push_back (RadioMenuElem (*group, rg->name(), bind (mem_fun(*this, &RouteGroupMenu::set_group), rg)));
-
+
if (rg == curr) {
static_cast<RadioMenuItem*> (&items().back())->set_active ();
- }
+ }
}
void
diff --git a/gtk2_ardour/route_group_menu.h b/gtk2_ardour/route_group_menu.h
index 7827179acb..ba955f64a2 100644
--- a/gtk2_ardour/route_group_menu.h
+++ b/gtk2_ardour/route_group_menu.h
@@ -31,12 +31,12 @@ public:
void rebuild (ARDOUR::RouteGroup *);
sigc::signal<void, ARDOUR::RouteGroup*> GroupSelected;
-
+
private:
void add_item (ARDOUR::RouteGroup *, ARDOUR::RouteGroup *, Gtk::RadioMenuItem::Group*);
void new_group ();
void set_group (ARDOUR::RouteGroup *);
-
+
ARDOUR::Session& _session;
ARDOUR::RouteGroup::Property _default_properties;
};
diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc
index fe3d59d837..fc7c7bb7ce 100644
--- a/gtk2_ardour/route_params_ui.cc
+++ b/gtk2_ardour/route_params_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -64,7 +64,7 @@ RouteParams_UI::RouteParams_UI ()
: ArdourDialog ("track/bus inspector"),
latency_apply_button (Stock::APPLY),
track_menu(0)
-
+
{
insert_box = 0;
_input_iosel = 0;
@@ -103,17 +103,17 @@ RouteParams_UI::RouteParams_UI ()
route_select_frame.add(route_select_scroller);
list_vpacker.pack_start (route_select_frame, true, true);
-
+
notebook.pages().push_back (TabElem (input_frame, _("Inputs")));
notebook.pages().push_back (TabElem (output_frame, _("Outputs")));
notebook.pages().push_back (TabElem (redir_hpane, _("Plugins, Inserts & Sends")));
notebook.pages().push_back (TabElem (latency_frame, _("Latency")));
notebook.set_name ("InspectorNotebook");
-
+
title_label.set_name ("RouteParamsTitleLabel");
update_title();
-
+
latency_packer.set_spacing (18);
latency_button_box.pack_start (latency_apply_button);
delay_label.set_alignment (0, 0.5);
@@ -121,32 +121,32 @@ RouteParams_UI::RouteParams_UI ()
// changeable area
route_param_frame.set_name("RouteParamsBaseFrame");
route_param_frame.set_shadow_type (Gtk::SHADOW_IN);
-
-
+
+
route_hpacker.pack_start (notebook, true, true);
-
+
route_vpacker.pack_start (title_label, false, false);
route_vpacker.pack_start (route_hpacker, true, true);
-
+
list_hpane.pack1 (list_vpacker);
list_hpane.add2 (route_vpacker);
list_hpane.set_position(110);
redir_hpane.set_position(110);
-
+
//global_vpacker.pack_start (list_hpane, true, true);
//get_vbox()->pack_start (global_vpacker);
get_vbox()->pack_start (list_hpane);
-
-
+
+
set_name ("RouteParamsWindow");
set_default_size (620,370);
set_wmclass (X_("ardour_route_parameters"), "Ardour");
WindowTitle title(Glib::get_application_name());
- title += _("Track/Bus Inspector");
+ title += _("Track/Bus Inspector");
set_title (title.get_string());
@@ -155,9 +155,9 @@ RouteParams_UI::RouteParams_UI ()
route_display.get_column(0)->signal_clicked().connect(mem_fun(*this, &RouteParams_UI::show_track_menu));
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_RELEASE_MASK);
-
+
_plugin_selector = new PluginSelector (PluginManager::the_manager());
- _plugin_selector->signal_delete_event().connect (bind (ptr_fun (just_hide_it),
+ _plugin_selector->signal_delete_event().connect (bind (ptr_fun (just_hide_it),
static_cast<Window *> (_plugin_selector)));
@@ -172,20 +172,20 @@ void
RouteParams_UI::add_routes (RouteList& routes)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::add_routes), routes));
-
+
for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
if (route->is_hidden()) {
return;
}
-
+
TreeModel::Row row = *(route_display_model->append());
row[route_display_columns.text] = route->name();
row[route_display_columns.route] = route;
-
+
//route_select_list.rows().back().select ();
-
+
route->NameChanged.connect (bind (mem_fun(*this, &RouteParams_UI::route_name_changed), route));
route->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::route_removed), route));
}
@@ -225,7 +225,7 @@ RouteParams_UI::setup_processor_boxes()
// just in case... shouldn't need this
cleanup_processor_boxes();
-
+
// construct new redirect boxes
insert_box = new ProcessorBox(*session, *_plugin_selector, _rr_selection, 0);
insert_box->set_route (_route);
@@ -293,7 +293,7 @@ RouteParams_UI::setup_latency_frame ()
latency_apply_conn = latency_apply_button.signal_clicked().connect (mem_fun (*latency_widget, &LatencyGUI::finish));
latency_conn = _route->signal_latency_changed.connect (mem_fun (*this, &RouteParams_UI::refresh_latency));
delay_conn = _route->initial_delay_changed.connect (mem_fun (*this, &RouteParams_UI::refresh_latency));
-
+
latency_frame.add (latency_packer);
latency_frame.show_all ();
}
@@ -302,13 +302,13 @@ void
RouteParams_UI::setup_io_frames()
{
cleanup_io_frames();
-
+
// input
_input_iosel = new IOSelector (this, *session, _route->input());
_input_iosel->setup ();
input_frame.add (*_input_iosel);
input_frame.show_all();
-
+
// output
_output_iosel = new IOSelector (this, *session, _route->output());
_output_iosel->setup ();
@@ -340,7 +340,7 @@ RouteParams_UI::cleanup_view (bool stopupdate)
{
if (_active_view) {
GenericPluginUI * plugui = 0;
-
+
if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_view)) != 0) {
plugui->stop_updating (0);
}
@@ -373,7 +373,7 @@ RouteParams_UI::route_removed (boost::shared_ptr<Route> route)
cleanup_io_frames();
cleanup_view();
cleanup_processor_boxes();
-
+
_route.reset ((Route*) 0);
_processor.reset ((Processor*) 0);
update_title();
@@ -400,7 +400,7 @@ RouteParams_UI::set_session (Session *sess)
//route_select_list.thaw ();
_plugin_selector->set_session (session);
-}
+}
void
@@ -487,7 +487,7 @@ RouteParams_UI::processors_changed ()
{
ENSURE_GUI_THREAD(mem_fun(*this, &RouteParams_UI::processors_changed));
cleanup_view();
-
+
_processor.reset ((Processor*) 0);
//update_title();
@@ -497,12 +497,12 @@ void
RouteParams_UI::show_track_menu()
{
using namespace Menu_Helpers;
-
+
if (track_menu == 0) {
track_menu = new Menu;
track_menu->set_name ("ArdourContextMenu");
- track_menu->items().push_back
- (MenuElem (_("Add Track/Bus"),
+ track_menu->items().push_back
+ (MenuElem (_("Add Track/Bus"),
bind (mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::add_route), (Gtk::Window*) 0)));
}
track_menu->popup (1, gtk_get_current_event_time());
@@ -515,7 +515,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert)
boost::shared_ptr<Return> retrn;
boost::shared_ptr<PluginInsert> plugin_insert;
boost::shared_ptr<PortInsert> port_insert;
-
+
if ((send = boost::dynamic_pointer_cast<Send> (insert)) != 0) {
SendUI *send_ui = new SendUI (this, send, *session);
@@ -524,7 +524,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert)
_plugin_conn = send->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away),
insert));
_active_view = send_ui;
-
+
redir_hpane.add2 (*_active_view);
redir_hpane.show_all();
@@ -536,11 +536,11 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert)
_plugin_conn = retrn->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away),
insert));
_active_view = return_ui;
-
+
redir_hpane.add2 (*_active_view);
redir_hpane.show_all();
- } else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
+ } else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
GenericPluginUI *plugin_ui = new GenericPluginUI (plugin_insert, true);
@@ -555,7 +555,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert)
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (insert)) != 0) {
PortInsertUI *portinsert_ui = new PortInsertUI (this, *session, port_insert);
-
+
cleanup_view();
_plugin_conn = port_insert->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away),
insert));
@@ -564,18 +564,18 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert)
portinsert_ui->redisplay();
redir_hpane.show_all();
}
-
+
_processor = insert;
-
+
update_title();
-
+
}
void
RouteParams_UI::plugin_going_away (Placement place)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), place));
-
+
// delete the current view without calling finish
if (place == PreFader) {
@@ -589,13 +589,13 @@ RouteParams_UI::redirect_going_away (boost::shared_ptr<ARDOUR::Processor> insert
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
-
+
printf ("redirect going away\n");
// delete the current view without calling finish
if (insert == _processor) {
cleanup_view (false);
_processor.reset ((Processor*) 0);
- }
+ }
}
void
@@ -628,13 +628,13 @@ RouteParams_UI::update_title ()
title_label.set_text(_("No Route Selected"));
title += _("No Route Selected");
set_title(title.get_string());
- }
+ }
}
void
RouteParams_UI::start_updating ()
{
- update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
+ update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
(mem_fun(*this, &RouteParams_UI::update_views));
}
@@ -649,7 +649,7 @@ RouteParams_UI::update_views ()
{
SendUI *sui;
// TODO: only do it if correct tab is showing
-
+
if ((sui = dynamic_cast<SendUI*> (_active_view)) != 0) {
sui->update ();
}
diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h
index 5fd7487bc1..75c0ef731d 100644
--- a/gtk2_ardour/route_params_ui.h
+++ b/gtk2_ardour/route_params_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -88,17 +88,17 @@ class RouteParams_UI : public ArdourDialog
Gtk::VBox route_vpacker;
ProcessorBox* insert_box;
-
+
Gtk::HPaned list_hpane;
Gtk::HPaned right_hpane;
-
+
Gtk::Frame route_choice_frame;
Gtk::Frame route_param_frame;
Gtk::VBox choice_vpacker;
-
+
Gtk::Frame latency_frame;
Gtk::VBox latency_packer;
Gtk::HButtonBox latency_button_box;
@@ -110,17 +110,17 @@ class RouteParams_UI : public ArdourDialog
sigc::connection latency_apply_conn;
void refresh_latency ();
-
+
Gtk::ToggleButton input_button;
Gtk::ToggleButton output_button;
Gtk::Label track_input_label;
-
+
Gtk::Label title_label;
-
+
Gtk::Container * _active_view;
IOSelector * _input_iosel;
IOSelector * _output_iosel;
-
+
PluginSelector *_plugin_selector;
RouteRedirectSelection _rr_selection;
@@ -131,16 +131,16 @@ class RouteParams_UI : public ArdourDialog
boost::shared_ptr<ARDOUR::Processor> _processor;
sigc::connection _plugin_conn;
-
+
enum ConfigView {
NO_CONFIG_VIEW = 0,
INPUT_CONFIG_VIEW,
OUTPUT_CONFIG_VIEW,
- PLUGIN_CONFIG_VIEW,
+ PLUGIN_CONFIG_VIEW,
PORTINSERT_CONFIG_VIEW,
SEND_CONFIG_VIEW
};
-
+
ConfigView _current_view;
@@ -158,7 +158,7 @@ class RouteParams_UI : public ArdourDialog
Gtk::TreeView route_display;
Glib::RefPtr<Gtk::ListStore> route_display_model;
-
+
void add_routes (ARDOUR::RouteList&);
void route_name_changed (boost::shared_ptr<ARDOUR::Route> route);
@@ -173,25 +173,25 @@ class RouteParams_UI : public ArdourDialog
void cleanup_view(bool stopupdate = true);
void cleanup_latency_frame ();
void setup_latency_frame ();
-
+
void processors_changed ();
-
+
void setup_processor_boxes();
void cleanup_processor_boxes();
void redirect_selected (boost::shared_ptr<ARDOUR::Processor>);
-
+
void plugin_going_away (ARDOUR::Placement);
void redirect_going_away (boost::shared_ptr<ARDOUR::Processor>);
gint edit_input_configuration (GdkEventButton *ev);
gint edit_output_configuration (GdkEventButton *ev);
-
+
void update_routeinfo (ARDOUR::Route * route);
-
+
Gtk::Menu *track_menu;
void show_track_menu();
-
+
void update_title ();
//void unselect_all_redirects ();
diff --git a/gtk2_ardour/route_processor_selection.cc b/gtk2_ardour/route_processor_selection.cc
index 243a32b0c5..dfc345f63e 100644
--- a/gtk2_ardour/route_processor_selection.cc
+++ b/gtk2_ardour/route_processor_selection.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -130,4 +130,4 @@ RouteRedirectSelection::empty ()
{
return processors.empty () && routes.empty ();
}
-
+
diff --git a/gtk2_ardour/route_processor_selection.h b/gtk2_ardour/route_processor_selection.h
index bb0e6701e1..83bdbc2d8b 100644
--- a/gtk2_ardour/route_processor_selection.h
+++ b/gtk2_ardour/route_processor_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
#include "processor_selection.h"
#include "route_selection.h"
-class RouteRedirectSelection : public sigc::trackable
+class RouteRedirectSelection : public sigc::trackable
{
public:
ProcessorSelection processors;
diff --git a/gtk2_ardour/route_selection.h b/gtk2_ardour/route_selection.h
index 311641b4ae..c11feabc13 100644
--- a/gtk2_ardour/route_selection.h
+++ b/gtk2_ardour/route_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 9a3a6a3124..954841a163 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -210,7 +210,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
ARDOUR_UI::instance()->tooltips().set_tip(automation_button, _("Automation"));
ARDOUR_UI::instance()->tooltips().set_tip(visual_button, _("Visual options"));
ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("Hide this track"));
-
+
label_view ();
if (0) {
@@ -259,7 +259,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
_session,
(RouteGroup::Property) (RouteGroup::Mute | RouteGroup::Solo | RouteGroup::Edit)
);
-
+
route_group_menu->GroupSelected.connect (mem_fun (*this, &RouteTimeAxisView::set_route_group_from_menu));
gm.get_gain_slider().signal_scroll_event().connect(mem_fun(*this, &RouteTimeAxisView::controls_ebox_scroll), false);
@@ -276,7 +276,7 @@ RouteTimeAxisView::~RouteTimeAxisView ()
delete playlist_menu;
playlist_menu = 0;
-
+
delete playlist_action_menu;
playlist_action_menu = 0;
@@ -286,7 +286,7 @@ RouteTimeAxisView::~RouteTimeAxisView ()
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
delete i->second;
}
-
+
_automation_tracks.clear ();
delete route_group_menu;
@@ -362,12 +362,12 @@ void
RouteTimeAxisView::playlist_click ()
{
// always build a new action menu
-
+
delete playlist_action_menu;
playlist_action_menu = new Menu;
playlist_action_menu->set_name ("ArdourContextMenu");
-
+
build_playlist_menu (playlist_action_menu);
conditionally_add_to_selection ();
@@ -394,7 +394,7 @@ RouteTimeAxisView::set_state (const XMLNode& node)
if (_view && (prop = node.property ("layer-display"))) {
set_layer_display (LayerDisplay (string_2_enum (prop->value(), _view->layer_display ())));
}
-
+
for (iter = kids.begin(); iter != kids.end(); ++iter) {
if ((*iter)->name() == AutomationTimeAxisView::state_node_name) {
if ((prop = (*iter)->property ("automation-id")) != 0) {
@@ -419,7 +419,7 @@ RouteTimeAxisView::build_automation_action_menu ()
automation_action_menu = manage (new Menu);
MenuList& automation_items = automation_action_menu->items();
automation_action_menu->set_name ("ArdourContextMenu");
-
+
automation_items.push_back (MenuElem (_("Show all automation"),
mem_fun(*this, &RouteTimeAxisView::show_all_automation)));
@@ -434,7 +434,7 @@ RouteTimeAxisView::build_automation_action_menu ()
automation_items.push_back (MenuElem (_("Plugins"), subplugin_menu));
automation_items.back().set_sensitive (!subplugin_menu.items().empty());
-
+
map<Evoral::Parameter, RouteAutomationNode*>::iterator i;
for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
@@ -442,7 +442,7 @@ RouteTimeAxisView::build_automation_action_menu ()
delete i->second->menu_item;
- automation_items.push_back(CheckMenuElem (_route->describe_parameter(i->second->param),
+ automation_items.push_back(CheckMenuElem (_route->describe_parameter(i->second->param),
bind (mem_fun(*this, &RouteTimeAxisView::toggle_automation_track), i->second->param)));
i->second->menu_item = static_cast<Gtk::CheckMenuItem*>(&automation_items.back());
@@ -469,7 +469,7 @@ RouteTimeAxisView::build_display_menu ()
MenuList& items = display_menu->items();
display_menu->set_name ("ArdourContextMenu");
-
+
items.push_back (MenuElem (_("Height"), *size_menu));
items.push_back (MenuElem (_("Color"), mem_fun(*this, &RouteTimeAxisView::select_track_color)));
@@ -486,7 +486,7 @@ RouteTimeAxisView::build_display_menu ()
// Hook for derived classes to add type specific stuff
append_extra_display_menu_items ();
items.push_back (SeparatorElem());
-
+
if (is_track()) {
Menu *layers_menu = manage(new Menu);
@@ -524,7 +524,7 @@ RouteTimeAxisView::build_display_menu ()
items.push_back (MenuElem (_("Alignment"), *alignment_menu));
get_diskstream()->AlignmentStyleChanged.connect (
mem_fun(*this, &RouteTimeAxisView::align_style_changed));
-
+
RadioMenuItem::Group mode_group;
items.push_back (RadioMenuElem (mode_group, _("Normal mode"), bind (
mem_fun (*this, &RouteTimeAxisView::set_track_mode),
@@ -539,9 +539,9 @@ RouteTimeAxisView::build_display_menu ()
items.push_back (RadioMenuElem (mode_group, _("No layering mode"),
bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::NonLayered)));
non_layered_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
-
-
+
+
switch (track()->mode()) {
case ARDOUR::Destructive:
destructive_track_mode_item->set_active ();
@@ -561,11 +561,11 @@ RouteTimeAxisView::build_display_menu ()
mode_menu = build_mode_menu();
if (mode_menu)
items.push_back (MenuElem (_("Mode"), *mode_menu));
-
+
color_mode_menu = build_color_mode_menu();
if (color_mode_menu)
items.push_back (MenuElem (_("Color Mode"), *color_mode_menu));
-
+
items.push_back (SeparatorElem());
}
@@ -618,7 +618,7 @@ RouteTimeAxisView::set_track_mode (TrackMode mode)
/*NOTREACHED*/
return;
}
-
+
if (item && other_item && other_item_2 && item->get_active() && track()->mode() != mode) {
_set_track_mode (track().get(), mode, other_item, other_item_2);
}
@@ -662,7 +662,7 @@ void
RouteTimeAxisView::track_mode_changed ()
{
RadioMenuItem* item;
-
+
switch (track()->mode()) {
case ARDOUR::Normal:
item = normal_track_mode_item;
@@ -688,12 +688,12 @@ RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
double x1;
double x2;
double y2;
-
+
TimeAxisView::show_timestretch (start, end);
hide_timestretch ();
-#if 0
+#if 0
if (ts.empty()) {
return;
}
@@ -709,7 +709,7 @@ RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
}
/* ignore it if our edit group is not active */
-
+
if ((ts.track != this) && _route->route_group() && !_route->route_group()->is_active()) {
return;
}
@@ -731,7 +731,7 @@ RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
x1 = start / _editor.get_current_zoom();
x2 = (end - 1) / _editor.get_current_zoom();
y2 = current_height() - 2;
-
+
timestretch_rect->property_x1() = x1;
timestretch_rect->property_y1() = 1.0;
timestretch_rect->property_x2() = x2;
@@ -807,7 +807,7 @@ RouteTimeAxisView::set_height (uint32_t h)
visual_button.show();
size_button.show();
automation_button.show();
-
+
if (is_track() && track()->mode() == ARDOUR::Normal) {
playlist_button.show();
}
@@ -833,7 +833,7 @@ RouteTimeAxisView::set_height (uint32_t h)
visual_button.hide ();
size_button.hide ();
automation_button.hide ();
-
+
if (is_track() && track()->mode() == ARDOUR::Normal) {
playlist_button.hide ();
}
@@ -854,7 +854,7 @@ RouteTimeAxisView::set_height (uint32_t h)
hide_name_entry ();
show_name_label ();
-
+
gm.get_gain_slider().hide();
mute_button->hide();
solo_button->hide();
@@ -901,7 +901,7 @@ RouteTimeAxisView::set_samples_per_unit (double spu)
if (get_diskstream() != 0) {
speed = get_diskstream()->speed();
}
-
+
if (_view) {
_view->set_samples_per_unit (spu * speed);
}
@@ -981,7 +981,7 @@ RouteTimeAxisView::rename_current_playlist ()
}
}
-std::string
+std::string
RouteTimeAxisView::resolve_new_group_playlist_name(std::string &basename, vector<boost::shared_ptr<Playlist> > const & playlists)
{
std::string ret (basename);
@@ -993,7 +993,7 @@ RouteTimeAxisView::resolve_new_group_playlist_name(std::string &basename, vector
for (vector<boost::shared_ptr<Playlist> >::const_iterator i = playlists.begin(); i != playlists.end(); ++i) {
std::string tmp = (*i)->name();
- std::string::size_type idx = tmp.find(group_string);
+ std::string::size_type idx = tmp.find(group_string);
// find those which belong to this group
if (idx != string::npos) {
tmp = tmp.substr(idx + group_string.length());
@@ -1010,7 +1010,7 @@ RouteTimeAxisView::resolve_new_group_playlist_name(std::string &basename, vector
char buf[32];
snprintf (buf, sizeof(buf), "%d", maxnumber);
-
+
ret = this->name() + "." + route_group()->name () + "." + buf;
return ret;
@@ -1020,7 +1020,7 @@ void
RouteTimeAxisView::use_copy_playlist (bool prompt, vector<boost::shared_ptr<Playlist> > const & playlists_before_op)
{
string name;
-
+
boost::shared_ptr<Diskstream> ds = get_diskstream();
if (!ds || ds->destructive())
return;
@@ -1030,7 +1030,7 @@ RouteTimeAxisView::use_copy_playlist (bool prompt, vector<boost::shared_ptr<Play
return;
name = pl->name();
-
+
if (route_group() && route_group()->is_active()) {
name = resolve_new_group_playlist_name(name, playlists_before_op);
}
@@ -1045,18 +1045,18 @@ RouteTimeAxisView::use_copy_playlist (bool prompt, vector<boost::shared_ptr<Play
if (prompt) {
ArdourPrompter prompter (true);
-
+
prompter.set_prompt (_("Name for Playlist"));
prompter.set_initial_text (name);
prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, true);
prompter.show_all ();
-
+
switch (prompter.run ()) {
case Gtk::RESPONSE_ACCEPT:
prompter.get_result (name);
break;
-
+
default:
return;
}
@@ -1072,7 +1072,7 @@ void
RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playlist> > const & playlists_before_op)
{
string name;
-
+
boost::shared_ptr<Diskstream> ds = get_diskstream();
if (!ds || ds->destructive())
return;
@@ -1082,7 +1082,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
return;
name = pl->name();
-
+
if (route_group() && route_group()->is_active()) {
name = resolve_new_group_playlist_name(name,playlists_before_op);
}
@@ -1093,9 +1093,9 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
if (prompt) {
-
+
ArdourPrompter prompter (true);
-
+
prompter.set_prompt (_("Name for Playlist"));
prompter.set_initial_text (name);
prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
@@ -1105,7 +1105,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
case Gtk::RESPONSE_ACCEPT:
prompter.get_result (name);
break;
-
+
default:
return;
}
@@ -1141,7 +1141,7 @@ void
RouteTimeAxisView::diskstream_changed ()
{
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &RouteTimeAxisView::update_diskstream_display));
-}
+}
void
RouteTimeAxisView::update_diskstream_display ()
@@ -1150,7 +1150,7 @@ RouteTimeAxisView::update_diskstream_display ()
return;
map_frozen ();
-}
+}
void
RouteTimeAxisView::selection_click (GdkEventButton* ev)
@@ -1165,7 +1165,7 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
}
return;
- }
+ }
PublicEditor::TrackViewList* tracks = _editor.get_valid_views (this, _route->route_group());
@@ -1173,7 +1173,7 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
case Selection::Toggle:
_editor.get_selection().toggle (*tracks);
break;
-
+
case Selection::Set:
_editor.get_selection().set (*tracks);
break;
@@ -1219,11 +1219,11 @@ void
RouteTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
{
double speed = 1.0;
-
+
if (get_diskstream() != 0) {
speed = get_diskstream()->speed();
}
-
+
nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
@@ -1232,7 +1232,7 @@ RouteTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top,
}
/* pick up visible automation tracks */
-
+
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
if (!(*i)->hidden()) {
(*i)->get_selectables (start_adjusted, end_adjusted, top, bot, results);
@@ -1277,7 +1277,7 @@ RouteTimeAxisView::automation_track (Evoral::Parameter param)
}
/** Shorthand for GainAutomation, etc.
- */
+ */
RouteTimeAxisView::RouteAutomationNode*
RouteTimeAxisView::automation_track (AutomationType type)
{
@@ -1297,12 +1297,12 @@ RouteTimeAxisView::name() const
}
boost::shared_ptr<Playlist>
-RouteTimeAxisView::playlist () const
+RouteTimeAxisView::playlist () const
{
boost::shared_ptr<Diskstream> ds;
if ((ds = get_diskstream()) != 0) {
- return ds->playlist();
+ return ds->playlist();
} else {
return boost::shared_ptr<Playlist> ();
}
@@ -1314,7 +1314,7 @@ RouteTimeAxisView::name_entry_changed ()
string x;
x = name_entry.get_text ();
-
+
if (x == _route->name()) {
return;
}
@@ -1348,9 +1348,9 @@ RouteTimeAxisView::hide_click ()
{
// LAME fix for hide_button refresh fix
hide_button.set_sensitive(false);
-
+
_editor.hide_track_in_display (*this);
-
+
hide_button.set_sensitive(true);
}
@@ -1367,7 +1367,7 @@ RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t d
return boost::shared_ptr<Region> ();
}
-nframes64_t
+nframes64_t
RouteTimeAxisView::find_next_region_boundary (nframes64_t pos, int32_t dir)
{
boost::shared_ptr<Diskstream> stream;
@@ -1403,7 +1403,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
(*i).end = session_frame_to_track_frame((*i).end, speed);
}
}
-
+
XMLNode &before = playlist->get_state();
switch (op) {
case Cut:
@@ -1440,7 +1440,7 @@ RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size
boost::shared_ptr<Playlist> playlist = get_diskstream()->playlist();
PlaylistSelection::iterator p;
-
+
for (p = selection.playlists.begin(); p != selection.playlists.end() && nth; ++p, --nth) {}
if (p == selection.playlists.end()) {
@@ -1450,7 +1450,7 @@ RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size
if (get_diskstream()->speed() != 1.0f) {
pos = session_frame_to_track_frame(pos, get_diskstream()->speed() );
}
-
+
XMLNode &before = playlist->get_state();
playlist->paste (*p, pos, times);
_session.add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
@@ -1463,7 +1463,7 @@ TimeAxisView::Children
RouteTimeAxisView::get_child_list()
{
TimeAxisView::Children redirect_children;
-
+
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
if (!(*i)->hidden()) {
redirect_children.push_back(*i);
@@ -1496,7 +1496,7 @@ RouteTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
RadioMenuItem::Group playlist_group;
_session.get_playlists (playlists);
-
+
for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
if ((*i)->get_orig_diskstream_id() == ds->id()) {
@@ -1507,10 +1507,10 @@ RouteTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
static_cast<RadioMenuItem*>(&playlist_items.back())->set_active();
}
} else if (ds->playlist()->id() == (*i)->id()) {
- playlist_items.push_back (RadioMenuElem (playlist_group, (*i)->name(), bind (mem_fun (*this, &RouteTimeAxisView::use_playlist),
+ playlist_items.push_back (RadioMenuElem (playlist_group, (*i)->name(), bind (mem_fun (*this, &RouteTimeAxisView::use_playlist),
boost::weak_ptr<Playlist>(*i))));
static_cast<RadioMenuItem*>(&playlist_items.back())->set_active();
-
+
}
}
@@ -1526,7 +1526,7 @@ RouteTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
// Use a label which tells the user what is happening
playlist_items.push_back (MenuElem (_("New Take"), bind(mem_fun(_editor, &PublicEditor::new_playlists), this)));
playlist_items.push_back (MenuElem (_("Copy Take"), bind(mem_fun(_editor, &PublicEditor::copy_playlists), this)));
-
+
}
playlist_items.push_back (SeparatorElem());
@@ -1548,10 +1548,10 @@ RouteTimeAxisView::use_playlist (boost::weak_ptr<Playlist> wpl)
}
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist> (pl);
-
+
if (apl) {
if (get_diskstream()->playlist() == apl) {
- // radio button cotnrols mean this function is called for both the
+ // radio button cotnrols mean this function is called for both the
// old and new playlist
return;
}
@@ -1569,12 +1569,12 @@ RouteTimeAxisView::use_playlist (boost::weak_ptr<Playlist> wpl)
return;
take_name = take_name.substr(idx + group_string.length()); // find the bit containing the take number / name
-
+
for (list<Route*>::const_iterator i = route_group()->route_list().begin(); i != route_group()->route_list().end(); ++i) {
if ( (*i) == this->route().get()) {
continue;
}
-
+
std::string playlist_name = (*i)->name()+group_string+take_name;
Track *track = dynamic_cast<Track *>(*i);
@@ -1591,7 +1591,7 @@ RouteTimeAxisView::use_playlist (boost::weak_ptr<Playlist> wpl)
} else {
track->diskstream()->use_playlist(ipl);
}
-
+
//(*i)->get_dis
}
}
@@ -1662,7 +1662,7 @@ RouteTimeAxisView::toggle_automation_track (Evoral::Parameter param)
}
/* now trigger a redisplay */
-
+
if (!no_redraw) {
_route->gui_changed (X_("track_height"), (void *) 0); /* EMIT_SIGNAL */
}
@@ -1676,7 +1676,7 @@ RouteTimeAxisView::automation_track_hidden (Evoral::Parameter param)
if (!ran) {
return;
}
-
+
// if Evoral::Parameter::operator< doesn't obey strict weak ordering, we may crash here....
_show_automation.erase(param);
ran->track->get_state_node()->add_property (X_("shown"), X_("no"));
@@ -1693,7 +1693,7 @@ void
RouteTimeAxisView::show_all_automation ()
{
no_redraw = true;
-
+
/* Show our automation */
map<Evoral::Parameter, RouteAutomationNode*>::iterator i;
@@ -1711,7 +1711,7 @@ RouteTimeAxisView::show_all_automation ()
for (vector<ProcessorAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
if ((*ii)->view == 0) {
add_processor_automation_curve ((*i)->processor, (*ii)->what);
- }
+ }
(*ii)->menu_item->set_active (true);
}
@@ -1728,7 +1728,7 @@ void
RouteTimeAxisView::show_existing_automation ()
{
no_redraw = true;
-
+
/* Show our automation */
map<Evoral::Parameter, RouteAutomationNode*>::iterator i;
@@ -1753,7 +1753,7 @@ RouteTimeAxisView::show_existing_automation ()
}
no_redraw = false;
-
+
_route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
@@ -1793,7 +1793,7 @@ RouteTimeAxisView::region_view_added (RegionView* rv)
if(is_audio_track()) {
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
boost::shared_ptr<AutomationTimeAxisView> atv;
-
+
if ((atv = boost::dynamic_pointer_cast<AutomationTimeAxisView> (*i)) != 0) {
atv->add_ghost(rv);
}
@@ -1844,7 +1844,7 @@ RouteTimeAxisView::find_processor_automation_node (boost::shared_ptr<Processor>
return 0;
}
-static string
+static string
legalize_for_xml_node (string str)
{
string::size_type pos;
@@ -1934,14 +1934,14 @@ RouteTimeAxisView::add_existing_processor_automation_curves (boost::weak_ptr<Pro
if (!processor) {
return;
}
-
+
set<Evoral::Parameter> s;
boost::shared_ptr<AutomationLine> al;
processor->what_has_visible_data (s);
for (set<Evoral::Parameter>::iterator i = s.begin(); i != s.end(); ++i) {
-
+
if ((al = find_processor_automation_curve (processor, *i)) != 0) {
al->queue_reset ();
} else {
@@ -1969,7 +1969,7 @@ RouteTimeAxisView::add_automation_child(Evoral::Parameter param, boost::shared_p
if (string_is_affirmative (prop->value())) {
hideit = false;
}
- }
+ }
}
_automation_tracks.insert(std::make_pair(param, new RouteAutomationNode(param, NULL, track)));
@@ -2000,11 +2000,11 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
if (!processor->visible ()) {
return;
}
-
+
using namespace Menu_Helpers;
ProcessorAutomationInfo *rai;
list<ProcessorAutomationInfo*>::iterator x;
-
+
const std::set<Evoral::Parameter>& automatable = processor->what_can_be_automated ();
std::set<Evoral::Parameter> has_visible_automation;
@@ -2045,9 +2045,9 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
ProcessorAutomationNode* pan;
CheckMenuItem* mitem;
-
+
string name = processor->describe_parameter (*i);
-
+
items.push_back (CheckMenuElem (name));
mitem = dynamic_cast<CheckMenuItem*> (&items.back());
@@ -2058,9 +2058,9 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
if ((pan = find_processor_automation_node (processor, *i)) == 0) {
/* new item */
-
+
pan = new ProcessorAutomationNode (*i, mitem, *this);
-
+
rai->lines.push_back (pan);
} else {
@@ -2113,7 +2113,7 @@ RouteTimeAxisView::processor_menu_item_toggled (RouteTimeAxisView::ProcessorAuto
if (redraw && !no_redraw) {
/* now trigger a redisplay */
-
+
_route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
@@ -2123,7 +2123,7 @@ void
RouteTimeAxisView::processors_changed ()
{
using namespace Menu_Helpers;
-
+
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
(*i)->valid = false;
}
@@ -2145,7 +2145,7 @@ RouteTimeAxisView::processors_changed ()
delete *i;
processor_automation.erase (i);
- }
+ }
i = tmp;
}
@@ -2163,7 +2163,7 @@ RouteTimeAxisView::find_processor_automation_curve (boost::shared_ptr<Processor>
if ((pan = find_processor_automation_node (processor, what)) != 0) {
if (pan->view) {
pan->view->line();
- }
+ }
}
return boost::shared_ptr<AutomationLine>();
@@ -2183,7 +2183,7 @@ RouteTimeAxisView::update_rec_display ()
RouteUI::update_rec_display ();
name_entry.set_sensitive (!_route->record_enabled());
}
-
+
void
RouteTimeAxisView::set_layer_display (LayerDisplay d)
{
@@ -2206,7 +2206,7 @@ RouteTimeAxisView::layer_display () const
return Overlaid;
}
-
+
boost::shared_ptr<AutomationTimeAxisView>
RouteTimeAxisView::automation_child(Evoral::Parameter param)
@@ -2275,9 +2275,9 @@ RouteTimeAxisView::build_underlay_menu(Gtk::Menu* parent_menu) {
Menu* gs_menu = manage (new Menu);
gs_menu->set_name ("ArdourContextMenu");
MenuList& gs_items = gs_menu->items();
-
+
parent_items.push_back (MenuElem (_("Underlays"), *gs_menu));
-
+
for(UnderlayList::iterator it = _underlay_streams.begin(); it != _underlay_streams.end(); ++it) {
gs_items.push_back(MenuElem(string_compose(_("Remove \"%1\""), (*it)->trackview().name()),
bind(mem_fun(*this, &RouteTimeAxisView::remove_underlay), *it)));
@@ -2286,7 +2286,7 @@ RouteTimeAxisView::build_underlay_menu(Gtk::Menu* parent_menu) {
}
bool
-RouteTimeAxisView::set_underlay_state()
+RouteTimeAxisView::set_underlay_state()
{
if(!underlay_xml_node) {
return false;
@@ -2295,7 +2295,7 @@ RouteTimeAxisView::set_underlay_state()
XMLNodeList nlist = underlay_xml_node->children();
XMLNodeConstIterator niter;
XMLNode *child_node;
-
+
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
child_node = *niter;
@@ -2319,7 +2319,7 @@ RouteTimeAxisView::set_underlay_state()
}
void
-RouteTimeAxisView::add_underlay(StreamView* v, bool update_xml)
+RouteTimeAxisView::add_underlay(StreamView* v, bool update_xml)
{
if(!v) {
return;
@@ -2352,7 +2352,7 @@ RouteTimeAxisView::add_underlay(StreamView* v, bool update_xml)
}
void
-RouteTimeAxisView::remove_underlay(StreamView* v)
+RouteTimeAxisView::remove_underlay(StreamView* v)
{
if(!v) {
return;
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index 95cbfa8c76..5970c31226 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -89,7 +89,7 @@ public:
bool show_automation(Evoral::Parameter param);
void set_layer_display (LayerDisplay d);
LayerDisplay layer_display () const;
-
+
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
nframes64_t find_next_region_boundary (nframes64_t pos, int32_t dir);
@@ -107,36 +107,36 @@ public:
/* group playlist name resolving */
std::string resolve_new_group_playlist_name(std::string &, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
-
+
void build_playlist_menu (Gtk::Menu *);
void add_underlay (StreamView*, bool update_xml = true);
void remove_underlay (StreamView*);
void build_underlay_menu(Gtk::Menu*);
-
+
int set_state (const XMLNode&);
-
+
/* This is a bit nasty to expose :/ */
struct RouteAutomationNode {
Evoral::Parameter param;
Gtk::CheckMenuItem* menu_item;
boost::shared_ptr<AutomationTimeAxisView> track;
-
+
RouteAutomationNode (Evoral::Parameter par, Gtk::CheckMenuItem* mi, boost::shared_ptr<AutomationTimeAxisView> tr)
: param (par), menu_item (mi), track (tr) {}
};
virtual void create_automation_child (const Evoral::Parameter& param, bool show) = 0;
-
+
/* make sure we get the right version of this */
XMLNode* get_automation_child_xml_node (Evoral::Parameter param) { return RouteUI::get_automation_child_xml_node (param); }
-
+
typedef std::map<Evoral::Parameter, RouteAutomationNode*> AutomationTracks;
AutomationTracks automation_tracks() { return _automation_tracks; }
boost::shared_ptr<AutomationTimeAxisView> automation_child(Evoral::Parameter param);
-
+
std::string name() const;
StreamView* view() const { return _view; }
ARDOUR::RouteGroup* route_group() const;
@@ -174,29 +174,29 @@ protected:
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 ();
};
-
+
void diskstream_changed ();
void update_diskstream_display ();
-
+
gint edit_click (GdkEventButton *);
void processors_changed ();
-
+
void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
void remove_processor_automation_node (ProcessorAutomationNode* pan);
void processor_menu_item_toggled (RouteTimeAxisView::ProcessorAutomationInfo*,
RouteTimeAxisView::ProcessorAutomationNode*);
-
+
void processor_automation_track_hidden (ProcessorAutomationNode*,
boost::shared_ptr<ARDOUR::Processor>);
-
+
void automation_track_hidden (Evoral::Parameter param);
RouteAutomationNode* automation_track(Evoral::Parameter param);
@@ -204,7 +204,7 @@ protected:
ProcessorAutomationNode*
find_processor_automation_node (boost::shared_ptr<ARDOUR::Processor> i, Evoral::Parameter);
-
+
boost::shared_ptr<AutomationLine>
find_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> i, Evoral::Parameter);
@@ -212,7 +212,7 @@ protected:
void add_existing_processor_automation_curves (boost::weak_ptr<ARDOUR::Processor>);
void add_automation_child(Evoral::Parameter param, boost::shared_ptr<AutomationTimeAxisView> track, bool show=true);
-
+
void reset_processor_automation_curves ();
void take_name_changed (void *src);
@@ -222,26 +222,26 @@ protected:
void update_rec_display ();
virtual void label_view ();
-
+
void set_route_group_from_menu (ARDOUR::RouteGroup *);
void reset_samples_per_unit ();
void select_track_color();
-
+
virtual void build_automation_action_menu ();
virtual void append_extra_display_menu_items () {}
void build_display_menu ();
-
+
void align_style_changed ();
void set_align_style (ARDOUR::AlignStyle);
-
+
void playlist_click ();
void show_playlist_selector ();
void playlist_changed ();
void rename_current_playlist ();
-
+
void automation_click ();
void toggle_automation_track (Evoral::Parameter param);
virtual void show_all_automation ();
@@ -254,7 +254,7 @@ protected:
void hide_click ();
void speed_changed ();
-
+
void map_frozen ();
void color_handler ();
@@ -264,7 +264,7 @@ protected:
StreamView* _view;
ArdourCanvas::Canvas& parent_canvas;
bool no_redraw;
-
+
Gtk::HBox other_button_hbox;
Gtk::Table button_table;
Gtk::Button processor_button;
@@ -274,7 +274,7 @@ protected:
Gtk::Button automation_button;
Gtk::Button hide_button;
Gtk::Button visual_button;
-
+
Gtk::Menu subplugin_menu;
Gtk::Menu* automation_action_menu;
RouteGroupMenu* route_group_menu;
@@ -304,14 +304,14 @@ protected:
typedef std::vector<boost::shared_ptr<AutomationLine> > ProcessorAutomationCurves;
ProcessorAutomationCurves processor_automation_curves;
-
+
// Set from XML so context menu automation buttons can be correctly initialized
std::set<Evoral::Parameter> _show_automation;
AutomationTracks _automation_tracks;
void post_construct ();
-
+
GainMeterBase gm;
static Glib::RefPtr<Gdk::Pixbuf> slider;
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 703857bc6b..45f2b80a1a 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2006 Paul Davis
+ Copyright (C) 2002-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ RouteUI::~RouteUI()
/* derived classes should emit GoingAway so that they receive the signal
when the object is still a legal derived instance.
*/
-
+
delete solo_menu;
delete mute_menu;
delete sends_menu;
@@ -151,7 +151,7 @@ RouteUI::reset ()
delete mute_menu;
mute_menu = 0;
-
+
if (xml_node) {
/* do not delete the node - its owned by the route */
xml_node = 0;
@@ -183,13 +183,13 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
mute_button->set_controllable (_route->mute_control());
solo_button->set_controllable (_route->solo_control());
-
+
connections.push_back (_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed)));
connections.push_back (_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)));
connections.push_back (_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)));
connections.push_back (_route->listen_changed.connect (mem_fun(*this, &RouteUI::listen_changed)));
connections.push_back (_route->solo_isolated_changed.connect (mem_fun(*this, &RouteUI::solo_changed)));
-
+
if (_session.writable() && is_track()) {
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
@@ -200,11 +200,11 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
rec_enable_button->set_controllable (t->rec_enable_control());
update_rec_display ();
- }
+ }
mute_button->unset_flags (Gtk::CAN_FOCUS);
solo_button->unset_flags (Gtk::CAN_FOCUS);
-
+
mute_button->show();
if (_route->is_control()) {
@@ -243,7 +243,7 @@ RouteUI::mute_press(GdkEventButton* ev)
if (Keyboard::is_button2_event (ev)) {
// Primary-button2 click is the midi binding click
// button2-click is "momentary"
-
+
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
wait_for_release = true;
} else {
@@ -274,7 +274,7 @@ RouteUI::mute_press(GdkEventButton* ev)
if (ev->button == 1) {
set_route_group_mute (_route, !_route->muted());
}
-
+
} else {
/* plain click applies change to this route */
@@ -328,41 +328,41 @@ RouteUI::solo_press(GdkEventButton* ev)
multiple_solo_change = false;
if (!ignore_toggle) {
-
+
if (Keyboard::is_context_menu_event (ev)) {
-
+
if (solo_menu == 0) {
build_solo_menu ();
}
-
+
solo_menu->popup (1, ev->time);
-
+
} else {
-
+
if (Keyboard::is_button2_event (ev)) {
-
+
// Primary-button2 click is the midi binding click
// button2-click is "momentary"
-
+
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
wait_for_release = true;
} else {
return false;
}
}
-
+
if (ev->button == 1 || Keyboard::is_button2_event (ev)) {
-
+
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
-
+
/* Primary-Tertiary-click applies change to all routes */
bool was_not_latched = false;
if (!Config->get_solo_latched ()) {
was_not_latched = true;
/*
- XXX it makes no sense to solo all tracks if we're
- not in latched mode, but doing nothing feels like a bug,
- so do it anyway
+ XXX it makes no sense to solo all tracks if we're
+ not in latched mode, but doing nothing feels like a bug,
+ so do it anyway
*/
Config->set_solo_latched (true);
}
@@ -376,9 +376,9 @@ RouteUI::solo_press(GdkEventButton* ev)
if (was_not_latched) {
Config->set_solo_latched (false);
}
-
+
} else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
-
+
// Primary-Secondary-click: exclusively solo this track, not a toggle */
_session.begin_reversible_command (_("solo change"));
@@ -499,7 +499,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
set_route_group_rec_enable (_route, !_route->record_enabled());
} else if (Keyboard::is_context_menu_event (ev)) {
-
+
/* do this on release */
} else {
@@ -521,11 +521,11 @@ void
RouteUI::build_sends_menu ()
{
using namespace Menu_Helpers;
-
+
sends_menu = new Menu;
sends_menu->set_name ("ArdourContextMenu");
MenuList& items = sends_menu->items();
-
+
items.push_back (MenuElem(_("Assign all tracks (prefader)"), bind (mem_fun (*this, &RouteUI::create_sends), PreFader)));
items.push_back (MenuElem(_("Assign all tracks (postfader)"), bind (mem_fun (*this, &RouteUI::create_sends), PostFader)));
items.push_back (MenuElem(_("Copy track gains to sends"), mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
@@ -616,7 +616,7 @@ RouteUI::send_blink (bool onoff)
if (!show_sends_button) {
return;
}
-
+
if (onoff) {
show_sends_button->set_state (STATE_ACTIVE);
} else {
@@ -663,8 +663,8 @@ RouteUI::update_solo_display ()
ignore_toggle = true;
solo_button->set_active (x);
ignore_toggle = false;
- }
-
+ }
+
if (_route->solo_isolated()) {
solo_button->set_visual_state (2);
} else if (x) {
@@ -704,7 +704,7 @@ RouteUI::update_mute_display ()
}
/* now attend to visual state */
-
+
if (Config->get_show_solo_mutes()) {
if (_route->muted()) {
mute_button->set_visual_state (2);
@@ -753,7 +753,7 @@ RouteUI::update_rec_display ()
else {
return;
}
-
+
/* now make sure its color state is correct */
if (model) {
@@ -779,7 +779,7 @@ void
RouteUI::build_solo_menu (void)
{
using namespace Menu_Helpers;
-
+
solo_menu = new Menu;
solo_menu->set_name ("ArdourContextMenu");
MenuList& items = solo_menu->items();
@@ -794,18 +794,18 @@ RouteUI::build_solo_menu (void)
//items.push_back (SeparatorElem());
// items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn)));
-
+
}
void
RouteUI::build_mute_menu(void)
{
using namespace Menu_Helpers;
-
+
mute_menu = new Menu;
mute_menu->set_name ("ArdourContextMenu");
-#if FIX_ME_IN_3_0
+#if FIX_ME_IN_3_0
MenuList& items = mute_menu->items();
CheckMenuItem* check;
@@ -822,7 +822,7 @@ RouteUI::build_mute_menu(void)
_route->post_fader_changed.connect(bind (mem_fun (*this, &RouteUI::post_fader_toggle), check));
items.push_back (CheckMenuElem(*check));
check->show_all();
-
+
check = new CheckMenuItem(_("Control Outs"));
init_mute_menu(CONTROL_OUTS, check);
check->signal_toggled().connect(bind (mem_fun (*this, &RouteUI::toggle_mute_menu), CONTROL_OUTS, check));
@@ -952,9 +952,9 @@ void
RouteUI::set_color (const Gdk::Color & c)
{
char buf[64];
-
+
_color = c;
-
+
ensure_xml_node ();
snprintf (buf, sizeof (buf), "%d:%d:%d", c.get_red(), c.get_green(), c.get_blue());
xml_node->add_property ("color", buf);
@@ -978,7 +978,7 @@ XMLNode*
RouteUI::get_automation_child_xml_node (Evoral::Parameter param)
{
ensure_xml_node ();
-
+
XMLNodeList kids = xml_node->children();
XMLNodeConstIterator iter;
@@ -1004,7 +1004,7 @@ int
RouteUI::set_color_from_route ()
{
XMLProperty *prop;
-
+
RouteUI::ensure_xml_node ();
if ((prop = xml_node->property ("color")) != 0) {
@@ -1014,7 +1014,7 @@ RouteUI::set_color_from_route ()
_color.set_green(g);
_color.set_blue(b);
return 0;
- }
+ }
return 1;
}
@@ -1064,12 +1064,12 @@ RouteUI::route_rename ()
name_prompter.get_result (result);
if (result.length()) {
_route->set_name (result);
- }
+ }
break;
}
return;
-
+
}
void
@@ -1108,7 +1108,7 @@ RouteUI::toggle_polarity ()
bool x;
ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::toggle_polarity));
-
+
if ((x = polarity_menu_item->get_active()) != _route->phase_invert()) {
_route->set_phase_invert (x);
if (x) {
@@ -1138,7 +1138,7 @@ RouteUI::toggle_denormal_protection ()
bool x;
ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::toggle_denormal_protection));
-
+
if ((x = denormal_menu_item->get_active()) != _route->denormal_protection()) {
_route->set_denormal_protection (x);
}
@@ -1168,7 +1168,7 @@ void
RouteUI::pre_fader_toggle(void* src, Gtk::CheckMenuItem* check)
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::pre_fader_toggle), src, check));
-
+
bool yn = _route->get_mute_config(PRE_FADER);
if (check->get_active() != yn) {
check->set_active (yn);
@@ -1179,7 +1179,7 @@ void
RouteUI::post_fader_toggle(void* src, Gtk::CheckMenuItem* check)
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::post_fader_toggle), src, check));
-
+
bool yn = _route->get_mute_config(POST_FADER);
if (check->get_active() != yn) {
check->set_active (yn);
@@ -1190,7 +1190,7 @@ void
RouteUI::control_outs_toggle(void* src, Gtk::CheckMenuItem* check)
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::control_outs_toggle), src, check));
-
+
bool yn = _route->get_mute_config(CONTROL_OUTS);
if (check->get_active() != yn) {
check->set_active (yn);
@@ -1201,7 +1201,7 @@ void
RouteUI::main_outs_toggle(void* src, Gtk::CheckMenuItem* check)
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::main_outs_toggle), src, check));
-
+
bool yn = _route->get_mute_config(MAIN_OUTS);
if (check->get_active() != yn) {
check->set_active (yn);
@@ -1306,16 +1306,16 @@ RouteUI::save_as_template ()
sys::path path;
Glib::ustring safe_name;
string name;
-
+
path = ARDOUR::user_route_template_directory ();
-
+
if (g_mkdir_with_parents (path.to_string().c_str(), 0755)) {
error << string_compose (_("Cannot create route template directory %1"), path.to_string()) << endmsg;
return;
}
-
+
Prompter p (true); // modal
-
+
p.set_prompt (_("Template name:"));
switch (p.run()) {
case RESPONSE_ACCEPT:
@@ -1323,15 +1323,15 @@ RouteUI::save_as_template ()
default:
return;
}
-
+
p.hide ();
p.get_result (name, true);
-
+
safe_name = legalize_for_path (name);
safe_name += template_suffix;
-
+
path /= safe_name;
-
+
_route->save_as_template (path.to_string(), name);
}
@@ -1349,7 +1349,7 @@ void
RouteUI::parameter_changed (string const & p)
{
ENSURE_GUI_THREAD (bind (mem_fun (*this, &RouteUI::parameter_changed), p));
-
+
if (p == "disable-disarm-during-roll") {
check_rec_enable_sensitivity ();
} else if (p == "solo-control-is-listen-control") {
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index 1ac87a0404..3b611d23a0 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -59,11 +59,11 @@ class RouteUI : public virtual AxisView
bool is_midi_track() const;
boost::shared_ptr<ARDOUR::Route> route() const { return _route; }
-
+
boost::shared_ptr<ARDOUR::Track> track() const;
boost::shared_ptr<ARDOUR::AudioTrack> audio_track() const;
boost::shared_ptr<ARDOUR::MidiTrack> midi_track() const;
-
+
boost::shared_ptr<ARDOUR::Diskstream> get_diskstream() const;
std::string name() const;
@@ -71,7 +71,7 @@ class RouteUI : public virtual AxisView
// protected: XXX sigh this should be here
boost::shared_ptr<ARDOUR::Route> _route;
-
+
void set_color (const Gdk::Color & c);
bool choose_color ();
@@ -91,10 +91,10 @@ class RouteUI : public virtual AxisView
void send_blink (bool);
sigc::connection send_blink_connection;
-
+
virtual std::string solo_button_name () const { return "SoloButton"; }
virtual std::string safe_solo_button_name () const { return "SafeSoloButton"; }
-
+
Gtk::Menu* mute_menu;
Gtk::Menu* solo_menu;
Gtk::Menu* sends_menu;
@@ -103,7 +103,7 @@ class RouteUI : public virtual AxisView
void ensure_xml_node ();
virtual XMLNode* get_automation_child_xml_node (Evoral::Parameter param);
-
+
bool mute_press(GdkEventButton*);
bool mute_release(GdkEventButton*);
bool solo_press(GdkEventButton*);
@@ -145,7 +145,7 @@ class RouteUI : public virtual AxisView
void build_mute_menu(void);
void init_mute_menu(ARDOUR::MuteMaster::MutePoint, Gtk::CheckMenuItem*);
-
+
void set_route_group_solo (boost::shared_ptr<ARDOUR::Route>, bool);
void set_route_group_mute (boost::shared_ptr<ARDOUR::Route>, bool);
void set_route_group_rec_enable (boost::shared_ptr<ARDOUR::Route>, bool);
@@ -156,7 +156,7 @@ class RouteUI : public virtual AxisView
static gint idle_remove_this_route (RouteUI *);
void route_rename();
-
+
virtual void name_changed ();
void route_removed ();
@@ -188,7 +188,7 @@ class RouteUI : public virtual AxisView
void adjust_latency ();
void save_as_template ();
void open_remote_control_id_dialog ();
-
+
protected:
std::vector<sigc::connection> connections;
bool self_destruct;
diff --git a/gtk2_ardour/selectable.h b/gtk2_ardour/selectable.h
index ca316c6450..2d31dbf62b 100644
--- a/gtk2_ardour/selectable.h
+++ b/gtk2_ardour/selectable.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 66d1075557..c16c913658 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@ operator== (const Selection& a, const Selection& b)
return a.regions == b.regions &&
a.tracks == b.tracks &&
a.time.track == b.time.track &&
- a.time.group == b.time.group &&
+ a.time.group == b.time.group &&
a.time == b.time &&
a.lines == b.lines &&
a.playlists == b.playlists &&
@@ -209,7 +209,7 @@ void
Selection::toggle (TimeAxisView* track)
{
TrackSelection::iterator i;
-
+
if ((i = find (tracks.begin(), tracks.end(), track)) == tracks.end()) {
void (Selection::*pmf)(TimeAxisView*) = &Selection::remove;
track->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), track));
@@ -233,7 +233,7 @@ void
Selection::toggle (MidiCutBuffer* midi)
{
MidiNoteSelection::iterator i;
-
+
if ((i = find (midi_notes.begin(), midi_notes.end(), midi)) == midi_notes.end()) {
midi_notes.push_back (midi);
} else {
@@ -241,7 +241,7 @@ Selection::toggle (MidiCutBuffer* midi)
delete *i;
midi_notes.erase (i);
}
-
+
MidiNotesChanged();
}
@@ -300,7 +300,7 @@ Selection::toggle (nframes_t start, nframes_t end)
time.push_back (AudioRange (start, end, next_time_id++));
time.consolidate ();
time.sort (cmp);
-
+
TimeChanged ();
return next_time_id - 1;
@@ -328,7 +328,7 @@ Selection::add (const list<boost::shared_ptr<Playlist> >& pllist)
changed = true;
}
}
-
+
if (changed) {
PlaylistsChanged ();
}
@@ -343,7 +343,7 @@ Selection::add (const list<TimeAxisView*>& track_list)
void (Selection::*pmf)(TimeAxisView*) = &Selection::remove;
(*i)->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), (*i)));
}
-
+
if (!added.empty()) {
TracksChanged ();
}
@@ -390,7 +390,7 @@ Selection::add (vector<RegionView*>& v)
*/
bool changed = false;
-
+
for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
changed = regions.add ((*i));
@@ -412,7 +412,7 @@ Selection::add (const RegionSelection& rs)
*/
bool changed = false;
-
+
for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) {
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
changed = regions.add ((*i));
@@ -421,7 +421,7 @@ Selection::add (const RegionSelection& rs)
}
}
}
-
+
if (changed) {
RegionsChanged ();
}
@@ -464,7 +464,7 @@ Selection::add (nframes_t start, nframes_t end)
time.push_back (AudioRange (start, end, next_time_id++));
time.consolidate ();
time.sort (cmp);
-
+
TimeChanged ();
return next_time_id - 1;
@@ -560,7 +560,7 @@ void
Selection::remove (MidiCutBuffer* midi)
{
MidiNoteSelection::iterator x;
-
+
if ((x = find (midi_notes.begin(), midi_notes.end(), midi)) != midi_notes.end()) {
/* remember that we own the MCB */
delete *x;
@@ -640,7 +640,7 @@ Selection::remove (uint32_t selection_id)
for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
if ((*i).id == selection_id) {
time.erase (i);
-
+
TimeChanged ();
break;
}
@@ -706,7 +706,7 @@ Selection::set (const RegionSelection& rs)
}
void
-Selection::set (MidiRegionView* mrv)
+Selection::set (MidiRegionView* mrv)
{
clear_midi_regions ();
add (mrv);
@@ -798,8 +798,8 @@ Selection::empty (bool internal_selection)
{
bool object_level_empty = regions.empty () &&
tracks.empty () &&
- points.empty () &&
- playlists.empty () &&
+ points.empty () &&
+ playlists.empty () &&
lines.empty () &&
time.empty () &&
playlists.empty () &&
@@ -857,11 +857,11 @@ Selection::toggle (list<Selectable*>& selectables)
if (!rvs.empty()) {
toggle (rvs);
- }
+ }
if (!autos.empty()) {
toggle (autos);
- }
+ }
}
void
@@ -896,11 +896,11 @@ Selection::add (list<Selectable*>& selectables)
if (!rvs.empty()) {
add (rvs);
- }
+ }
if (!autos.empty()) {
add (autos);
- }
+ }
}
void
@@ -933,7 +933,7 @@ void
Selection::toggle (Marker* m)
{
MarkerSelection::iterator i;
-
+
if ((i = find (markers.begin(), markers.end(), m)) == markers.end()) {
add (m);
} else {
@@ -958,7 +958,7 @@ Selection::add (Marker* m)
if (find (markers.begin(), markers.end(), m) == markers.end()) {
/* disambiguate which remove() for the compiler */
-
+
void (Selection::*pmf)(Marker*) = &Selection::remove;
m->GoingAway.connect (bind (mem_fun (*this, pmf), m));
@@ -985,7 +985,7 @@ MarkerSelection::range (nframes64_t& s, nframes64_t& e)
if ((*i)->position() < s) {
s = (*i)->position();
- }
+ }
if ((*i)->position() > e) {
e = (*i)->position();
diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h
index a898705d23..4e5f684af9 100644
--- a/gtk2_ardour/selection.h
+++ b/gtk2_ardour/selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2003 Paul Davis
+ Copyright (C) 2000-2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ namespace Evoral {
/** The Selection class holds lists of selected items (tracks, regions, etc. etc.). */
-class Selection : public sigc::trackable
+class Selection : public sigc::trackable
{
public:
enum SelectionType {
@@ -110,7 +110,7 @@ class Selection : public sigc::trackable
void set (std::list<Selectable*>&);
void add (std::list<Selectable*>&);
void toggle (std::list<Selectable*>&);
-
+
void set (TimeAxisView*);
void set (const std::list<TimeAxisView*>&);
void set (const MidiNoteSelection&);
@@ -168,7 +168,7 @@ class Selection : public sigc::trackable
void remove (Marker*);
void replace (uint32_t time_index, nframes_t start, nframes_t end);
-
+
void clear_regions();
void clear_tracks ();
void clear_time();
diff --git a/gtk2_ardour/selection_templates.h b/gtk2_ardour/selection_templates.h
index cc2585c17e..0dce2f903b 100644
--- a/gtk2_ardour/selection_templates.h
+++ b/gtk2_ardour/selection_templates.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2003 Paul Davis
+ Copyright (C) 2000-2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
#define __ardour_gtk_selection_templates_h__
/* these inlines require knowledge of Region and Route classes,
- and so they are in a separate header file from selection.h to
+ and so they are in a separate header file from selection.h to
avoid multiplying dependencies.
*/
@@ -56,7 +56,7 @@ Selection::foreach_midi_regionview (void (MidiRegionView::*method)(void)) {
}
}
-template<class A> inline void
+template<class A> inline void
Selection::foreach_region (void (ARDOUR::Region::*method)(A), A arg) {
for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
ARDOUR::Region* region = (*i)->region().get();
diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc
index 6ec9002222..7dab778054 100644
--- a/gtk2_ardour/send_ui.cc
+++ b/gtk2_ardour/send_ui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session& se)
_hbox.pack_start (_gpm, true, true);
set_name ("SendUIFrame");
-
+
_vbox.set_spacing (5);
_vbox.set_border_width (5);
@@ -52,7 +52,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session& se)
_vbox.pack_start (_panners, false,false);
io = manage (new IOSelector (parent, se, s->output()));
-
+
pack_start (_vbox, false, false);
pack_start (*io, true, true);
@@ -63,7 +63,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session& se)
_send->input()->changed.connect (mem_fun (*this, &SendUI::ins_changed));
_send->output()->changed.connect (mem_fun (*this, &SendUI::outs_changed));
-
+
_panners.set_width (Wide);
_panners.setup_pan ();
@@ -117,7 +117,7 @@ SendUI::fast_update ()
_gpm.update_meters ();
}
}
-
+
SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session& ss)
: ArdourDialog (string("Ardour: send ") + s->name())
{
@@ -129,7 +129,7 @@ SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session& ss)
get_vbox()->pack_start (hpacker);
set_name ("SendUIWindow");
-
+
going_away_connection = s->GoingAway.connect (
mem_fun (*this, &SendUIWindow::send_going_away));
diff --git a/gtk2_ardour/send_ui.h b/gtk2_ardour/send_ui.h
index 5fe785b156..df5a8a216e 100644
--- a/gtk2_ardour/send_ui.h
+++ b/gtk2_ardour/send_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ class SendUI : public Gtk::HBox
sigc::connection screen_update_connection;
sigc::connection fast_screen_update_connection;
-
+
void ins_changed (ARDOUR::IOChange, void*);
void outs_changed (ARDOUR::IOChange, void*);
};
diff --git a/gtk2_ardour/session_import_dialog.cc b/gtk2_ardour/session_import_dialog.cc
index 89f50c5893..500ca3ea09 100644
--- a/gtk2_ardour/session_import_dialog.cc
+++ b/gtk2_ardour/session_import_dialog.cc
@@ -46,20 +46,20 @@ SessionImportDialog::SessionImportDialog (ARDOUR::Session & target) :
file_entry.set_name ("ImportFileNameEntry");
file_entry.set_text ("/");
Gtkmm2ext::set_size_request_to_display_given_text (file_entry, X_("Kg/quite/a/reasonable/size/for/files/i/think"), 5, 8);
-
+
file_browse_button.set_name ("EditorGTKButton");
file_browse_button.signal_clicked().connect (mem_fun(*this, &SessionImportDialog::browse));
-
+
file_hbox.set_spacing (5);
file_hbox.set_border_width (5);
file_hbox.pack_start (file_entry, true, true);
file_hbox.pack_start (file_browse_button, false, false);
-
+
file_frame.add (file_hbox);
file_frame.set_border_width (5);
file_frame.set_name ("ImportFrom");
file_frame.set_label (_("Import from Session"));
-
+
get_vbox()->pack_start (file_frame, false, false);
// Session browser
@@ -73,28 +73,28 @@ SessionImportDialog::SessionImportDialog (ARDOUR::Session & target) :
session_browser.get_column(0)->set_min_width (180);
session_browser.get_column(1)->set_min_width (40);
session_browser.get_column(1)->set_sizing (Gtk::TREE_VIEW_COLUMN_AUTOSIZE);
-
+
session_scroll.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
session_scroll.add (session_browser);
session_scroll.set_size_request (220, 400);
-
+
// Connect signals
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *> (session_browser.get_column_cell_renderer (1));
toggle->signal_toggled().connect(mem_fun (*this, &SessionImportDialog::update));
session_browser.signal_row_activated().connect(mem_fun (*this, &SessionImportDialog::show_info));
-
+
get_vbox()->pack_start (session_scroll, false, false);
-
+
// Buttons
cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
cancel_button->signal_clicked().connect (mem_fun (*this, &SessionImportDialog::end_dialog));
ok_button = add_button (_("Import"), Gtk::RESPONSE_ACCEPT);
ok_button->signal_clicked().connect (mem_fun (*this, &SessionImportDialog::do_merge));
-
+
// prompt signals
ElementImporter::Rename.connect (mem_fun (*this, &SessionImportDialog::open_rename_dialog));
ElementImporter::Prompt.connect (mem_fun (*this, &SessionImportDialog::open_prompt_dialog));
-
+
// Finalize
show_all();
}
@@ -105,16 +105,16 @@ SessionImportDialog::load_session (const string& filename)
tree.read (filename);
boost::shared_ptr<AudioRegionImportHandler> region_handler (new AudioRegionImportHandler (tree, target));
boost::shared_ptr<AudioPlaylistImportHandler> pl_handler (new AudioPlaylistImportHandler (tree, target, *region_handler));
-
+
handlers.push_back (boost::static_pointer_cast<ElementImportHandler> (region_handler));
handlers.push_back (boost::static_pointer_cast<ElementImportHandler> (pl_handler));
handlers.push_back (HandlerPtr(new UnusedAudioPlaylistImportHandler (tree, target, *region_handler)));
handlers.push_back (HandlerPtr(new AudioTrackImportHandler (tree, target, *pl_handler)));
handlers.push_back (HandlerPtr(new LocationImportHandler (tree, target)));
handlers.push_back (HandlerPtr(new TempoMapImportHandler (tree, target)));
-
+
fill_list();
-
+
if (ElementImportHandler::dirty()) {
// Warn user
string txt = _("Some elements had errors in them. Please see the log for details");
@@ -127,7 +127,7 @@ void
SessionImportDialog::fill_list ()
{
session_tree->clear();
-
+
// Loop through element types
for (HandlerList::iterator handler = handlers.begin(); handler != handlers.end(); ++handler) {
Gtk::TreeModel::iterator iter = session_tree->append();
@@ -135,7 +135,7 @@ SessionImportDialog::fill_list ()
row[sb_cols.name] = (*handler)->get_info();
row[sb_cols.queued] = false;
row[sb_cols.element] = ElementPtr(); // "Null" pointer
-
+
// Loop through elements
ElementList &elements = (*handler)->elements;
for (ElementList::iterator element = elements.begin(); element != elements.end(); ++element) {
@@ -158,12 +158,12 @@ SessionImportDialog::browse ()
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
-
+
int result = dialog.run();
if (result == Gtk::RESPONSE_OK) {
string filename = dialog.get_filename();
-
+
if (filename.length()) {
file_entry.set_text (filename);
load_session (filename);
@@ -174,7 +174,7 @@ SessionImportDialog::browse ()
void
SessionImportDialog::do_merge ()
{
-
+
// element types
Gtk::TreeModel::Children types = session_browser.get_model()->children();
Gtk::TreeModel::Children::iterator ti;
@@ -189,9 +189,9 @@ SessionImportDialog::do_merge ()
}
}
}
-
+
end_dialog();
-
+
if (ElementImportHandler::errors()) {
// Warn user
string txt = _("Some elements had errors in them. Please see the log for details");
@@ -205,7 +205,7 @@ void
SessionImportDialog::update (string path)
{
Gtk::TreeModel::iterator cell = session_browser.get_model()->get_iter (path);
-
+
// Select all elements if element type is selected
if (path.size() == 1) {
{
@@ -217,7 +217,7 @@ SessionImportDialog::update (string path)
return;
}
}
-
+
Gtk::TreeModel::Children elements = cell->children();
Gtk::TreeModel::Children::iterator ei;
for (ei = elements.begin(); ei != elements.end(); ++ei) {
@@ -230,7 +230,7 @@ SessionImportDialog::update (string path)
}
return;
}
-
+
ElementPtr element = (*cell)[sb_cols.element];
if ((*cell)[sb_cols.queued]) {
if (!element->prepare_move()) {
@@ -247,10 +247,10 @@ SessionImportDialog::show_info(const Gtk::TreeModel::Path& path, Gtk::TreeViewCo
if (path.size() == 1) {
return;
}
-
+
Gtk::TreeModel::iterator cell = session_browser.get_model()->get_iter (path);
string info = (*cell)[sb_cols.info];
-
+
Gtk::MessageDialog msg (info, false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true);
msg.run();
}
@@ -274,7 +274,7 @@ SessionImportDialog::open_rename_dialog (string text, string name)
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
prompter.set_prompt (text);
prompter.set_initial_text (name);
-
+
if (prompter.run() == Gtk::RESPONSE_ACCEPT) {
prompter.get_result (new_name);
if (new_name.length()) {
diff --git a/gtk2_ardour/session_import_dialog.h b/gtk2_ardour/session_import_dialog.h
index 74da13855a..4144d07c88 100644
--- a/gtk2_ardour/session_import_dialog.h
+++ b/gtk2_ardour/session_import_dialog.h
@@ -43,15 +43,15 @@ class SessionImportDialog : public ArdourDialog
private:
typedef boost::shared_ptr<ARDOUR::ElementImportHandler> HandlerPtr;
typedef std::list<HandlerPtr> HandlerList;
-
+
typedef boost::shared_ptr<ARDOUR::ElementImporter> ElementPtr;
typedef std::list<ElementPtr> ElementList;
public:
SessionImportDialog (ARDOUR::Session & target);
-
+
virtual Gtk::FileChooserAction browse_action() const { return Gtk::FILE_CHOOSER_ACTION_OPEN; }
-
+
private:
void load_session (const std::string& filename);
@@ -61,7 +61,7 @@ class SessionImportDialog : public ArdourDialog
void end_dialog ();
void update (std::string path);
void show_info(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
-
+
std::pair<bool, std::string> open_rename_dialog (std::string text, std::string name);
bool open_prompt_dialog (std::string text);
@@ -75,7 +75,7 @@ class SessionImportDialog : public ArdourDialog
Gtk::HBox file_hbox;
Gtk::Entry file_entry;
Gtk::Button file_browse_button;
-
+
struct SessionBrowserColumns : public Gtk::TreeModel::ColumnRecord
{
public:
@@ -86,12 +86,12 @@ class SessionImportDialog : public ArdourDialog
SessionBrowserColumns() { add (name); add (queued); add (element); add (info); }
};
-
+
SessionBrowserColumns sb_cols;
Glib::RefPtr<Gtk::TreeStore> session_tree;
Gtk::TreeView session_browser;
Gtk::ScrolledWindow session_scroll;
-
+
Gtk::Button* ok_button;
Gtk::Button* cancel_button;
};
diff --git a/gtk2_ardour/session_metadata_dialog.cc b/gtk2_ardour/session_metadata_dialog.cc
index fefabf143d..be2e6fe012 100644
--- a/gtk2_ardour/session_metadata_dialog.cc
+++ b/gtk2_ardour/session_metadata_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
Author: Sakari Bergen
This program is free software; you can redistribute it and/or modify it
@@ -97,11 +97,11 @@ Gtk::Widget &
TextMetadataField::edit_widget ()
{
entry = Gtk::manage (new Gtk::Entry());
-
+
entry->set_text (_value);
entry->set_width_chars (width);
entry->signal_changed().connect (sigc::mem_fun(*this, &TextMetadataField::update_value));
-
+
return *entry;
}
@@ -175,12 +175,12 @@ Gtk::Widget &
NumberMetadataField::edit_widget ()
{
entry = Gtk::manage (new Gtk::Entry());
-
+
entry->set_text (_value);
entry->set_width_chars (width);
entry->set_max_length (numbers);
entry->signal_changed().connect (sigc::mem_fun(*this, &NumberMetadataField::update_value));
-
+
return *entry;
}
@@ -204,7 +204,7 @@ NumberMetadataField::str_to_uint (ustring const & str) const
while ((i = tmp.find_first_not_of("1234567890")) != ustring::npos) {
tmp.erase (i, 1);
}
-
+
std::istringstream iss(tmp);
uint32_t result = 0;
iss >> result;
@@ -249,9 +249,9 @@ void
SessionMetadataSetEditable::set_session (ARDOUR::Session * s)
{
session = s;
-
+
ARDOUR::SessionMetadata const & data = session->metadata();
-
+
table.resize (list.size(), 2);
uint32_t row = 0;
MetadataPtr field;
@@ -281,27 +281,27 @@ SessionMetadataSetImportable::SessionMetadataSetImportable (ustring const & name
{
tree = Gtk::ListStore::create (tree_cols);
tree_view.set_model (tree);
-
+
Gtk::TreeView::Column * viewcol;
-
+
// Add import column
Gtk::CellRendererToggle * import_render = Gtk::manage(new Gtk::CellRendererToggle());
import_render->signal_toggled().connect (sigc::mem_fun(*this, &SessionMetadataSetImportable::selection_changed));
viewcol = Gtk::manage(new Gtk::TreeView::Column (_("Import"), *import_render));
viewcol->add_attribute (import_render->property_active(), tree_cols.import);
tree_view.append_column (*viewcol);
-
+
// Add field name column
tree_view.append_column(_("Field"), tree_cols.field);
-
+
// Add values column with pango markup
Gtk::CellRendererText * values_render = Gtk::manage(new Gtk::CellRendererText());
viewcol = Gtk::manage(new Gtk::TreeView::Column (_("Values (current value on top)"), *values_render));
viewcol->add_attribute (values_render->property_markup(), tree_cols.values);
tree_view.append_column (*viewcol);
-
+
select_all_check.signal_toggled().connect (sigc::mem_fun(*this, &SessionMetadataSetImportable::select_all));
-
+
session = 0;
}
@@ -326,14 +326,14 @@ SessionMetadataSetImportable::load_extra_data (ARDOUR::SessionMetadata const & d
std::cerr << "Programming error: no session set for SessionMetaDataSetImportable (in load_data)!" << std::endl;
return;
}
-
+
ARDOUR::SessionMetadata & session_data = session->metadata();
-
+
MetadataPtr session_field;
MetadataPtr import_field;
DataList::iterator session_it;
DataList::iterator import_it;
-
+
// Copy list and load data to import
for (session_it = session_list.begin(); session_it != session_list.end(); ++session_it) {
session_field = *session_it;
@@ -347,13 +347,13 @@ SessionMetadataSetImportable::load_extra_data (ARDOUR::SessionMetadata const & d
while (session_it != session_list.end() && import_it != import_list.end()) { // _should_ be the same...
session_field = *session_it;
import_field = *import_it;
-
+
import_field->load_data(data); // hasn't been done yet
-
+
// Make string for values TODO get color from somewhere?
ustring values = "<span weight=\"ultralight\" color=\"#777\">" + session_field->value() + "</span>\n"
+ "<span weight=\"bold\">" + import_field->value() + "</span>";
-
+
Gtk::TreeModel::iterator row_iter = tree->append();
Gtk::TreeModel::Row row = *row_iter;
@@ -361,7 +361,7 @@ SessionMetadataSetImportable::load_extra_data (ARDOUR::SessionMetadata const & d
row[tree_cols.values] = values;
row[tree_cols.import] = false;
row[tree_cols.data] = import_field;
-
+
++session_it;
++import_it;
}
@@ -392,7 +392,7 @@ SessionMetadataSetImportable::select_all ()
{
select_all_check.set_inconsistent (false);
bool state = select_all_check.get_active();
-
+
Gtk::TreeModel::Children fields = tree->children();
Gtk::TreeModel::Children::iterator it;
for (it = fields.begin(); it != fields.end(); ++it) {
@@ -404,7 +404,7 @@ void
SessionMetadataSetImportable::selection_changed (ustring const & path)
{
select_all_check.set_inconsistent (true);
-
+
Gtk::TreeModel::iterator iter = tree->get_iter (path);
bool value((*iter)[tree_cols.import]);
(*iter)[tree_cols.import] = !value;
@@ -430,14 +430,14 @@ SessionMetadataDialog<DataSet>::init_data ()
std::cerr << "Programming error: no session set for SessionMetaDataDialog (in init_data)!" << std::endl;
return;
}
-
+
init_track_data ();
init_album_data ();
init_people_data ();
-
+
for (DataSetList::iterator it = data_list.begin(); it != data_list.end(); ++it) {
(*it)->set_session (session);
-
+
notebook.append_page ((*it)->get_widget(), (*it)->get_tab_widget());
}
}
@@ -493,7 +493,7 @@ SessionMetadataDialog<DataSet>::get_custom_widgets (WidgetFunc f)
DataSet * set = dynamic_cast<DataSet *> (it->get());
list->push_back (& CALL_MEMBER_FN (*set, f) ());
}
-
+
return list;
}
@@ -512,28 +512,28 @@ SessionMetadataDialog<DataSet>::init_track_data ()
data_list.push_back (data_set);
MetadataPtr ptr;
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::title, &ARDOUR::SessionMetadata::set_title, _("Title")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new NumberMetadataField (&ARDOUR::SessionMetadata::track_number, &ARDOUR::SessionMetadata::set_track_number, _("Track Number"), 3));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::subtitle, &ARDOUR::SessionMetadata::set_subtitle, _("Subtitle")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::grouping, &ARDOUR::SessionMetadata::set_grouping, _("Grouping")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::artist, &ARDOUR::SessionMetadata::set_artist, _("Artist")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::genre, &ARDOUR::SessionMetadata::set_genre, _("Genre")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::comment, &ARDOUR::SessionMetadata::set_comment, _("Comment")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::copyright, &ARDOUR::SessionMetadata::set_copyright, _("Copyright")));
data_set->add_data_field (ptr);
}
@@ -544,33 +544,33 @@ SessionMetadataDialog<DataSet>::init_album_data ()
{
DataSetPtr data_set (new DataSet (_("Album")));
data_list.push_back (data_set);
-
+
MetadataPtr ptr;
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::album, &ARDOUR::SessionMetadata::set_album, _("Album")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new NumberMetadataField (&ARDOUR::SessionMetadata::year, &ARDOUR::SessionMetadata::set_year, _("Year"), 4));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::album_artist, &ARDOUR::SessionMetadata::set_album_artist, _("Album Artist")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new NumberMetadataField (&ARDOUR::SessionMetadata::total_tracks, &ARDOUR::SessionMetadata::set_total_tracks, _("Total Tracks"), 3));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::disc_subtitle, &ARDOUR::SessionMetadata::set_disc_subtitle, _("Disc Subtitle")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new NumberMetadataField (&ARDOUR::SessionMetadata::disc_number, &ARDOUR::SessionMetadata::set_disc_number, _("Disc Number"), 2));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new NumberMetadataField (&ARDOUR::SessionMetadata::total_discs, &ARDOUR::SessionMetadata::set_total_discs, _("Total Discs"), 2));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::compilation, &ARDOUR::SessionMetadata::set_compilation, _("Compilation")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::isrc, &ARDOUR::SessionMetadata::set_isrc, _("ISRC")));
data_set->add_data_field (ptr);
}
@@ -583,31 +583,31 @@ SessionMetadataDialog<DataSet>::init_people_data ()
data_list.push_back (data_set);
MetadataPtr ptr;
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::lyricist, &ARDOUR::SessionMetadata::set_lyricist, _("Lyricist")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::composer, &ARDOUR::SessionMetadata::set_composer, _("Composer")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::conductor, &ARDOUR::SessionMetadata::set_conductor, _("Conductor")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::remixer, &ARDOUR::SessionMetadata::set_remixer, _("Remixer")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::arranger, &ARDOUR::SessionMetadata::set_arranger, _("Arranger")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::engineer, &ARDOUR::SessionMetadata::set_engineer, _("Engineer")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::producer, &ARDOUR::SessionMetadata::set_producer, _("Producer")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::dj_mixer, &ARDOUR::SessionMetadata::set_dj_mixer, _("DJ Mixer")));
data_set->add_data_field (ptr);
-
+
ptr = MetadataPtr (new TextMetadataField (&ARDOUR::SessionMetadata::mixer, &ARDOUR::SessionMetadata::set_mixer, _("Mixer")));
data_set->add_data_field (ptr);
}
@@ -628,10 +628,10 @@ SessionMetadataEditor::~SessionMetadataEditor ()
void
SessionMetadataEditor::run ()
-{
+{
init_data ();
init_gui();
-
+
ArdourDialog::run();
}
@@ -639,7 +639,7 @@ void
SessionMetadataEditor::init_gui ()
{
add_widget (notebook);
-
+
show_all();
}
@@ -659,14 +659,14 @@ SessionMetadataImporter::~SessionMetadataImporter ()
void
SessionMetadataImporter::run ()
-{
+{
if (!session) {
std::cerr << "Programming error: no session set for SessionMetaDataImporter (in run)!" << std::endl;
return;
}
/* Open session file selector */
-
+
Gtk::FileChooserDialog session_selector(_("Choose session to import metadata from"), Gtk::FILE_CHOOSER_ACTION_OPEN);
session_selector.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
session_selector.add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
@@ -699,30 +699,30 @@ SessionMetadataImporter::run ()
} else {
return;
}
-
+
/* We have a session: load the data and run dialog */
-
+
string filename = Glib::build_filename (path, name + ".ardour");
XMLTree session_tree;
if (!session_tree.read (filename)) {
warn_user (_("A proper ardour session file was not selected!"));
return;
}
-
+
XMLNode * node = session_tree.root()->child ("Metadata");
-
+
if (!node) {
warn_user (_("The session file didn't contain metadata!\nMaybe this is an old session format?"));
return;
}
-
+
ARDOUR::SessionMetadata data;
data.set_state (*node);
-
+
init_data ();
load_extra_data (data);
init_gui();
-
+
ArdourDialog::run();
}
@@ -733,13 +733,13 @@ SessionMetadataImporter::init_gui ()
add_widget (selection_hbox);
selection_label.set_text (_("Import all from:"));
selection_hbox.pack_start (selection_label, false, false);
-
+
WidgetListPtr list = get_custom_widgets (&SessionMetadataSetImportable::get_select_all_widget);
for (WidgetList::iterator it = list->begin(); it != list->end(); ++it) {
selection_hbox.pack_start (**it, false, false, 6);
}
add_widget (notebook);
-
+
show_all();
}
diff --git a/gtk2_ardour/session_metadata_dialog.h b/gtk2_ardour/session_metadata_dialog.h
index cb2c12daa2..3e618c079f 100644
--- a/gtk2_ardour/session_metadata_dialog.h
+++ b/gtk2_ardour/session_metadata_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
Author: Sakari Bergen
This program is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
#include "ardour/session_metadata.h"
class MetadataField;
-typedef boost::shared_ptr<MetadataField> MetadataPtr;
+typedef boost::shared_ptr<MetadataField> MetadataPtr;
/// Wraps a metadata field to be used in a GUI
class MetadataField {
@@ -39,13 +39,13 @@ class MetadataField {
MetadataField (Glib::ustring const & field_name);
virtual ~MetadataField();
virtual MetadataPtr copy () = 0;
-
+
virtual void save_data (ARDOUR::SessionMetadata & data) const = 0;
virtual void load_data (ARDOUR::SessionMetadata const & data) = 0;
-
+
virtual Glib::ustring name() { return _name; }
virtual Glib::ustring value() { return _value; }
-
+
/// Get widget containing name of field
virtual Gtk::Widget & name_widget () = 0;
/// Get label containing value of field
@@ -65,23 +65,23 @@ class TextMetadataField : public MetadataField {
public:
TextMetadataField (Getter getter, Setter setter, Glib::ustring const & field_name, guint width = 50);
MetadataPtr copy ();
-
+
void save_data (ARDOUR::SessionMetadata & data) const;
void load_data (ARDOUR::SessionMetadata const & data);
-
+
Gtk::Widget & name_widget ();
Gtk::Widget & value_widget ();
Gtk::Widget & edit_widget ();
private:
void update_value ();
-
+
Getter getter;
Setter setter;
-
+
Gtk::Label* label;
Gtk::Label* value_label;
Gtk::Entry* entry;
-
+
uint width;
};
@@ -93,10 +93,10 @@ class NumberMetadataField : public MetadataField {
public:
NumberMetadataField (Getter getter, Setter setter, Glib::ustring const & field_name, guint numbers, guint width = 50);
MetadataPtr copy ();
-
+
void save_data (ARDOUR::SessionMetadata & data) const;
void load_data (ARDOUR::SessionMetadata const & data);
-
+
Gtk::Widget & name_widget ();
Gtk::Widget & value_widget ();
Gtk::Widget & edit_widget ();
@@ -104,14 +104,14 @@ class NumberMetadataField : public MetadataField {
void update_value ();
Glib::ustring uint_to_str (uint32_t i) const;
uint32_t str_to_uint (Glib::ustring const & str) const;
-
+
Getter getter;
Setter setter;
-
+
Gtk::Label* label;
Gtk::Label* value_label;
Gtk::Entry* entry;
-
+
guint numbers;
guint width;
};
@@ -121,19 +121,19 @@ class SessionMetadataSet {
public:
SessionMetadataSet (Glib::ustring const & name);
virtual ~SessionMetadataSet () {};
-
+
void add_data_field (MetadataPtr field);
-
+
/// Sets session, into which the data is eventually saved
virtual void set_session (ARDOUR::Session * s) { session = s; }
/// allows loading extra data into data sets (for importing etc.)
virtual void load_extra_data (ARDOUR::SessionMetadata const & /*data*/) { }
/// Saves data to session
virtual void save_data () = 0;
-
+
virtual Gtk::Widget & get_widget () = 0;
virtual Gtk::Widget & get_tab_widget () = 0;
-
+
protected:
typedef std::list<MetadataPtr> DataList;
DataList list;
@@ -145,15 +145,15 @@ class SessionMetadataSet {
class SessionMetadataSetEditable : public SessionMetadataSet {
public:
SessionMetadataSetEditable (Glib::ustring const & name);
-
+
Gtk::Widget & get_widget () { return vbox; }
Gtk::Widget & get_tab_widget ();
-
+
/// Sets session and loads data
void set_session (ARDOUR::Session * s);
/// Saves from MetadataFields into data
void save_data ();
-
+
private:
Gtk::VBox vbox;
Gtk::Table table;
@@ -164,20 +164,20 @@ class SessionMetadataSetEditable : public SessionMetadataSet {
class SessionMetadataSetImportable : public SessionMetadataSet {
public:
SessionMetadataSetImportable (Glib::ustring const & name);
-
+
Gtk::Widget & get_widget () { return tree_view; }
Gtk::Widget & get_tab_widget ();
Gtk::Widget & get_select_all_widget ();
-
+
/// Loads importable data from data
void load_extra_data (ARDOUR::SessionMetadata const & data);
/// Saves from importable data (see load_data) to session_data
void save_data ();
-
+
private:
DataList & session_list; // References MetadataSet::list
DataList import_list;
-
+
struct Columns : public Gtk::TreeModel::ColumnRecord
{
public:
@@ -185,17 +185,17 @@ class SessionMetadataSetImportable : public SessionMetadataSet {
Gtk::TreeModelColumn<Glib::ustring> values;
Gtk::TreeModelColumn<bool> import;
Gtk::TreeModelColumn<MetadataPtr> data;
-
+
Columns() { add (field); add (values); add (import); add (data); }
};
-
+
Glib::RefPtr<Gtk::ListStore> tree;
Columns tree_cols;
Gtk::TreeView tree_view;
-
- Gtk::Label tab_widget;
+
+ Gtk::Label tab_widget;
Gtk::CheckButton select_all_check;
-
+
void select_all ();
void selection_changed (Glib::ustring const & path);
};
@@ -215,20 +215,20 @@ class SessionMetadataDialog : public ArdourDialog
void init_data ();
void load_extra_data (ARDOUR::SessionMetadata const & data);
void save_data ();
-
+
virtual void init_gui () = 0;
virtual void save_and_close ();
virtual void end_dialog ();
-
+
void warn_user (Glib::ustring const & string);
-
+
typedef std::list<Gtk::Widget *> WidgetList;
typedef boost::shared_ptr<WidgetList> WidgetListPtr;
typedef Gtk::Widget & (DataSet::*WidgetFunc) ();
-
+
/// Returns list of widgets gathered by calling f for each data set
WidgetListPtr get_custom_widgets (WidgetFunc f);
-
+
/// Adds a widget to the table (vertical stacking) with automatic spacing
void add_widget (Gtk::Widget & widget);
@@ -242,7 +242,7 @@ class SessionMetadataDialog : public ArdourDialog
typedef boost::shared_ptr<SessionMetadataSet> DataSetPtr;
typedef std::list<DataSetPtr> DataSetList;
DataSetList data_list;
-
+
Gtk::Button * save_button;
Gtk::Button * cancel_button;
};
@@ -264,11 +264,11 @@ class SessionMetadataImporter : public SessionMetadataDialog<SessionMetadataSetI
private:
void init_gui ();
-
+
// Select all from -widget
Gtk::HBox selection_hbox;
Gtk::Label selection_label;
-
+
};
#endif
diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc
index edb596c6cc..29051fe09a 100644
--- a/gtk2_ardour/session_option_editor.cc
+++ b/gtk2_ardour/session_option_editor.cc
@@ -19,14 +19,14 @@ public:
{
_port_group.reset (new PortGroup (""));
_ports[OURS].add_group (_port_group);
-
+
setup_all_ports ();
}
void setup_ports (int dim)
{
cerr << _session.the_auditioner()->output()->n_ports() << "\n";
-
+
if (dim == OURS) {
_port_group->clear ();
_port_group->add_bundle (_session.click_io()->bundle());
@@ -40,7 +40,7 @@ public:
{
Bundle::PortList const & our_ports = c[OURS].bundle->channel_ports (c[OURS].channel);
Bundle::PortList const & other_ports = c[OTHER].bundle->channel_ports (c[OTHER].channel);
-
+
if (c[OURS].bundle == _session.click_io()->bundle()) {
for (ARDOUR::Bundle::PortList::const_iterator i = our_ports.begin(); i != our_ports.end(); ++i) {
@@ -48,7 +48,7 @@ public:
Port* f = _session.engine().get_port_by_name (*i);
assert (f);
-
+
if (s) {
_session.click_io()->connect (f, *j, 0);
} else {
@@ -63,14 +63,14 @@ public:
{
Bundle::PortList const & our_ports = c[OURS].bundle->channel_ports (c[OURS].channel);
Bundle::PortList const & other_ports = c[OTHER].bundle->channel_ports (c[OTHER].channel);
-
+
if (c[OURS].bundle == _session.click_io()->bundle()) {
-
+
for (ARDOUR::Bundle::PortList::const_iterator i = our_ports.begin(); i != our_ports.end(); ++i) {
for (ARDOUR::Bundle::PortList::const_iterator j = other_ports.begin(); j != other_ports.end(); ++j) {
Port* f = _session.engine().get_port_by_name (*i);
assert (f);
-
+
if (f->connected_to (*j)) {
return PortMatrixNode::ASSOCIATED;
} else {
@@ -95,13 +95,13 @@ public:
bool can_remove_channels (boost::shared_ptr<Bundle>) const {
return false;
}
-
+
void remove_channel (ARDOUR::BundleChannel) {}
-
+
std::string disassociation_verb () const {
return _("Disassociate");
}
-
+
private:
/* see PortMatrix: signal flow from 0 to 1 (out to in) */
enum {
@@ -241,7 +241,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
smf->add (smpte_60, _("60"));
add_option (_("Sync"), smf);
-
+
add_option (_("Sync"), new BoolOption (
"timecode-source-is-synced",
_("Timecode source is synced"),
@@ -265,9 +265,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
vpu->add (-4.1667 + 0.1, _("-4.1667 + 0.1%"));
vpu->add (-4.1667, _("-4.1667"));
vpu->add (-4.1667 - 0.1, _("-4.1667 - 0.1%"));
-
+
add_option (_("Sync"), vpu);
-
+
/* MISC */
add_option (_("Misc"), new OptionEditorHeading (_("Audio file format")));
@@ -313,9 +313,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
lm->add (AddHigher, _("most recently added is higher"));
add_option (_("Misc"), lm);
-
+
add_option (_("Misc"), new OptionEditorHeading (_("Broadcast WAVE metadata")));
-
+
add_option (_("Misc"), new EntryOption (
"bwf-country-code",
_("Country code"),
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 41758d493d..7a7fad030f 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -91,7 +91,7 @@ string2importmode (string str)
}
warning << string_compose (_("programming error: unknown import mode string %1"), str) << endmsg;
-
+
return ImportAsTrack;
}
@@ -119,7 +119,7 @@ SoundFileBox::SoundFileBox (bool persistent)
timecode_clock ("sfboxTimecodeClock", !persistent, "EditCursorClock", false, false, false),
main_box (false, 6),
autoplay_btn (_("Auto-play"))
-
+
{
set_name (X_("SoundFileBox"));
set_size_request (300, -1);
@@ -179,13 +179,13 @@ SoundFileBox::SoundFileBox (bool persistent)
main_box.pack_start (tags_entry, true, true);
main_box.pack_start (bottom_box, false, false);
-
+
play_btn.set_image (*(manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON))));
play_btn.set_label (_("Play"));
stop_btn.set_image (*(manage (new Image (Stock::MEDIA_STOP, ICON_SIZE_BUTTON))));
stop_btn.set_label (_("Stop"));
-
+
bottom_box.set_homogeneous (false);
bottom_box.set_spacing (6);
bottom_box.pack_start(play_btn, true, true);
@@ -207,7 +207,7 @@ SoundFileBox::set_session(Session* s)
if (!_session) {
play_btn.set_sensitive (false);
stop_btn.set_sensitive (false);
- }
+ }
length_clock.set_session (s);
@@ -215,7 +215,7 @@ SoundFileBox::set_session(Session* s)
}
bool
-SoundFileBox::setup_labels (const ustring& filename)
+SoundFileBox::setup_labels (const ustring& filename)
{
if (!path.empty()) {
// save existing tags
@@ -236,10 +236,10 @@ SoundFileBox::setup_labels (const ustring& filename)
length_clock.set (0);
timecode_clock.set (0);
-
+
tags_entry.set_sensitive (false);
play_btn.set_sensitive (false);
-
+
return false;
}
@@ -272,7 +272,7 @@ SoundFileBox::setup_labels (const ustring& filename)
// this is a hack that is fixed in trunk, i think (august 26th, 2007)
vector<string> tags = Library->get_tags (string ("//") + filename);
-
+
stringstream tag_string;
for (vector<string>::iterator i = tags.begin(); i != tags.end(); ++i) {
if (i != tags.begin()) {
@@ -281,12 +281,12 @@ SoundFileBox::setup_labels (const ustring& filename)
tag_string << *i;
}
tags_entry.get_buffer()->set_text (tag_string.str());
-
+
tags_entry.set_sensitive (true);
if (_session) {
play_btn.set_sensitive (true);
}
-
+
return true;
}
@@ -309,7 +309,7 @@ SoundFileBox::audition ()
if (!_session) {
return;
}
-
+
_session->cancel_audition();
if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
@@ -331,9 +331,9 @@ SoundFileBox::audition ()
afs = boost::dynamic_pointer_cast<AudioFileSource> (
SourceFactory::createReadable (DataType::AUDIO, *_session,
path, false, n, Source::Flag (0), false));
-
+
srclist.push_back(afs);
-
+
} catch (failed_constructor& err) {
error << _("Could not access soundfile: ") << path << endmsg;
AudioSource::set_build_peakfiles (old_sbp);
@@ -342,11 +342,11 @@ SoundFileBox::audition ()
}
AudioSource::set_build_peakfiles (old_sbp);
-
+
if (srclist.empty()) {
return;
}
-
+
afs = boost::dynamic_pointer_cast<AudioFileSource> (srclist[0]);
string rname = region_name_from_path (afs->path(), false);
r = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (srclist, 0,
@@ -418,7 +418,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
chooser.add_shortcut_folder_uri("file:///Library/GarageBand/Apple Loops");
chooser.add_shortcut_folder_uri("file:///Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files");
}
-
+
//add the file chooser
{
@@ -426,10 +426,10 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
audio_filter.add_custom (FILE_FILTER_FILENAME, mem_fun(*this, &SoundFileBrowser::on_audio_filter));
audio_filter.set_name (_("Audio files"));
-
+
midi_filter.add_custom (FILE_FILTER_FILENAME, mem_fun(*this, &SoundFileBrowser::on_midi_filter));
midi_filter.set_name (_("MIDI files"));
-
+
matchall_filter.add_pattern ("*.*");
matchall_filter.set_name (_("All files"));
@@ -445,13 +445,13 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
}
notebook.append_page (chooser, _("Browse Files"));
}
-
+
hpacker.set_spacing (6);
hpacker.pack_start (notebook, true, true);
hpacker.pack_start (preview, false, false);
-
+
get_vbox()->pack_start (hpacker, true, true);
-
+
//add tag search
{
VBox* vbox;
@@ -461,7 +461,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
hbox = manage(new HBox);
hbox->pack_start (found_entry);
hbox->pack_start (found_search_btn);
-
+
Gtk::ScrolledWindow *scroll = manage(new ScrolledWindow);
scroll->add(found_list_view);
scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -469,11 +469,11 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
vbox = manage(new VBox);
vbox->pack_start (*hbox, PACK_SHRINK);
vbox->pack_start (*scroll);
-
+
found_list_view.append_column(_("Paths"), found_list_columns.pathname);
found_list_view.get_selection()->signal_changed().connect(mem_fun(*this, &SoundFileBrowser::found_list_view_selected));
-
+
found_list_view.signal_row_activated().connect (mem_fun (*this, &SoundFileBrowser::found_list_view_activated));
found_search_btn.signal_clicked().connect(mem_fun(*this, &SoundFileBrowser::found_search_clicked));
@@ -506,7 +506,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
passbox->pack_start (*label, false, false);
passbox->pack_start (freesound_entry, false, false);
passbox->pack_start (freesound_search_btn, false, false);
-
+
Gtk::ScrolledWindow *scroll = manage(new ScrolledWindow);
scroll->add(freesound_list_view);
scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -514,12 +514,12 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
vbox = manage(new VBox);
vbox->pack_start (*passbox, PACK_SHRINK);
vbox->pack_start(*scroll);
-
+
//vbox->pack_start (freesound_list_view);
freesound_list_view.append_column(_("Paths"), freesound_list_columns.pathname);
freesound_list_view.get_selection()->signal_changed().connect(mem_fun(*this, &SoundFileBrowser::freesound_list_view_selected));
-
+
//freesound_list_view.get_selection()->set_mode (SELECTION_MULTIPLE);
freesound_list_view.signal_row_activated().connect (mem_fun (*this, &SoundFileBrowser::freesound_list_view_activated));
freesound_search_btn.signal_clicked().connect(mem_fun(*this, &SoundFileBrowser::freesound_search_clicked));
@@ -527,7 +527,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
notebook.append_page (*vbox, _("Search Freesound"));
}
#endif
-
+
notebook.set_size_request (500, -1);
@@ -536,7 +536,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::APPLY, RESPONSE_APPLY);
add_button (Stock::OK, RESPONSE_OK);
-
+
}
SoundFileBrowser::~SoundFileBrowser ()
@@ -669,7 +669,7 @@ SoundFileBrowser::found_list_view_selected ()
ustring file;
TreeView::Selection::ListHandle_Path rows = found_list_view.get_selection()->get_selected_rows ();
-
+
if (!rows.empty()) {
TreeIter iter = found_list->get_iter(*rows.begin());
file = (*iter)[found_list_columns.pathname];
@@ -678,7 +678,7 @@ SoundFileBrowser::found_list_view_selected ()
} else {
set_response_sensitive (RESPONSE_OK, false);
}
-
+
preview.setup_labels (file);
}
}
@@ -692,7 +692,7 @@ SoundFileBrowser::freesound_list_view_selected ()
ustring file;
TreeView::Selection::ListHandle_Path rows = freesound_list_view.get_selection()->get_selected_rows ();
-
+
if (!rows.empty()) {
TreeIter iter = freesound_list->get_iter(*rows.begin());
file = (*iter)[freesound_list_columns.pathname];
@@ -701,7 +701,7 @@ SoundFileBrowser::freesound_list_view_selected ()
} else {
set_response_sensitive (RESPONSE_OK, false);
}
-
+
preview.setup_labels (file);
}
}
@@ -717,10 +717,10 @@ SoundFileBrowser::found_search_clicked ()
warning << _("SoundFileBrowser: Could not tokenize string: ") << tag_string << endmsg;
return;
}
-
+
vector<string> results;
Library->search_members_and (results, tags);
-
+
found_list->clear();
for (vector<string>::iterator i = results.begin(); i != results.end(); ++i) {
TreeModel::iterator new_row = found_list->append();
@@ -736,7 +736,7 @@ freesound_search_thread_entry (void* arg)
PBD::notify_gui_about_thread_creation (pthread_self(), X_("Freesound Search"));
static_cast<SoundFileBrowser*>(arg)->freesound_search_thread ();
-
+
return 0;
}
@@ -748,7 +748,7 @@ SoundFileBrowser::freesound_search_clicked ()
{
if (canceling) //already canceling, button does nothing
return;
-
+
if ( searching ) {
freesound_search_btn.set_label(_("Cancelling.."));
canceling = true;
@@ -770,7 +770,7 @@ SoundFileBrowser::freesound_search_thread()
path = Glib::get_home_dir();
path += "/Freesound/";
Mootcher theMootcher(path.c_str());
-
+
string name_string = freesound_name_entry.get_text ();
string pass_string = freesound_pass_entry.get_text ();
string search_string = freesound_entry.get_text ();
@@ -799,7 +799,7 @@ SoundFileBrowser::freesound_search_thread()
TreeModel::iterator new_row = freesound_list->append();
TreeModel::Row row = *new_row;
string path = Glib::filename_from_uri (string ("file:") + filename);
- row[freesound_list_columns.pathname] = path;
+ row[freesound_list_columns.pathname] = path;
}
}
}
@@ -816,9 +816,9 @@ vector<ustring>
SoundFileBrowser::get_paths ()
{
vector<ustring> results;
-
+
int n = notebook.get_current_page ();
-
+
if (n == 0) {
vector<ustring> filenames = chooser.get_filenames();
vector<ustring>::iterator i;
@@ -829,27 +829,27 @@ SoundFileBrowser::get_paths ()
results.push_back (*i);
}
}
-
+
} else if (n==1){
-
+
typedef TreeView::Selection::ListHandle_Path ListPath;
-
+
ListPath rows = found_list_view.get_selection()->get_selected_rows ();
for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) {
TreeIter iter = found_list->get_iter(*i);
ustring str = (*iter)[found_list_columns.pathname];
-
+
results.push_back (str);
}
} else {
-
+
typedef TreeView::Selection::ListHandle_Path ListPath;
-
+
ListPath rows = freesound_list_view.get_selection()->get_selected_rows ();
for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) {
TreeIter iter = freesound_list->get_iter(*i);
ustring str = (*iter)[freesound_list_columns.pathname];
-
+
results.push_back (str);
}
}
@@ -914,26 +914,26 @@ SoundFileOmega::reset_options ()
if (selected_track_cnt > 0) {
if (channel_combo.get_active_text().length()) {
ImportDisposition id = get_channel_disposition();
-
+
switch (id) {
case Editing::ImportDistinctFiles:
if (selected_track_cnt == paths.size()) {
action_strings.push_back (importmode2string (ImportToTrack));
}
break;
-
+
case Editing::ImportDistinctChannels:
/* XXX it would be nice to allow channel-per-selected track
- but its too hard we don't want to deal with all the
+ but its too hard we don't want to deal with all the
different per-file + per-track channel configurations.
*/
break;
-
+
default:
action_strings.push_back (importmode2string (ImportToTrack));
break;
}
- }
+ }
}
action_strings.push_back (importmode2string (ImportAsTrack));
@@ -973,7 +973,7 @@ SoundFileOmega::reset_options ()
}
vector<string> channel_strings;
-
+
if (mode == ImportAsTrack || mode == ImportAsTapeTrack || mode == ImportToTrack) {
channel_strings.push_back (_("one track per file"));
@@ -991,7 +991,7 @@ SoundFileOmega::reset_options ()
if (same_size) {
channel_strings.push_back (_("all files in one region"));
}
-
+
}
} else {
@@ -1034,7 +1034,7 @@ SoundFileOmega::reset_options ()
} else {
src_combo.set_sensitive (false);
}
-
+
if (Config->get_only_copy_imported_files()) {
if (selection_can_be_embedded_with_links) {
@@ -1047,15 +1047,15 @@ SoundFileOmega::reset_options ()
copy_files_btn.set_sensitive (true);
}
-
+
return true;
-}
+}
bool
SoundFileOmega::bad_file_message()
{
- MessageDialog msg (*this,
+ MessageDialog msg (*this,
_("One or more of the selected files\ncannot be used by Ardour"),
true,
Gtk::MESSAGE_INFO,
@@ -1106,7 +1106,7 @@ SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool&
multichannel = true; // "channel" == track here...
}
- /* XXX we need err = true handling here in case
+ /* XXX we need err = true handling here in case
we can't check the file
*/
@@ -1131,7 +1131,7 @@ SoundFileOmega::check_link_status (const Session& s, const vector<ustring>& path
return false;
}
}
-
+
for (vector<ustring>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
char tmpc[MAXPATHLEN+1];
@@ -1143,7 +1143,7 @@ SoundFileOmega::check_link_status (const Session& s, const vector<ustring>& path
if (link ((*i).c_str(), tmpc)) {
goto out;
}
-
+
unlink (tmpc);
}
@@ -1183,7 +1183,7 @@ SoundFileChooser::get_filename ()
if (paths.empty()) {
return ustring ();
}
-
+
if (!Glib::file_test (paths.front(), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) {
return ustring();
}
@@ -1202,11 +1202,11 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
vector<string> str;
set_size_request (-1, 450);
-
+
block_two.set_border_width (12);
block_three.set_border_width (12);
block_four.set_border_width (12);
-
+
options.set_spacing (12);
str.clear ();
@@ -1219,7 +1219,7 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
Label* l = manage (new Label);
l->set_text (_("Add files:"));
-
+
hbox = manage (new HBox);
hbox->set_border_width (12);
hbox->set_spacing (6);
@@ -1229,7 +1229,7 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
vbox->pack_start (*hbox, false, false);
options.pack_start (*vbox, false, false);
- /* dummy entry for action combo so that it doesn't look odd if we
+ /* dummy entry for action combo so that it doesn't look odd if we
come up with no tracks selected.
*/
@@ -1296,7 +1296,7 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
reset_options ();
action_combo.signal_changed().connect (mem_fun (*this, &SoundFileOmega::reset_options_noret));
-
+
copy_files_btn.set_active (true);
block_four.pack_start (copy_files_btn, false, false);
@@ -1417,7 +1417,7 @@ SoundFileOmega::reset (int selected_tracks)
{
selected_track_cnt = selected_tracks;
reset_options ();
-}
+}
void
SoundFileOmega::file_selection_changed ()
diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h
index d9d0322532..740667fc0f 100644
--- a/gtk2_ardour/sfdb_ui.h
+++ b/gtk2_ardour/sfdb_ui.h
@@ -56,7 +56,7 @@ class SoundFileBox : public Gtk::VBox
public:
SoundFileBox (bool persistent);
virtual ~SoundFileBox () {};
-
+
void set_session (ARDOUR::Session* s);
bool setup_labels (const Glib::ustring& filename);
@@ -67,11 +67,11 @@ class SoundFileBox : public Gtk::VBox
protected:
ARDOUR::Session* _session;
Glib::ustring path;
-
+
ARDOUR::SoundFileInfo sf_info;
-
+
Gtk::Table table;
-
+
Gtk::Label length;
Gtk::Label format;
Gtk::Label channels;
@@ -80,7 +80,7 @@ class SoundFileBox : public Gtk::VBox
Gtk::Label channels_value;
Gtk::Label samplerate_value;
-
+
Gtk::Label format_text;
AudioClock length_clock;
AudioClock timecode_clock;
@@ -89,11 +89,11 @@ class SoundFileBox : public Gtk::VBox
Gtk::Label preview_label;
Gtk::TextView tags_entry;
-
+
Gtk::VBox main_box;
Gtk::VBox path_box;
Gtk::HBox bottom_box;
-
+
Gtk::Button play_btn;
Gtk::Button stop_btn;
Gtk::CheckButton autoplay_btn;
@@ -112,10 +112,10 @@ class SoundFileBrowser : public ArdourDialog
{
public:
Gtk::TreeModelColumn<Glib::ustring> pathname;
-
+
FoundTagColumns() { add(pathname); }
};
-
+
FoundTagColumns found_list_columns;
Glib::RefPtr<Gtk::ListStore> found_list;
@@ -125,10 +125,10 @@ class SoundFileBrowser : public ArdourDialog
public:
SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, bool persistent);
virtual ~SoundFileBrowser ();
-
+
virtual void set_session (ARDOUR::Session*);
std::vector<Glib::ustring> get_paths ();
-
+
void clear_selection ();
Gtk::FileChooserWidget chooser;
@@ -149,7 +149,7 @@ class SoundFileBrowser : public ArdourDialog
protected:
bool resetting_ourselves;
-
+
Gtk::FileFilter audio_filter;
Gtk::FileFilter midi_filter;
Gtk::FileFilter custom_filter;
@@ -178,9 +178,9 @@ class SoundFileBrowser : public ArdourDialog
void freesound_list_view_selected ();
void freesound_list_view_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn*);
void freesound_search_clicked ();
-
+
void chooser_file_activated ();
-
+
bool on_audio_filter (const Gtk::FileFilter::Info& filter_info);
bool on_midi_filter (const Gtk::FileFilter::Info& filter_info);
@@ -196,7 +196,7 @@ class SoundFileChooser : public SoundFileBrowser
public:
SoundFileChooser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s = 0);
virtual ~SoundFileChooser () {};
-
+
Glib::ustring get_filename ();
protected:
@@ -207,11 +207,11 @@ class SoundFileOmega : public SoundFileBrowser
{
public:
- SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, bool persistent,
+ SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, bool persistent,
Editing::ImportMode mode_hint = Editing::ImportAsTrack);
-
+
void reset (int selected_tracks);
-
+
Gtk::ComboBoxText action_combo;
Gtk::ComboBoxText where_combo;
Gtk::ComboBoxText channel_combo;
@@ -239,7 +239,7 @@ class SoundFileOmega : public SoundFileBrowser
Gtk::VBox block_three;
Gtk::VBox block_four;
- bool check_info (const std::vector<Glib::ustring>& paths,
+ bool check_info (const std::vector<Glib::ustring>& paths,
bool& same_size, bool& src_needed, bool& multichannel);
static bool check_link_status (const ARDOUR::Session&, const std::vector<Glib::ustring>& paths);
diff --git a/gtk2_ardour/simpleline.cc b/gtk2_ardour/simpleline.cc
index b1fecba840..6c8c4ceb10 100644
--- a/gtk2_ardour/simpleline.cc
+++ b/gtk2_ardour/simpleline.cc
@@ -134,7 +134,7 @@ GType SimpleLine::get_base_type()
return gnome_canvas_line_get_type();
}
-Glib::PropertyProxy<guint> SimpleLine::property_color_rgba()
+Glib::PropertyProxy<guint> SimpleLine::property_color_rgba()
{
return Glib::PropertyProxy<guint>(this, "color_rgba");
}
@@ -144,7 +144,7 @@ Glib::PropertyProxy_ReadOnly<guint> SimpleLine::property_color_rgba() const
return Glib::PropertyProxy_ReadOnly<guint>(this, "color_rgba");
}
-Glib::PropertyProxy<double> SimpleLine::property_x1()
+Glib::PropertyProxy<double> SimpleLine::property_x1()
{
return Glib::PropertyProxy<double>(this, "x1");
}
@@ -154,7 +154,7 @@ Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_x1() const
return Glib::PropertyProxy_ReadOnly<double>(this, "x1");
}
-Glib::PropertyProxy<double> SimpleLine::property_x2()
+Glib::PropertyProxy<double> SimpleLine::property_x2()
{
return Glib::PropertyProxy<double>(this, "x2");
}
@@ -164,7 +164,7 @@ Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_x2() const
return Glib::PropertyProxy_ReadOnly<double>(this, "x2");
}
-Glib::PropertyProxy<double> SimpleLine::property_y1()
+Glib::PropertyProxy<double> SimpleLine::property_y1()
{
return Glib::PropertyProxy<double>(this, "y1");
}
@@ -174,7 +174,7 @@ Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_y1() const
return Glib::PropertyProxy_ReadOnly<double>(this, "y1");
}
-Glib::PropertyProxy<double> SimpleLine::property_y2()
+Glib::PropertyProxy<double> SimpleLine::property_y2()
{
return Glib::PropertyProxy<double>(this, "y2");
}
diff --git a/gtk2_ardour/simpleline.h b/gtk2_ardour/simpleline.h
index 3e23ace83b..3aea5a4aa4 100644
--- a/gtk2_ardour/simpleline.h
+++ b/gtk2_ardour/simpleline.h
@@ -6,7 +6,7 @@
/* line.h
- *
+ *
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
@@ -109,7 +109,7 @@ public:
explicit SimpleLine(Group& parent);
SimpleLine(Group& parent, double x1, double y1, double x2, double y2);
- /**
+ /**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -117,7 +117,7 @@ public:
*/
Glib::PropertyProxy<double> property_x1() ;
-/**
+/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -125,7 +125,7 @@ public:
*/
Glib::PropertyProxy_ReadOnly<double> property_x1() const;
- /**
+ /**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -133,7 +133,7 @@ public:
*/
Glib::PropertyProxy<double> property_x2() ;
-/**
+/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -142,7 +142,7 @@ public:
Glib::PropertyProxy_ReadOnly<double> property_x2() const;
- /**
+ /**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -150,7 +150,7 @@ public:
*/
Glib::PropertyProxy<double> property_y1() ;
-/**
+/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -158,7 +158,7 @@ public:
*/
Glib::PropertyProxy_ReadOnly<double> property_y1() const;
- /**
+ /**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -166,7 +166,7 @@ public:
*/
Glib::PropertyProxy<double> property_y2() ;
-/**
+/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -174,7 +174,7 @@ public:
*/
Glib::PropertyProxy_ReadOnly<double> property_y2() const;
- /**
+ /**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
@@ -182,7 +182,7 @@ public:
*/
Glib::PropertyProxy<guint> property_color_rgba() ;
-/**
+/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
diff --git a/gtk2_ardour/simpleline_p.h b/gtk2_ardour/simpleline_p.h
index 59a624ea06..0a2e3061fd 100644
--- a/gtk2_ardour/simpleline_p.h
+++ b/gtk2_ardour/simpleline_p.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/simplerect.h b/gtk2_ardour/simplerect.h
index 299b27a868..d102d91792 100644
--- a/gtk2_ardour/simplerect.h
+++ b/gtk2_ardour/simplerect.h
@@ -6,7 +6,7 @@
/* rect.h
- *
+ *
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
diff --git a/gtk2_ardour/simplerect_p.h b/gtk2_ardour/simplerect_p.h
index ed30fb9ce6..4338d1029d 100644
--- a/gtk2_ardour/simplerect_p.h
+++ b/gtk2_ardour/simplerect_p.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc
index 3fa96704e3..bba754dc10 100644
--- a/gtk2_ardour/splash.cc
+++ b/gtk2_ardour/splash.cc
@@ -33,7 +33,7 @@ Splash::Splash ()
catch (...) {
throw failed_constructor();
}
-
+
darea.set_size_request (pixbuf->get_width(), pixbuf->get_height());
set_keep_above (true);
set_position (WIN_POS_CENTER);
@@ -93,10 +93,10 @@ Splash::expose (GdkEventExpose* ev)
window->draw_pixbuf (get_style()->get_bg_gc (STATE_NORMAL), pixbuf,
ev->area.x, ev->area.y,
ev->area.x, ev->area.y,
- min ((pixbuf->get_width() - ev->area.x), ev->area.width),
+ min ((pixbuf->get_width() - ev->area.x), ev->area.width),
min ((pixbuf->get_height() - ev->area.y), ev->area.height),
Gdk::RGB_DITHER_NONE, 0, 0);
-
+
Glib::RefPtr<Gtk::Style> style = darea.get_style();
Glib::RefPtr<Gdk::GC> white = style->get_white_gc();
diff --git a/gtk2_ardour/splash.h b/gtk2_ardour/splash.h
index a034ddad86..1c645d31cb 100644
--- a/gtk2_ardour/splash.h
+++ b/gtk2_ardour/splash.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,9 +41,9 @@ class Splash : public Gtk::Window
bool expose (GdkEventExpose*);
bool on_button_release_event (GdkEventButton*);
void on_realize ();
-
+
void message (const std::string& msg);
-
+
private:
static Splash* the_splash;
@@ -52,6 +52,6 @@ class Splash : public Gtk::Window
Glib::RefPtr<Pango::Layout> layout;
void boot_message (std::string);
-};
+};
#endif /* __ardour_gtk_splash_h__ */
diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc
index e4b19947a7..4fc372b976 100644
--- a/gtk2_ardour/startup.cc
+++ b/gtk2_ardour/startup.cc
@@ -35,7 +35,7 @@ static string poor_mans_glob (string path)
replace_all (copy, "~", Glib::get_home_dir());
return copy;
}
-
+
ArdourStartup::ArdourStartup ()
: applying (false)
@@ -73,7 +73,7 @@ Ardour will play NO role in monitoring"))
set_resizable (false);
set_position (WIN_POS_CENTER);
set_border_width (12);
-
+
sys::path icon_file;
if (!find_file_in_search_path (ardour_search_path() + system_data_search_path().add_subdirectory_to_paths("icons"), "ardour_icon_48px.png", icon_file)) {
@@ -178,7 +178,7 @@ ArdourStartup::session_name (bool& should_be_new)
should_be_new = false;
TreeIter iter = recent_session_display.get_selection()->get_selected();
-
+
if (iter) {
return (*iter)[recent_session_columns.visible_name];
}
@@ -198,7 +198,7 @@ ArdourStartup::session_folder ()
if (iter) {
return (*iter)[recent_session_columns.fullpath];
- }
+ }
return "";
}
}
@@ -215,7 +215,7 @@ ArdourStartup::setup_audio_page ()
audio_page_index = append_page (*engine_dialog);
set_page_type (*engine_dialog, ASSISTANT_PAGE_CONTENT);
set_page_title (*engine_dialog, _("Audio Setup"));
-
+
/* the default parameters should work, so the page is potentially complete */
set_page_complete (*engine_dialog, true);
@@ -235,7 +235,7 @@ ideas about music and sound.\n\
There are a few things that need to configured before you start\n\
using the program.</span>\
"));
-
+
HBox* hbox = manage (new HBox);
HBox* vbox = manage (new HBox);
@@ -265,12 +265,12 @@ ArdourStartup::default_dir_changed ()
void
ArdourStartup::setup_first_time_config_page ()
{
- default_dir_chooser = manage (new FileChooserButton (_("Default folder for Ardour sessions"),
+ default_dir_chooser = manage (new FileChooserButton (_("Default folder for Ardour sessions"),
FILE_CHOOSER_ACTION_SELECT_FOLDER));
Gtk::Label* txt = manage (new Label);
HBox* hbox = manage (new HBox);
VBox* vbox = manage (new VBox);
-
+
txt->set_markup (_("\
Each project that you work on with Ardour has its own folder.\n\
These can require a lot of disk space if you are recording audio.\n\
@@ -307,7 +307,7 @@ ArdourStartup::setup_monitoring_choice_page ()
{
mon_vbox.set_spacing (18);
mon_vbox.set_border_width (24);
-
+
HBox* hbox = manage (new HBox);
VBox* vbox = manage (new VBox);
RadioButton::Group g (monitor_via_hardware_button.get_group());
@@ -354,7 +354,7 @@ ArdourStartup::setup_initial_choice_page ()
HBox* centering_hbox = manage (new HBox);
VBox* centering_vbox = manage (new VBox);
-
+
centering_vbox->set_spacing (6);
centering_vbox->pack_start (ic_new_session_button, false, true);
@@ -445,13 +445,13 @@ ArdourStartup::on_apply ()
if (default_dir_chooser) {
Config->set_default_session_parent_dir (default_dir_chooser->get_current_folder());
}
-
+
if (monitor_via_hardware_button.get_active()) {
Config->set_monitoring_model (ExternalMonitoring);
} else if (monitor_via_ardour_button.get_active()) {
Config->set_monitoring_model (SoftwareMonitoring);
}
-
+
Config->save_state ();
}
@@ -462,7 +462,7 @@ void
ArdourStartup::on_prepare (Gtk::Widget* page)
{
if (page == &session_vbox) {
-
+
if (ic_new_session_button.get_active()) {
/* new session requested */
setup_new_session_page ();
@@ -470,14 +470,14 @@ ArdourStartup::on_prepare (Gtk::Widget* page)
/* existing session requested */
setup_existing_session_page ();
}
- }
+ }
}
void
ArdourStartup::populate_session_templates ()
{
vector<TemplateInfo> templates;
-
+
find_session_templates (templates);
template_model->clear ();
@@ -486,7 +486,7 @@ ArdourStartup::populate_session_templates ()
TreeModel::Row row;
row = *(template_model->append ());
-
+
row[session_template_columns.name] = (*x).name;
row[session_template_columns.path] = (*x).path;
}
@@ -505,38 +505,38 @@ ArdourStartup::setup_new_session_page ()
VBox *vbox1 = manage (new VBox);
HBox* hbox1 = manage (new HBox);
Label* label1 = manage (new Label);
-
+
vbox1->set_spacing (6);
hbox1->set_spacing (6);
hbox1->pack_start (*label1, false, false);
hbox1->pack_start (new_name_entry, true, true);
-
+
label1->set_text (_("Session name:"));
-
+
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
new_name_entry.set_text (Glib::path_get_basename (ARDOUR_COMMAND_LINE::session_name));
/* name provided - they can move right along */
set_page_complete (session_vbox, true);
}
-
+
new_name_entry.signal_changed().connect (mem_fun (*this, &ArdourStartup::new_name_changed));
new_name_entry.signal_activate().connect (mem_fun (*this, &ArdourStartup::move_along_now));
-
+
vbox1->pack_start (*hbox1, true, true);
/* --- */
HBox* hbox2 = manage (new HBox);
Label* label2 = manage (new Label);
-
+
hbox2->set_spacing (6);
hbox2->pack_start (*label2, false, false);
hbox2->pack_start (new_folder_chooser, true, true);
-
+
label2->set_text (_("Create session folder in:"));
-
+
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
new_folder_chooser.set_current_folder (poor_mans_glob (Glib::path_get_dirname (ARDOUR_COMMAND_LINE::session_name)));
} else {
@@ -557,7 +557,7 @@ ArdourStartup::setup_new_session_page ()
populate_session_templates ();
vbox2->set_spacing (6);
-
+
label3->set_markup (_("<b>Options</b>"));
label3->set_alignment (0.0, 0.0);
@@ -579,37 +579,37 @@ ArdourStartup::setup_new_session_page ()
hbox4a->set_spacing (6);
hbox4a->pack_start (use_template_button, false, false);
hbox4a->pack_start (template_chooser, true, true);
-
+
template_chooser.set_model (template_model);
-
+
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
text_renderer->property_editable() = false;
-
+
template_chooser.pack_start (*text_renderer);
template_chooser.add_attribute (text_renderer->property_text(), session_template_columns.name);
template_chooser.set_active (0);
-
+
use_template_button.show();
template_chooser.show ();
vbox3->pack_start (*hbox4a, false, false);
}
-
+
/* --- */
if (!new_user) {
session_template_chooser.set_current_folder (poor_mans_glob (Config->get_default_session_parent_dir()));
-
+
HBox* hbox4b = manage (new HBox);
use_session_as_template_button.set_label (_("Use an existing session as a template:"));
-
+
hbox4b->set_spacing (6);
hbox4b->pack_start (use_session_as_template_button, false, false);
hbox4b->pack_start (session_template_chooser, true, true);
-
+
use_session_as_template_button.show ();
session_template_chooser.show ();
-
+
Gtk::FileFilter* template_filter = manage (new (Gtk::FileFilter));
template_filter->add_pattern(X_("*.template"));
session_template_chooser.set_filter (*template_filter);
@@ -619,12 +619,12 @@ ArdourStartup::setup_new_session_page ()
}
/* --- */
-
+
HBox* hbox5 = manage (new HBox);
-
+
hbox5->set_spacing (6);
hbox5->pack_start (more_new_session_options_button, false, false);
-
+
more_new_session_options_button.show ();
more_new_session_options_button.signal_clicked().connect (mem_fun (*this, &ArdourStartup::more_new_session_options_button_clicked));
@@ -660,7 +660,7 @@ ArdourStartup::redisplay_recent_sessions ()
{
std::vector<sys::path> session_directories;
RecentSessionsSorter cmp;
-
+
recent_session_display.set_model (Glib::RefPtr<TreeModel>(0));
recent_session_model->clear ();
@@ -674,11 +674,11 @@ ArdourStartup::redisplay_recent_sessions ()
//
// sort them alphabetically
sort (rs.begin(), rs.end(), cmp);
-
+
for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) {
session_directories.push_back ((*i).second);
}
-
+
for (vector<sys::path>::const_iterator i = session_directories.begin(); i != session_directories.end(); ++i)
{
std::vector<sys::path> state_file_paths;
@@ -690,7 +690,7 @@ ArdourStartup::redisplay_recent_sessions ()
vector<string*>* states;
vector<const gchar*> item;
string fullpath = (*i).to_string();
-
+
/* remove any trailing / */
if (fullpath[fullpath.length()-1] == '/') {
@@ -701,22 +701,22 @@ ArdourStartup::redisplay_recent_sessions ()
if (!Glib::file_test(fullpath.c_str(), Glib::FILE_TEST_EXISTS)) {
/* session doesn't exist */
continue;
- }
-
+ }
+
/* now get available states for this session */
if ((states = Session::possible_states (fullpath)) == 0) {
/* no state file? */
continue;
}
-
+
std::vector<string> state_file_names(get_file_names_no_extension (state_file_paths));
Gtk::TreeModel::Row row = *(recent_session_model->append());
row[recent_session_columns.visible_name] = Glib::path_get_basename (fullpath);
row[recent_session_columns.fullpath] = fullpath;
-
+
if (state_file_names.size() > 1) {
// add the children
@@ -760,13 +760,13 @@ ArdourStartup::setup_existing_session_page ()
recent_session_display.append_column (_("Recent Sessions"), recent_session_columns.visible_name);
recent_session_display.set_headers_visible (false);
recent_session_display.get_selection()->set_mode (SELECTION_BROWSE);
-
+
recent_session_display.get_selection()->signal_changed().connect (mem_fun (*this, &ArdourStartup::recent_session_row_selected));
-
+
recent_scroller.add (recent_session_display);
recent_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
recent_scroller.set_shadow_type (Gtk::SHADOW_IN);
-
+
recent_session_display.show();
}
@@ -801,7 +801,7 @@ ArdourStartup::setup_more_options_page ()
_input_limit_count.set_adjustment (_input_limit_count_adj);
_control_bus_channel_count.set_adjustment (_control_bus_channel_count_adj);
_master_bus_channel_count.set_adjustment (_master_bus_channel_count_adj);
-
+
chan_count_label_1.set_text (_("channels"));
chan_count_label_2.set_text (_("channels"));
chan_count_label_3.set_text (_("channels"));
@@ -856,14 +856,14 @@ ArdourStartup::setup_more_options_page ()
advanced_table.set_row_spacings(0);
advanced_table.set_col_spacings(0);
-
+
_connect_inputs.set_label (_("Automatically connect to physical_inputs"));
_connect_inputs.set_flags(Gtk::CAN_FOCUS);
_connect_inputs.set_relief(Gtk::RELIEF_NORMAL);
_connect_inputs.set_mode(true);
_connect_inputs.set_active(true);
_connect_inputs.set_border_width(0);
-
+
_limit_input_ports.set_label (_("Use only"));
_limit_input_ports.set_flags(Gtk::CAN_FOCUS);
_limit_input_ports.set_relief(Gtk::RELIEF_NORMAL);
@@ -889,7 +889,7 @@ ArdourStartup::setup_more_options_page ()
bus_frame.set_label_align(0,0.5);
bus_frame.add(bus_hbox);
bus_frame.set_label_widget(bus_label);
-
+
bus_table.set_row_spacings (0);
bus_table.set_col_spacings (0);
bus_table.attach (_create_master_bus, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
@@ -1000,7 +1000,7 @@ ArdourStartup::setup_more_options_page ()
* default. this is entirely by design - this page
* should be skipped unless explicitly requested.
*/
-
+
session_options_page_index = append_page (more_options_vbox);
set_page_title (more_options_vbox, _("Advanced Session Options"));
set_page_complete (more_options_vbox, true);
diff --git a/gtk2_ardour/startup.h b/gtk2_ardour/startup.h
index b3b1379ea5..9a4202b399 100644
--- a/gtk2_ardour/startup.h
+++ b/gtk2_ardour/startup.h
@@ -55,7 +55,7 @@ class ArdourStartup : public Gtk::Assistant {
bool connect_outs_to_master() const;
bool connect_outs_to_physical() const ;
-
+
private:
bool applying;
bool config_modified;
@@ -104,11 +104,11 @@ class ArdourStartup : public Gtk::Assistant {
void setup_session_page ();
Gtk::VBox session_vbox;
Gtk::HBox session_hbox;
-
+
/* recent sessions */
-
+
void setup_existing_session_page ();
-
+
struct RecentSessionsSorter {
bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
return cmp_nocase(a.first, b.first) == -1;
@@ -133,7 +133,7 @@ class ArdourStartup : public Gtk::Assistant {
void recent_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
/* audio setup page */
-
+
void setup_audio_page ();
EngineControl* engine_dialog;
@@ -145,7 +145,7 @@ class ArdourStartup : public Gtk::Assistant {
Gtk::FileChooserButton session_template_chooser;
struct SessionTemplateColumns : public Gtk::TreeModel::ColumnRecord {
- SessionTemplateColumns () {
+ SessionTemplateColumns () {
add (name);
add (path);
}
@@ -202,7 +202,7 @@ class ArdourStartup : public Gtk::Assistant {
Gtk::CheckButton _create_master_bus;
Gtk::SpinButton _master_bus_channel_count;
-
+
Gtk::CheckButton _create_control_bus;
Gtk::SpinButton _control_bus_channel_count;
@@ -210,7 +210,7 @@ class ArdourStartup : public Gtk::Assistant {
Gtk::CheckButton _limit_input_ports;
Gtk::SpinButton _input_limit_count;
- Gtk::CheckButton _connect_outputs;
+ Gtk::CheckButton _connect_outputs;
Gtk::CheckButton _limit_output_ports;
Gtk::SpinButton _output_limit_count;
@@ -252,7 +252,7 @@ class ArdourStartup : public Gtk::Assistant {
gint session_options_page_index;
void move_along_now ();
-
+
};
#endif /* __gtk2_ardour_startup_h__ */
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc
index afa41d6f90..81c272a882 100644
--- a/gtk2_ardour/streamview.cc
+++ b/gtk2_ardour/streamview.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001, 2006 Paul Davis
+ Copyright (C) 2001, 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group)
canvas_rect->property_y2() = (double) tv.current_height();
canvas_rect->raise(1); // raise above tempo lines
- canvas_rect->property_outline_what() = (guint32) (0x2|0x8); // outline RHS and bottom
+ canvas_rect->property_outline_what() = (guint32) (0x2|0x8); // outline RHS and bottom
canvas_rect->signal_event().connect (bind (
mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event),
@@ -88,7 +88,7 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group)
mem_fun (*this, &StreamView::rec_enable_changed));
_trackview.session().RecordStateChanged.connect (
mem_fun (*this, &StreamView::sess_rec_enable_changed));
- }
+ }
ColorsChanged.connect (mem_fun (*this, &StreamView::color_handler));
}
@@ -96,9 +96,9 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group)
StreamView::~StreamView ()
{
undisplay_diskstream ();
-
+
delete canvas_rect;
-
+
if (owns_canvas_group) {
delete canvas_group;
}
@@ -137,11 +137,11 @@ StreamView::set_height (double h)
update_contents_height ();
HeightChanged ();
-
+
return 0;
}
-int
+int
StreamView::set_samples_per_unit (gdouble spp)
{
RegionViewList::iterator i;
@@ -158,7 +158,7 @@ StreamView::set_samples_per_unit (gdouble spp)
for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
RecBoxInfo &recbox = (*xi);
-
+
gdouble xstart = _trackview.editor().frame_to_pixel (recbox.start);
gdouble xend = _trackview.editor().frame_to_pixel (recbox.start + recbox.length);
@@ -175,7 +175,7 @@ void
StreamView::add_region_view_weak (boost::weak_ptr<Region> r)
{
boost::shared_ptr<Region> sp (r.lock());
-
+
if (sp) {
add_region_view (sp);
}
@@ -186,9 +186,9 @@ void
StreamView::add_region_view (boost::shared_ptr<Region> r)
{
ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r));
-
+
add_region_view_internal (r, true);
-
+
if (_layer_display == Stacked) {
update_contents_height ();
}
@@ -299,7 +299,7 @@ void
StreamView::playlist_modified_weak (boost::weak_ptr<Diskstream> ds)
{
boost::shared_ptr<Diskstream> sp (ds.lock());
-
+
if (sp) {
playlist_modified (sp);
}
@@ -344,7 +344,7 @@ StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
i != playlist_connections.end(); ++i) {
(*i).disconnect();
}
-
+
playlist_connections.clear();
undisplay_diskstream ();
@@ -354,9 +354,9 @@ StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
update_coverage_frames ();
ds->playlist()->set_explicit_relayering (_layer_display == Stacked);
-
+
/* draw it */
-
+
redisplay_diskstream ();
/* catch changes */
@@ -398,7 +398,7 @@ StreamView::apply_color (Gdk::Color& color, ColorTarget target)
(*i)->set_color (region_color);
}
break;
-
+
case StreamBaseColor:
stream_base_color = RGBA_TO_UINT (
color.get_red_p(), color.get_green_p(), color.get_blue_p(), 255);
@@ -451,28 +451,28 @@ StreamView::update_rec_box ()
nframes_t at = _trackview.get_diskstream()->current_capture_end();
double xstart;
double xend;
-
+
switch (_trackview.track()->mode()) {
-
+
case NonLayered:
case Normal:
rect.length = at - rect.start;
xstart = _trackview.editor().frame_to_pixel (rect.start);
xend = _trackview.editor().frame_to_pixel (at);
break;
-
+
case Destructive:
rect.length = 2;
xstart = _trackview.editor().frame_to_pixel (_trackview.get_diskstream()->current_capture_start());
xend = _trackview.editor().frame_to_pixel (at);
break;
}
-
+
rect.rectangle->property_x1() = xstart;
rect.rectangle->property_x2() = xend;
}
}
-
+
RegionView*
StreamView::find_view (boost::shared_ptr<const Region> region)
{
@@ -484,7 +484,7 @@ StreamView::find_view (boost::shared_ptr<const Region> region)
}
return 0;
}
-
+
void
StreamView::foreach_regionview (sigc::slot<void,RegionView*> slot)
{
@@ -499,9 +499,9 @@ StreamView::set_selected_regionviews (RegionSelection& regions)
bool selected;
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
-
+
selected = false;
-
+
for (RegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) {
if (*i == *ii) {
selected = true;
@@ -518,13 +518,13 @@ StreamView::get_selectables (nframes_t start, nframes_t end, double top, double
{
layer_t min_layer = 0;
layer_t max_layer = 0;
-
+
if (_layer_display == Stacked) {
double const c = child_height ();
min_layer = _layers - ((bottom - _trackview.y_position()) / c);
max_layer = _layers - ((top - _trackview.y_position()) / c);
}
-
+
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
bool layer_ok = true;
@@ -533,7 +533,7 @@ StreamView::get_selectables (nframes_t start, nframes_t end, double top, double
layer_t const l = (*i)->region()->layer ();
layer_ok = (min_layer <= l && l <= max_layer);
}
-
+
if ((*i)->region()->coverage (start, end) != OverlapNone && layer_ok) {
results.push_back (*i);
}
@@ -557,7 +557,7 @@ StreamView::child_height () const
if (_layer_display == Stacked) {
return height / _layers;
}
-
+
return height;
}
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index 39ca9f10d3..bfd3cb7b00 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001, 2006 Paul Davis
+ Copyright (C) 2001, 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -99,7 +99,7 @@ public:
void region_layered (RegionView*);
virtual void update_contents_height ();
-
+
virtual void redisplay_diskstream () = 0;
double child_height () const;
ARDOUR::layer_t layers () const { return _layers; }
@@ -107,20 +107,20 @@ public:
virtual RegionView* create_region_view (boost::shared_ptr<ARDOUR::Region>, bool, bool) {
return 0;
}
-
+
sigc::signal<void,RegionView*> RegionViewAdded;
sigc::signal<void> HeightChanged;
protected:
StreamView (RouteTimeAxisView&, ArdourCanvas::Group* group = NULL);
-
+
void transport_changed();
void transport_looped();
void rec_enable_changed();
void sess_rec_enable_changed();
virtual void setup_rec_box () = 0;
void update_rec_box ();
-
+
virtual RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>,
bool wait_for_waves, bool recording = false) = 0;
virtual void remove_region_view (boost::weak_ptr<ARDOUR::Region> );
@@ -129,12 +129,12 @@ protected:
virtual void undisplay_diskstream ();
void diskstream_changed ();
void layer_regions ();
-
+
virtual void playlist_changed_weak (boost::weak_ptr<ARDOUR::Diskstream>);
virtual void playlist_changed (boost::shared_ptr<ARDOUR::Diskstream>);
virtual void playlist_modified_weak (boost::weak_ptr<ARDOUR::Diskstream>);
virtual void playlist_modified (boost::shared_ptr<ARDOUR::Diskstream>);
-
+
virtual void color_handler () = 0;
RouteTimeAxisView& _trackview;
@@ -154,7 +154,7 @@ protected:
bool rec_updating;
bool rec_active;
bool use_rec_regions;
-
+
Gdk::Color region_color; ///< Contained region color
uint32_t stream_base_color; ///< Background color
@@ -163,7 +163,7 @@ protected:
ARDOUR::layer_t _layers;
LayerDisplay _layer_display;
-
+
double height;
std::list<sigc::connection> rec_data_ready_connections;
diff --git a/gtk2_ardour/strip_selection.h b/gtk2_ardour/strip_selection.h
index 466101851d..35e5950d61 100644
--- a/gtk2_ardour/strip_selection.h
+++ b/gtk2_ardour/strip_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index 2770d6b03d..a455db3f24 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,12 +42,12 @@ StripSilenceDialog::StripSilenceDialog (std::list<boost::shared_ptr<ARDOUR::Audi
w.view = 0;
w.samples_per_unit = 1;
_waves.push_back (w);
-
+
}
-
+
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox);
hbox->set_spacing (16);
-
+
Gtk::Table* table = Gtk::manage (new Gtk::Table (4, 3));
table->set_spacings (4);
@@ -127,7 +127,7 @@ void
StripSilenceDialog::create_waves ()
{
int n = 0;
-
+
for (std::list<Wave>::iterator i = _waves.begin(); i != _waves.end(); ++i) {
if (i->region->audio_source(0)->peaks_ready (mem_fun (*this, &StripSilenceDialog::peaks_ready), _peaks_ready_connection)) {
i->view = new WaveView (*(_canvas->root()));
@@ -173,12 +173,12 @@ void
StripSilenceDialog::update_silence_rects ()
{
int n = 0;
-
+
for (std::list<Wave>::iterator i = _waves.begin(); i != _waves.end(); ++i) {
for (std::list<ArdourCanvas::SimpleRect*>::iterator j = i->silence_rects.begin(); j != i->silence_rects.end(); ++j) {
delete *j;
}
-
+
i->silence_rects.clear ();
std::list<std::pair<nframes_t, nframes_t> > const silence =
@@ -194,7 +194,7 @@ StripSilenceDialog::update_silence_rects ()
r->property_outline_pixels() = 0;
r->property_fill_color_rgba() = RGBA_TO_UINT (128, 128, 128, 128);
i->silence_rects.push_back (r);
-
+
}
++n;
diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h
index 351fffa005..b7f776b537 100644
--- a/gtk2_ardour/strip_silence_dialog.h
+++ b/gtk2_ardour/strip_silence_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,13 +43,13 @@ public:
nframes_t fade_length () const {
return _fade_length.get_value_as_int ();
}
-
+
private:
void create_waves ();
void peaks_ready ();
void canvas_allocation (Gtk::Allocation &);
void update_silence_rects ();
-
+
Gtk::SpinButton _threshold;
Gtk::SpinButton _minimum_length;
Gtk::SpinButton _fade_length;
diff --git a/gtk2_ardour/tape_region_view.cc b/gtk2_ardour/tape_region_view.cc
index c5267a9f24..5daa3b4a6d 100644
--- a/gtk2_ardour/tape_region_view.cc
+++ b/gtk2_ardour/tape_region_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -49,13 +49,13 @@ const TimeAxisViewItem::Visibility TapeAudioRegionView::default_tape_visibility
TimeAxisViewItem::HideFrameRight |
TimeAxisViewItem::FullWidthNameHighlight);
-TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv,
- boost::shared_ptr<AudioRegion> r,
- double spu,
+TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv,
+ boost::shared_ptr<AudioRegion> r,
+ double spu,
Gdk::Color const & basic_color)
: AudioRegionView (parent, tv, r, spu, basic_color, false,
- TimeAxisViewItem::Visibility ((r->position() != 0) ? default_tape_visibility :
+ TimeAxisViewItem::Visibility ((r->position() != 0) ? default_tape_visibility :
TimeAxisViewItem::Visibility (default_tape_visibility|TimeAxisViewItem::HideFrameLeft)))
{
}
@@ -70,11 +70,11 @@ TapeAudioRegionView::init (Gdk::Color const & basic_color, bool /*wfw*/)
AudioRegionView::init(basic_color, false);
/* every time the wave data changes and peaks are ready, redraw */
-
+
for (uint32_t n = 0; n < audio_region()->n_channels(); ++n) {
audio_region()->audio_source(n)->PeaksReady.connect (bind (mem_fun(*this, &TapeAudioRegionView::update), n));
}
-
+
}
TapeAudioRegionView::~TapeAudioRegionView()
diff --git a/gtk2_ardour/tape_region_view.h b/gtk2_ardour/tape_region_view.h
index 8887281393..a3aa7142ea 100644
--- a/gtk2_ardour/tape_region_view.h
+++ b/gtk2_ardour/tape_region_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
class TapeAudioRegionView : public AudioRegionView
{
public:
- TapeAudioRegionView (ArdourCanvas::Group *,
+ TapeAudioRegionView (ArdourCanvas::Group *,
RouteTimeAxisView&,
boost::shared_ptr<ARDOUR::AudioRegion>,
double initial_samples_per_unit,
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc
index e83ff09a1d..b78d57df63 100644
--- a/gtk2_ardour/tempo_dialog.cc
+++ b/gtk2_ardour/tempo_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
*/
-#include <cstdio> // for snprintf, grrr
+#include <cstdio> // for snprintf, grrr
#include <gtkmm/stock.h>
#include <gtkmm2ext/utils.h>
@@ -76,7 +76,7 @@ TempoDialog::init (const BBT_Time& when, double bpm, double note_type, bool mova
strings.push_back (_("eighth (8)"));
strings.push_back (_("sixteenth (16)"));
strings.push_back (_("thirty-second (32)"));
-
+
set_popdown_strings (note_types, strings, true);
if (note_type == 1.0f) {
@@ -109,19 +109,19 @@ TempoDialog::init (const BBT_Time& when, double bpm, double note_type, bool mova
when_bar_entry.set_text (buf);
snprintf (buf, sizeof (buf), "%" PRIu32, when.beats);
when_beat_entry.set_text (buf);
-
+
when_bar_entry.set_name ("MetricEntry");
when_beat_entry.set_name ("MetricEntry");
-
+
when_bar_label.set_name ("MetricLabel");
when_beat_label.set_name ("MetricLabel");
-
+
table->attach (when_bar_label, 1, 2, 2, 3);
table->attach (when_bar_entry, 2, 3, 2, 3);
-
+
table->attach (when_beat_label, 1, 2, 1, 2);
table->attach (when_beat_entry, 2, 3, 1, 2);
-
+
Label* when_label = manage (new Label(_("Tempo begins at"), ALIGN_LEFT, ALIGN_CENTER));
table->attach (*when_label, 0, 1, 1, 2);
}
@@ -157,7 +157,7 @@ TempoDialog::bpm_button_press (GdkEventButton*)
bool
TempoDialog::bpm_button_release (GdkEventButton*)
-{
+{
/* the value has been modified, accept should work now */
set_response_sensitive (RESPONSE_ACCEPT, true);
@@ -166,7 +166,7 @@ TempoDialog::bpm_button_release (GdkEventButton*)
bool
TempoDialog::entry_key_release (GdkEventKey*)
-{
+{
if (when_beat_entry.get_text() != "" && when_bar_entry.get_text() != "") {
set_response_sensitive (RESPONSE_ACCEPT, true);
} else {
@@ -175,11 +175,11 @@ TempoDialog::entry_key_release (GdkEventKey*)
return false;
}
-double
+double
TempoDialog::get_bpm ()
{
return bpm_spinner.get_value ();
-}
+}
bool
TempoDialog::get_bbt_time (BBT_Time& requested)
@@ -187,7 +187,7 @@ TempoDialog::get_bbt_time (BBT_Time& requested)
if (sscanf (when_bar_entry.get_text().c_str(), "%" PRIu32, &requested.bars) != 1) {
return false;
}
-
+
if (sscanf (when_beat_entry.get_text().c_str(), "%" PRIu32, &requested.beats) != 1) {
return false;
}
@@ -203,7 +203,7 @@ TempoDialog::get_note_type ()
double note_type = 0;
vector<string>::iterator i;
string text = note_types.get_active_text();
-
+
for (i = strings.begin(); i != strings.end(); ++i) {
if (text == *i) {
if (sscanf (text.c_str(), "%*[^0-9]%lf", &note_type) != 1) {
@@ -213,8 +213,8 @@ TempoDialog::get_note_type ()
break;
}
}
- }
-
+ }
+
if (i == strings.end()) {
if (sscanf (text.c_str(), "%lf", &note_type) != 1) {
error << string_compose(_("incomprehensible note type entry (%1)"), text) << endmsg;
@@ -238,7 +238,7 @@ MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action)
cancel_button (_("Cancel"))
{
BBT_Time when;
- frame = map.round_to_bar(frame,0);
+ frame = map.round_to_bar(frame,0);
Meter meter (map.meter_at(frame));
map.bbt_time (frame, when);
@@ -267,7 +267,7 @@ MeterDialog::init (const BBT_Time& when, double bpb, double note_type, bool mova
strings.push_back (_("eighth (8)"));
strings.push_back (_("sixteenth (16)"));
strings.push_back (_("thirty-second (32)"));
-
+
set_popdown_strings (note_types, strings, true);
if (note_type == 1.0f) {
@@ -302,7 +302,7 @@ MeterDialog::init (const BBT_Time& when, double bpb, double note_type, bool mova
snprintf (buf, sizeof (buf), "%" PRIu32, when.bars);
when_bar_entry.set_text (buf);
when_bar_entry.set_name ("MetricEntry");
-
+
Label* when_label = manage (new Label(_("Meter begins at bar:"), ALIGN_LEFT, ALIGN_CENTER));
table->attach (*when_label, 0, 1, 2, 3, FILL | EXPAND, FILL | EXPAND);
@@ -338,7 +338,7 @@ bool
MeterDialog::entry_key_press (GdkEventKey* ev)
{
- switch (ev->keyval) {
+ switch (ev->keyval) {
case GDK_0:
case GDK_1:
@@ -403,21 +403,21 @@ double
MeterDialog::get_bpb ()
{
double bpb = 0;
-
+
if (sscanf (bpb_entry.get_text().c_str(), "%lf", &bpb) != 1) {
return 0;
}
return bpb;
}
-
+
double
MeterDialog::get_note_type ()
{
double note_type = 0;
vector<string>::iterator i;
string text = note_types.get_active_text();
-
+
for (i = strings.begin(); i != strings.end(); ++i) {
if (text == *i) {
if (sscanf (text.c_str(), "%*[^0-9]%lf", &note_type) != 1) {
@@ -427,8 +427,8 @@ MeterDialog::get_note_type ()
break;
}
}
- }
-
+ }
+
if (i == strings.end()) {
if (sscanf (text.c_str(), "%lf", &note_type) != 1) {
error << string_compose(_("incomprehensible note type entry (%1)"), text) << endmsg;
@@ -446,7 +446,7 @@ MeterDialog::get_bbt_time (BBT_Time& requested)
if (sscanf (when_bar_entry.get_text().c_str(), "%" PRIu32, &requested.bars) != 1) {
return false;
}
-
+
requested.beats = 1;
requested.ticks = 0;
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index 5dc56b1e37..c75f60ac23 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@
#include "ardour_dialog.h"
-struct TempoDialog : public ArdourDialog
+struct TempoDialog : public ArdourDialog
{
Gtk::ComboBoxText note_types;
std::vector<std::string> strings;
@@ -48,14 +48,14 @@ struct TempoDialog : public ArdourDialog
Gtk::Label when_bar_label;
Gtk::Label when_beat_label;
char buf[64];
-
+
TempoDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
TempoDialog (ARDOUR::TempoSection&, const std::string & action);
double get_bpm ();
double get_note_type ();
bool get_bbt_time (ARDOUR::BBT_Time&);
-
+
private:
void init (const ARDOUR::BBT_Time& start, double, double, bool);
void bpm_changed ();
@@ -65,7 +65,7 @@ private:
void note_types_change ();
};
-struct MeterDialog : public ArdourDialog
+struct MeterDialog : public ArdourDialog
{
Gtk::Entry bpb_entry;
Gtk::ComboBoxText note_types;
@@ -74,7 +74,7 @@ struct MeterDialog : public ArdourDialog
Gtk::Button cancel_button;
Gtk::Entry when_bar_entry;
char buf[64];
-
+
MeterDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
MeterDialog (ARDOUR::MeterSection&, const std::string & action);
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc
index 1400b189fb..e9bd4bbc49 100644
--- a/gtk2_ardour/tempo_lines.cc
+++ b/gtk2_ardour/tempo_lines.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2007 Paul Davis
+ Copyright (C) 2002-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
using namespace std;
#define MAX_CACHED_LINES 128
-
+
TempoLines::TempoLines(ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group, double screen_height)
: _canvas(canvas)
, _group(group)
@@ -82,7 +82,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
uint32_t beats = 0;
uint32_t bars = 0;
uint32_t color;
-
+
const size_t needed = points.size();
_canvas.get_scroll_region (x1, y1, x2, who_cares);
@@ -106,7 +106,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
const double needed_right = xpos;
i = points.begin();
-
+
xpos = rint(((nframes64_t)(*i).frame) / (double)frames_per_unit);
const double needed_left = xpos;
@@ -116,7 +116,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
Lines::iterator li = left;
if (li != _lines.end())
line = li->second;
-
+
// Tempo map hasn't changed and we're entirely within a clean
// range, don't need to do anything. Yay.
if (needed_left >= _clean_left && needed_right <= _clean_right) {
@@ -128,7 +128,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
bool inserted_last_time = true;
bool invalidated = false;
-
+
for (i = points.begin(); i != points.end(); ++i) {
switch ((*i).type) {
@@ -144,23 +144,23 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
break; /* only draw beat lines if the gaps between beats are large. */
}
}
-
+
xpos = rint(((nframes64_t)(*i).frame) / (double)frames_per_unit);
if (inserted_last_time && !_lines.empty()) {
li = _lines.lower_bound(xpos); // first line >= xpos
}
-
+
line = (li != _lines.end()) ? li->second : NULL;
assert(!line || line->property_x1() == li->first);
-
+
Lines::iterator next = li;
if (next != _lines.end())
++next;
exhausted = (next == _lines.end());
-
- // Hooray, line is perfect
+
+ // Hooray, line is perfect
if (line && line->property_x1() == xpos) {
if (li != _lines.end())
++li;
@@ -172,7 +172,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
} else if (!exhausted) {
Lines::iterator steal = _lines.end();
--steal;
-
+
// Steal from the right
if (left->first > needed_left && li != steal && steal->first > needed_right) {
//cout << "*** STEALING FROM RIGHT" << endl;
@@ -240,7 +240,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
_lines.insert(make_pair(xpos, line));
inserted_last_time = true; // search next time
invalidated = true;
-
+
// Shift clean range right
_clean_left = max(_clean_left, steal->first);
_clean_right = max(_clean_right, xpos);
diff --git a/gtk2_ardour/tempo_lines.h b/gtk2_ardour/tempo_lines.h
index 275db7c85e..0991ba7559 100644
--- a/gtk2_ardour/tempo_lines.h
+++ b/gtk2_ardour/tempo_lines.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc
index 6b574588b6..4bc383e8a3 100644
--- a/gtk2_ardour/theme_manager.cc
+++ b/gtk2_ardour/theme_manager.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,13 +57,13 @@ ThemeManager::ThemeManager()
Gtkmm2ext::WindowTitle title (Glib::get_application_name ());
title += _("Theme Manager");
set_title (title.get_string ());
-
+
color_list = ListStore::create (columns);
color_display.set_model (color_list);
color_display.append_column (_("Object"), columns.name);
color_display.append_column (_("Color"), columns.color);
- color_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0));
- color_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1));
+ color_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0));
+ color_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1));
color_display.set_reorderable (false);
color_display.get_selection()->set_mode (SELECTION_NONE);
color_display.set_headers_visible (true);
@@ -71,10 +71,10 @@ ThemeManager::ThemeManager()
CellRenderer* color_cell = color_display.get_column_cell_renderer (1);
TreeViewColumn* color_column = color_display.get_column (1);
color_column->add_attribute (color_cell->property_cell_background_gdk(), columns.gdkcolor);
-
+
scroller.add (color_display);
scroller.set_policy (POLICY_NEVER, POLICY_AUTOMATIC);
-
+
RadioButton::Group group = dark_button.get_group();
light_button.set_group(group);
theme_selection_hbox.set_homogeneous(false);
@@ -121,7 +121,7 @@ ThemeManager::button_press_event (GdkEventButton* ev)
int celly;
UIConfigVariable<uint32_t> *ccvar;
-
+
if (!color_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
return false;
}
@@ -151,7 +151,7 @@ ThemeManager::button_press_event (GdkEventButton* ev)
case RESPONSE_CANCEL:
break;
case RESPONSE_ACCEPT:
- color = color_dialog.get_colorsel()->get_current_color();
+ color = color_dialog.get_colorsel()->get_current_color();
a = color_dialog.get_colorsel()->get_current_alpha();
r = (int) floor (color.get_red_p() * 255.0);
g = (int) floor (color.get_green_p() * 255.0);
@@ -198,7 +198,7 @@ load_rc_file (const string& filename, bool themechange)
if (!find_file_in_search_path (spath, filename, rc_file_path)) {
warning << string_compose(
_("Unable to find UI style file %1 in search path %2. Ardour will look strange"),
- filename, spath.to_string())
+ filename, spath.to_string())
<< endmsg;
return;
}
@@ -211,7 +211,7 @@ load_rc_file (const string& filename, bool themechange)
/* hmm, this is a problem. the profile doesn't
exist when the theme manager is constructed
and toggles buttons during "normal" GTK setup.
-
+
a better solution will be to make all Profile
methods static or something.
@@ -255,7 +255,7 @@ ThemeManager::setup_theme ()
color_list->clear();
for (std::vector<UIConfigVariable<uint32_t> *>::iterator i = ARDOUR_UI::config()->canvas_colors.begin(); i != ARDOUR_UI::config()->canvas_colors.end(); i++) {
-
+
TreeModel::Row row = *(color_list->append());
Gdk::Color col;
diff --git a/gtk2_ardour/theme_manager.h b/gtk2_ardour/theme_manager.h
index 3419cf0768..ea617aee77 100644
--- a/gtk2_ardour/theme_manager.h
+++ b/gtk2_ardour/theme_manager.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,20 +39,20 @@ class ThemeManager : public ArdourDialog
int save (std::string path);
void setup_theme ();
void reset_canvas_colors();
-
+
void on_dark_theme_button_toggled ();
void on_light_theme_button_toggled ();
private:
struct ColorDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
- ColorDisplayModelColumns() {
+ ColorDisplayModelColumns() {
add (name);
add (color);
add (gdkcolor);
add (pVar);
add (rgba);
}
-
+
Gtk::TreeModelColumn<Glib::ustring> name;
Gtk::TreeModelColumn<Glib::ustring> color;
Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 921d0424d6..3d747b33d4 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@
using namespace std;
using namespace Gtk;
using namespace Gdk;
-using namespace sigc;
+using namespace sigc;
using namespace ARDOUR;
using namespace PBD;
using namespace Editing;
@@ -74,8 +74,8 @@ uint32_t TimeAxisView::hSmall = 0;
bool TimeAxisView::need_size_info = true;
int const TimeAxisView::_max_order = 512;
-TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
- : AxisView (sess),
+TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
+ : AxisView (sess),
controls_table (2, 8),
_y_position (0),
_editor (ed),
@@ -431,7 +431,7 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev)
return true;
/* Shift+Tab Keys Pressed. Note that for Shift+Tab, GDK actually
- * generates a different ev->keyval, rather than setting
+ * generates a different ev->keyval, rather than setting
* ev->state.
*/
case GDK_ISO_Left_Tab:
@@ -474,7 +474,7 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev)
break;
}
-#ifdef TIMEOUT_NAME_EDIT
+#ifdef TIMEOUT_NAME_EDIT
/* adapt the timeout to reflect the user's typing speed */
guint32 name_entry_timeout;
@@ -578,7 +578,7 @@ TimeAxisView::popup_display_menu (guint32 when)
}
conditionally_add_to_selection ();
- display_menu->popup (1, when);
+ display_menu->popup (1, when);
}
gint
@@ -871,7 +871,7 @@ TimeAxisView::get_selection_rect (uint32_t id)
rect->rect->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_selection_rect_event), rect->rect, rect));
rect->start_trim->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_selection_start_trim_event), rect->rect, rect));
rect->end_trim->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_selection_end_trim_event), rect->rect, rect));
- }
+ }
rect = free_selection_rects.front();
rect->id = id;
@@ -955,11 +955,11 @@ TimeAxisView::touched (double top, double bot)
*/
double mybot = _y_position + current_height();
-
- return ((_y_position <= bot && _y_position >= top) ||
- ((mybot <= bot) && (top < mybot)) ||
+
+ return ((_y_position <= bot && _y_position >= top) ||
+ ((mybot <= bot) && (top < mybot)) ||
(mybot >= bot && _y_position < top));
-}
+}
void
TimeAxisView::set_parent (TimeAxisView& p)
@@ -982,7 +982,7 @@ TimeAxisView::get_parent_with_state ()
if (parent->has_state()) {
return parent;
- }
+ }
return parent->get_parent_with_state ();
}
@@ -1031,7 +1031,7 @@ TimeAxisView::set_state (const XMLNode& node)
} else if ((prop = node.property ("height")) != 0) {
set_height (atoi (prop->value()));
-
+
} else {
set_height (hNormal);
@@ -1049,7 +1049,7 @@ TimeAxisView::reset_height()
(*i)->set_height ((*i)->height);
}
}
-
+
void
TimeAxisView::compute_controls_size_info ()
{
@@ -1080,7 +1080,7 @@ TimeAxisView::compute_controls_size_info ()
}
one_row_table.attach (*buttons[0], 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
-
+
one_row_table.show_all ();
Gtk::Requisition req(one_row_table.size_request ());
@@ -1100,11 +1100,11 @@ TimeAxisView::compute_controls_size_info ()
two_row_table.show_all ();
req = two_row_table.size_request ();
- // height required to show all normal buttons
+ // height required to show all normal buttons
hNormal = /*req.height*/ 48 + extra_height;
- // these heights are all just larger than normal. no more
+ // these heights are all just larger than normal. no more
// elements are visible (yet).
hLarger = hNormal + 50;
@@ -1215,7 +1215,7 @@ TimeAxisView::covers_y_position (double y)
l = view()->layers() - 1;
}
}
-
+
return std::make_pair (this, l);
}
@@ -1327,7 +1327,7 @@ TimeAxisView::resizer_expose (GdkEventExpose* event)
win->get_geometry (x, y, w, h, d);
/* handle/line #1 */
-
+
win->draw_line (dark, 0, 0, w - 2, 0);
win->draw_point (dark, 0, 1);
win->draw_line (light, 1, 1, w - 1, 1);
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 0589385762..e32913dbb2 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -180,10 +180,10 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual void reveal_dependent_views (TimeAxisViewItem&) {}
/* editing operations */
-
+
virtual bool cut_copy_clear (Selection&, Editing::CutCopyOp) { return false; }
virtual bool paste (nframes_t, float /*times*/, Selection&, size_t /*nth*/) { return false; }
-
+
virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&) {}
@@ -214,7 +214,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual LayerDisplay layer_display () const { return Overlaid; }
virtual StreamView* view () const { return 0; }
-
+
typedef std::vector<boost::shared_ptr<TimeAxisView> > Children;
protected:
@@ -241,7 +241,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
sigc::connection name_entry_key_timeout;
bool name_entry_key_timed_out ();
guint32 last_name_entry_key_press_event;
-
+
/* derived classes can override these */
virtual void name_entry_changed ();
@@ -249,7 +249,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual bool name_entry_focus_out (GdkEventFocus *ev);
/** Handle mouse relaese on our LHS control name ebox.
- *
+ *
*@ param ev the event
*/
virtual bool controls_ebox_button_release (GdkEventButton *ev);
@@ -281,7 +281,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
void popup_size_menu(guint32 when);
/** Handle the size option of our main menu.
- *
+ *
* @param ev the event
*/
gint size_click(GdkEventButton *ev);
@@ -337,7 +337,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
ArdourCanvas::Group* _canvas_display;
double _y_position;
PublicEditor& _editor;
-
+
private:
ArdourCanvas::Group* _canvas_background;
@@ -348,7 +348,7 @@ private:
ArdourCanvas::Group* _ghost_group;
static int const _max_order;
-
+
}; /* class TimeAxisView */
#endif /* __ardour_gtk_time_axis_h__ */
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 2236050792..cb114f4f3d 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -74,7 +74,7 @@ double TimeAxisViewItem::NAME_HIGHLIGHT_THRESH;
* @param start the start point of this item
* @param duration the duration of this item
*/
-TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
+TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
nframes64_t start, nframes64_t duration, bool recording,
Visibility vis)
: trackview (tv), _recregion(recording)
@@ -84,7 +84,7 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
/* first constructed item sets up font info */
NAME_FONT = get_font_for_style (N_("TimeAxisViewItemName"));
-
+
Gtk::Window win;
Gtk::Label foo;
win.add (foo);
@@ -104,7 +104,7 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
}
group = new ArdourCanvas::Group (parent);
-
+
init (it_name, spu, base_color, start, duration, vis);
}
@@ -123,7 +123,7 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
/* share the other's parent, but still create a new group */
Gnome::Canvas::Group* parent = other.group->property_parent();
-
+
group = new ArdourCanvas::Group (*parent);
init (other.item_name, other.samples_per_unit, c, other.frame_position, other.item_duration, other.visibility);
@@ -179,7 +179,7 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & ba
}
frame->property_outline_what() = outline_what;
-
+
} else {
frame = 0;
}
@@ -200,12 +200,12 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & ba
name_pixbuf = new ArdourCanvas::Pixbuf(*group);
name_pixbuf->property_x() = NAME_X_OFFSET;
name_pixbuf->property_y() = trackview.current_height() - 1.0 - NAME_Y_OFFSET;
-
+
} else {
name_pixbuf = 0;
}
- /* create our grab handles used for trimming/duration etc */
+ /* create our grab handles used for trimming/duration etc */
frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
frame_handle_start->property_outline_what() = 0x0;
@@ -245,7 +245,7 @@ TimeAxisViewItem::set_position(nframes64_t pos, void* src, double* delta)
}
frame_position = pos;
-
+
/* This sucks. The GnomeCanvas version I am using
doesn't correctly implement gnome_canvas_group_set_arg(),
so that simply setting the "x" arg of the group
@@ -254,7 +254,7 @@ TimeAxisViewItem::set_position(nframes64_t pos, void* src, double* delta)
thing. I see that in GNOME CVS, the current (Sept 2001)
version of GNOME Canvas rectifies this issue cleanly.
*/
-
+
double old_unit_pos ;
double new_unit_pos = pos / samples_per_unit ;
@@ -263,11 +263,11 @@ TimeAxisViewItem::set_position(nframes64_t pos, void* src, double* delta)
if (new_unit_pos != old_unit_pos) {
group->move (new_unit_pos - old_unit_pos, 0.0);
}
-
+
if (delta) {
(*delta) = new_unit_pos - old_unit_pos;
}
-
+
PositionChanged (frame_position, src) ; /* EMIT_SIGNAL */
return true;
@@ -305,9 +305,9 @@ TimeAxisViewItem::set_duration (nframes64_t dur, void* src)
}
item_duration = dur;
-
+
reset_width_dependent_items (trackview.editor().frame_to_pixel (dur));
-
+
DurationChanged (dur, src) ; /* EMIT_SIGNAL */
return true;
}
@@ -334,7 +334,7 @@ TimeAxisViewItem::set_max_duration(nframes64_t dur, void* src)
max_item_duration = dur ;
MaxDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
}
-
+
/**
* Returns the maxmimum duration that this item may be set to
*
@@ -358,7 +358,7 @@ TimeAxisViewItem::set_min_duration(nframes64_t dur, void* src)
min_item_duration = dur ;
MinDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
}
-
+
/**
* Returns the minimum duration that this item mey be set to
*
@@ -408,7 +408,7 @@ TimeAxisViewItem::set_max_duration_active (bool active, void* /*src*/)
{
max_duration_active = active;
}
-
+
/**
* Returns whether the Maximum Duration constraint is active and should be enforced
*
@@ -419,7 +419,7 @@ TimeAxisViewItem::get_max_duration_active() const
{
return(max_duration_active) ;
}
-
+
/**
* Sets whether the Minimum Duration constraint is active and should be enforced
*
@@ -431,7 +431,7 @@ TimeAxisViewItem::set_min_duration_active (bool active, void* /*src*/)
{
min_duration_active = active ;
}
-
+
/**
* Returns whether the Maximum Duration constraint is active and should be enforced
*
@@ -491,7 +491,7 @@ TimeAxisViewItem::set_selected(bool yn)
}
}
-void
+void
TimeAxisViewItem::set_should_show_selection (bool yn)
{
if (should_show_selection != yn) {
@@ -512,7 +512,7 @@ TimeAxisView&
TimeAxisViewItem::get_time_axis_view()
{
return trackview;
-}
+}
//---------------------------------------------------------------------------------------//
// ui methods & data
@@ -555,14 +555,14 @@ TimeAxisViewItem::set_name_text(const ustring& new_name)
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 10);
cairo_text_extents (cr, new_name.c_str(), &te);
-
+
cairo_move_to (cr, 0.5,
0.5 - te.height / 2 - te.y_bearing + NAME_HIGHLIGHT_SIZE / 2);
cairo_show_text (cr, new_name.c_str());
-
+
unsigned char* src = cairo_image_surface_get_data (surface);
convert_bgra_to_rgba(src, buf->get_pixels(), pb_width, NAME_HIGHLIGHT_SIZE);
-
+
cairo_destroy(cr);
name_pixbuf->property_pixbuf() = buf;
}
@@ -571,7 +571,7 @@ TimeAxisViewItem::set_name_text(const ustring& new_name)
* Set the height of this item
*
* @param h the new height
- */
+ */
void
TimeAxisViewItem::set_height (double height)
{
@@ -579,11 +579,11 @@ TimeAxisViewItem::set_height (double height)
if (height < NAME_HIGHLIGHT_THRESH) {
name_highlight->hide();
name_pixbuf->hide();
-
+
} else {
name_highlight->show();
name_pixbuf->show();
-
+
}
if (height > NAME_HIGHLIGHT_SIZE) {
@@ -611,7 +611,7 @@ TimeAxisViewItem::set_height (double height)
}
/**
- *
+ *
*/
void
TimeAxisViewItem::set_color (Gdk::Color const & base_color)
@@ -621,7 +621,7 @@ TimeAxisViewItem::set_color (Gdk::Color const & base_color)
}
/**
- *
+ *
*/
ArdourCanvas::Item*
TimeAxisViewItem::get_canvas_frame()
@@ -630,7 +630,7 @@ TimeAxisViewItem::get_canvas_frame()
}
/**
- *
+ *
*/
ArdourCanvas::Group*
TimeAxisViewItem::get_canvas_group()
@@ -639,7 +639,7 @@ TimeAxisViewItem::get_canvas_group()
}
/**
- *
+ *
*/
ArdourCanvas::Item*
TimeAxisViewItem::get_name_highlight()
@@ -648,7 +648,7 @@ TimeAxisViewItem::get_name_highlight()
}
/**
- *
+ *
*/
ArdourCanvas::Pixbuf*
TimeAxisViewItem::get_name_pixbuf()
@@ -666,7 +666,7 @@ TimeAxisViewItem::compute_colors (Gdk::Color const & base_color)
{
unsigned char radius ;
char minor_shift ;
-
+
unsigned char r,g,b ;
/* FILL: this is simple */
@@ -678,7 +678,7 @@ TimeAxisViewItem::compute_colors (Gdk::Color const & base_color)
/* for minor colors:
if the overall saturation is strong, make the minor colors light.
if its weak, make them dark.
-
+
we do this by moving an equal distance to the other side of the
central circle in the color wheel from where we started.
*/
@@ -691,7 +691,7 @@ TimeAxisViewItem::compute_colors (Gdk::Color const & base_color)
r = base_color.get_red()/256;
g = base_color.get_green()/256;
b = base_color.get_blue()/256;
-
+
if (r > b)
{
if (r > g)
@@ -703,7 +703,7 @@ TimeAxisViewItem::compute_colors (Gdk::Color const & base_color)
{
/* green sector => blue */
swap (g,b);
- }
+ }
}
else
{
@@ -722,26 +722,26 @@ TimeAxisViewItem::compute_colors (Gdk::Color const & base_color)
r += minor_shift;
b += minor_shift;
g += minor_shift;
-
+
label_color = RGBA_TO_UINT(r,g,b,255);
r = (base_color.get_red()/256) + 127 ;
g = (base_color.get_green()/256) + 127 ;
b = (base_color.get_blue()/256) + 127 ;
-
+
label_color = RGBA_TO_UINT(r,g,b,255);
/* XXX can we do better than this ? */
/* We're trying ;) */
/* NUKECOLORS */
-
+
//frame_color_r = 192;
//frame_color_g = 192;
//frame_color_b = 194;
-
+
//selected_frame_color_r = 182;
//selected_frame_color_g = 145;
//selected_frame_color_b = 168;
-
+
//handle_color_r = 25 ;
//handle_color_g = 0 ;
//handle_color_b = 255 ;
@@ -773,7 +773,7 @@ TimeAxisViewItem::set_frame_color()
{
if (frame) {
uint32_t r,g,b,a;
-
+
if (_selected && should_show_selection) {
UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), &r, &g, &b, &a);
frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, a);
@@ -850,7 +850,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
frame_handle_start->hide();
frame_handle_end->hide();
}
-
+
} else {
vestigial_frame->hide();
@@ -951,4 +951,4 @@ TimeAxisViewItem::set_y (double y)
}
-
+
diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h
index c1ae4e4e63..be475c65d6 100644
--- a/gtk2_ardour/time_axis_view_item.h
+++ b/gtk2_ardour/time_axis_view_item.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ class TimeAxisViewItem : public Selectable
{
public:
virtual ~TimeAxisViewItem() ;
-
+
/**
* Set the position of this item upon the timeline to the specified value
*
@@ -48,14 +48,14 @@ class TimeAxisViewItem : public Selectable
* @return true if the position change was a success, false otherwise
*/
virtual bool set_position(nframes64_t pos, void* src, double* delta = 0) ;
-
+
/**
* Return the position of this item upon the timeline
*
* @return the position of this item
*/
- nframes64_t get_position() const ;
-
+ nframes64_t get_position() const ;
+
/**
* Sets the duration of this item
*
@@ -64,13 +64,13 @@ class TimeAxisViewItem : public Selectable
* @return true if the duration change was succesful, false otherwise
*/
virtual bool set_duration(nframes64_t dur, void* src) ;
-
+
/**
* Returns the duration of this item
*
*/
nframes64_t get_duration() const ;
-
+
/**
* Sets the maximum duration that this item make have.
*
@@ -78,14 +78,14 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
virtual void set_max_duration(nframes64_t dur, void* src) ;
-
+
/**
* Returns the maxmimum duration that this item may be set to
*
* @return the maximum duration that this item may be set to
*/
nframes64_t get_max_duration() const ;
-
+
/**
* Sets the minimu duration that this item may be set to
*
@@ -93,14 +93,14 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
virtual void set_min_duration(nframes64_t dur, void* src) ;
-
+
/**
* Returns the minimum duration that this item mey be set to
*
* @return the nimum duration that this item mey be set to
*/
nframes64_t get_min_duration() const ;
-
+
/**
* Sets whether the position of this Item is locked to its current position
* Locked items cannot be moved until the item is unlocked again.
@@ -109,7 +109,7 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
virtual void set_position_locked(bool yn, void* src) ;
-
+
/**
* Returns whether this item is locked to its current position
*
@@ -117,7 +117,7 @@ class TimeAxisViewItem : public Selectable
* false otherwise
*/
bool get_position_locked() const ;
-
+
/**
* Sets whether the Maximum Duration constraint is active and should be enforced
*
@@ -125,14 +125,14 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
void set_max_duration_active(bool active, void* src) ;
-
+
/**
* Returns whether the Maximum Duration constraint is active and should be enforced
*
* @return true if the maximum duration constraint is active, false otherwise
*/
bool get_max_duration_active() const ;
-
+
/**
* Sets whether the Minimum Duration constraint is active and should be enforced
*
@@ -140,14 +140,14 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
void set_min_duration_active(bool active, void* src) ;
-
+
/**
* Returns whether the Maximum Duration constraint is active and should be enforced
*
* @return true if the maximum duration constraint is active, false otherwise
*/
bool get_min_duration_active() const ;
-
+
/**
* Set the name/Id of this item.
*
@@ -155,14 +155,14 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
void set_item_name(std::string new_name, void* src) ;
-
+
/**
* Returns the name/id of this item
*
* @return the name/id of this item
*/
virtual std::string get_item_name() const ;
-
+
/**
* Set to true to indicate that this item is currently selected
*
@@ -179,20 +179,20 @@ class TimeAxisViewItem : public Selectable
void set_sensitive (bool yn) { _sensitive = yn; }
bool sensitive () const { return _sensitive; }
-
+
//---------------------------------------------------------------------------------------//
// Parent Component Methods
-
+
/**
* Returns the TimeAxisView that this item is upon
*
* @return the timeAxisView that this item is placed upon
*/
TimeAxisView& get_time_axis_view() ;
-
+
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Sets the displayed item text
* This item is the visual text name displayed on the canvas item, this can be different to the name of the item
@@ -200,7 +200,7 @@ class TimeAxisViewItem : public Selectable
* @param new_name the new name text to display
*/
void set_name_text(const Glib::ustring& new_name) ;
-
+
/**
* Set the height of this item
*
@@ -211,27 +211,27 @@ class TimeAxisViewItem : public Selectable
void set_y (double);
/**
- *
+ *
*/
void set_color (Gdk::Color const &);
-
+
/**
- *
+ *
*/
ArdourCanvas::Item* get_canvas_frame() ;
/**
- *
+ *
*/
ArdourCanvas::Group* get_canvas_group();
/**
- *
+ *
*/
ArdourCanvas::Item* get_name_highlight();
/**
- *
+ *
*/
ArdourCanvas::Pixbuf* get_name_pixbuf();
@@ -249,7 +249,7 @@ class TimeAxisViewItem : public Selectable
* @param spu the new samples per unit value
*/
virtual void set_samples_per_unit(double spu) ;
-
+
/**
* Returns the current samples per unit of this item
*
@@ -261,7 +261,7 @@ class TimeAxisViewItem : public Selectable
virtual void raise_to_top () { return; }
virtual void lower () { return; }
virtual void lower_to_bottom () { return; }
-
+
/**
* returns true if the name area should respond to events.
*/
@@ -290,7 +290,7 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
virtual void remove_this_item(void* src) ;
-
+
/**
* Emitted when this Group has been removed
* This is different to the GoingAway signal in that this signal
@@ -300,25 +300,25 @@ class TimeAxisViewItem : public Selectable
*/
sigc::signal<void,std::string,void*> ItemRemoved ;
-
+
/** Emitted when the name/Id of this item is changed */
sigc::signal<void,std::string,std::string,void*> NameChanged ;
-
+
/** Emiited when the position of this item changes */
sigc::signal<void,nframes64_t,void*> PositionChanged ;
-
+
/** Emitted when the position lock of this item is changed */
sigc::signal<void,bool,void*> PositionLockChanged ;
-
+
/** Emitted when the duration of this item changes */
sigc::signal<void,nframes64_t,void*> DurationChanged ;
-
+
/** Emitted when the maximum item duration is changed */
sigc::signal<void,nframes64_t,void*> MaxDurationChanged ;
-
+
/** Emitted when the mionimum item duration is changed */
sigc::signal<void,nframes64_t,void*> MinDurationChanged ;
-
+
enum Visibility {
ShowFrame = 0x1,
ShowNameHighlight = 0x2,
@@ -341,30 +341,30 @@ class TimeAxisViewItem : public Selectable
* @param start the start point of this item
* @param duration the duration of this item
*/
- TimeAxisViewItem(const std::string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
+ TimeAxisViewItem(const std::string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
nframes64_t start, nframes64_t duration, bool recording = false, Visibility v = Visibility (0));
TimeAxisViewItem (const TimeAxisViewItem& other);
void init (const std::string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis);
-
+
/**
* Calculates some contrasting color for displaying various parts of this item, based upon the base color
*
* @param color the base color of the item
*/
virtual void compute_colors (Gdk::Color const & color);
-
+
/**
* convenience method to set the various canvas item colors
*/
virtual void set_colors() ;
-
+
/**
* Sets the frame color depending on whether this item is selected
*/
virtual void set_frame_color() ;
-
+
/**
* Sets the colors of the start and end trim handle depending on object state
*
@@ -383,34 +383,34 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
*/
static gint idle_remove_this_item(TimeAxisViewItem* item, void* src) ;
-
+
/** The time axis that this item is upon */
TimeAxisView& trackview ;
-
+
/** indicates whether this item is locked to its current position */
bool position_locked ;
-
+
/** The posotion of this item on the timeline */
nframes64_t frame_position ;
-
+
/** the duration of this item upon the timeline */
nframes64_t item_duration ;
-
+
/** the maximum duration that we allow this item to take */
nframes64_t max_item_duration ;
-
+
/** the minimu duration that we allow this item to take */
nframes64_t min_item_duration ;
-
+
/** indicates whether this Max Duration constraint is active */
bool max_duration_active ;
-
+
/** indicates whether this Min Duration constraint is active */
bool min_duration_active ;
-
+
/** the curretn samples per canvas unit */
double samples_per_unit ;
-
+
/** indicates if this item is currently selected */
bool selected ;
@@ -419,13 +419,13 @@ class TimeAxisViewItem : public Selectable
/** should the item respond to events */
bool _sensitive;
-
+
/**
* The unique item name of this Item
* Each item upon a time axis must have a unique id
*/
std::string item_name ;
-
+
/**
* true if the name should respond to events
*/
@@ -446,14 +446,14 @@ class TimeAxisViewItem : public Selectable
uint32_t selected_frame_color_g ;
uint32_t selected_frame_color_b ;
uint32_t label_color ;
-
+
uint32_t handle_color_r ;
uint32_t handle_color_g ;
uint32_t handle_color_b ;
uint32_t lock_handle_color_r ;
uint32_t lock_handle_color_g ;
uint32_t lock_handle_color_b ;
-
+
ArdourCanvas::Group* group;
ArdourCanvas::SimpleRect* vestigial_frame;
ArdourCanvas::SimpleRect* frame;
diff --git a/gtk2_ardour/time_fx_dialog.cc b/gtk2_ardour/time_fx_dialog.cc
index b0536a26b6..34fe6e932d 100644
--- a/gtk2_ardour/time_fx_dialog.cc
+++ b/gtk2_ardour/time_fx_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -162,7 +162,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch)
antialias_button.set_name (N_("TimeFXButton"));
table->attach (antialias_button, 1, 3, 1, 2, Gtk::FILL, Gtk::EXPAND, 0, 0);
-#endif
+#endif
add_button (_("Stretch/Shrink"), Gtk::RESPONSE_ACCEPT);
@@ -176,7 +176,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch)
l->set_use_markup ();
progress_bar.set_name (N_("TimeFXProgress"));
-
+
progress_box->pack_start (*l, false, false);
progress_box->pack_start (progress_bar, false, true);
@@ -186,7 +186,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch)
get_vbox()->pack_start (*vbox, false, false);
-
+
show_all_children ();
}
diff --git a/gtk2_ardour/time_fx_dialog.h b/gtk2_ardour/time_fx_dialog.h
index 0a9952aa3e..aee9d40b16 100644
--- a/gtk2_ardour/time_fx_dialog.h
+++ b/gtk2_ardour/time_fx_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2009 Paul Davis
+ Copyright (C) 2000-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/time_selection.cc b/gtk2_ardour/time_selection.cc
index f9e45f7f6b..19fc321f78 100644
--- a/gtk2_ardour/time_selection.cc
+++ b/gtk2_ardour/time_selection.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003-2004 Paul Davis
+ Copyright (C) 2003-2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,9 +66,9 @@ TimeSelection::consolidate ()
}
return changed;
-}
+}
-nframes_t
+nframes_t
TimeSelection::start ()
{
if (empty()) {
@@ -85,7 +85,7 @@ TimeSelection::start ()
return first;
}
-nframes_t
+nframes_t
TimeSelection::end_frame ()
{
nframes_t last = 0;
@@ -105,4 +105,4 @@ TimeSelection::length()
{
return end_frame() - start() + 1;
}
-
+
diff --git a/gtk2_ardour/time_selection.h b/gtk2_ardour/time_selection.h
index ba4250ad7f..819a85e809 100644
--- a/gtk2_ardour/time_selection.h
+++ b/gtk2_ardour/time_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,17 +30,17 @@ namespace ARDOUR {
class TimeAxisView;
struct TimeSelection : public std::list<ARDOUR::AudioRange> {
-
+
/* if (track == 0 && group == 0) then it applies to all
tracks.
- if (track != 0 && group == 0) then it applies just to
+ if (track != 0 && group == 0) then it applies just to
that track.
- if (group != 0) then it applies to all tracks in
+ if (group != 0) then it applies to all tracks in
the group.
*/
-
+
TimeAxisView* track;
ARDOUR::RouteGroup* group;
diff --git a/gtk2_ardour/track_selection.h b/gtk2_ardour/track_selection.h
index 2a4cc1b288..38032d6de3 100644
--- a/gtk2_ardour/track_selection.h
+++ b/gtk2_ardour/track_selection.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ class TrackSelection : public std::list<TimeAxisView*>
{
public:
TrackSelection () {}
-
+
TrackSelection (std::list<TimeAxisView*> const &);
std::list<TimeAxisView*> add (std::list<TimeAxisView*> const &);
bool contains (TimeAxisView const *) const;
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc
index f52ad14277..0602b07a0e 100644
--- a/gtk2_ardour/ui_config.cc
+++ b/gtk2_ardour/ui_config.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999-2006 Paul Davis
+ Copyright (C) 1999-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ UIConfiguration::load_defaults ()
string rcfile = default_ui_rc_file.to_string();
cerr << string_compose (_("Loading default ui configuration file %1"), rcfile) << endl;
-
+
if (!tree.read (rcfile.c_str())) {
error << string_compose(_("Ardour: cannot read default ui configuration file \"%1\""), rcfile) << endmsg;
return -1;
@@ -93,14 +93,14 @@ UIConfiguration::load_defaults ()
}
return found;
}
-
+
int
UIConfiguration::load_state ()
{
bool found = false;
-
+
sys::path default_ui_rc_file;
-
+
if ( find_file_in_search_path (ardour_search_path() + system_config_search_path(),
"ardour3_ui_default.conf", default_ui_rc_file) )
{
@@ -110,7 +110,7 @@ UIConfiguration::load_state ()
string rcfile = default_ui_rc_file.to_string();
cerr << string_compose (_("Loading default ui configuration file %1"), rcfile) << endl;
-
+
if (!tree.read (rcfile.c_str())) {
error << string_compose(_("Ardour: cannot read default ui configuration file \"%1\""), rcfile) << endmsg;
return -1;
@@ -129,7 +129,7 @@ UIConfiguration::load_state ()
{
XMLTree tree;
found = true;
-
+
string rcfile = user_ui_rc_file.to_string();
cerr << string_compose (_("Loading user ui configuration file %1"), rcfile) << endl;
@@ -164,7 +164,7 @@ UIConfiguration::save_state()
error << "Could not create user configuration directory" << endmsg;
return -1;
}
-
+
sys::path rcfile_path(user_config_directory());
rcfile_path /= "ardour3_ui.conf";
@@ -189,14 +189,14 @@ UIConfiguration::get_state ()
LocaleGuard lg (X_("POSIX"));
root = new XMLNode("Ardour");
-
+
root->add_child_nocopy (get_variables ("UI"));
root->add_child_nocopy (get_variables ("Canvas"));
-
+
if (_extra_xml) {
root->add_child_copy (*_extra_xml);
}
-
+
return *root;
}
@@ -268,7 +268,7 @@ void
UIConfiguration::pack_canvasvars ()
{
#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,name) canvas_colors.push_back(&var);
+#define CANVAS_VARIABLE(var,name) canvas_colors.push_back(&var);
#include "canvas_vars.h"
#undef CANVAS_VARIABLE
}
diff --git a/gtk2_ardour/ui_config.h b/gtk2_ardour/ui_config.h
index da1ebd3784..4a099fbc8d 100644
--- a/gtk2_ardour/ui_config.h
+++ b/gtk2_ardour/ui_config.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
#include <ostream>
#include <iostream>
-#include "pbd/stateful.h"
+#include "pbd/stateful.h"
#include "pbd/xml++.h"
#include "ardour/configuration_variable.h"
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index a5dcd72438..72b128c02f 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you an redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -99,7 +99,7 @@ fit_to_pixels (const ustring& str, int pixel_width, Pango::FontDescription& font
actual_width = width;
break;
}
-
+
ustr.erase (last--);
shorter_by++;
@@ -128,7 +128,7 @@ fit_to_pixels (cairo_t* cr, std::string name, double avail)
bool abbreviated = false;
uint32_t width = 0;
-
+
while (1) {
cairo_text_extents_t ext;
cairo_text_extents (cr, name.c_str(), &ext);
@@ -187,9 +187,9 @@ xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
uint32_t t, x, y, colors, cpp;
unsigned char c;
unsigned char *savergb, *rgb;
-
+
// PARSE HEADER
-
+
if ( sscanf(xpm[0], "%u%u%u%u", &w, &h, &colors, &cpp) != 4 ) {
error << string_compose (_("bad XPM header %1"), xpm[0])
<< endmsg;
@@ -197,13 +197,13 @@ xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
}
savergb = rgb = (unsigned char*) malloc (h * w * 3);
-
+
// LOAD XPM COLORMAP LONG ENOUGH TO DO CONVERSION
for (t = 0; t < colors; ++t) {
sscanf (xpm[t+1], "%c c #%lx", &c, &val);
vals[c] = val;
}
-
+
// COLORMAP -> RGB CONVERSION
// Get low 3 bytes from vals[]
//
@@ -240,7 +240,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
}
savergb = rgb = (unsigned char*) malloc (h * w * 4);
-
+
// LOAD XPM COLORMAP LONG ENOUGH TO DO CONVERSION
if (strstr (xpm[1], "None")) {
@@ -255,7 +255,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
sscanf (xpm[t+1], "%c c #%lx", &c, &val);
vals[c] = val;
}
-
+
// COLORMAP -> RGB CONVERSION
// Get low 3 bytes from vals[]
//
@@ -311,17 +311,17 @@ get_font_for_style (string widgetname)
style = foobar.get_style ();
Glib::RefPtr<const Pango::Layout> layout = foobar.get_layout();
-
+
PangoFontDescription *pfd = (PangoFontDescription *)pango_layout_get_font_description((PangoLayout *)layout->gobj());
-
+
if (!pfd) {
-
+
/* layout inherited its font description from a PangoContext */
PangoContext* ctxt = (PangoContext*) pango_layout_get_context ((PangoLayout*) layout->gobj());
pfd = pango_context_get_font_description (ctxt);
return new Pango::FontDescription (pfd, true); /* make a copy */
- }
+ }
return new Pango::FontDescription (pfd, true); /* make a copy */
}
@@ -340,12 +340,12 @@ rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, s
}
Gtk::Label foo;
-
+
window->add (foo);
foo.set_name (style);
foo.ensure_style ();
-
+
GtkRcStyle* waverc = foo.get_style()->gobj()->rc_style;
if (waverc) {
@@ -353,7 +353,7 @@ rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, s
r = waverc->fg[state].red / 257;
g = waverc->fg[state].green / 257;
b = waverc->fg[state].blue / 257;
-
+
/* what a hack ... "a" is for "active" */
if (state == Gtk::STATE_NORMAL && rgba) {
a = waverc->fg[GTK_STATE_ACTIVE].red / 257;
@@ -377,7 +377,7 @@ rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, s
}
window->remove ();
-
+
if (state == Gtk::STATE_NORMAL && rgba) {
return (uint32_t) RGBA_TO_UINT(r,g,b,a);
} else {
@@ -491,7 +491,7 @@ gc_from_style (string widget_style_name, int state, string attr)
}
-bool
+bool
canvas_item_visible (ArdourCanvas::Item* item)
{
return (item->gobj()->object.flags & GNOME_CANVAS_ITEM_VISIBLE) ? true : false;
@@ -535,8 +535,8 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
if (focus) {
if (GTK_IS_ENTRY(focus) || Keyboard::some_magic_widget_has_focus()) {
special_handling_of_unmodified_accelerators = true;
- }
- }
+ }
+ }
#ifdef GTKOSX
/* should this be universally true? */
@@ -547,7 +547,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
#ifdef DEBUG_ACCELERATOR_HANDLING
if (debug) {
- cerr << "Win = " << win << " Key event: code = " << ev->keyval << " state = " << hex << ev->state << dec << " special handling ? "
+ cerr << "Win = " << win << " Key event: code = " << ev->keyval << " state = " << hex << ev->state << dec << " special handling ? "
<< special_handling_of_unmodified_accelerators
<< " magic widget focus ? "
<< Keyboard::some_magic_widget_has_focus()
@@ -566,18 +566,18 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
the focus widget and/or focus chain
The problem with this is that if the accelerators include
- keys without modifiers, such as the space bar or the
+ keys without modifiers, such as the space bar or the
letter "e", then pressing the key while typing into
a text entry widget results in the accelerator being
activated, instead of the desired letter appearing
in the text entry.
There is no good way of fixing this, but this
- represents a compromise. The idea is that
+ represents a compromise. The idea is that
key events involving modifiers (not Shift)
get routed into the activation pathway first, then
get propagated to the focus widget if necessary.
-
+
If the key event doesn't involve modifiers,
we deliver to the focus widget first, thus allowing
it to get "normal text" without interference
@@ -648,9 +648,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
#endif
return gtk_window_propagate_key_event (win, ev);
}
-
+
/* no modifiers, propagate first */
-
+
#ifdef DEBUG_ACCELERATOR_HANDLING
if (debug) {
cerr << "\tpropagate, then activate\n";
@@ -664,15 +664,15 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
#endif
if (allow_activating) {
-
+
#ifdef GTKOSX
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
return true;
}
#endif
return gtk_window_activate_key (win, ev);
- }
-
+ }
+
} else {
#ifdef DEBUG_ACCELERATOR_HANDLING
if (debug) {
@@ -690,22 +690,22 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
return true;
}
-Glib::RefPtr<Gdk::Pixbuf>
+Glib::RefPtr<Gdk::Pixbuf>
get_xpm (std::string name)
{
if (!xpm_map[name]) {
SearchPath spath(ARDOUR::ardour_search_path());
spath += ARDOUR::system_data_search_path();
-
+
spath.add_subdirectory_to_paths("pixmaps");
-
+
sys::path data_file_path;
-
+
if(!find_file_in_search_path (spath, name, data_file_path)) {
fatal << string_compose (_("cannot find XPM file for %1"), name) << endmsg;
}
-
+
try {
xpm_map[name] = Gdk::Pixbuf::create_from_file (data_file_path.to_string());
} catch(const Glib::Error& e) {
@@ -736,7 +736,7 @@ get_icon_path (const char* cname)
return data_file_path.to_string();
}
-Glib::RefPtr<Gdk::Pixbuf>
+Glib::RefPtr<Gdk::Pixbuf>
get_icon (const char* cname)
{
Glib::RefPtr<Gdk::Pixbuf> img;
@@ -760,22 +760,22 @@ longest (vector<string>& strings)
vector<string>::iterator longest = strings.begin();
string::size_type longest_length = (*longest).length();
-
+
vector<string>::iterator i = longest;
++i;
while (i != strings.end()) {
-
+
string::size_type len = (*i).length();
-
+
if (len > longest_length) {
longest = i;
longest_length = len;
- }
-
+ }
+
++i;
}
-
+
return *longest;
}
@@ -819,7 +819,7 @@ key_is_legal_for_numeric_entry (guint keyval)
case GDK_Left:
case GDK_Right:
return true;
-
+
default:
break;
}
@@ -836,7 +836,7 @@ set_pango_fontsize ()
pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_for_display(), val/1024, val/1024);
/* Cairo rendering, in case there is any */
-
+
pango_cairo_font_map_set_resolution ((PangoCairoFontMap*) pango_cairo_font_map_get_default(), val/1024);
}
@@ -862,35 +862,35 @@ possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval)
case GDK_ISO_Left_Tab:
fakekey = GDK_nabla;
break;
-
+
case GDK_Up:
fakekey = GDK_uparrow;
break;
-
+
case GDK_Down:
fakekey = GDK_downarrow;
break;
-
+
case GDK_Right:
fakekey = GDK_rightarrow;
break;
-
+
case GDK_Left:
fakekey = GDK_leftarrow;
break;
-
+
default:
break;
}
-
+
if (fakekey != GDK_VoidSymbol) {
keyval = fakekey;
return true;
- }
+ }
return false;
}
-
+
inline guint8
convert_color_channel (guint8 src,
@@ -907,7 +907,7 @@ convert_bgra_to_rgba (guint8 const* src,
{
guint8 const* src_pixel = src;
guint8* dst_pixel = dst;
-
+
for (int y = 0; y < height; y++)
for (int x = 0; x < width; x++)
{
@@ -918,7 +918,7 @@ convert_bgra_to_rgba (guint8 const* src,
dst_pixel[2] = convert_color_channel (src_pixel[0],
src_pixel[3]);
dst_pixel[3] = src_pixel[3];
-
+
dst_pixel += 4;
src_pixel += 4;
}
diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h
index 0df04cb0f8..dfcd4c8469 100644
--- a/gtk2_ardour/utils.h
+++ b/gtk2_ardour/utils.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ namespace Gtk {
class Paned;
}
-static inline double
+static inline double
gain_to_slider_position (ARDOUR::gain_t g)
{
if (g == 0) return 0;
@@ -45,7 +45,7 @@ gain_to_slider_position (ARDOUR::gain_t g)
}
-static inline ARDOUR::gain_t
+static inline ARDOUR::gain_t
slider_position_to_gain (double pos)
{
/* XXX Marcus writes: this doesn't seem right to me. but i don't have a better answer ... */
diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc
index 2b811e6c58..9574a83c26 100644
--- a/gtk2_ardour/visual_time_axis.cc
+++ b/gtk2_ardour/visual_time_axis.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ using namespace ARDOUR;
using namespace PBD;
using namespace sigc;
using namespace Gtk;
-
+
/**
* Abstract Constructor for base visual time axis classes
*
@@ -74,12 +74,12 @@ VisualTimeAxis::VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Se
{
time_axis_name = name ;
_color = unique_random_color() ;
-
+
name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ;
name_entry.signal_button_release_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_release_handler)) ;
name_entry.signal_key_release_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_key_release_handler)) ;
-
+
size_button.set_name("TrackSizeButton") ;
visual_button.set_name("TrackVisualButton") ;
hide_button.set_name("TrackRemoveButton") ;
@@ -90,7 +90,7 @@ VisualTimeAxis::VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Se
ARDOUR_UI::instance()->tooltips().set_tip(size_button,_("Display Height")) ;
ARDOUR_UI::instance()->tooltips().set_tip(visual_button, _("Visual options")) ;
ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("Hide this track")) ;
-
+
controls_table.attach (hide_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (visual_button, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (size_button, 2, 3, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
@@ -99,7 +99,7 @@ VisualTimeAxis::VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Se
size_button.unset_flags(Gtk::CAN_FOCUS) ;
hide_button.unset_flags(Gtk::CAN_FOCUS) ;
visual_button.unset_flags(Gtk::CAN_FOCUS) ;
-
+
set_height (hNormal) ;
}
@@ -119,13 +119,13 @@ void
VisualTimeAxis::set_time_axis_name(const string & name, void* src)
{
std::string old_name = time_axis_name ;
-
+
if(name != time_axis_name)
{
time_axis_name = name ;
label_view() ;
editor.route_name_changed(this) ;
-
+
NameChanged(time_axis_name, old_name, src) ; /* EMIT_SIGNAL */
}
}
@@ -143,13 +143,13 @@ VisualTimeAxis::name() const
/**
* Sets the height of this TrackView to one of the defined TrackHeghts
*
- * @param h
+ * @param h
*/
void
VisualTimeAxis::set_height(uint32_t h)
{
TimeAxisView::set_height(h);
-
+
if (h >= hNormal) {
hide_name_label ();
show_name_entry ();
@@ -185,9 +185,9 @@ VisualTimeAxis::hide_click()
{
// LAME fix for hide_button display refresh
hide_button.set_sensitive(false);
-
+
editor.hide_track_in_display (*this);
-
+
hide_button.set_sensitive(true);
}
@@ -216,7 +216,7 @@ VisualTimeAxis::choose_time_axis_color()
Gdk::Color color ;
gdouble current[4] ;
Gdk::Color current_color ;
-
+
current[0] = _color.get_red() / 65535.0 ;
current[1] = _color.get_green() / 65535.0 ;
current[2] = _color.get_blue() / 65535.0 ;
@@ -224,7 +224,7 @@ VisualTimeAxis::choose_time_axis_color()
current_color.set_rgb_p (current[0],current[1],current[2]);
color = Gtkmm2ext::UI::instance()->get_color(_("ardour: color selection"),picked, &current_color) ;
-
+
if (picked)
{
set_time_axis_color(color) ;
@@ -300,7 +300,7 @@ VisualTimeAxis::idle_remove_this_time_axis(VisualTimeAxis* ta, void* src)
//---------------------------------------------------------------------------------------//
// Handle TimeAxis rename
-
+
/**
* Construct a new prompt to receive a new name for this TimeAxis
*
@@ -325,7 +325,7 @@ VisualTimeAxis::start_time_axis_rename()
ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
return ;
}
-
+
set_time_axis_name(result, this) ;
}
}
@@ -348,13 +348,13 @@ VisualTimeAxis::label_view()
//---------------------------------------------------------------------------------------//
-// Handle name entry signals
+// Handle name entry signals
void
VisualTimeAxis::name_entry_changed()
{
string x = name_entry.get_text ();
-
+
if (x == time_axis_name) {
return;
}
@@ -374,7 +374,7 @@ VisualTimeAxis::name_entry_changed()
}
}
-gint
+gint
VisualTimeAxis::name_entry_button_press_handler(GdkEventButton *ev)
{
if (ev->button == 3) {
@@ -383,7 +383,7 @@ VisualTimeAxis::name_entry_button_press_handler(GdkEventButton *ev)
return FALSE;
}
-gint
+gint
VisualTimeAxis::name_entry_button_release_handler(GdkEventButton *ev)
{
return FALSE;
@@ -407,7 +407,7 @@ VisualTimeAxis::name_entry_key_release_handler(GdkEventKey* ev)
//---------------------------------------------------------------------------------------//
// Super class methods not handled by VisualTimeAxis
-
+
void
VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
{
diff --git a/gtk2_ardour/visual_time_axis.h b/gtk2_ardour/visual_time_axis.h
index bce02c9bae..f728a1f4cf 100644
--- a/gtk2_ardour/visual_time_axis.h
+++ b/gtk2_ardour/visual_time_axis.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,37 +47,37 @@ class TimeAxisViewStrip;
/**
* Base Abstact Class for TimeAxis views that operate purely within the visual domain.
- *
+ *
* This class provides many of the common methods required for visual TimeAxis views. The aim is
* to provide an abstract layer during the developmnt of the visual based time axis'. Many of these
- * methods have a better home further up the class heirarchy, and in fact some are replication of
+ * methods have a better home further up the class heirarchy, and in fact some are replication of
* methods found within RouteUI. This, however, has been required due to various problems with previous
* versions of g++, mainly 2.95, which are not correctly handling virtual methods, virtual base classes,
* and virtual methods when used with Multiple Inheritance. Perhaps these could be combined once the
* compilers all agree on hos do to do stuff...
- */
+ */
class VisualTimeAxis : public TimeAxisView
{
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* VisualTimeAxis Destructor
*
*/
virtual ~VisualTimeAxis() ;
-
+
//---------------------------------------------------------------------------------------//
// Name/Id Accessors/Mutators
-
+
/**
* Returns the name of this TimeAxis
*
* @return the name of this TimeAxis
*/
virtual std::string name() const ;
-
+
/**
* Sets the name of this TimeAxis
*
@@ -86,35 +86,35 @@ class VisualTimeAxis : public TimeAxisView
*/
virtual void set_time_axis_name(const std::string & name, void* src) ;
-
+
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Sets the height of this TrackView to one of the defined TrackHeghts
*
* @param h the number of pixels to set the height to
*/
- virtual void set_height (uint32_t);
+ virtual void set_height (uint32_t);
//---------------------------------------------------------------------------------------//
// Selection Methods
// selection methods are not handled by visual time axis object yet...
-
+
/**
* Not implemented
*/
virtual void set_selected_regionviews(RegionSelection&) ;
-
+
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/**
* Emitted when we have changed the gui, and what we have shanged
*/
sigc::signal<void,const std::string &,void*> gui_changed ;
-
+
/**
* Emitted when this Visual Time Axis has been removed
* This is different to the GoingAway signal in that this signal
@@ -123,7 +123,7 @@ class VisualTimeAxis : public TimeAxisView
* event
*/
sigc::signal<void,const std::string &,void*> VisualTimeAxisRemoved ;
-
+
/**
* Emitted when we have changed the name of this TimeAxis
*/
@@ -136,7 +136,7 @@ class VisualTimeAxis : public TimeAxisView
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Abstract Constructor for base visual time axis classes
*
@@ -146,18 +146,18 @@ class VisualTimeAxis : public TimeAxisView
* @param canvas the parent canvas object
*/
VisualTimeAxis(const std::string & name, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Handle time axis removal
-
+
/**
* Handles the Removal of this VisualTimeAxis
*
* @param src the identity of the object that initiated the change
*/
virtual void remove_this_time_axis(void* src) ;
-
+
/**
* Callback used to remove this time axis during the gtk idle loop
* This is used to avoid deleting the obejct while inside the remove_this_time_axis
@@ -168,64 +168,64 @@ class VisualTimeAxis : public TimeAxisView
*/
static gint idle_remove_this_time_axis(VisualTimeAxis* ta, void* src) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// ui methods & data
-
+
/**
* Handle the visuals button click
*
*/
void visual_click() ;
-
+
/**
* Handle the hide buttons click
*
*/
void hide_click() ;
-
+
/**
* Allows the selection of a new color for this TimeAxis
*
*/
virtual void select_track_color() ;
-
+
/**
* Provides a color chooser for the selection of a new time axis color.
*
*/
bool choose_time_axis_color() ;
-
+
/**
* Sets the color of this TimeAxis to the specified color c
*
* @param c the new TimeAxis color
*/
void set_time_axis_color(Gdk::Color c) ;
-
-
+
+
//---------------------------------------------------------------------------------------//
// Handle TimeAxis rename
-
+
/**
* Construct a new prompt to receive a new name for this TimeAxis
*
* @see finish_time_axis_rename()
*/
void start_time_axis_rename() ;
-
+
/**
* Handles the new name for this TimeAxis from the name prompt
*
* @see start_time_axis_rename()
*/
virtual void label_view() ;
-
-
+
+
//---------------------------------------------------------------------------------------//
- // Handle name entry signals
-
+ // Handle name entry signals
+
void name_entry_changed() ;
gint name_entry_focus_out_handler(GdkEventFocus*) ;
gint name_entry_key_release_handler(GdkEventKey*) ;
@@ -241,25 +241,25 @@ class VisualTimeAxis : public TimeAxisView
/** the name of this TimeAxis object */
std::string time_axis_name ;
-
+
//---------------------------------------------------------------------------------------//
// Super class methods not handled by VisualTimeAxis
-
+
/**
* Not handled by purely Visual TimeAxis
*
* @todo should VisualTimeAxis handle this?
*/
void show_timestretch (nframes_t start, nframes_t end);
-
+
/**
* Not handle by purely visual TimeAxis
* @see show_timestratch
*/
virtual void hide_timestretch() ;
-
+
private:
-
+
};
#endif /* __ardour_visual_time_axis_h__ */
diff --git a/gtk2_ardour/vst_pluginui.cc b/gtk2_ardour/vst_pluginui.cc
index 7a80aaf71e..8b7847f0a3 100644
--- a/gtk2_ardour/vst_pluginui.cc
+++ b/gtk2_ardour/vst_pluginui.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<
vst_preset_combo.signal_changed().connect (mem_fun (*this, &VSTPluginUI::preset_chosen));
bypass_button.set_active (!insert->active());
-
+
pack_start (preset_box, false, false);
pack_start (socket, true, true);
pack_start (plugin_analysis_expander, true, true);
@@ -90,7 +90,7 @@ VSTPluginUI::package (Gtk::Window& win)
/*
this assumes that the window's owner understands the XEmbed protocol.
*/
-
+
socket.add_id (fst_get_XID (vst->fst()));
fst_move_window_into_view (vst->fst());
@@ -154,15 +154,15 @@ VSTPluginUI::create_preset_store ()
if (vst_version >= 2) {
fst->plugin->dispatcher (fst->plugin, 29, i, 0, buf, 0.0);
}
-
+
row[preset_columns.name] = buf;
row[preset_columns.number] = i;
}
-
+
if (fst->plugin->numPrograms > 0) {
fst->plugin->dispatcher( fst->plugin, effSetProgram, 0, 0, NULL, 0.0 );
}
-
+
vst_preset_combo.set_model (preset_model);
CellRenderer* renderer = manage (new CellRendererText());
@@ -181,7 +181,7 @@ static Display *the_gtk_display;
static error_handler_t wine_error_handler;
static error_handler_t gtk_error_handler;
-static int
+static int
fst_xerror_handler( Display *disp, XErrorEvent *ev )
{
if (disp == the_gtk_display) {
diff --git a/gtk2_ardour/waveview.cc b/gtk2_ardour/waveview.cc
index f9f011ea41..9cc53355be 100644
--- a/gtk2_ardour/waveview.cc
+++ b/gtk2_ardour/waveview.cc
@@ -139,7 +139,7 @@ Glib::PropertyProxy_ReadOnly<void*> WaveView::property_data_src() const
{
return Glib::PropertyProxy_ReadOnly<void*> (this, "data_src");
}
-Glib::PropertyProxy<uint32_t> WaveView::property_channel()
+Glib::PropertyProxy<uint32_t> WaveView::property_channel()
{
return Glib::PropertyProxy<uint32_t> (this, "channel");
}
diff --git a/gtk2_ardour/waveview.h b/gtk2_ardour/waveview.h
index 2af3465932..53472f80d3 100644
--- a/gtk2_ardour/waveview.h
+++ b/gtk2_ardour/waveview.h
@@ -6,7 +6,7 @@
/* waveview.h
- *
+ *
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
@@ -80,7 +80,7 @@ private:
protected:
explicit WaveView(const Glib::ConstructParams& construct_params);
explicit WaveView(GnomeCanvasWaveView* castitem);
-
+
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
diff --git a/gtk2_ardour/waveview_p.h b/gtk2_ardour/waveview_p.h
index 941e036e5e..5b636a702f 100644
--- a/gtk2_ardour/waveview_p.h
+++ b/gtk2_ardour/waveview_p.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by