13
0

NO-OP: whitespace

- remove trailing whitespace
- remove space after opening brackets and before closing brackets
- add space around operators
- do not use '//' for multi-line comments, do not use "//" on line-start
  to comment-out code breaking indenting (-Wmisleading-indent)
- do add a single space after comment-start /*{SPACE}... or //{SPACE}...
- reserve duplicate whitespace "  " for alignment, remove other duplicate
  whitespace
- use established "TODO" and "XXX" (highlighted keywords)
- remove equal-sign series "====" (those indicate merge conflicts)
This commit is contained in:
Robin Gareus 2018-02-24 13:54:15 +01:00
parent 75122af118
commit ceac42cc03
11 changed files with 426 additions and 425 deletions

View File

@ -185,17 +185,17 @@ You may select:\n \
strict_io_combo.append_text (_("Strict-I/O"));
strict_io_combo.set_active (Config->get_strict_io () ? 1 : 0);
//top-level VBox
/* top-level VBox */
VBox* vbox = manage (new VBox);
get_vbox()->set_spacing (4);
vbox->set_spacing (18);
vbox->set_border_width (5);
//this box contains the template chooser, and the template details
/* this box contains the template chooser, and the template details */
HBox* template_hbox = manage (new HBox);
template_hbox->set_spacing (8);
//scrollbars for the template chooser and template descriptions....
/* scrollbars for the template chooser and template descriptions.... */
Gtk::ScrolledWindow *template_scroller = manage (new Gtk::ScrolledWindow());
template_scroller->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
template_scroller->add (trk_template_chooser);
@ -204,10 +204,10 @@ You may select:\n \
desc_scroller->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
desc_scroller->add (trk_template_desc);
//this is the outer sample that surrounds the description and the settings-table
/* this is the outer sample that surrounds the description and the settings-table */
trk_template_outer_frame.set_name (X_("TextHighlightFrame"));
//this is the "inner frame" that surrounds the description text
/* this is the "inner frame" that surrounds the description text */
trk_template_desc_frame.set_name (X_("TextHighlightFrame"));
trk_template_desc_frame.add (*desc_scroller);
@ -250,7 +250,7 @@ You may select:\n \
vbox->pack_start (*template_hbox, true, true);
//Now pack the "settings table" with manual controls (these controls are sensitized by the left-side selection)
/* Now pack the "settings table" with manual controls (these controls are sensitized by the left-side selection) */
int n = 0;
@ -262,7 +262,7 @@ You may select:\n \
++n;
// Number
/* Number */
add_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
settings_table->attach (add_label, 0, 1, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
Gtk::Alignment *align = manage (new Alignment (0, .5, 0, 0));
@ -271,31 +271,31 @@ You may select:\n \
++n;
// Name
/* Name */
name_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
settings_table->attach (name_label, 0, 1, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
settings_table->attach (name_template_entry, 1, 3, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
// Route configuration
/* Route configuration */
configuration_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
settings_table->attach (configuration_label, 4, 5, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
settings_table->attach (channel_combo, 5, 6, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
++n;
// instrument choice (for MIDI)
/* instrument choice (for MIDI) */
instrument_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
settings_table->attach (instrument_label, 0, 1, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
settings_table->attach (instrument_combo, 1, 3, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
// Group choice
/* Group choice */
group_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
settings_table->attach (group_label, 4, 5, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
settings_table->attach (route_group_combo, 5, 6, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
++n;
// New Route's I/O is.. {strict/flexible}
/* New Route's I/O is.. {strict/flexible} */
if (Profile->get_mixbus ()) {
strict_io_combo.set_active (1);
} else {
@ -306,7 +306,7 @@ You may select:\n \
ArdourWidgets::set_tooltip (strict_io_combo,
_("With strict-i/o enabled, Effect Processors will not modify the number of channels on a track. The number of output channels will always match the number of input channels."));
// recording mode
/* recording mode */
mode_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
settings_table->attach (mode_label, 4, 5, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
settings_table->attach (mode_combo, 5, 6, n, n + 1, Gtk::FILL, Gtk::SHRINK, 0, 0);
@ -317,12 +317,12 @@ You may select:\n \
HBox* outer_box = manage (new HBox);
outer_box->set_spacing (4);
// New route will be inserted at..
/* New route will be inserted at.. */
insert_label.set_alignment (Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
outer_box->pack_start (insert_label, false, false);
outer_box->pack_start (insert_at_combo, false, false);
//quick-add button (add item but don't close dialog)
/* quick-add button (add item but don't close dialog) */
Gtk::Button* addnoclose_button = manage (new Gtk::Button(_("Add selected items (and leave dialog open)")));
addnoclose_button->set_can_default ();
addnoclose_button->signal_clicked ().connect (sigc::bind (sigc::mem_fun (*this, &Gtk::Dialog::response), Add));
@ -426,7 +426,6 @@ AddRouteDialog::trk_template_row_selected ()
name_template_entry.set_text ("");
}
if ((it = rs.find ("how_many")) != rs.end()) {
if (atoi (it->second.c_str()) > 0) {
routes_adjustment.set_value (atoi (it->second.c_str()));
@ -942,7 +941,7 @@ AddRouteDialog::refill_channel_setups ()
}
TreeModel::Row row;
if ((*s)->name == "Create Audio Tracks Interactively" && Profile->get_mixbus ()) {
// somewhat-special, Ben says: "most-used template"
/* somewhat-special, Ben says: "most-used template" */
row = *(trk_template_model->prepend ());
} else {
row = *(trk_template_model->append ());

View File

@ -223,7 +223,7 @@ static const gchar *_rb_opt_strings[] = {
};
#endif
//Robin says: this should be odd to accomodate cairo drawing offset ( width/2 rounds up to pixel boundary )
/* Robin says: this should be odd to accomodate cairo drawing offset (width/2 rounds up to pixel boundary) */
#ifdef __APPLE__
#define COMBO_TRIANGLE_WIDTH 19 // ArdourButton _diameter (11) + 2 * arrow-padding (2*2) + 2 * text-padding (2*5)
#else
@ -611,7 +611,7 @@ Editor::Editor ()
pad_line_1->set_outline_color (0xFF0000FF);
pad_line_1->show();
// CAIROCANVAS
/* CAIROCANVAS */
time_pad->show();
edit_packer.set_col_spacings (0);
@ -740,7 +740,7 @@ Editor::Editor ()
global_vpacker.set_spacing (0);
global_vpacker.set_border_width (0);
//the next three EventBoxes provide the ability for their child widgets to have a background color. That is all.
/* the next three EventBoxes provide the ability for their child widgets to have a background color. That is all. */
Gtk::EventBox* ebox = manage (new Gtk::EventBox); // a themeable box
ebox->set_name("EditorWindow");
@ -1132,7 +1132,7 @@ bool
Editor::deferred_control_scroll (samplepos_t /*target*/)
{
_session->request_locate (*_control_scroll_target, _session->transport_rolling());
// reset for next stream
/* reset for next stream */
_control_scroll_target = boost::none;
_dragging_playhead = false;
return false;
@ -1326,8 +1326,9 @@ Editor::set_session (Session *t)
return;
}
//initialize _leftmost_sample to the extents of the session
//this prevents a bogus setting of leftmost = "0" if the summary view asks for the leftmost sample before the visible state has been loaded from instant.xml
/* initialize _leftmost_sample to the extents of the session
* this prevents a bogus setting of leftmost = "0" if the summary view asks for the leftmost sample
* before the visible state has been loaded from instant.xml */
_leftmost_sample = session_gui_extents().first;
_playlist_selector->set_session (_session);
@ -1364,14 +1365,14 @@ Editor::set_session (Session *t)
loc = _session->locations()->auto_punch_location();
if (loc != 0) {
// force name
/* force name */
loc->set_name (_("Punch"));
}
refresh_location_display ();
/* This must happen after refresh_location_display(), as (amongst other things) we restore
the selected Marker; this needs the LocationMarker list to be available.
* the selected Marker; this needs the LocationMarker list to be available.
*/
XMLNode* node = ARDOUR_UI::instance()->editor_settings();
set_state (*node, Stateful::loading_state_version);
@ -2233,8 +2234,10 @@ Editor::set_grid_to (GridType gt)
grid_type_selector.set_text (str);
}
//show appropriate rulers for this grid setting. (ToDo: perhaps make this optional)
//Currently this is 'required' because the RULER calculates the grid_marks which will be used by grid_lines
/* show appropriate rulers for this grid setting.
* TODO: perhaps make this optional.
* Currently this is 'required' because the RULER calculates the grid_marks which will be used by grid_lines
*/
if (grid_musical()) {
ruler_tempo_action->set_active(true);
ruler_meter_action->set_active(true);
@ -2739,7 +2742,7 @@ Editor::snap_to_grid (vector<ArdourCanvas::Ruler::Mark> marks, samplepos_t presn
before = after = max_samplepos;
//get marks to either side of presnap
/* get marks to either side of presnap */
vector<ArdourCanvas::Ruler::Mark>::const_iterator m = marks.begin();
while (m != marks.end() && (m->position < presnap)) {
++m;
@ -2823,7 +2826,7 @@ Editor::snap_to_internal (MusicSample& start, RoundMode direction, SnapPref pref
samplepos_t dist = max_samplepos; // this records the distance of the best snap result we've found so far
samplepos_t best = max_samplepos; // this records the best snap-result we've found so far
//check snap-to-marker
/* check snap-to-marker */
if (UIConfiguration::instance().get_snap_to_marks()) {
if (for_mark) {
return;
@ -2833,7 +2836,7 @@ Editor::snap_to_internal (MusicSample& start, RoundMode direction, SnapPref pref
check_best_snap(presnap, test, dist, best);
}
//check snap-to-region-{start/end/sync}
/* check snap-to-region-{start/end/sync} */
if (UIConfiguration::instance().get_snap_to_region_start() || UIConfiguration::instance().get_snap_to_region_end() || UIConfiguration::instance().get_snap_to_region_sync()) {
if (!region_boundary_cache.empty()) {
@ -2864,20 +2867,21 @@ Editor::snap_to_internal (MusicSample& start, RoundMode direction, SnapPref pref
check_best_snap(presnap, test, dist, best);
}
//check Grid
/* check Grid */
if (UIConfiguration::instance().get_snap_to_grid() && (_grid_type != GridTypeNone)) {
//if SnapToGrid is selected, the user wants to prioritize the music grid
//in this case we should reset the best distance, so Grid will prevail
/* if SnapToGrid is selected, the user wants to prioritize the music grid
* in this case we should reset the best distance, so Grid will prevail */
dist = max_samplepos;
test = snap_to_grid (grid_marks, presnap, direction);
check_best_snap(presnap, test, dist, best);
}
//now check "magnetic" state: is the grid within reasonable on-screen distance to trigger a snap?
//this also helps to avoid snapping to somewhere the user can't see. ( i.e.: I clicked on a region and it disappeared!! )
//ToDo: perhaps this should only occur if EditPointMouse?
/* now check "magnetic" state: is the grid within reasonable on-screen distance to trigger a snap?
* this also helps to avoid snapping to somewhere the user can't see. (i.e.: I clicked on a region and it disappeared!!)
* ToDo: Perhaps this should only occur if EditPointMouse?
*/
int snap_threshold_s = pixel_to_sample(UIConfiguration::instance().get_snap_threshold());
if (ensure_snap) {
start.set (best, 0);
@ -3108,8 +3112,6 @@ Editor::setup_toolbar ()
toolbar_hbox.pack_start (*nudge_box, false, false);
//zoom tools on right ege
toolbar_hbox.pack_end (_zoom_box, false, false, 2);
toolbar_hbox.pack_end (*(manage (new ArdourVSpacer ())), false, false, 3);
@ -3140,9 +3142,9 @@ Editor::build_edit_mode_menu ()
using namespace Menu_Helpers;
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Slide], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide)));
// edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Splice], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Splice)));
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Ripple], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple)));
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Lock], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Lock)));
/* Note: Splice was removed */
set_size_request_to_display_given_text (edit_mode_selector, edit_mode_strings, COMBO_TRIANGLE_WIDTH, 2);
}
@ -3152,7 +3154,7 @@ Editor::build_grid_type_menu ()
{
using namespace Menu_Helpers;
//main grid: bars, quarter-notes, etc
/* main grid: bars, quarter-notes, etc */
grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeNone], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeNone)));
grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBar], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBar)));
grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeat], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeat)));
@ -3162,7 +3164,7 @@ Editor::build_grid_type_menu ()
grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv16], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv16)));
grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv32], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv32)));
//triplet grid
/* triplet grid */
grid_type_selector.AddMenuElem(SeparatorElem());
Gtk::Menu *_triplet_menu = manage (new Menu);
MenuList& triplet_items (_triplet_menu->items());
@ -3174,7 +3176,7 @@ Editor::build_grid_type_menu ()
}
grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Triplets"), *_triplet_menu));
//quintuplet grid
/* quintuplet grid */
Gtk::Menu *_quintuplet_menu = manage (new Menu);
MenuList& quintuplet_items (_quintuplet_menu->items());
{
@ -3184,7 +3186,7 @@ Editor::build_grid_type_menu ()
}
grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Quintuplets"), *_quintuplet_menu));
//septuplet grid
/* septuplet grid */
Gtk::Menu *_septuplet_menu = manage (new Menu);
MenuList& septuplet_items (_septuplet_menu->items());
{
@ -3377,9 +3379,8 @@ Editor::commit_reversible_selection_op ()
if (selection_op_cmd_depth == 1) {
if (selection_op_history_it > 0 && selection_op_history_it < selection_op_history.size()) {
/**
The user has undone some selection ops and then made a new one,
making anything earlier in the list invalid.
/* The user has undone some selection ops and then made a new one,
* making anything earlier in the list invalid.
*/
list<XMLNode *>::iterator it = selection_op_history.begin();
@ -3936,8 +3937,7 @@ Editor::set_stationary_playhead (bool yn)
{
if (_stationary_playhead != yn) {
if ((_stationary_playhead = yn) == true) {
/* catch up */
// FIXME need a 3.0 equivalent of this 2.X call
/* catch up -- FIXME need a 3.0 equivalent of this 2.X call */
// update_current_screen ();
}
instant_save ();
@ -4099,7 +4099,7 @@ Editor::playlist_deletion_dialog (boost::shared_ptr<Playlist> pl)
dialog.add_button (_("Keep Remaining"), RESPONSE_NO); // ditto
dialog.add_button (_("Cancel"), RESPONSE_CANCEL);
// by default gtk uses the left most button
/* by default gtk uses the left most button */
keep->grab_focus ();
switch (dialog.run ()) {
@ -4397,8 +4397,7 @@ Editor::redo_visual_state ()
VisualState* vs = redo_visual_stack.back();
redo_visual_stack.pop_back();
// can 'vs' really be 0? Is there a place that puts NULL pointers onto the stack?
// why do we check here?
/* XXX: can 'vs' really be 0? Is there a place that puts NULL pointers onto the stack? */
undo_visual_stack.push_back (current_visual_state (vs ? (vs->gui_state != 0) : false));
if (vs) {
@ -4513,7 +4512,7 @@ void
Editor::ensure_visual_change_idle_handler ()
{
if (pending_visual_change.idle_handler_id < 0) {
// see comment in add_to_idle_resize above.
/* see comment in add_to_idle_resize above. */
pending_visual_change.idle_handler_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE + 10, _idle_visual_changer, this, NULL);
pending_visual_change.being_handled = false;
}
@ -4608,16 +4607,14 @@ Editor::visual_changer (const VisualChange& vc)
}
if (!(vc.pending & VisualChange::ZoomLevel)) {
/**
* If the canvas is not being zoomed then the canvas items will not change
/* If the canvas is not being zoomed then the canvas items will not change
* and cause Item::prepare_for_render to be called so do it here manually.
*
* Not ideal, but I can't think of a better solution atm.
*/
_track_canvas->prepare_for_render();
}
// If we are only scrolling vertically there is no need to update these
/* If we are only scrolling vertically there is no need to update these */
if (vc.pending != VisualChange::YOrigin) {
update_fixed_rulers ();
redisplay_grid (true);
@ -5093,7 +5090,7 @@ Editor::first_idle ()
selection->set (rs);
// first idle adds route children (automation tracks), so we need to redisplay here
/* first idle adds route children (automation tracks), so we need to redisplay here */
_routes->redisplay ();
delete dialog;
@ -5477,7 +5474,7 @@ Editor::hide_track_in_display (TimeAxisView* tv, bool apply_to_selection)
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
if (rtv && current_mixer_strip && (rtv->route() == current_mixer_strip->route())) {
// this will hide the mixer strip
/* this will hide the mixer strip */
set_selected_mixer_strip (*tv);
}
@ -5792,7 +5789,7 @@ Editor::super_rapid_screen_update ()
_last_update_time = now;
}
//snapped cursor stuff ( the snapped_cursor shows where an operation is going to occur )
/* snapped cursor stuff (the snapped_cursor shows where an operation is going to occur) */
bool ignored;
MusicSample where (sample, 0);
if (!UIConfiguration::instance().get_show_snapped_cursor()) {
@ -5802,8 +5799,9 @@ Editor::super_rapid_screen_update ()
snapped_cursor->set_position (where.sample);
snapped_cursor->show ();
} else if (_edit_point == EditAtSelectedMarker) {
//NOTE: I don't think EditAtSelectedMarker should snap. they are what they are.
//however, the current editing code -does- snap so I'll draw it that way for now.
/* NOTE: I don't think EditAtSelectedMarker should snap. They are what they are.
* however, the current editing code -does- snap so I'll draw it that way for now.
*/
if (!selection->markers.empty()) {
MusicSample ms (selection->markers.front()->position(), 0);
snap_to (ms); // should use snap_to_with_modifier?
@ -5865,7 +5863,7 @@ Editor::super_rapid_screen_update ()
if (target <= 0.0) {
target = 0.0;
}
// compare to EditorCursor::set_position()
/* compare to EditorCursor::set_position() */
double const old_pos = sample_to_pixel_unrounded (_leftmost_sample);
double const new_pos = sample_to_pixel_unrounded (target);
if (rint (new_pos) != rint (old_pos)) {

View File

@ -593,8 +593,9 @@ Editor::session_gui_extents ( bool use_extra ) const
samplecnt_t session_extent_start = _session->current_start_sample();
samplecnt_t session_extent_end = _session->current_end_sample();
//calculate the extents of all regions in every playlist
//NOTE: we should listen to playlists, and cache these values so we don't calculate them every time.
/* calculate the extents of all regions in every playlist
* NOTE: we should listen to playlists, and cache these values so we don't calculate them every time.
*/
{
boost::shared_ptr<RouteList> rl = _session->get_routes();
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
@ -615,16 +616,16 @@ Editor::session_gui_extents ( bool use_extra ) const
}
}
//ToDo: also incorporate automation regions (in case the session has no audio/midi but is just used for automating plugins or the like)
/* ToDo: also incorporate automation regions (in case the session has no audio/midi but is just used for automating plugins or the like) */
//add additional time to the ui extents ( user-defined in config )
/* add additional time to the ui extents (user-defined in config) */
if (use_extra) {
samplecnt_t const extra = UIConfiguration::instance().get_extra_ui_extents_time() * 60 * _session->nominal_sample_rate();
session_extent_end += extra;
session_extent_start -= extra;
}
//range-check
/* range-check */
if (session_extent_end > max_samplepos) {
session_extent_end = max_samplepos;
}

View File

@ -282,7 +282,7 @@ Editor::set_mouse_mode (MouseMode m, bool force)
tact->set_active (false);
tact->set_active (true);
//NOTE: this will result in a call to mouse_mode_toggled which does the heavy lifting
/* NOTE: this will result in a call to mouse_mode_toggled which does the heavy lifting */
}
void
@ -932,7 +932,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
break;
case StreamItem:
//in the past, we created a new midi region here, but perhaps that is best left to the Draw mode
/* in the past, we created a new midi region here, but perhaps that is best left to the Draw mode */
break;
case AutomationTrackItem:
@ -977,11 +977,14 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case StartCrossFadeItem:
case EndCrossFadeItem:
/* we might allow user to grab inside the fade to trim a region with preserve_fade_anchor. for not this is not fully implemented */
// if (!clicked_regionview->region()->locked()) {
// _drags->set (new TrimDrag (this, item, clicked_regionview, selection->regions.by_layer(), true), event);
// return true;
// }
/* we might allow user to grab inside the fade to trim a region with preserve_fade_anchor.
* For not this is not fully implemented */
#if 0
if (!clicked_regionview->region()->locked()) {
_drags->set (new TrimDrag (this, item, clicked_regionview, selection->regions.by_layer(), true), event);
return true;
}
#endif
break;
case FeatureLineItem:
@ -1600,7 +1603,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case CdMarkerBarItem:
if (!_dragging_playhead) {
// if we get here then a dragged range wasn't done
/* if we get here then a dragged range wasn't done */
snap_to_with_modifier (where, event, RoundNearest, SnapToAny, true);
mouse_add_new_marker (where.sample, true);
}
@ -1702,7 +1705,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
} else if (Keyboard::modifier_state_equals (event->button.state, Keyboard::ModifierMask (Keyboard::TertiaryModifier|Keyboard::SecondaryModifier))) {
lower_region ();
} else {
// Button2 click is unused
/* Button2 click is unused */
}
return true;
@ -2100,7 +2103,7 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
update_join_object_range_location (event->motion.y);
//snapped_cursor stuff ( the snapped_cursor shows where an operation is going to occur )
/* snapped_cursor stuff (the snapped_cursor shows where an operation is going to occur) */
bool ignored;
MusicSample where (0, 0);
if (mouse_sample (where.sample, ignored)) {
@ -2108,7 +2111,7 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
set_snapped_cursor_position (where.sample);
}
//drags might also change the snapped_cursor location, because we are snapping the thing being dragged, not the actual mouse cursor
/* drags might also change the snapped_cursor location, because we are snapping the thing being dragged, not the actual mouse cursor */
if (_drags->active ()) {
return _drags->motion_handler (event, from_autoscroll);
}
@ -2421,7 +2424,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, samplepos_t pos)
playlist->add_region (new_region, pos);
_session->add_command (new StatefulDiffCommand (playlist));
// playlist is frozen, so we have to update manually XXX this is disgusting
/* playlist is frozen, so we have to update manually XXX this is disgusting */
//playlist->RegionAdded (new_region); /* EMIT SIGNAL */
}
@ -2559,7 +2562,7 @@ Editor::escape ()
} else {
selection->clear ();
//if session is playing a range, cancel that
/* if session is playing a range, cancel that */
if (_session->get_play_range()) {
_session->request_cancel_play_range();
}
@ -2568,7 +2571,6 @@ Editor::escape ()
StripableList sl;
_session->solo_selection (sl, false);
}
}
ARDOUR_UI::instance()->reset_focus (&contents());
@ -2596,9 +2598,10 @@ Editor::update_join_object_range_location (double y)
if (entered_regionview) {
//ToDo: there is currently a bug here(?)
//when we are inside a region fade handle, it acts as though we are in range mode because it is in the top half of the region
//can it be fixed here?
/* TODO: there is currently a bug here(?)
* when we are inside a region fade handle, it acts as though we are in range mode because it is in the top half of the region
* can it be fixed here?
*/
ArdourCanvas::Duple const item_space = entered_regionview->get_canvas_group()->canvas_to_item (ArdourCanvas::Duple (0, y));
double const c = item_space.y / entered_regionview->height();

View File

@ -1557,7 +1557,6 @@ sample_to_clock_parts ( samplepos_t sample,
long* mins_p,
long* secs_p,
long* millisecs_p)
{
samplepos_t left;
long hrs;

View File

@ -248,7 +248,7 @@ EditorSummary::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle
_background_dirty = true;
}
//draw the background (regions, markers, etc ) if they've changed
/* draw the background (regions, markers, etc) if they've changed */
if (!_image || _background_dirty) {
render_background_image ();
_background_dirty = false;
@ -576,7 +576,7 @@ EditorSummary::get_position (double x, double y) const
void
EditorSummary::reset_to_extents()
{
//reset as if the user never went anywhere outside the extents
/* reset as if the user never went anywhere outside the extents */
_leftmost = max_samplepos;
_rightmost = 0;
@ -618,7 +618,10 @@ EditorSummary::summary_zoom_step ( int steps /* positive steps to zoom "out" , n
xn.first -= steps;
xn.second += steps;
//for now, disallow really close zooming-in from the scroomer. ( currently it causes the start-offset to 'walk' because of integer limitations. to fix this, probably need to maintain float throught the get/set_editor() path )
/* for now, disallow really close zooming-in from the scroomer. (Currently it
* causes the start-offset to 'walk' because of integer limitations.
* To fix this, probably need to maintain float throught the get/set_editor() path.)
*/
if (steps<0) {
if ((xn.second - xn.first) < 2)
return;
@ -634,25 +637,25 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
{
if (_move_dragging) {
//To avoid accidental zooming, the mouse must move exactly vertical, not diagonal, to trigger a zoom step
//we use screen coordinates for this, not canvas-based grab_x
/* To avoid accidental zooming, the mouse must move exactly vertical, not diagonal, to trigger a zoom step
* we use screen coordinates for this, not canvas-based grab_x */
double mx = ev->x;
double dx = mx - _last_mx;
double my = ev->y;
double dy = my - _last_my;
//do zooming in windowed "steps" so it feels more reversible ?
/* do zooming in windowed "steps" so it feels more reversible ? */
const int stepsize = 2;
int y_delta = _start_mouse_y - my;
y_delta = y_delta / stepsize;
//do the zoom?
/* do the zoom? */
const float zscale = 3;
if ((dx == 0) && (_last_dx == 0) && (y_delta != _last_y_delta)) {
summary_zoom_step (dy * zscale);
//after the zoom we must re-calculate x-pos grabs
/* after the zoom we must re-calculate x-pos grabs */
pair<double, double> xr;
get_editor (&xr);
_start_editor_x = xr;
@ -661,7 +664,7 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
_last_y_delta = y_delta;
}
//always track horizontal movement, if any
/* always track horizontal movement, if any */
if (dx != 0) {
double x = _start_editor_x.first;
@ -671,8 +674,7 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
x = 0;
}
//zoom-behavior-tweaks
//protect the right edge from expanding beyond the end
/* zoom-behavior-tweaks: protect the right edge from expanding beyond the end */
pair<double, double> xr;
get_editor (&xr);
double w = xr.second - xr.first;
@ -696,8 +698,7 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
xr.first += dx;
} else if (_zoom_trim_position == RIGHT) {
//zoom-behavior-tweaks
//protect the right edge from expanding beyond the edge
/* zoom-behavior-tweaks: protect the right edge from expanding beyond the edge */
if ((xr.second + dx) < get_width()) {
xr.second += dx;
}

View File

@ -1256,7 +1256,6 @@ MixerStrip::guess_main_type(bool for_input, bool favor_connected) const
/*
* Output port labelling
* =====================
*
* Case 1: Each output has one connection, all connections are to system:playback_%i
* out 1 -> system:playback_1
@ -1280,8 +1279,9 @@ MixerStrip::guess_main_type(bool for_input, bool favor_connected) const
* Default case (unusual routing):
* Display as: *number of connections*
*
*
* Tooltips
* ========
*
* .-----------------------------------------------.
* | Mixdown |
* | out 1 -> ardour:master/in 1, jamin:input/in 1 |