NO-OP: whitespace, alignment

This commit is contained in:
Robin Gareus 2019-04-08 21:37:02 +02:00
parent 8f5f0f298b
commit 37aaa2d11b
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
12 changed files with 109 additions and 101 deletions

View file

@ -442,7 +442,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
if (get_smart_mode() && eff_mouse_mode == MouseRange && event->button.button == 3 && item_type == RegionItem) { if (get_smart_mode() && eff_mouse_mode == MouseRange && event->button.button == 3 && item_type == RegionItem) {
/* context clicks are always about object properties, even if /* context clicks are always about object properties, even if
we're in range mode within smart mode. * we're in range mode within smart mode.
*/ */
eff_mouse_mode = MouseObject; eff_mouse_mode = MouseObject;
} }
@ -682,9 +682,9 @@ bool
Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type) Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{ {
/* single mouse clicks on any of these item types operate /* single mouse clicks on any of these item types operate
independent of mouse mode, mostly because they are * independent of mouse mode, mostly because they are
not on the main track canvas or because we want * not on the main track canvas or because we want
them to be modeless. * them to be modeless.
*/ */
NoteBase* note = NULL; NoteBase* note = NULL;
@ -800,10 +800,10 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
if (_join_object_range_state == JOIN_OBJECT_RANGE_OBJECT) { if (_join_object_range_state == JOIN_OBJECT_RANGE_OBJECT) {
/* special case: allow trim of range selections in joined object mode; /* special case: allow trim of range selections in joined object mode;
in theory eff should equal MouseRange in this case, but it doesn't * in theory eff should equal MouseRange in this case, but it doesn't
because entering the range selection canvas item results in entered_regionview * because entering the range selection canvas item results in entered_regionview
being set to 0, so update_join_object_range_location acts as if we aren't * being set to 0, so update_join_object_range_location acts as if we aren't
over a region. * over a region.
*/ */
if (item_type == StartSelectionTrimItem) { if (item_type == StartSelectionTrimItem) {
_drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionStartTrim), event); _drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionStartTrim), event);
@ -847,8 +847,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
/* grab selection for moving */ /* grab selection for moving */
_drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionMove), event); _drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionMove), event);
} else { } else {
/* this was debated, but decided the more common action was to /* this was debated, but decided the more common action was to make a new selection */
make a new selection */
_drags->set (new SelectionDrag (this, item, SelectionDrag::CreateSelection), event); _drags->set (new SelectionDrag (this, item, SelectionDrag::CreateSelection), event);
} }
break; break;
@ -2138,12 +2137,12 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
gint x, y; gint x, y;
/* We call this so that MOTION_NOTIFY events continue to be /* We call this so that MOTION_NOTIFY events continue to be
delivered to the canvas. We need to do this because we set * delivered to the canvas. We need to do this because we set
Gdk::POINTER_MOTION_HINT_MASK on the canvas. This reduces * Gdk::POINTER_MOTION_HINT_MASK on the canvas. This reduces
the density of the events, at the expense of a round-trip * the density of the events, at the expense of a round-trip
to the server. Given that this will mostly occur on cases * to the server. Given that this will mostly occur on cases
where DISPLAY = :0.0, and given the cost of what the motion * 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); _track_canvas->get_pointer (x, y);
@ -2294,7 +2293,7 @@ void
Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event) Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
{ {
/* Either add to or set the set the region selection, unless /* Either add to or set the set the region selection, unless
this is an alignment click (control used) * this is an alignment click (control used)
*/ */
if (Keyboard::modifier_state_contains (event->state, Keyboard::PrimaryModifier)) { if (Keyboard::modifier_state_contains (event->state, Keyboard::PrimaryModifier)) {
@ -2573,17 +2572,17 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
boost::shared_ptr<Region> region (new_regions.front()); boost::shared_ptr<Region> region (new_regions.front());
/* add it to the current stream/playlist. /* add it to the current stream/playlist.
*
tricky: the streamview for the track will add a new regionview. we will * tricky: the streamview for the track will add a new regionview. we will
catch the signal it sends when it creates the regionview to * catch the signal it sends when it creates the regionview to
set the regionview we want to then drag. * set the regionview we want to then drag.
*/ */
latest_regionviews.clear(); latest_regionviews.clear();
sigc::connection c = clicked_routeview->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view)); sigc::connection c = clicked_routeview->view()->RegionViewAdded.connect (sigc::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. * creating the new region and another for moving it.
*/ */
begin_reversible_command (Operations::selection_grab); begin_reversible_command (Operations::selection_grab);
@ -2602,7 +2601,7 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
} }
/* we need to deselect all other regionviews, and select this one /* 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); selection->set (latest_regionviews);

View file

@ -470,7 +470,7 @@ MidiStreamView::setup_rec_box ()
samplepos_t start = 0; samplepos_t start = 0;
if (rec_regions.size() > 0) { if (rec_regions.size() > 0) {
start = rec_regions.back().first->start() start = rec_regions.back().first->start()
+ _trackview.track()->get_captured_samples(rec_regions.size()-1); + _trackview.track()->get_captured_samples (rec_regions.size() - 1);
} }
if (!rec_regions.empty()) { if (!rec_regions.empty()) {
@ -521,7 +521,7 @@ MidiStreamView::setup_rec_box ()
/* start a new rec box */ /* start a new rec box */
create_rec_box(_trackview.midi_track()->current_capture_start(), 0); create_rec_box (_trackview.midi_track()->current_capture_start(), 0);
} else if (rec_active && } else if (rec_active &&
(_trackview.session()->record_status() != Session::Recording || (_trackview.session()->record_status() != Session::Recording ||

View file

@ -43,7 +43,7 @@ using namespace Gtkmm2ext;
PatchChangeDialog::PatchChangeDialog ( PatchChangeDialog::PatchChangeDialog (
const ARDOUR::BeatsSamplesConverter* tc, const ARDOUR::BeatsSamplesConverter* tc,
ARDOUR::Session* session, ARDOUR::Session* session,
Evoral::PatchChange<Temporal::Beats> const & patch, Evoral::PatchChange<Temporal::Beats> const& patch,
ARDOUR::InstrumentInfo& info, ARDOUR::InstrumentInfo& info,
const Gtk::BuiltinStockID& ok, const Gtk::BuiltinStockID& ok,
bool allow_delete, bool allow_delete,

View file

@ -41,11 +41,11 @@ class PatchChangeDialog : public ArdourDialog
{ {
public: public:
PatchChangeDialog ( PatchChangeDialog (
const ARDOUR::BeatsSamplesConverter *, const ARDOUR::BeatsSamplesConverter*,
ARDOUR::Session *, ARDOUR::Session*,
Evoral::PatchChange<Temporal::Beats> const &, Evoral::PatchChange<Temporal::Beats> const&,
ARDOUR::InstrumentInfo&, ARDOUR::InstrumentInfo&,
const Gtk::BuiltinStockID &, const Gtk::BuiltinStockID&,
bool allow_delete = false, bool allow_delete = false,
bool modal = true bool modal = true
); );
@ -71,6 +71,7 @@ private:
const ARDOUR::BeatsSamplesConverter* _time_converter; const ARDOUR::BeatsSamplesConverter* _time_converter;
ARDOUR::InstrumentInfo& _info; ARDOUR::InstrumentInfo& _info;
AudioClock _time; AudioClock _time;
Gtk::SpinButton _channel; Gtk::SpinButton _channel;
Gtk::SpinButton _program; Gtk::SpinButton _program;
Gtk::SpinButton _bank_msb; Gtk::SpinButton _bank_msb;
@ -79,6 +80,7 @@ private:
Gtk::ComboBoxText _patch_combo; Gtk::ComboBoxText _patch_combo;
boost::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank; boost::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank;
bool _ignore_signals; bool _ignore_signals;
bool _keep_open; bool _keep_open;

View file

@ -854,7 +854,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
_region->trim_front (new_bound, sub_num); _region->trim_front (new_bound, sub_num);
if (no_overlap) { if (no_overlap) {
// Get the next region on the left of this region and shrink/expand it. /* Get the next region on the left of this region and shrink/expand it. */
boost::shared_ptr<Playlist> playlist (_region->playlist()); boost::shared_ptr<Playlist> playlist (_region->playlist());
boost::shared_ptr<Region> region_left = playlist->find_next_region (pre_trim_first_sample, End, 0); boost::shared_ptr<Region> region_left = playlist->find_next_region (pre_trim_first_sample, End, 0);
@ -864,7 +864,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
regions_touching = true; regions_touching = true;
} }
// Only trim region on the left if the first sample has gone beyond the left region's last sample. /* Only trim region on the left if the first sample has gone beyond the left region's last sample. */
if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) { if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) {
region_left->trim_end (_region->first_sample() - 1); region_left->trim_end (_region->first_sample() - 1);
} }
@ -872,7 +872,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
region_changed (ARDOUR::bounds_change); region_changed (ARDOUR::bounds_change);
return (pre_trim_first_sample != _region->first_sample()); //return true if we actually changed something return (pre_trim_first_sample != _region->first_sample()); // return true if we actually changed something
} }
bool bool
@ -887,7 +887,7 @@ RegionView::trim_end (samplepos_t new_bound, bool no_overlap, const int32_t sub_
_region->trim_end (new_bound, sub_num); _region->trim_end (new_bound, sub_num);
if (no_overlap) { if (no_overlap) {
// Get the next region on the right of this region and shrink/expand it. /* Get the next region on the right of this region and shrink/expand it. */
boost::shared_ptr<Playlist> playlist (_region->playlist()); boost::shared_ptr<Playlist> playlist (_region->playlist());
boost::shared_ptr<Region> region_right = playlist->find_next_region (pre_trim_last_sample, Start, 1); boost::shared_ptr<Region> region_right = playlist->find_next_region (pre_trim_last_sample, Start, 1);
@ -897,7 +897,7 @@ RegionView::trim_end (samplepos_t new_bound, bool no_overlap, const int32_t sub_
regions_touching = true; regions_touching = true;
} }
// Only trim region on the right if the last sample has gone beyond the right region's first sample. /* Only trim region on the right if the last sample has gone beyond the right region's first sample. */
if (region_right != 0 && (region_right->first_sample() < _region->last_sample() || regions_touching)) { if (region_right != 0 && (region_right->first_sample() < _region->last_sample() || regions_touching)) {
region_right->trim_front (_region->last_sample() + 1, sub_num); region_right->trim_front (_region->last_sample() + 1, sub_num);
} }
@ -908,7 +908,7 @@ RegionView::trim_end (samplepos_t new_bound, bool no_overlap, const int32_t sub_
region_changed (PropertyChange (ARDOUR::Properties::length)); region_changed (PropertyChange (ARDOUR::Properties::length));
} }
return (pre_trim_last_sample != _region->last_sample()); //return true if we actually changed something return (pre_trim_last_sample != _region->last_sample()); // return true if we actually changed something
} }

View file

@ -75,7 +75,7 @@ public:
void move_step_edit_beat_pos (Temporal::Beats beats); void move_step_edit_beat_pos (Temporal::Beats beats);
void set_step_edit_cursor_width (Temporal::Beats beats); void set_step_edit_cursor_width (Temporal::Beats beats);
std::string name() const; std::string name () const;
void start_step_editing (); void start_step_editing ();
void stop_step_editing (); void stop_step_editing ();

View file

@ -49,9 +49,9 @@ public:
protected: protected:
PublicEditor& editor; PublicEditor& editor;
ArdourCanvas::Container* _parent; ArdourCanvas::Container* parent;
ArdourCanvas::Container *group; ArdourCanvas::Container* group;
ArdourCanvas::Points *points; ArdourCanvas::Points* points;
ArdourCanvas::FramedCurve* _curve; ArdourCanvas::FramedCurve* _curve;
double unit_position; double unit_position;
@ -62,15 +62,18 @@ protected:
uint32_t _color; uint32_t _color;
void reposition (); void reposition ();
private: private:
double _min_tempo;
double _max_tempo;
/* disallow copy construction */ /* disallow copy construction */
TempoCurve (TempoCurve const &); TempoCurve (TempoCurve const &);
TempoCurve & operator= (TempoCurve const &);
ARDOUR::TempoSection& _tempo;
ArdourCanvas::Text *_start_text;
ArdourCanvas::Text *_end_text;
TempoCurve & operator= (TempoCurve const &);
double _min_tempo;
double _max_tempo;
ARDOUR::TempoSection& _tempo;
ArdourCanvas::Text* _start_text;
ArdourCanvas::Text* _end_text;
}; };
#endif /* __gtk_ardour_tempo_curve_h__ */ #endif /* __gtk_ardour_tempo_curve_h__ */

View file

@ -90,13 +90,13 @@ class PasteContext;
*/ */
class TimeAxisView : public virtual AxisView class TimeAxisView : public virtual AxisView
{ {
private: private:
enum NamePackingBits { enum NamePackingBits {
NameLabelPacked = 0x1, NameLabelPacked = 0x1,
NameEntryPacked = 0x2 NameEntryPacked = 0x2
}; };
public: public:
TimeAxisView(ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* parent, ArdourCanvas::Canvas& canvas); TimeAxisView(ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* parent, ArdourCanvas::Canvas& canvas);
virtual ~TimeAxisView (); virtual ~TimeAxisView ();
@ -185,7 +185,11 @@ class TimeAxisView : public virtual AxisView
virtual bool paste (ARDOUR::samplepos_t pos, virtual bool paste (ARDOUR::samplepos_t pos,
const Selection& selection, const Selection& selection,
PasteContext& ctx, PasteContext& ctx,
const int32_t sub_num) { return false; } const int32_t sub_num)
{
return false;
}
virtual void set_selected_regionviews (RegionSelection&) {} virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&); virtual void set_selected_points (PointSelection&);
@ -220,7 +224,7 @@ class TimeAxisView : public virtual AxisView
static uint32_t preset_height (Height); static uint32_t preset_height (Height);
protected: protected:
static Glib::RefPtr<Gtk::SizeGroup> controls_meters_size_group; static Glib::RefPtr<Gtk::SizeGroup> controls_meters_size_group;
static Glib::RefPtr<Gtk::SizeGroup> midi_scroomer_size_group; static Glib::RefPtr<Gtk::SizeGroup> midi_scroomer_size_group;
static unsigned int name_width_px; static unsigned int name_width_px;
@ -305,7 +309,7 @@ class TimeAxisView : public virtual AxisView
void build_size_menu (); void build_size_menu ();
private: private:
Gtk::VBox* control_parent; Gtk::VBox* control_parent;
int _order; int _order;
uint32_t _effective_height; uint32_t _effective_height;