13
0

NOOP, remove trailing tabs/whitespace.

This commit is contained in:
Robin Gareus 2015-10-05 16:17:49 +02:00
parent e11ba7b79d
commit 22b07e0233
822 changed files with 6861 additions and 6861 deletions

View File

@ -323,7 +323,7 @@ void
AddRouteDialog::refill_track_modes ()
{
vector<string> s;
s.push_back (_("Normal"));
if (!ARDOUR::Profile->get_sae ()) {
@ -392,7 +392,7 @@ AddRouteDialog::channels ()
ret.set (DataType::MIDI, 1);
break;
}
return ret;
}

View File

@ -64,7 +64,7 @@ class AddRouteDialog : public ArdourDialog
bool name_template_is_default () const;
std::string track_template ();
ARDOUR::PluginInfoPtr requested_instrument ();
ARDOUR::TrackMode mode();
ARDOUR::RouteGroup* route_group ();
enum InsertAt {

View File

@ -627,7 +627,7 @@ ArdourButton::set_colors ()
/* The inactive color for the LED is just a fairly dark version of the
* active color.
*/
ArdourCanvas::HSV inactive (led_active_color);
inactive.v = 0.35;

View File

@ -89,7 +89,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
void set_layout_ellipsize_width (int w);
void set_layout_font (const Pango::FontDescription&);
void set_text_ellipsize (Pango::EllipsizeMode);
sigc::signal<void> signal_led_clicked;
sigc::signal<void> signal_clicked;

View File

@ -63,7 +63,7 @@ ArdourDisplay::~ArdourDisplay ()
bool
ArdourDisplay::on_button_press_event (GdkEventButton*)
{
_menu.popup (1, gtk_get_current_event_time());
_menu.popup (1, gtk_get_current_event_time());
return true;
}
@ -84,12 +84,12 @@ ArdourDisplay::on_scroll_event (GdkEventScroll* ev)
boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
if (c) {
float val = c->get_interface();
if ( ev->direction == GDK_SCROLL_UP )
val += 0.05 * scale; //by default, we step in 1/20ths of the knob travel
else
val -= 0.05 * scale;
c->set_interface(val);
}

View File

@ -138,7 +138,7 @@ ArdourDropdown::AddMenuElem (Menu_Helpers::Element e)
using namespace Menu_Helpers;
MenuList& items = _menu.items ();
items.push_back (e);
}

View File

@ -80,13 +80,13 @@ void
ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
{
cairo_pattern_t* shade_pattern;
float width = get_width();
float height = get_height();
const float scale = min(width, height);
const float pointer_thickness = 3.0 * (scale/80); //(if the knob is 80 pixels wide, we want a 3-pix line on it)
const float start_angle = ((180 - 65) * G_PI) / 180;
const float end_angle = ((360 + 65) * G_PI) / 180;
@ -97,13 +97,13 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
const float value_angle = start_angle + (_val * (end_angle - start_angle));
const float zero_angle = start_angle + (zero * (end_angle - start_angle));
float value_x = cos (value_angle);
float value_y = sin (value_angle);
float xc = 0.5 + width/ 2.0;
float yc = 0.5 + height/ 2.0;
cairo_translate (cr, xc, yc); //after this, everything is based on the center of the knob
//get the knob color from the theme
@ -111,11 +111,11 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
float center_radius = 0.48*scale;
float border_width = 0.8;
bool arc = (_elements & Arc)==Arc;
bool bevel = (_elements & Bevel)==Bevel;
bool flat = _flat_buttons;
if ( arc ) {
center_radius = scale*0.33;
@ -123,7 +123,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
float outer_progress_radius = scale*0.48;
float progress_width = (outer_progress_radius-inner_progress_radius);
float progress_radius = inner_progress_radius + progress_width/2.0;
//dark arc background
cairo_set_source_rgb (cr, 0.3, 0.3, 0.3 );
cairo_set_line_width (cr, progress_width);
@ -185,7 +185,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
cairo_stroke (cr);
#endif
}
if (!flat) {
//knob shadow
cairo_save(cr);
@ -199,8 +199,8 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
ArdourCanvas::set_source_rgba(cr, knob_color);
cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
cairo_fill (cr);
//gradient
//gradient
if (bevel) {
//knob gradient
shade_pattern = cairo_pattern_create_linear (0.0, -yc, 0.0, yc); //note we have to offset the gradient from our centerpoint
@ -217,7 +217,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
ArdourCanvas::set_source_rgb_a (cr, knob_color, 0.5 );
cairo_arc (cr, 0, 0, center_radius-pointer_thickness, 0, 2.0*G_PI);
cairo_fill (cr);
} else {
} else {
//radial gradient
shade_pattern = cairo_pattern_create_radial ( -center_radius, -center_radius, 1, -center_radius, -center_radius, center_radius*2.5 ); //note we have to offset the gradient from our centerpoint
cairo_pattern_add_color_stop_rgba (shade_pattern, 0.0, 1,1,1, 0.2);
@ -227,21 +227,21 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
cairo_fill (cr);
cairo_pattern_destroy (shade_pattern);
}
} else {
//inner circle
ArdourCanvas::set_source_rgba(cr, knob_color);
cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
cairo_fill (cr);
}
//black knob border
cairo_set_line_width (cr, border_width);
cairo_set_source_rgba (cr, 0,0,0, 1 );
cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
cairo_stroke (cr);
//line shadow
if (!flat) {
cairo_save(cr);
@ -254,7 +254,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
cairo_stroke (cr);
cairo_restore(cr);
}
//line
cairo_set_source_rgba (cr, 1,1,1, 1 );
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
@ -269,8 +269,8 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
cairo_fill (cr);
}
cairo_identity_matrix(cr);
cairo_identity_matrix(cr);
}
void
@ -305,11 +305,11 @@ ArdourKnob::on_scroll_event (GdkEventScroll* ev)
boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
if (c) {
float val = c->get_interface();
if ( ev->direction == GDK_SCROLL_UP )
val += scale;
else
val -= scale;
val -= scale;
c->set_interface(val);
}
@ -408,7 +408,7 @@ ArdourKnob::on_button_press_event (GdkEventButton *ev)
if (ev->button != 1 && ev->button != 2) {
return false;
}
set_active_state (Gtkmm2ext::ExplicitActive);
_tooltip.start_drag();
add_modal_grab();
@ -506,14 +506,14 @@ ArdourKnob::set_active_state (Gtkmm2ext::ActiveState s)
if (_active_state != s)
CairoWidget::set_active_state (s);
}
void
ArdourKnob::set_visual_state (Gtkmm2ext::VisualState s)
{
if (_visual_state != s)
CairoWidget::set_visual_state (s);
}
bool
ArdourKnob::on_focus_in_event (GdkEventFocus* ev)

View File

@ -113,7 +113,7 @@ public:
float _val; // current value [0..1]
float _normal; // default value, arc
float _dead_zone_delta;
Flags _flags;
void action_sensitivity_changed ();

View File

@ -305,7 +305,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
xmlSetGenericErrorFunc (this, libxml_generic_error_func);
xmlSetStructuredErrorFunc (this, libxml_structured_error_func);
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
UIConfiguration::instance().map_parameters (pc);
@ -441,7 +441,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
/* Trigger setting up the color scheme and loading the GTK RC file */
UIConfiguration::instance().load_rc_file (false);
_process_thread = new ProcessThread ();
_process_thread->init ();

View File

@ -180,7 +180,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
ARDOUR::Session* the_session() { return _session; }
bool get_smart_mode () const;
int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
int build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
bool ask_about_loading_existing_session (const std::string& session_path);
@ -193,7 +193,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void save_state (const std::string & state_name = "", bool switch_to_it = false);
static ARDOUR_UI *instance () { return theArdourUI; }
PublicEditor& the_editor() { return *editor;}
Mixer_UI* the_mixer() { return mixer; }
@ -227,7 +227,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void create_xrun_marker (framepos_t);
GUIObjectState* gui_object_state;
MainClock* primary_clock;
MainClock* secondary_clock;
void focus_on_clock ();
@ -486,13 +486,13 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void audition_blink (bool);
void feedback_blink (bool);
void error_blink (bool);
void set_flat_buttons();
void soloing_changed (bool);
void auditioning_changed (bool);
void _auditioning_changed (bool);
bool solo_alert_press (GdkEventButton* ev);
bool audition_alert_press (GdkEventButton* ev);
bool feedback_alert_press (GdkEventButton *);
@ -543,7 +543,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
Gtk::Label format_label;
void update_format ();
void every_second ();
void every_point_one_seconds ();
void every_point_zero_something_seconds ();

View File

@ -412,7 +412,7 @@ ARDOUR_UI::setup_transport ()
shuttle_box = manage (new ShuttleControl);
shuttle_box->show ();
VBox* transport_vbox = manage (new VBox);
transport_vbox->set_name ("TransportBase");
transport_vbox->set_border_width (0);
@ -734,4 +734,4 @@ ARDOUR_UI::toggle_follow_edits ()
UIConfiguration::instance().set_follow_edits (tact->get_active ());
}

View File

@ -348,7 +348,7 @@ ARDOUR_UI::goto_mixer_window ()
{
Glib::RefPtr<Gdk::Window> win;
Glib::RefPtr<Gdk::Screen> screen;
if (editor) {
win = editor->get_window ();
}
@ -358,7 +358,7 @@ ARDOUR_UI::goto_mixer_window ()
} else {
screen = Gdk::Screen::get_default();
}
if (g_getenv ("ARDOUR_LOVES_STUPID_TINY_SCREENS") == 0 && screen && screen->get_height() < 700) {
Gtk::MessageDialog msg (_("This screen is not tall enough to display the mixer window"));
msg.run ();

View File

@ -137,7 +137,7 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
act = ActionManager::register_action (main_actions, X_("OpenVideo"), _("Open Video"),
sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
ActionManager::session_sensitive_actions.push_back (act);

View File

@ -126,7 +126,7 @@ ArdourWindow::init ()
if (parent) {
set_transient_for (*parent);
}
ARDOUR_UI::CloseAllDialogs.connect (sigc::mem_fun (*this, &ArdourWindow::hide));
proxy = new WM::ProxyTemporary (get_title(), this);

View File

@ -151,7 +151,7 @@ AudioClock::on_realize ()
Gtk::Requisition req;
CairoWidget::on_realize ();
set_clock_dimensions (req);
first_width = req.width;
@ -318,7 +318,7 @@ AudioClock::render (cairo_t* cr, cairo_rectangle_t*)
cairo_save (cr);
cairo_scale (cr, xscale, yscale);
}
pango_cairo_show_layout (cr, _layout->gobj());
if (xscale != 1.0 || yscale != 1.0) {
@ -507,15 +507,15 @@ AudioClock::on_size_request (Gtk::Requisition* req)
Glib::RefPtr<Gtk::Style> style = get_style ();
Pango::FontDescription font;
int w;
tmp = Pango::Layout::create (get_pango_context());
if (!is_realized()) {
font = get_font_for_style (get_name());
} else {
font = style->get_font();
}
tmp->set_font_description (font);
font.set_size (INFO_FONT_SIZE);
@ -561,17 +561,17 @@ AudioClock::start_edit (Field f)
edit_string.clear ();
_layout->set_text ("");
}
input_string.clear ();
editing = true;
edit_is_negative = false;
if (f) {
input_string = get_field (f);
show_edit_status (merge_input_and_edit_string ());
_layout->set_text (edit_string);
}
queue_draw ();
Keyboard::magic_widget_grab_focus ();

View File

@ -87,7 +87,7 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
* to font distortion.
*/
void set_scale (double x, double y);
static void print_minsec (framepos_t, char* buf, size_t bufsize, float frame_rate);
sigc::signal<void> ValueChanged;
@ -242,7 +242,7 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
ARDOUR::framecnt_t parse_as_minsec_distance (const std::string&);
ARDOUR::framecnt_t parse_as_bbt_distance (const std::string&);
ARDOUR::framecnt_t parse_as_frames_distance (const std::string&);
void set_font (Pango::FontDescription);
void set_colors ();
void show_edit_status (int length);

View File

@ -235,7 +235,7 @@ AudioRegionView::init (bool wfd)
if (!Profile->get_sae()) {
gain_line.reset (new AudioRegionGainLine (line_name, *this, *group, audio_region()->envelope()));
}
update_envelope_visibility ();
gain_line->reset ();
@ -375,7 +375,7 @@ AudioRegionView::fade_out_active_changed ()
if (end_xfade_rect) {
if (audio_region()->fade_out_active()) {
end_xfade_rect->set_fill (false);
} else {
} else {
end_xfade_rect->set_fill_color (UIConfiguration::instance().color_mod ("inactive crossfade", "inactive crossfade"));
end_xfade_rect->set_fill (true);
}
@ -420,7 +420,7 @@ AudioRegionView::region_resized (const PropertyChange& what_changed)
interesting_stuff.add (ARDOUR::Properties::length);
if (what_changed.contains (interesting_stuff)) {
for (uint32_t n = 0; n < waves.size(); ++n) {
waves[n]->region_resized ();
}
@ -531,17 +531,17 @@ AudioRegionView::set_height (gdouble height)
if (wcnt > 0) {
gdouble ht;
if (!UIConfiguration::instance().get_show_name_highlight() || (height < NAME_HIGHLIGHT_THRESH)) {
ht = height / (double) wcnt;
} else {
ht = (height - NAME_HIGHLIGHT_SIZE) / (double) wcnt;
}
for (uint32_t n = 0; n < wcnt; ++n) {
gdouble yoff = floor (ht * n);
waves[n]->set_height (ht);
waves[n]->set_y_position (yoff);
}
@ -635,7 +635,7 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f
hide_start_xfade ();
return;
}
double effective_height;
if (_height >= NAME_HIGHLIGHT_THRESH) {
@ -689,7 +689,7 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
double const pwidth = floor(trackview.editor().sample_to_pixel (width));
/* the right edge should be right on the region frame is the pixel
* width is zero. Hence the additional + 1.0 at the end.
*/
@ -731,7 +731,7 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
}
/* points *MUST* be in anti-clockwise order */
Points points;
Points::size_type pi;
boost::shared_ptr<const Evoral::ControlList> list (audio_region()->fade_out());
@ -739,7 +739,7 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
double length = list->length();
points.assign (list->size(), Duple());
for (x = list->begin(), pi = 0; x != list->end(); ++x, ++pi) {
points[pi].x = _pixel_width - pwidth + (pwidth * ((*x)->when/length));
points[pi].y = effective_height - ((*x)->value * (effective_height - 1.));
@ -839,7 +839,7 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, frame
npoints = inverse->size();
ipoints.assign (npoints, Duple());
Evoral::ControlList::const_iterator x;
Points::size_type pi;
double length = inverse->length();
@ -866,7 +866,7 @@ AudioRegionView::redraw_end_xfade ()
}
show_end_xfade();
reset_fade_out_shape_width (ar, ar->fade_out()->back()->when);
}
@ -930,9 +930,9 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn
npoints = inverse->size();
ipoints.assign (npoints, Duple());
const double rend = trackview.editor().sample_to_pixel (_region->length() - width);
Evoral::ControlList::const_iterator x;
Points::size_type pi;
double length = inverse->length();
@ -1218,12 +1218,12 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
/* first waveview starts at 1.0, not 0.0 since that will overlap the
* frame
*/
gdouble yoff = which * ht;
WaveView *wave = new WaveView (group, audio_region ());
CANVAS_DEBUG_NAME (wave, string_compose ("wave view for chn %1 of %2", which, get_item_name()));
wave->set_channel (which);
wave->set_y_position (yoff);
wave->set_height (ht);
@ -1231,9 +1231,9 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
wave->set_show_zero_line (true);
wave->set_clip_level (UIConfiguration::instance().get_waveform_clip_level ());
wave->set_start_shift (1.0);
wave->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_wave_view_event), wave, this));
switch (UIConfiguration::instance().get_waveform_shape()) {
case Rectified:
wave->set_shape (WaveView::Rectified);
@ -1241,7 +1241,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
default:
wave->set_shape (WaveView::Normal);
}
wave->set_logscaled (UIConfiguration::instance().get_waveform_scale() == Logarithmic);
vector<ArdourCanvas::WaveView*> v;
@ -1523,7 +1523,7 @@ AudioRegionView::set_some_waveform_colors (vector<ArdourCanvas::WaveView*>& wave
} else {
if (_region->muted()) {
/* hide outline with zero alpha */
outline = UINT_RGBA_CHANGE_A(UIConfiguration::instance().color ("waveform outline"), 0);
outline = UINT_RGBA_CHANGE_A(UIConfiguration::instance().color ("waveform outline"), 0);
fill = UINT_RGBA_CHANGE_A(UIConfiguration::instance().color ("waveform fill"), MUTED_ALPHA);
} else {
outline = UIConfiguration::instance().color ("waveform outline");

View File

@ -122,7 +122,7 @@ class AudioRegionView : public RegionView
void redraw_end_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double, double);
void redraw_start_xfade ();
void redraw_end_xfade ();
void hide_xfades ();
void hide_start_xfade ();
void hide_end_xfade ();

View File

@ -432,7 +432,7 @@ AudioStreamView::hide_xfades_with (boost::shared_ptr<AudioRegion> ar)
{
list<AudioRegionView*> start_hidden;
list<AudioRegionView*> end_hidden;
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
if (arv) {

View File

@ -183,14 +183,14 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
AutomationTracks::iterator existing = _automation_tracks.find (param);
if (existing != _automation_tracks.end()) {
/* automation track created because we had existing data for
* the processor, but visibility may need to be controlled
* since it will have been set visible by default.
*/
existing->second->set_marked_for_display (show);
if (!no_redraw) {
request_redraw ();
}
@ -219,7 +219,7 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
} else if (param.type() == MuteAutomation) {
create_mute_automation_child (param, show);
} else {
error << "AudioTimeAxisView: unknown automation child " << EventTypeMap::instance().to_symbol(param) << endmsg;

View File

@ -94,7 +94,7 @@ AutomationLine::AutomationLine (const string& name,
} else {
_our_time_converter = true;
}
_visible = Line;
update_pending = false;
@ -203,7 +203,7 @@ AutomationLine::hide ()
/* leave control points setting unchanged, we are just hiding the
overall line
*/
set_visibility (AutomationLine::VisibleAspects (_visible & ~Line));
}
@ -582,10 +582,10 @@ AutomationLine::ContiguousControlPoints::clamp_dx (double dx)
/* get the maximum distance we can move any of these points along the x-axis
*/
double tx; /* possible position a point would move to, given dx */
ControlPoint* cp;
if (dx > 0) {
/* check the last point, since we're moving later in time */
cp = back();
@ -649,15 +649,15 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
no motion ever took place, but need to do before we handle
motion.
*/
/* partition the points we are dragging into (potentially several)
* set(s) of contiguous points. this will not happen with a normal
* drag, but if the user does a discontiguous selection, it can.
*/
uint32_t expected_view_index = 0;
CCP contig;
for (list<ControlPoint*>::iterator i = _drag_points.begin(); i != _drag_points.end(); ++i) {
if (i == _drag_points.begin() || (*i)->view_index() != expected_view_index) {
contig.reset (new ContiguousControlPoints (*this));
@ -675,7 +675,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
(*ccp)->compute_x_bounds (trackview.editor());
}
_drag_had_movement = true;
}
}
/* OK, now on to the stuff related to *this* motion event. First, for
* each contiguous range, figure out the maximum x-axis motion we are
@ -695,7 +695,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
}
/* clamp y */
for (list<ControlPoint*>::iterator i = _drag_points.begin(); i != _drag_points.end(); ++i) {
double const y = ((_height - (*i)->get_y()) / _height) + dy;
if (y < 0) {
@ -709,7 +709,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
if (dx || dy) {
/* and now move each section */
for (vector<CCP>::iterator ccp = contiguous_points.begin(); ccp != contiguous_points.end(); ++ccp) {
(*ccp)->move (dx, dy);
}
@ -731,7 +731,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
line->set_steps (line_points, is_stepped());
}
}
_drag_distance += dx;
_drag_x += dx;
_last_drag_fraction = fraction;
@ -884,7 +884,7 @@ AutomationLine::remove_point (ControlPoint& cp)
XMLNode &before = alist->get_state();
alist->erase (cp.model());
trackview.editor().session()->add_command(
new MementoCommand<AutomationList> (memento_command_binder (), &before, &alist->get_state()));
@ -912,7 +912,7 @@ AutomationLine::get_selectables (framepos_t start, framepos_t end, double botfra
/* model_when is relative to the start of the source, so we just need to add on the origin_b here
(as it is the session frame position of the start of the source)
*/
framepos_t const session_frames_when = _time_converter->to (model_when) + _time_converter->origin_b ();
if (session_frames_when >= start && session_frames_when <= end && (*i)->get_y() >= bot_track && (*i)->get_y() <= top_track) {
@ -993,7 +993,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
np = events.size();
Evoral::ControlList& e = const_cast<Evoral::ControlList&> (events);
for (AutomationList::iterator ai = e.begin(); ai != e.end(); ++ai, ++pi) {
double tx = (*ai)->when;
@ -1008,17 +1008,17 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
_name) << endmsg;
continue;
}
if (tx >= max_framepos || tx < 0 || tx >= _maximum_time) {
continue;
}
/* convert x-coordinate to a canvas unit coordinate (this takes
* zoom and scroll into account).
*/
tx = trackview.editor().sample_to_pixel_unrounded (tx);
/* convert from canonical view height (0..1.0) to actual
* height coordinates (using X11's top-left rooted system)
*/

View File

@ -60,7 +60,7 @@ public:
ControlPoints = 0x2,
SelectedControlPoints = 0x4
};
AutomationLine (const std::string& name,
TimeAxisView& tv,
ArdourCanvas::Item& parent,

View File

@ -110,7 +110,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
}
tipname += nom;
_name = tipname;
CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name()));
CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, r->name()));
CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, r->name()));
@ -178,7 +178,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
if (name_label.get_parent()) {
name_label.get_parent()->remove (name_label);
}
name_label.set_text (_name);
name_label.set_alignment (Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
name_label.set_name (X_("TrackParameterName"));
@ -618,7 +618,7 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when,
}
boost::shared_ptr<AutomationList> list = _line->the_list ();
if (list->in_write_pass()) {
/* do not allow the GUI to add automation events during an
automation write pass.
@ -781,11 +781,11 @@ AutomationTimeAxisView::add_line (boost::shared_ptr<AutomationLine> line)
{
if (_control && line) {
assert(line->the_list() == _control->list());
_control->alist()->automation_state_changed.connect (
_list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::automation_state_changed, this), gui_context()
);
_control->alist()->InterpolationChanged.connect (
_list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::interpolation_changed, this, _1), gui_context()
);
@ -860,15 +860,15 @@ AutomationTimeAxisView::what_has_visible_automation (const boost::shared_ptr<Aut
assert (automatable);
Automatable::Controls& controls (automatable->controls());
for (Automatable::Controls::iterator i = controls.begin(); i != controls.end(); ++i) {
boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> (i->second);
if (ac && ac->alist()) {
const XMLNode* gui_node = ac->extra_xml ("GUI");
if (gui_node) {
const XMLProperty* prop = gui_node->property ("shown");
if (prop) {

View File

@ -54,7 +54,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
virtual std::string name() const = 0;
sigc::signal<void> Hiding;
void set_old_order_key (uint32_t ok) { _old_order_key = ok; }
uint32_t old_order_key() const { return _old_order_key; }
@ -62,7 +62,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
/* for now, we always return properties in string form.
*/
std::string gui_property (const std::string& property_name) const;
template<typename T> void set_gui_property (const std::string& property_name, const T& value) {
std::stringstream s;
s << value;
@ -82,7 +82,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
static GUIObjectState& gui_object_state();
void clear_property_cache() { property_hashtable.clear(); }
protected:
AxisView (ARDOUR::Session* sess);

View File

@ -28,11 +28,11 @@ class BigClockWindow : public ArdourWindow
{
public:
BigClockWindow (AudioClock&);
private:
AudioClock& clock;
Gtk::Requisition default_size;
void clock_size_reallocated (Gtk::Allocation&);
void on_realize ();
void on_unmap ();

View File

@ -79,7 +79,7 @@ fixup_bundle_environment (int, char* [], string & localedir)
localedir = "/this/cannot/exist";
} else {
/* force localedir into the bundle */
vector<string> lpath;
lpath.push_back (bundle_dir);
lpath.push_back ("Resources");
@ -87,7 +87,7 @@ fixup_bundle_environment (int, char* [], string & localedir)
localedir = Glib::build_filename (lpath).c_str();
}
#endif
export_search_path (bundle_dir, "ARDOUR_DLL_PATH", "/lib");
/* inside an OS X .app bundle, there is no difference

View File

@ -86,7 +86,7 @@ std::string ret;
if (0 == pExeRoot) {
pExeRoot = g_build_filename("C:\\", "Program Files", PROGRAM_NAME, 0);
}
if (pExeRoot) {
gchar tmp[PATH_MAX+1];
gchar* p;
@ -232,7 +232,7 @@ string fonts_conf_file;
#ifdef DEBUG
fonts_conf_file = get_module_folder();
if (!fonts_conf_file.empty()) {
fonts_conf_file += "\\";
fonts_conf_file += PROGRAM_NAME;
@ -257,7 +257,7 @@ string pango_modules_file;
#if defined(DEBUG) || defined(RDC_BUILD)
// Make sure we pick up the debuggable DLLs !!!
pango_modules_file = get_module_folder();
if (!pango_modules_file.empty()) {
pango_modules_file += "\\";
pango_modules_file += PROGRAM_NAME;
@ -295,7 +295,7 @@ string gdk_pixbuf_loaders_file;
#if defined(DEBUG) || defined(RDC_BUILD)
// Make sure we pick up the debuggable DLLs !!!
gdk_pixbuf_loaders_file = get_module_folder();
if (!gdk_pixbuf_loaders_file.empty()) {
gdk_pixbuf_loaders_file += "\\";
gdk_pixbuf_loaders_file += PROGRAM_NAME;
@ -321,7 +321,7 @@ string clearlooks_la_file;
#if defined(DEBUG) || defined(RDC_BUILD)
// Make sure we pick up the debuggable DLLs !!!
clearlooks_la_file = get_module_folder();
if (!clearlooks_la_file.empty()) {
clearlooks_la_file += "\\";
clearlooks_la_file += PROGRAM_NAME;

View File

@ -78,7 +78,7 @@ ButtonJoiner::ButtonJoiner (const std::string& str, Gtk::Widget& lw, Gtk::Widget
border_color = UIConfiguration::instance().color (string_compose ("%1: border end", name));
UINT_TO_RGBA (border_color, &r, &g, &b, &a);
border_r = r/255.0;
border_g = g/255.0;
border_b = b/255.0;
@ -104,7 +104,7 @@ void
ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
{
double h = get_height();
if (!get_active()) {
cairo_set_source (cr, inactive_fill_pattern);
} else {
@ -113,25 +113,25 @@ ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
if (!central_link) {
/* outer rect */
Gtkmm2ext::rounded_top_rectangle (cr, 0, 0, get_width(), h, 8);
cairo_fill_preserve (cr);
/* outer edge */
cairo_set_line_width (cr, 1.5);
cairo_set_source_rgb (cr, border_r, border_g, border_b);
cairo_stroke (cr);
/* inner "edge" */
Gtkmm2ext::rounded_top_rectangle (cr, 8, 8, get_width() - 16, h - 8, 6);
cairo_stroke (cr);
} else {
if (get_active()) {
Gtkmm2ext::rounded_top_rectangle (cr, 0, 0, (get_width() - 20.0)/2.0 , h, 8);
cairo_fill_preserve (cr);
Gtkmm2ext::rounded_top_rectangle (cr, (get_width() - 20.)/2.0 + 20.0, 0.0,
(get_width() - 20.0)/2.0 , h, 8);
cairo_fill_preserve (cr);
@ -146,7 +146,7 @@ ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
cairo_set_line_width (cr, 1.5);
cairo_fill_preserve (cr);
cairo_set_source_rgb (cr, border_r, border_g, border_b);
cairo_stroke (cr);
cairo_stroke (cr);
}
}
}
@ -203,7 +203,7 @@ ButtonJoiner::action_sensitivity_changed ()
} else {
set_visual_state (Gtkmm2ext::VisualState (visual_state() | Gtkmm2ext::Insensitive));
}
}
void
@ -231,7 +231,7 @@ ButtonJoiner::action_toggled ()
if (tact) {
set_active (tact->get_active());
}
}
}
void
ButtonJoiner::set_active_state (Gtkmm2ext::ActiveState s)

View File

@ -32,7 +32,7 @@ class ButtonJoiner : public CairoWidget, public Gtkmm2ext::Activatable {
ButtonJoiner (const std::string&, Gtk::Widget&, Gtk::Widget&, bool central_link = false);
~ButtonJoiner ();
void set_related_action (Glib::RefPtr<Gtk::Action>);
void set_related_action (Glib::RefPtr<Gtk::Action>);
void set_active_state (Gtkmm2ext::ActiveState);
protected:

View File

@ -1361,7 +1361,7 @@ gnome_canvas_waveview_gradient_render (GnomeCanvasItem *item,
} else {
PAINT_VERTA_GR(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax, fill_max, wave_middle, wave_top);
}
}
if((prev_pymin > pymin && next_pymin > pymin) ||
@ -1559,7 +1559,7 @@ gnome_canvas_waveview_gradient_render (GnomeCanvasItem *item,
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a >> 1, x - 1, pymax, pymax + (clip_length - 1));
}
if (clip_min) {
if (clip_min) {
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a , x, pymin - clip_length, pymin);
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a >> 1, x + 1, pymin - (clip_length - 1), pymin);
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a >> 1, x - 1, pymin - (clip_length - 1), pymin);

View File

@ -80,7 +80,7 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force
ControlPoint::~ControlPoint ()
{
CatchDeletion (this); /* EMIT SIGNAL */
delete _item;
}

View File

@ -81,7 +81,7 @@ class ControlPoint : public Selectable
AutomationLine& line() const { return _line; }
static PBD::Signal1<void, ControlPoint *> CatchDeletion;
private:
ArdourCanvas::Rectangle* _item;
AutomationLine& _line;

View File

@ -112,13 +112,13 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set<NoteBase*> n)
_velocity_all.set_sensitive (false);
_time_all.set_sensitive (false);
_length_all.set_sensitive (false);
int test_channel = (*_events.begin())->note()->channel ();
int test_pitch = (*_events.begin())->note()->note ();
int test_velocity = (*_events.begin())->note()->velocity ();
Evoral::Beats test_time = (*_events.begin())->note()->time ();
Evoral::Beats test_length = (*_events.begin())->note()->length ();
for (set<NoteBase*>::iterator i = _events.begin(); i != _events.end(); ++i) {
if ((*i)->note()->channel() != test_channel) {
_channel_all.set_sensitive (true);
@ -140,7 +140,7 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set<NoteBase*> n)
_length_all.set_sensitive (true);
}
}
get_vbox()->pack_start (*table);
add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);

View File

@ -235,7 +235,7 @@ pane_size_watcher (Paned* pane)
X: hard to access
Quartz: impossible to access
so stop that by preventing it from ever getting too narrow. 35
pixels is basically a rough guess at the tab width.
@ -313,7 +313,7 @@ Editor::Editor ()
PublicEditor::_instance = this;
_have_idled = false;
selection = new Selection (this);
cut_buffer = new Selection (this);
_selection_memento = new SelectionMemento ();
@ -742,7 +742,7 @@ Editor::Editor ()
signal_delete_event().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::exit_on_main_window_close));
Gtkmm2ext::Keyboard::the_keyboard().ZoomVerticalModifierReleased.connect (sigc::mem_fun (*this, &Editor::zoom_vertical_modifier_released));
/* allow external control surfaces/protocols to do various things */
ControlProtocol::ZoomToSession.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_session, this), gui_context());
@ -1019,7 +1019,7 @@ Editor::control_select (uint32_t rid, Selection::Operation op)
/* handles the (static) signal from the ControlProtocol class that
* requests setting the selected track to a given RID
*/
if (!_session) {
return;
}
@ -1464,18 +1464,18 @@ Editor::fill_xfade_menu (Menu_Helpers::MenuList& items, bool start)
sigc::bind (sigc::mem_fun (*this, emf), FadeLinear)
)
);
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Constant power"),
*(*images)[FadeConstantPower],
sigc::bind (sigc::mem_fun (*this, emf), FadeConstantPower)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Symmetric"),
@ -1483,25 +1483,25 @@ Editor::fill_xfade_menu (Menu_Helpers::MenuList& items, bool start)
sigc::bind (sigc::mem_fun (*this, emf), FadeSymmetric)
)
);
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Slow"),
*(*images)[FadeSlow],
sigc::bind (sigc::mem_fun (*this, emf), FadeSlow)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
items.push_back (
ImageMenuElem (
_("Fast"),
*(*images)[FadeFast],
sigc::bind (sigc::mem_fun (*this, emf), FadeFast)
));
dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
}
@ -2101,7 +2101,7 @@ Editor::set_snap_to (SnapType st)
case SnapToBeatDiv2: {
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_samples(),
current_bbt_points_begin, current_bbt_points_end);
compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + current_page_samples(),
@ -2587,9 +2587,9 @@ Editor::trackview_by_y_position (double y, bool trackview_relative_offset) const
}
for (TrackViewList::const_iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
std::pair<TimeAxisView*, double> const r = (*iter)->covers_y_position (y);
if (r.first) {
return r;
}
@ -2948,7 +2948,7 @@ Editor::setup_toolbar ()
if (!ARDOUR::Profile->get_mixbus()) {
mouse_mode_hbox->pack_start (mouse_cut_button, false, false);
}
if (!ARDOUR::Profile->get_trx()) {
mouse_mode_hbox->pack_start (mouse_timefx_button, false, false);
mouse_mode_hbox->pack_start (mouse_audition_button, false, false);
@ -3059,7 +3059,7 @@ Editor::setup_toolbar ()
if (!ARDOUR::Profile->get_trx()) {
_zoom_tearoff = manage (new TearOff (_zoom_box));
_zoom_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&_zoom_tearoff->tearoff_window()));
_zoom_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
@ -3169,7 +3169,7 @@ void
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)));
@ -3400,11 +3400,11 @@ Editor::commit_reversible_selection_op ()
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();
list<XMLNode *>::iterator e_it = it;
advance (e_it, selection_op_history_it);
for ( ; it != e_it; ++it) {
delete *it;
}
@ -3764,7 +3764,7 @@ Editor::set_zoom_preset (int64_t ms)
temporal_zoom_session();
return;
}
ARDOUR::framecnt_t const sample_rate = ARDOUR::AudioEngine::instance()->sample_rate();
temporal_zoom( (sample_rate * ms / 1000) / _visible_canvas_width );
}
@ -3779,7 +3779,7 @@ Editor::set_visible_track_count (int32_t n)
allocation happens, we will get called again and then we can do the
real work.
*/
if (_visible_canvas_height <= 1) {
return;
}
@ -3787,7 +3787,7 @@ Editor::set_visible_track_count (int32_t n)
int h;
string str;
DisplaySuspender ds;
if (_visible_track_count > 0) {
h = trackviews_height() / _visible_track_count;
std::ostringstream s;
@ -3813,7 +3813,7 @@ Editor::set_visible_track_count (int32_t n)
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
(*i)->set_height (h, TimeAxisView::HeightPerLane);
}
if (str != visible_tracks_selector.get_text()) {
visible_tracks_selector.set_text (str);
}
@ -3995,7 +3995,7 @@ Editor::set_show_measures (bool yn)
ARDOUR::TempoMap::BBTPointList::const_iterator begin;
ARDOUR::TempoMap::BBTPointList::const_iterator end;
compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_samples(), begin, end);
draw_measures (begin, end);
}
@ -4329,7 +4329,7 @@ Editor::copy_playlists (TimeAxisView* v)
void
Editor::clear_playlists (TimeAxisView* v)
{
begin_reversible_command (_("clear playlists"));
begin_reversible_command (_("clear playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists->get (playlists);
mapover_tracks (sigc::mem_fun (*this, &Editor::mapped_clear_playlist), v, ARDOUR::Properties::select.property_id);
@ -4434,7 +4434,7 @@ Editor::current_visual_state (bool with_tracks)
vs->leftmost_frame = leftmost_frame;
vs->zoom_focus = zoom_focus;
if (with_tracks) {
if (with_tracks) {
*vs->gui_state = *ARDOUR_UI::instance()->gui_object_state;
}
@ -4498,11 +4498,11 @@ Editor::use_visual_state (VisualState& vs)
set_zoom_focus (vs.zoom_focus);
reposition_and_zoom (vs.leftmost_frame, vs.samples_per_pixel);
if (vs.gui_state) {
*ARDOUR_UI::instance()->gui_object_state = *vs.gui_state;
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
(*i)->clear_property_cache();
(*i)->reset_visual_state ();
}
@ -4612,7 +4612,7 @@ Editor::idle_visual_changer ()
pending_visual_change.idle_handler_id = -1;
pending_visual_change.being_handled = true;
VisualChange vc = pending_visual_change;
pending_visual_change.pending = (VisualChange::Type) 0;
@ -4636,7 +4636,7 @@ Editor::visual_changer (const VisualChange& vc)
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
compute_current_bbt_points (vc.time_origin, pending_visual_change.time_origin + current_page_samples(),
current_bbt_points_begin, current_bbt_points_end);
compute_bbt_ruler_scale (vc.time_origin, pending_visual_change.time_origin + current_page_samples(),
@ -4978,17 +4978,17 @@ Editor::get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) cons
{
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
RouteTimeAxisView* rtav;
if ((rtav = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
boost::shared_ptr<Playlist> pl;
std::vector<boost::shared_ptr<Region> > results;
boost::shared_ptr<Track> tr;
if ((tr = rtav->track()) == 0) {
/* bus */
continue;
}
if ((pl = (tr->playlist())) != 0) {
boost::shared_ptr<Region> r = pl->region_by_id (id);
if (r) {
@ -5014,7 +5014,7 @@ Editor::get_per_region_note_selection (list<pair<PBD::ID, set<boost::shared_ptr<
mtav->get_per_region_note_selection (selection);
}
}
}
void
@ -5070,7 +5070,7 @@ void
Editor::first_idle ()
{
MessageDialog* dialog = 0;
if (track_views.size() > 1) {
dialog = new MessageDialog (
*this,
@ -5606,7 +5606,7 @@ Editor::reset_x_origin_to_follow_playhead ()
} else {
framepos_t l = 0;
if (frame < leftmost_frame) {
/* moving left */
if (_session->transport_rolling()) {
@ -5630,7 +5630,7 @@ Editor::reset_x_origin_to_follow_playhead ()
if (l < 0) {
l = 0;
}
center_screen_internal (l + (current_page_samples() / 2), current_page_samples ());
}
}
@ -5775,7 +5775,7 @@ Editor::session_going_away ()
clear_marker_display ();
stop_step_editing ();
/* get rid of any existing editor mixer strip */
WindowTitle title(Glib::get_application_name());
@ -5851,7 +5851,7 @@ Editor::setup_fade_images ()
_fade_out_images[FadeFast] = new Gtk::Image (get_icon_path (X_("fadeout-fast-cut")));
_fade_out_images[FadeSlow] = new Gtk::Image (get_icon_path (X_("fadeout-slow-cut")));
_fade_out_images[FadeConstantPower] = new Gtk::Image (get_icon_path (X_("fadeout-constant-power")));
_xfade_in_images[FadeLinear] = new Gtk::Image (get_icon_path (X_("fadein-linear")));
_xfade_in_images[FadeSymmetric] = new Gtk::Image (get_icon_path (X_("fadein-symmetric")));
_xfade_in_images[FadeFast] = new Gtk::Image (get_icon_path (X_("fadein-fast-cut")));
@ -5922,10 +5922,10 @@ void
Editor::popup_control_point_context_menu (ArdourCanvas::Item* item, GdkEvent* event)
{
using namespace Menu_Helpers;
MenuList& items = _control_point_context_menu.items ();
items.clear ();
items.push_back (MenuElem (_("Edit..."), sigc::bind (sigc::mem_fun (*this, &Editor::edit_control_point), item)));
items.push_back (MenuElem (_("Delete"), sigc::bind (sigc::mem_fun (*this, &Editor::remove_control_point), item)));
if (!can_remove_control_point (item)) {

View File

@ -263,7 +263,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
void remove_tracks ();
/* tempo */
void set_show_measures (bool yn);
@ -366,7 +366,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void scroll_tracks_down_line ();
void scroll_tracks_up_line ();
bool scroll_up_one_track (bool skip_child_views = false);
bool scroll_down_one_track (bool skip_child_views = false);
@ -503,7 +503,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
TimeAxisView* stepping_axis_view () {
return _stepping_axis_view;
}
void set_stepping_axis_view (TimeAxisView* v) {
_stepping_axis_view = v;
}
@ -530,7 +530,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void split_regions_at (framepos_t, RegionSelection&);
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
RegionSelection get_regions_from_selection_and_mouse (framepos_t);
void mouse_add_new_tempo_event (framepos_t where);
void mouse_add_new_meter_event (framepos_t where);
void edit_tempo_section (ARDOUR::TempoSection*);
@ -719,7 +719,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
bool button_release_can_deselect;
bool _mouse_changed_selection;
@ -2258,7 +2258,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
QuantizeDialog* quantize_dialog;
MainMenuDisabler* _main_menu_disabler;
friend class Drag;
friend class RegionDrag;
friend class RegionMoveDrag;

View File

@ -460,7 +460,7 @@ Editor::register_actions ()
Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionGroup::create (X_("MouseMode"));
RadioAction::Group mouse_mode_group;
act = ActionManager::register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));
act = ActionManager::register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));
smart_mode_action = Glib::RefPtr<ToggleAction>::cast_static (act);
smart_mode_button.set_related_action (smart_mode_action);
smart_mode_button.set_text (_("Smart"));
@ -471,27 +471,27 @@ Editor::register_actions ()
mouse_move_button.set_icon (Gtkmm2ext::ArdourIcon::ToolGrab);
mouse_move_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
mouse_select_button.set_related_action (act);
mouse_select_button.set_icon (Gtkmm2ext::ArdourIcon::ToolRange);
mouse_select_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));
mouse_draw_button.set_related_action (act);
mouse_draw_button.set_icon (Gtkmm2ext::ArdourIcon::ToolDraw);
mouse_draw_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
mouse_audition_button.set_related_action (act);
mouse_audition_button.set_icon (Gtkmm2ext::ArdourIcon::ToolAudition);
mouse_audition_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
mouse_timefx_button.set_related_action (act);
mouse_timefx_button.set_icon (Gtkmm2ext::ArdourIcon::ToolStretch);
mouse_timefx_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent));
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent));
mouse_content_button.set_related_action (act);
mouse_content_button.set_icon (Gtkmm2ext::ArdourIcon::ToolContent);
mouse_content_button.set_name ("mouse mode button");
@ -502,7 +502,7 @@ Editor::register_actions ()
mouse_cut_button.set_icon (Gtkmm2ext::ArdourIcon::ToolCut);
mouse_cut_button.set_name ("mouse mode button");
}
ActionManager::register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), sigc::bind (sigc::mem_fun(*this, &Editor::step_mouse_mode), true));
RadioAction::Group edit_point_group;
@ -601,7 +601,7 @@ Editor::register_actions ()
/* set defaults here */
no_ruler_shown_update = true;
if (Profile->get_trx()) {
ruler_marker_action->set_active (true);
ruler_meter_action->set_active (false);
@ -613,7 +613,7 @@ Editor::register_actions ()
ruler_cd_marker_action->set_active (false);
ruler_timecode_action->set_active (false);
ruler_minsec_action->set_active (true);
} else {
} else {
ruler_marker_action->set_active (true);
ruler_meter_action->set_active (true);
ruler_tempo_action->set_active (true);
@ -741,7 +741,7 @@ void
Editor::load_bindings ()
{
/* XXX move this to a better place */
key_bindings.set_action_map (editor_action_map);
std::string binding_file;
@ -1632,7 +1632,7 @@ void
Editor::toggle_sound_midi_notes ()
{
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("sound-midi-notes"));
if (act) {
bool s = UIConfiguration::instance().get_sound_midi_notes();
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);

View File

@ -128,7 +128,7 @@ Editor::initialize_canvas ()
_trackview_group = new ArdourCanvas::Container (hv_scroll_group);
CANVAS_DEBUG_NAME (_trackview_group, "Canvas TrackViews");
// used as rubberband rect
rubberband_rect = new ArdourCanvas::Rectangle (hv_scroll_group, ArdourCanvas::Rect (0.0, 0.0, 0.0, 0.0));
rubberband_rect->hide();
@ -140,7 +140,7 @@ Editor::initialize_canvas ()
CANVAS_DEBUG_NAME (_drag_motion_group, "Canvas Drag Motion");
/* TIME BAR CANVAS */
_time_markers_group = new ArdourCanvas::Container (h_scroll_group);
CANVAS_DEBUG_NAME (_time_markers_group, "time bars");
@ -187,7 +187,7 @@ Editor::initialize_canvas ()
cd_marker_bar->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
ARDOUR_UI::instance()->video_timeline = new VideoTimeLine(this, videotl_group, (timebar_height * videotl_bar_height));
cd_marker_bar_drag_rect = new ArdourCanvas::Rectangle (cd_marker_group, ArdourCanvas::Rect (0.0, 0.0, 100, timebar_height));
CANVAS_DEBUG_NAME (cd_marker_bar_drag_rect, "cd marker drag");
cd_marker_bar_drag_rect->set_outline (false);
@ -401,7 +401,7 @@ void
Editor::drop_paths_part_two (const vector<string>& paths, framepos_t frame, double ypos, bool copy)
{
RouteTimeAxisView* tv;
/* MIDI files must always be imported, because we consider them
* writable. So split paths into two vectors, and follow the import
* path on the MIDI part.
@ -427,7 +427,7 @@ Editor::drop_paths_part_two (const vector<string>& paths, framepos_t frame, doub
frame = 0;
InstrumentSelector is; // instantiation builds instrument-list and sets default.
do_import (midi_paths, Editing::ImportDistinctFiles, ImportAsTrack, SrcBest, frame, is.selected_instrument());
if (Profile->get_sae() || UIConfiguration::instance().get_only_copy_imported_files() || copy) {
do_import (audio_paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, SrcBest, frame);
} else {
@ -520,13 +520,13 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
if (from_headers) {
alloc = controls_layout.get_allocation ();
} else {
} else {
alloc = _track_canvas_viewport->get_allocation ();
/* reduce height by the height of the timebars, which happens
to correspond to the position of the hv_scroll_group.
*/
alloc.set_height (alloc.get_height() - hv_scroll_group->position().y);
alloc.set_y (alloc.get_y() + hv_scroll_group->position().y);
@ -539,21 +539,21 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
/* the effective width of the autoscroll boundary so
that we start scrolling before we hit the edge.
this helps when the window is slammed up against the
right edge of the screen, making it hard to scroll
effectively.
*/
if (alloc.get_width() > 20) {
alloc.set_width (alloc.get_width() - 20);
alloc.set_x (alloc.get_x() + 10);
}
}
scrolling_boundary = ArdourCanvas::Rect (alloc.get_x(), alloc.get_y(), alloc.get_x() + alloc.get_width(), alloc.get_y() + alloc.get_height());
int x, y;
Gdk::ModifierType mask;
@ -607,7 +607,7 @@ Editor::autoscroll_canvas ()
no_stop = true;
} else if (x < autoscroll_boundary.x0) {
dx = autoscroll_boundary.x0 - x;
dx += 10 + (2 * (autoscroll_cnt/2));
@ -621,7 +621,7 @@ Editor::autoscroll_canvas ()
no_stop = true;
}
if (new_frame != leftmost_frame) {
vc.time_origin = new_frame;
vc.add (VisualChange::TimeOrigin);
@ -629,12 +629,12 @@ Editor::autoscroll_canvas ()
}
if (autoscroll_vertical_allowed) {
// const double vertical_pos = vertical_adjustment.get_value();
const int speed_factor = 10;
/* vertical */
if (y < autoscroll_boundary.y0) {
/* scroll to make higher tracks visible */
@ -671,7 +671,7 @@ Editor::autoscroll_canvas ()
ev.type = GDK_MOTION_NOTIFY;
ev.state = Gdk::BUTTON1_MASK;
/* the motion handler expects events in canvas coordinate space */
/* we asked for the mouse position above (::get_pointer()) via
@ -700,7 +700,7 @@ Editor::autoscroll_canvas ()
ev.y = d.y;
motion_handler (0, (GdkEvent*) &ev, true);
} else if (no_stop) {
/* not changing visual state but pointer is outside the scrolling boundary
@ -711,7 +711,7 @@ Editor::autoscroll_canvas ()
ev.type = GDK_MOTION_NOTIFY;
ev.state = Gdk::BUTTON1_MASK;
/* the motion handler expects events in canvas coordinate space */
/* first convert from Editor window coordinates to canvas
@ -740,7 +740,7 @@ Editor::autoscroll_canvas ()
ev.y = d.y;
motion_handler (0, (GdkEvent*) &ev, true);
} else {
stop_canvas_autoscroll ();
return false;
@ -749,7 +749,7 @@ Editor::autoscroll_canvas ()
autoscroll_cnt++;
return true; /* call me again */
}
}
void
Editor::start_canvas_autoscroll (bool allow_horiz, bool allow_vert, const ArdourCanvas::Rect& boundary)
@ -895,7 +895,7 @@ Editor::color_handler()
samples_ruler->set_outline_color (text);
bbt_ruler->set_fill_color (base);
bbt_ruler->set_outline_color (text);
playhead_cursor->set_color (UIConfiguration::instance().color ("play head"));
meter_bar->set_fill_color (UIConfiguration::instance().color_mod ("meter bar", "marker bar"));
@ -1082,9 +1082,9 @@ Editor::which_trim_cursor (bool left) const
}
Trimmable::CanTrim ct = entered_regionview->region()->can_trim ();
if (left) {
if (ct & Trimmable::FrontTrimEarlier) {
return _cursors->left_side_trim;
} else {
@ -1112,7 +1112,7 @@ Editor::which_mode_cursor () const
case MouseCut:
mode_cursor = _cursors->scissors;
break;
case MouseObject:
case MouseContent:
/* don't use mode cursor, pick a grabber cursor based on the item */
@ -1138,20 +1138,20 @@ Editor::which_mode_cursor () const
get_pointer_position (x, y);
if (x >= 0 && y >= 0) {
vector<ArdourCanvas::Item const *> items;
/* Note how we choose a specific scroll group to get
* items from. This could be problematic.
*/
hv_scroll_group->add_items_at_point (ArdourCanvas::Duple (x,y), items);
// first item will be the upper most
if (!items.empty()) {
const ArdourCanvas::Item* i = items.front();
if (i && i->parent() && i->parent()->get_data (X_("timeselection"))) {
pair<TimeAxisView*, int> tvp = trackview_by_y_position (_last_motion_y);
if (dynamic_cast<AutomationTimeAxisView*> (tvp.first)) {
@ -1200,7 +1200,7 @@ Editor::which_canvas_cursor(ItemType type) const
break;
}
}
if ((mouse_mode == MouseObject || get_smart_mode ()) ||
mouse_mode == MouseContent) {
@ -1296,7 +1296,7 @@ Editor::which_canvas_cursor(ItemType type) const
}
} else if (mouse_mode == MouseDraw) {
/* ControlPointItem is not really specific to region gain mode
but it is the same cursor so don't worry about this for now.
The result is that we'll see the fader cursor if we enter

View File

@ -67,7 +67,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
if (Keyboard::some_magic_widget_has_focus()) {
return false;
}
framepos_t xdelta;
int direction = ev->direction;
@ -329,7 +329,7 @@ Editor::canvas_wave_view_event (GdkEvent *event, ArdourCanvas::Item* item, Regio
}
return ret;
}
}
bool
@ -1036,7 +1036,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
bool handled = false;
if (event->type == GDK_SCROLL) {
/* scroll events in the rulers are handled a little differently from
scrolling elsewhere in the canvas.
*/
@ -1055,7 +1055,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
}
handled = true;
break;
case GDK_SCROLL_DOWN:
if (Profile->get_mixbus()) {
//for mouse-wheel zoom, force zoom-focus to mouse
@ -1068,7 +1068,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
}
handled = true;
break;
case GDK_SCROLL_LEFT:
xdelta = (current_page_samples() / 2);
if (leftmost_frame > xdelta) {
@ -1078,7 +1078,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
}
handled = true;
break;
case GDK_SCROLL_RIGHT:
xdelta = (current_page_samples() / 2);
if (max_framepos - xdelta > leftmost_frame) {
@ -1088,7 +1088,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
}
handled = true;
break;
default:
/* what? */
break;
@ -1130,9 +1130,9 @@ Editor::canvas_note_event (GdkEvent *event, ArdourCanvas::Item* item)
bool
Editor::canvas_drop_zone_event (GdkEvent* event)
{
GdkEventScroll scroll;
GdkEventScroll scroll;
ArdourCanvas::Duple winpos;
switch (event->type) {
case GDK_BUTTON_RELEASE:
if (event->button.button == 1) {
@ -1193,18 +1193,18 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py, false);
bool can_drop = false;
if (tv.first != 0) {
/* over a time axis view of some kind */
rtav = dynamic_cast<RouteTimeAxisView*> (tv.first);
if (rtav != 0 && rtav->is_track ()) {
/* over a track, not a bus */
can_drop = true;
}
} else {
/* not over a time axis view, so drop is possible */
@ -1213,7 +1213,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
if (can_drop) {
region = _regions->get_dragged_region ();
if (region) {
if (tv.first == 0
@ -1227,17 +1227,17 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
context->drag_status (context->get_suggested_action(), time);
return true;
}
if ((boost::dynamic_pointer_cast<AudioRegion> (region) != 0 &&
dynamic_cast<AudioTimeAxisView*> (tv.first) != 0) ||
(boost::dynamic_pointer_cast<MidiRegion> (region) != 0 &&
dynamic_cast<MidiTimeAxisView*> (tv.first) != 0)) {
/* audio to audio
OR
midi to midi
*/
context->drag_status (context->get_suggested_action(), time);
return true;
}

View File

@ -49,7 +49,7 @@ EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,Ardour
_track_canvas_item->set_y1 (ArdourCanvas::COORD_MAX);
_track_canvas_item->set_x (0);
_current_frame = 1; /* force redraw at 0 */
}
@ -63,7 +63,7 @@ EditorCursor::EditorCursor (Editor& ed)
_track_canvas_item->set_show_head (1, false);
_track_canvas_item->set_y1 (ArdourCanvas::COORD_MAX);
_track_canvas_item->set_ignore_events (true);
_track_canvas_item->set_x (0);
_current_frame = 1; /* force redraw at 0 */

View File

@ -50,7 +50,7 @@ class EditorCursor {
PBD::Signal1<void, framepos_t> PositionChanged;
private:
private:
Editor& _editor;
ArdourCanvas::Arrow* _track_canvas_item;
framepos_t _current_frame;

View File

@ -4969,7 +4969,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
s->clear_range_selection ();
}
}
} else {
/* just a click, no pointer movement.
*/

View File

@ -202,7 +202,7 @@ public:
bool initially_vertical() const {
return _initially_vertical;
}
/** Set up the _pointer_frame_offset */
virtual void setup_pointer_frame_offset () {
_pointer_frame_offset = 0;
@ -582,7 +582,7 @@ public:
private:
double y_to_region (double) const;
ARDOUR::framecnt_t grid_frames (framepos_t) const;
MidiRegionView* _region_view;
ArdourCanvas::Rectangle* _drag_rect;
framepos_t _note[2];
@ -675,7 +675,7 @@ public:
private:
Operation _operation;
bool _preserve_fade_anchor;
bool _jump_position_when_done;
};
@ -932,7 +932,7 @@ public:
* @param drag_in_progress true if the drag is currently happening.
*/
virtual void select_things (int button_state, framepos_t x1, framepos_t x2, double y1, double y2, bool drag_in_progress) = 0;
virtual void deselect_things () = 0;
protected:
@ -1042,7 +1042,7 @@ public:
RangeMarkerBarDrag (Editor *, ArdourCanvas::Item *, Operation);
~RangeMarkerBarDrag ();
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);
@ -1134,7 +1134,7 @@ class CrossfadeEdgeDrag : public Drag
void motion (GdkEvent*, bool);
void finished (GdkEvent*, bool);
void aborted (bool);
bool y_movement_matters () const {
return false;
}

View File

@ -114,16 +114,16 @@ Editor::export_region ()
boost::shared_ptr<Region> r = selection->regions.front()->region();
boost::shared_ptr<AudioRegion> audio_region = boost::dynamic_pointer_cast<AudioRegion>(r);
boost::shared_ptr<MidiRegion> midi_region = boost::dynamic_pointer_cast<MidiRegion>(r);
if (audio_region) {
RouteTimeAxisView & rtv (dynamic_cast<RouteTimeAxisView &> (selection->regions.front()->get_time_axis_view()));
AudioTrack & track (dynamic_cast<AudioTrack &> (*rtv.route()));
ExportRegionDialog dialog (*this, *(audio_region.get()), track);
dialog.set_session (_session);
dialog.run ();
} else if (midi_region) {
MidiExportDialog dialog (*this, midi_region);
@ -146,13 +146,13 @@ Editor::export_region ()
true,
Gtk::MESSAGE_WARNING,
Gtk::BUTTONS_NONE);
checker.set_title (_("File Exists!"));
checker.add_button (Stock::CANCEL, RESPONSE_CANCEL);
checker.add_button (_("Overwrite Existing File"), RESPONSE_ACCEPT);
checker.set_default_response (RESPONSE_CANCEL);
checker.set_wmclass (X_("midi_export_file_exists"), PROGRAM_NAME);
checker.set_position (Gtk::WIN_POS_MOUSE);
@ -169,7 +169,7 @@ Editor::export_region ()
default:
return;
}
}
(void) midi_region->clone (path);

View File

@ -91,7 +91,7 @@ EditorGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
{
double const arc_radius = get_width();
double r, g, b, a;
if (tab.group && tab.group->is_active()) {
ArdourCanvas::color_to_rgba (tab.color, r, g, b, a);
} else {

View File

@ -45,7 +45,7 @@ Editor::keyboard_selection_finish (bool /*add*/)
framepos_t start = selection->time.start();
framepos_t end;
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
end = _session->audible_frame();
} else {
@ -54,7 +54,7 @@ Editor::keyboard_selection_finish (bool /*add*/)
//snap the selection start/end
snap_to(start);
//if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
if ( (_edit_point == EditAtPlayhead) && selection->tracks.empty() )
select_all_tracks();
@ -81,19 +81,19 @@ Editor::keyboard_selection_begin ()
} else {
start = get_preferred_edit_position();
}
//snap the selection start/end
snap_to(start);
//if there's not already a sensible selection endpoint, go "forever"
if ( start > end ) {
end = max_framepos;
}
//if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
if ( selection->tracks.empty() )
select_all_tracks();
selection->set (start, end);
//if session is playing a range, cancel that

View File

@ -68,7 +68,7 @@ Editor::add_new_location (Location *location)
/* Do a full update of the markers in this group */
update_marker_labels (group);
if (location->is_auto_punch()) {
update_punch_range_view ();
}
@ -965,7 +965,7 @@ Editor::build_range_marker_menu (bool loop_or_punch, bool session)
if (!loop_or_punch_or_session || !session) {
items.push_back (SeparatorElem());
}
items.push_back (MenuElem (_("Separate Regions in Range"), sigc::mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
items.push_back (MenuElem (_("Select All in Range"), sigc::mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
if (!Profile->get_sae()) {
@ -1216,7 +1216,7 @@ Editor::marker_menu_set_from_selection (bool /*force_regions*/)
// nothing for now
} else {
if (!selection->time.empty()) {
l->set (selection->time.start(), selection->time.end_frame());
} else if (!selection->regions.empty()) {
@ -1295,7 +1295,7 @@ Editor::marker_menu_zoom_to_range ()
if (a >= extra) {
a -= extra;
}
framepos_t b = l->end ();
if (b < (max_framepos - extra)) {
b += extra;
@ -1480,7 +1480,7 @@ Editor::update_loop_range_view ()
transport_loop_range_rect->set_x1 (x2);
transport_loop_range_rect->show();
} else {
transport_loop_range_rect->hide();
}
@ -1499,7 +1499,7 @@ Editor::update_punch_range_view ()
double pixel_start;
double pixel_end;
if (_session->config.get_punch_in()) {
pixel_start = sample_to_pixel (tpl->start());
} else {
@ -1510,9 +1510,9 @@ Editor::update_punch_range_view ()
} else {
pixel_end = sample_to_pixel (max_framepos);
}
transport_punch_range_rect->set_x0 (pixel_start);
transport_punch_range_rect->set_x1 (pixel_end);
transport_punch_range_rect->set_x1 (pixel_end);
transport_punch_range_rect->show();
} else {

View File

@ -80,7 +80,7 @@ Editor::show_editor_mixer (bool yn)
if (yn) {
Glib::RefPtr<Gdk::Window> win = get_window ();
Glib::RefPtr<Gdk::Screen> screen;
if (win) {
screen = win->get_screen();
} else {
@ -184,7 +184,7 @@ Editor::create_editor_mixer ()
current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*this, &Editor::ensure_all_elements_drawn));
#endif
current_mixer_strip->set_embedded (true);
}
void

View File

@ -207,7 +207,7 @@ void
Editor::mouse_mode_object_range_toggled()
{
MouseMode m = mouse_mode;
Glib::RefPtr<Action> act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-range"));
assert (act);
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
@ -313,7 +313,7 @@ Editor::mouse_mode_toggled (MouseMode m)
}
set_gain_envelope_visibility ();
update_time_selection_display ();
update_all_enter_cursors ();
@ -1229,17 +1229,17 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case TempoMarkerItem: {
ArdourMarker* marker;
TempoMarker* tempo_marker;
if ((marker = reinterpret_cast<ArdourMarker *> (item->get_data ("marker"))) == 0) {
fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
abort(); /*NOTREACHED*/
}
if ((tempo_marker = dynamic_cast<TempoMarker*> (marker)) == 0) {
fatal << _("programming error: marker for tempo is not a tempo marker!") << endmsg;
abort(); /*NOTREACHED*/
}
edit_tempo_marker (*tempo_marker);
break;
}
@ -1247,12 +1247,12 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case MeterMarkerItem: {
ArdourMarker* marker;
MeterMarker* meter_marker;
if ((marker = reinterpret_cast<ArdourMarker *> (item->get_data ("marker"))) == 0) {
fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
abort(); /*NOTREACHED*/
}
if ((meter_marker = dynamic_cast<MeterMarker*> (marker)) == 0) {
fatal << _("programming error: marker for meter is not a meter marker!") << endmsg;
abort(); /*NOTREACHED*/
@ -1320,7 +1320,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case SelectionItem:
popup_track_context_menu (1, event->button.time, item_type, true);
break;
case AutomationTrackItem:
popup_track_context_menu (1, event->button.time, item_type, false);
break;
@ -1549,7 +1549,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case MouseDraw:
return true;
case MouseRange:
// x_style_paste (where, 1.0);
return true;
@ -1880,14 +1880,14 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
current_stepping_trackview = 0;
step_timeout.disconnect ();
}
if (_session && _session->actively_recording()) {
/* Sorry. no dragging stuff around while we record */
return true;
}
update_join_object_range_location (event->motion.y);
if (_drags->active ()) {
return _drags->motion_handler (event, from_autoscroll);
}
@ -2064,7 +2064,7 @@ Editor::cancel_time_selection ()
}
selection->time.clear ();
clicked_selection = 0;
}
}
void
Editor::point_trim (GdkEvent* event, framepos_t new_bound)
@ -2386,7 +2386,7 @@ Editor::update_join_object_range_location (double y)
} else if (entered_track) {
RouteTimeAxisView* entered_route_view = dynamic_cast<RouteTimeAxisView*> (entered_track);
if (entered_route_view) {
double cx = 0;

View File

@ -119,7 +119,7 @@ Editor::undo (uint32_t n)
if (_drags->active ()) {
_drags->abort ();
}
if (_session) {
_session->undo (n);
if (_session->undo_depth() == 0) {
@ -136,7 +136,7 @@ Editor::redo (uint32_t n)
if (_drags->active ()) {
_drags->abort ();
}
if (_session) {
_session->redo (n);
if (_session->redo_depth() == 0) {
@ -237,7 +237,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
for (list<RouteTimeAxisView*>::iterator i = used_trackviews.begin(); i != used_trackviews.end(); ++i) {
region_added_connections.push_back ((*i)->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view)));
}
while (used_playlists.size() > 0) {
list <boost::shared_ptr<Playlist > >::iterator i = used_playlists.begin();
(*i)->thaw();
@ -713,7 +713,7 @@ Editor::build_region_boundary_cache ()
TimeAxisView *ontrack = 0;
TrackViewList tlist;
if (!selection->tracks.empty()) {
tlist = selection->tracks.filter_to_unique_playlists ();
} else {
@ -1487,21 +1487,21 @@ Editor::scroll_down_one_track (bool skip_child_views)
}
/* move to the track below the first one that covers the */
if (next != track_views.rend()) {
ensure_time_axis_view_is_visible (**next, true);
return true;
}
return false;
}
}
bool
Editor::scroll_up_one_track (bool skip_child_views)
{
TrackViewList::iterator prev = track_views.end();
double top_of_trackviews = vertical_adjustment.get_value ();
for (TrackViewList::iterator t = track_views.begin(); t != track_views.end(); ++t) {
if ((*t)->hidden()) {
@ -1513,7 +1513,7 @@ Editor::scroll_up_one_track (bool skip_child_views)
* Note that covers_y_position() is recursive and includes child views
*/
std::pair<TimeAxisView*,double> res = (*t)->covers_y_position (top_of_trackviews);
if (res.first) {
if (skip_child_views) {
break;
@ -1562,7 +1562,7 @@ Editor::scroll_up_one_track (bool skip_child_views)
prev = t;
}
if (prev != track_views.end()) {
// move to bottom-most automation-lane of the previous track
TimeAxisView::Children kids = (*prev)->get_child_list();
@ -1601,7 +1601,7 @@ Editor::tav_zoom_step (bool coarser)
} else {
ts = &selection->tracks;
}
for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
tv->step_height (coarser);
@ -1620,7 +1620,7 @@ Editor::tav_zoom_smooth (bool coarser, bool force_all)
} else {
ts = &selection->tracks;
}
for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
uint32_t h = tv->current_height ();
@ -1825,7 +1825,7 @@ Editor::temporal_zoom_region (bool both_axes)
if ( !get_selection_extents(start, end) )
return;
calc_extra_zoom_edges (start, end);
/* if we're zooming on both axes we need to save track heights etc.
@ -1836,7 +1836,7 @@ Editor::temporal_zoom_region (bool both_axes)
PBD::Unwinder<bool> nsv (no_save_visual, true);
temporal_zoom_by_frame (start, end);
if (both_axes) {
uint32_t per_track_height = (uint32_t) floor ((_visible_canvas_height - 10.0) / tracks.size());
@ -1869,7 +1869,7 @@ Editor::get_selection_extents ( framepos_t &start, framepos_t &end )
start = max_framepos;
end = 0;
bool ret = true;
//ToDo: if notes are selected, set extents to that selection
//ToDo: if control points are selected, set extents to that selection
@ -1898,8 +1898,8 @@ Editor::get_selection_extents ( framepos_t &start, framepos_t &end )
if ((start == 0 && end == 0) || end < start) {
ret = false;
}
return ret;
return ret;
}
@ -1924,7 +1924,7 @@ Editor::temporal_zoom_selection (bool both_axes)
calc_extra_zoom_edges(start, end);
temporal_zoom_by_frame (start, end);
}
if (both_axes)
fit_selection();
}
@ -1974,7 +1974,7 @@ Editor::temporal_zoom_by_frame (framepos_t start, framepos_t end)
framepos_t range = end - start;
const framecnt_t new_fpp = (framecnt_t) ceil ((double) range / (double) _visible_canvas_width);
framepos_t new_page = range;
framepos_t middle = (framepos_t) floor ((double) start + ((double) range / 2.0f));
framepos_t new_leftmost = (framepos_t) floor ((double) middle - ((double) new_page / 2.0f));
@ -2027,7 +2027,7 @@ Editor::temporal_zoom_to_frame (bool coarser, framepos_t frame)
/* zoom focus is automatically taken as @param frame when this
method is used.
*/
framepos_t new_leftmost = frame - (framepos_t)range_before;
if (new_leftmost > frame) {
@ -2098,12 +2098,12 @@ Editor::add_location_from_selection ()
Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker);
begin_reversible_command (_("add marker"));
XMLNode &before = _session->locations()->get_state();
_session->locations()->add (location, true);
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
commit_reversible_command ();
}
@ -2120,12 +2120,12 @@ Editor::add_location_mark (framepos_t where)
}
Location *location = new Location (*_session, where, where, markername, Location::IsMark);
begin_reversible_command (_("add marker"));
XMLNode &before = _session->locations()->get_state();
_session->locations()->add (location, true);
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
commit_reversible_command ();
}
@ -2134,7 +2134,7 @@ Editor::set_session_start_from_playhead ()
{
if (!_session)
return;
Location* loc;
if ((loc = _session->locations()->session_range_location()) == 0) { //should never happen
_session->set_session_extents ( _session->audible_frame(), _session->audible_frame() );
@ -2146,7 +2146,7 @@ Editor::set_session_start_from_playhead ()
XMLNode &after = loc->get_state();
begin_reversible_command (_("Set session start"));
_session->add_command (new MementoCommand<Location>(*loc, &before, &after));
commit_reversible_command ();
@ -2158,7 +2158,7 @@ Editor::set_session_end_from_playhead ()
{
if (!_session)
return;
Location* loc;
if ((loc = _session->locations()->session_range_location()) == 0) { //should never happen
_session->set_session_extents ( _session->audible_frame(), _session->audible_frame() );
@ -2200,7 +2200,7 @@ Editor::remove_location_at_playhead_cursor ()
removed = true;
}
}
//store undo
if (removed) {
begin_reversible_command (_("remove marker"));
@ -2221,7 +2221,7 @@ Editor::add_locations_from_region ()
return;
}
bool commit = false;
XMLNode &before = _session->locations()->get_state();
for (RegionSelection::iterator i = rs.begin (); i != rs.end (); ++i) {
@ -2292,7 +2292,7 @@ Editor::jump_forward_to_mark ()
if (pos < 0) {
return;
}
_session->request_locate (pos, _session->transport_rolling());
}
@ -2332,12 +2332,12 @@ Editor::clear_markers ()
{
if (_session) {
begin_reversible_command (_("clear markers"));
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear_markers ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
commit_reversible_command ();
}
}
@ -2347,14 +2347,14 @@ Editor::clear_ranges ()
{
if (_session) {
begin_reversible_command (_("clear ranges"));
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear_ranges ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
commit_reversible_command ();
}
}
@ -2363,12 +2363,12 @@ void
Editor::clear_locations ()
{
begin_reversible_command (_("clear locations"));
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
commit_reversible_command ();
}
@ -2541,11 +2541,11 @@ Editor::maybe_locate_with_edit_preroll ( framepos_t location )
return;
location -= get_preroll();
//don't try to locate before the beginning of time
if ( location < 0 )
location = 0;
//if follow_playhead is on, keep the playhead on the screen
if ( _follow_playhead )
if ( location < leftmost_frame )
@ -2559,16 +2559,16 @@ Editor::play_with_preroll ()
{
{
framepos_t preroll = get_preroll();
framepos_t start, end;
if (!get_selection_extents ( start, end))
return;
if (start > preroll)
start = start - preroll;
end = end + preroll; //"post-roll"
AudioRange ar (start, end, 0);
list<AudioRange> lar;
lar.push_back (ar);
@ -2629,7 +2629,7 @@ Editor::do_layer_operation (LayerOperation op)
begin_reversible_command (_("raise region to top"));
}
break;
case Lower:
if (multiple) {
begin_reversible_command (_("lower regions"));
@ -2637,7 +2637,7 @@ Editor::do_layer_operation (LayerOperation op)
begin_reversible_command (_("lower region"));
}
break;
case LowerToBottom:
if (multiple) {
begin_reversible_command (_("lower regions to bottom"));
@ -2651,7 +2651,7 @@ Editor::do_layer_operation (LayerOperation op)
for (set<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
(*i)->clear_owned_changes ();
}
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
boost::shared_ptr<Region> r = (*i)->region ();
switch (op) {
@ -2674,7 +2674,7 @@ Editor::do_layer_operation (LayerOperation op)
(*i)->rdiff (cmds);
_session->add_commands (cmds);
}
commit_reversible_command ();
}
@ -3870,7 +3870,7 @@ Editor::freeze_route ()
/* stop transport before we start. this is important */
_session->request_transport_speed (0.0);
/* wait for just a little while, because the above call is asynchronous */
Glib::usleep (250000);
@ -4125,15 +4125,15 @@ Editor::cut_copy (CutCopyOp op)
if (!selection->regions.empty()) {
cut_copy_regions (op, selection->regions);
if (op == Cut || op == Delete) {
selection->clear_regions ();
}
}
if (!selection->points.empty()) {
cut_copy_points (op);
if (op == Cut || op == Delete) {
selection->clear_points ();
}
@ -4151,19 +4151,19 @@ Editor::cut_copy (CutCopyOp op)
did_edit = true;
cut_copy_ranges (op);
if (op == Cut || op == Delete) {
selection->clear_time ();
}
}
if (did_edit) {
/* reset repeated paste state */
paste_count = 0;
last_paste_pos = 0;
commit_reversible_command ();
commit_reversible_command ();
}
if (op == Delete || op == Cut || op == Clear) {
_drags->abort ();
}
@ -4172,7 +4172,7 @@ Editor::cut_copy (CutCopyOp op)
struct AutomationRecord {
AutomationRecord () : state (0) , line(NULL) {}
AutomationRecord (XMLNode* s, const AutomationLine* l) : state (s) , line (l) {}
XMLNode* state; ///< state before any operation
const AutomationLine* line; ///< line this came from
boost::shared_ptr<Evoral::ControlList> copy; ///< copied events for the cut buffer
@ -4258,10 +4258,10 @@ Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::Beats earliest, bool mid
cut_buffer->add (i->second.copy);
}
}
if (op == Delete || op == Cut) {
/* This operation needs to remove things from the main AutomationList, so do that now */
for (Lists::iterator i = lists.begin(); i != lists.end(); ++i) {
i->first->freeze ();
}
@ -4346,7 +4346,7 @@ Editor::remove_clicked_region ()
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command(new StatefulDiffCommand (playlist));
commit_reversible_command ();
}
@ -4421,7 +4421,7 @@ Editor::remove_selected_regions ()
vector<Command*> cmds;
(*pl)->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command(new StatefulDiffCommand (*pl));
}
@ -4513,15 +4513,15 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
if (op != Delete) {
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();
@ -4542,7 +4542,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
if (Config->get_edit_mode() == Ripple)
pl->ripple (r->position(), -r->length(), boost::shared_ptr<Region>());
break;
case Cut:
_xx = RegionFactory::create (r);
npl->add_region (_xx, r->position() - first_position);
@ -4569,20 +4569,20 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
if (op != Delete) {
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) {
if ((*i).pl) {
(*i).pl->thaw();
foo.push_back ((*i).pl);
}
}
if (!foo.empty()) {
cut_buffer->set (foo);
}
if (pmap.empty()) {
_last_cut_copy_source_track = 0;
} else {
@ -4599,7 +4599,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
vector<Command*> cmds;
(*pl)->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command (new StatefulDiffCommand (*pl));
}
}
@ -5452,7 +5452,7 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command(new StatefulDiffCommand (playlist));
}
@ -5486,7 +5486,7 @@ Editor::reset_region_gain_envelopes ()
}
bool in_command = false;
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
if (arv) {
@ -5580,13 +5580,13 @@ Editor::toggle_region_lock ()
}
begin_reversible_command (_("toggle region lock"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->set_locked (!(*i)->region()->locked());
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
commit_reversible_command ();
}
@ -5604,13 +5604,13 @@ Editor::toggle_region_video_lock ()
}
begin_reversible_command (_("Toggle Video Lock"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->set_video_locked (!(*i)->region()->video_locked());
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
commit_reversible_command ();
}
@ -5628,14 +5628,14 @@ Editor::toggle_region_lock_style ()
}
begin_reversible_command (_("region lock style"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
PositionLockStyle const ns = (*i)->region()->position_lock_style() == AudioTime ? MusicTime : AudioTime;
(*i)->region()->set_position_lock_style (ns);
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
commit_reversible_command ();
}
@ -5653,13 +5653,13 @@ Editor::toggle_opaque_region ()
}
begin_reversible_command (_("change region opacity"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->set_opaque (!(*i)->region()->opaque());
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
commit_reversible_command ();
}
@ -5977,7 +5977,7 @@ Editor::toggle_region_fades (int dir)
if (_ignore_region_action) {
return;
}
boost::shared_ptr<AudioRegion> ar;
bool yn = false;
@ -6117,7 +6117,7 @@ Editor::split_region ()
//if no range was selected, try to find some regions to split
if (current_mouse_mode() == MouseObject) { //don't try this for Internal Edit, Stretch, Draw, etc.
RegionSelection rs = get_regions_from_selection_and_edit_point ();
framepos_t where = get_preferred_edit_position ();
@ -6252,7 +6252,7 @@ Editor::set_session_extents_from_selection ()
if (_session == 0) {
return;
}
framepos_t start, end;
if (!get_selection_extents ( start, end))
return;
@ -6282,27 +6282,27 @@ Editor::set_punch_start_from_edit_point ()
framepos_t start = 0;
framepos_t end = max_framepos;
//use the existing punch end, if any
Location* tpl = transport_punch_location();
if (tpl) {
end = tpl->end();
}
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
start = _session->audible_frame();
} else {
start = get_preferred_edit_position();
}
//snap the selection start/end
snap_to(start);
//if there's not already a sensible selection endpoint, go "forever"
if ( start > end ) {
end = max_framepos;
}
set_punch_range (start, end, _("set punch start from EP"));
}
@ -6315,13 +6315,13 @@ Editor::set_punch_end_from_edit_point ()
framepos_t start = 0;
framepos_t end = max_framepos;
//use the existing punch start, if any
Location* tpl = transport_punch_location();
if (tpl) {
start = tpl->start();
}
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
end = _session->audible_frame();
} else {
@ -6330,7 +6330,7 @@ Editor::set_punch_end_from_edit_point ()
//snap the selection start/end
snap_to(end);
set_punch_range (start, end, _("set punch end from EP"));
}
@ -6343,22 +6343,22 @@ Editor::set_loop_start_from_edit_point ()
framepos_t start = 0;
framepos_t end = max_framepos;
//use the existing loop end, if any
Location* tpl = transport_loop_location();
if (tpl) {
end = tpl->end();
}
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
start = _session->audible_frame();
} else {
start = get_preferred_edit_position();
}
//snap the selection start/end
snap_to(start);
//if there's not already a sensible selection endpoint, go "forever"
if ( start > end ) {
end = max_framepos;
@ -6376,13 +6376,13 @@ Editor::set_loop_end_from_edit_point ()
framepos_t start = 0;
framepos_t end = max_framepos;
//use the existing loop start, if any
Location* tpl = transport_loop_location();
if (tpl) {
start = tpl->start();
}
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
end = _session->audible_frame();
} else {
@ -6391,7 +6391,7 @@ Editor::set_loop_end_from_edit_point ()
//snap the selection start/end
snap_to(end);
set_loop_range (start, end, _("set loop end from EP"));
}
}
@ -6574,7 +6574,7 @@ Editor::split_region_at_transients ()
}
begin_reversible_command (_("split regions"));
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ) {
RegionSelection::iterator tmp;
@ -6591,7 +6591,7 @@ Editor::split_region_at_transients ()
i = tmp;
}
commit_reversible_command ();
}
@ -6754,7 +6754,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
vector<Command*> cmds;
pl->rdiff (cmds);
_session->add_commands (cmds);
_session->add_command (new StatefulDiffCommand (pl));
if (select_new) {
@ -6781,12 +6781,12 @@ Editor::place_transient()
framepos_t where = get_preferred_edit_position();
begin_reversible_command (_("place transient"));
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
framepos_t position = (*r)->region()->position();
(*r)->region()->add_transient(where - position);
}
commit_reversible_command ();
}
@ -6816,7 +6816,7 @@ Editor::snap_regions_to_grid ()
}
begin_reversible_command (_("snap regions to grid"));
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
boost::shared_ptr<Playlist> pl = (*r)->region()->playlist();
@ -6839,7 +6839,7 @@ Editor::snap_regions_to_grid ()
(*i)->thaw();
used_playlists.pop_front();
}
commit_reversible_command ();
}
@ -6899,7 +6899,7 @@ Editor::close_region_gaps ()
/* Iterate over the region list and make adjacent regions overlap by crossfade_len_ms */
begin_reversible_command (_("close region gaps"));
int idx = 0;
boost::shared_ptr<Region> last_region;
@ -6938,7 +6938,7 @@ Editor::close_region_gaps ()
(*i)->thaw();
used_playlists.pop_front();
}
commit_reversible_command ();
}
@ -7028,7 +7028,7 @@ Editor::playhead_forward_to_grid ()
if (!_session) {
return;
}
framepos_t pos = playhead_cursor->current_frame ();
if (pos < max_framepos - 1) {
pos += 2;
@ -7044,7 +7044,7 @@ Editor::playhead_backward_to_grid ()
if (!_session) {
return;
}
framepos_t pos = playhead_cursor->current_frame ();
if (pos > 2) {
pos -= 2;
@ -7163,7 +7163,7 @@ edit your ardour.rc file to set the\n\
trackstr = P_("track", "tracks", ntracks);
busstr = P_("bus", "busses", nbusses);
if (ntracks) {
if (nbusses) {
prompt = string_compose (_("Do you really want to remove %1 %2 and %3 %4?\n"
@ -7282,7 +7282,7 @@ Editor::insert_time (
pl.insert ((*x)->playlist ());
}
}
for (set<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
(*i)->clear_changes ();
@ -7388,7 +7388,7 @@ Editor::do_remove_time ()
if (response != RESPONSE_OK) {
return;
}
framecnt_t distance = d.distance();
if (distance == 0) {
@ -7420,26 +7420,26 @@ Editor::remove_time (framepos_t pos, framecnt_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();
std::list<AudioRange> rl;
AudioRange ar(pos, pos+frames, 0);
rl.push_back(ar);
pl->cut (rl);
pl->shift (pos, -frames, true, ignore_music_glue);
if (!in_command) {
begin_reversible_command (_("cut time"));
in_command = true;
}
XMLNode &after = pl->get_state();
_session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));
}
/* automation */
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
if (rtav) {
@ -7452,7 +7452,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
}
std::list<Location*> loc_kill_list;
/* markers */
if (markers_too) {
bool moved = false;
@ -7514,7 +7514,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
for (list<Location*>::iterator i = loc_kill_list.begin(); i != loc_kill_list.end(); ++i) {
_session->locations()->remove( *i );
}
if (moved) {
if (!in_command) {
begin_reversible_command (_("cut time"));
@ -7524,7 +7524,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
_session->add_command (new MementoCommand<Locations>(*_session->locations(), &before, &after));
}
}
if (tempo_too) {
XMLNode& before (_session->tempo_map().get_state());
@ -7537,7 +7537,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
_session->add_command (new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after));
}
}
if (in_command) {
commit_reversible_command ();
}
@ -7701,7 +7701,7 @@ void
Editor::start_visual_state_op (uint32_t n)
{
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);
@ -7835,7 +7835,7 @@ Editor::toggle_midi_input_active (bool flip_others)
onoff = !mt->input_active();
}
}
_session->set_exclusive_input_active (rl, onoff, flip_others);
}
@ -7853,14 +7853,14 @@ Editor::lock ()
b->set_text (_("Click to unlock"));
b->signal_clicked.connect (sigc::mem_fun (*this, &Editor::unlock));
lock_dialog->get_vbox()->pack_start (*b);
lock_dialog->get_vbox()->show_all ();
lock_dialog->set_size_request (200, 200);
}
delete _main_menu_disabler;
_main_menu_disabler = new MainMenuDisabler;
lock_dialog->present ();
}
@ -7868,7 +7868,7 @@ void
Editor::unlock ()
{
lock_dialog->hide ();
delete _main_menu_disabler;
if (UIConfiguration::instance().get_lock_gui_after_seconds()) {
@ -7900,11 +7900,11 @@ Editor::bring_all_sources_into_session ()
ArdourDialog w (_("Moving embedded files into session folder"));
w.get_vbox()->pack_start (msg);
w.present ();
/* flush all pending GUI events because we're about to start copying
* files
*/
Gtkmm2ext::UI::instance()->flush_pending ();
cerr << " Do it\n";

View File

@ -124,7 +124,7 @@ EditorRegions::EditorRegions (Editor* e)
{ 10, S_("Opaque|O"), _("Region opaque (blocks regions below it from being heard)?") },
{ -1, 0, 0 }
};
for (int i = 0; ci[i].index >= 0; ++i) {
col = _display.get_column (ci[i].index);
l = manage (new Label (ci[i].label));
@ -433,7 +433,7 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
*/
row = *(_model->insert (subrows.end()));
} else {
row = *(_model->append());
}
@ -569,7 +569,7 @@ EditorRegions::selection_changed ()
_change_connection.block (false);
}
}
}
} else {
_editor->get_selection().clear_regions ();

View File

@ -75,7 +75,7 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
TreeViewColumn* color_column = manage (new TreeViewColumn ("", *color_renderer));
color_column->add_attribute (color_renderer->property_color(), _columns.gdkcolor);
_display.append_column (*color_column);
_display.append_column ("", _columns.text);
@ -138,7 +138,7 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
CellRendererText* name_cell = dynamic_cast<CellRendererText*>(_display.get_column_cell_renderer (1));
name_cell->property_editable() = true;
name_cell->signal_edited().connect (sigc::mem_fun (*this, &EditorRouteGroups::name_edit));
for (int i = 1; ci[i].index >= 0; ++i) {
CellRendererToggle* active_cell = dynamic_cast <CellRendererToggle*> (_display.get_column_cell_renderer (i));
@ -274,10 +274,10 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
c = color_dialog.get_colorsel()->get_current_color();
GroupTabs::set_group_color (group, gdk_color_to_rgba (c));
break;
default:
break;
}
color_dialog.hide ();
@ -301,7 +301,7 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
ret = true;
break;
case 3:
val = (*iter)[_columns.active_state];
group->set_active (!val, this);
@ -423,11 +423,11 @@ EditorRouteGroups::add (RouteGroup* group)
row[_columns.active_shared] = group->is_route_active ();
row[_columns.active_state] = group->is_active ();
row[_columns.is_visible] = !group->is_hidden();
Gdk::Color c;
set_color_from_rgba (c, GroupTabs::group_color (group));
row[_columns.gdkcolor] = c;
_in_row_change = true;
row[_columns.routegroup] = group;
@ -505,7 +505,7 @@ EditorRouteGroups::property_changed (RouteGroup* group, const PropertyChange&)
break;
}
}
_in_row_change = false;
for (TrackViewList::const_iterator i = _editor->get_track_views().begin(); i != _editor->get_track_views().end(); ++i) {

View File

@ -525,7 +525,7 @@ EditorRoutes::redisplay_real ()
}
bool visible = tv->marked_for_display ();
/* show or hide the TimeAxisView */
if (visible) {
position += tv->show_at (position, n, &_editor->edit_controls_vbox);
@ -886,11 +886,11 @@ EditorRoutes::reset_remote_control_ids ()
for (ri = rows.begin(); ri != rows.end(); ++ri) {
/* skip two special values */
if (rid == Route::MasterBusRemoteControlID) {
rid++;
}
if (rid == Route::MonitorBusRemoteControlID) {
rid++;
}
@ -1414,7 +1414,7 @@ EditorRoutes::initial_display ()
}
RouteList r (*_session->get_routes());
r.sort (EditorOrderRouteSorter ());
_editor->add_routes (r);
}
@ -1602,7 +1602,7 @@ EditorRoutes::idle_update_mute_rec_solo_etc()
(*i)[_columns.active] = route->active ();
if (boost::dynamic_pointer_cast<Track> (route)) {
boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (route);
if (route->record_enabled()) {
if (_session->record_status() == Session::Recording) {
(*i)[_columns.rec_state] = 1;
@ -1614,7 +1614,7 @@ EditorRoutes::idle_update_mute_rec_solo_etc()
} else {
(*i)[_columns.rec_state] = 0;
}
(*i)[_columns.name_editable] = !route->record_enabled ();
}
}

View File

@ -130,7 +130,7 @@ Editor::initialize_rulers ()
_bbt_metric = new BBTMetric (this);
_minsec_metric = new MinsecMetric (this);
_samples_metric = new SamplesMetric (this);
timecode_ruler = new ArdourCanvas::Ruler (_time_markers_group, *_timecode_metric,
ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, timebar_height));
timecode_ruler->set_font_description (font);
@ -175,7 +175,7 @@ Editor::initialize_rulers ()
minsec_ruler->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_event), minsec_ruler, MinsecRulerItem));
bbt_ruler->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_event), bbt_ruler, BBTRulerItem));
samples_ruler->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_event), samples_ruler, SamplesRulerItem));
visible_timebars = 0; /*this will be changed below */
}
@ -1141,7 +1141,7 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper,
} 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 <= Timecode::BBT_Time::ticks_per_beat / 4)) {
bbt_ruler_scale = bbt_show_ticks_super_detail;
}
@ -1154,7 +1154,7 @@ edit_last_mark_label (std::vector<ArdourCanvas::Ruler::Mark>& marks, const std::
copy.label = newlabel;
marks.pop_back ();
marks.push_back (copy);
}
}
void
Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble lower, gdouble upper, gint /*maxchars*/)
@ -1234,7 +1234,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
bbt_nmarks = (beats + 2) * bbt_beat_subdivision;
bbt_position_of_helper = lower + (30 * Editor::get_current_zoom ());
// could do marks.assign() here to preallocate
mark.label = "";

View File

@ -461,7 +461,7 @@ Editor::mapover_tracks_with_unique_playlists (sigc::slot<void, RouteTimeAxisView
RouteTimeAxisView* v = dynamic_cast<RouteTimeAxisView*> (*i);
if (v && v->route()->route_group() == group) {
boost::shared_ptr<Track> t = v->track();
if (t) {
if (playlists.insert (t->playlist()).second) {
@ -1005,7 +1005,7 @@ Editor::track_selection_changed ()
ActionManager::set_sensitive (ActionManager::track_selection_sensitive_actions, !selection->tracks.empty());
/* notify control protocols */
ControlProtocol::TrackSelectionChanged (routes);
if (sfbrowser && _session && !_session->deletion_in_progress()) {
@ -1341,7 +1341,7 @@ Editor::sensitize_the_right_region_actions ()
if (have_active_fade_out && have_inactive_fade_out) {
// a->set_inconsistent ();
}
bool const have_active_fade = have_active_fade_in || have_active_fade_out;
bool const have_inactive_fade = have_inactive_fade_in || have_inactive_fade_out;
@ -1351,7 +1351,7 @@ Editor::sensitize_the_right_region_actions ()
if (have_active_fade && have_inactive_fade) {
// a->set_inconsistent ();
}
_ignore_region_action = false;
_all_region_actions_sensitized = false;
@ -1610,7 +1610,7 @@ Editor::set_selection_from_region ()
/* find all the tracks that have selected regions */
set<TimeAxisView*> tracks;
for (RegionSelection::const_iterator r = selection->regions.begin(); r != selection->regions.end(); ++r) {
tracks.insert (&(*r)->get_time_axis_view());
}
@ -1623,9 +1623,9 @@ Editor::set_selection_from_region ()
selection->set (selection->regions.start(), selection->regions.end_frame());
/* and select the tracks */
selection->set (tvl);
if (!Profile->get_sae()) {
set_mouse_mode (Editing::MouseRange, false);
}
@ -1946,7 +1946,7 @@ Editor::get_edit_op_range (framepos_t& start, framepos_t& end) const
end = 0;
return false;
}
// if (!mouse_frame (m, ignored)) {
// /* mouse is not in a canvas, try playhead+selected marker.
// this is probably most true when using menus.

View File

@ -223,7 +223,7 @@ EditorSummary::render (cairo_t* cr, cairo_rectangle_t*)
}
cairo_push_group (cr);
/* Fill with the background image */
cairo_rectangle (cr, 0, 0, get_width(), get_height());
@ -408,7 +408,7 @@ bool
EditorSummary::on_button_press_event (GdkEventButton* ev)
{
_old_follow_playhead = _editor->follow_playhead ();
if (ev->button == 1) {
pair<double, double> xr;
@ -436,7 +436,7 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
get_editor (&_pending_editor_x, &_pending_editor_y);
_pending_editor_changed = false;
}
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
/* secondary-modifier-click: locate playhead */
@ -489,7 +489,7 @@ EditorSummary::get_editor (pair<double, double>* x, pair<double, double>* y) con
/* We are dragging, and configured not to update the editor window during drags,
so just return where the editor will be when the drag finishes.
*/
*x = _pending_editor_x;
*y = _pending_editor_y;
@ -499,7 +499,7 @@ EditorSummary::get_editor (pair<double, double>* x, pair<double, double>* y) con
x->first = (_editor->leftmost_sample () - _start) * _x_scale;
x->second = x->first + _editor->current_page_samples() * _x_scale;
y->first = editor_y_to_summary (_editor->vertical_adjustment.get_value ());
y->second = editor_y_to_summary (_editor->vertical_adjustment.get_value () + _editor->visible_canvas_height() - _editor->get_trackview_group()->canvas_origin().y);
}
@ -668,7 +668,7 @@ bool
EditorSummary::on_button_release_event (GdkEventButton*)
{
bool const was_suspended = suspending_editor_updates ();
_move_dragging = false;
_zoom_dragging = false;
_editor->_dragging_playhead = false;
@ -677,7 +677,7 @@ EditorSummary::on_button_release_event (GdkEventButton*)
if (was_suspended && _pending_editor_changed) {
set_editor (_pending_editor_x, _pending_editor_y);
}
return true;
}
@ -767,7 +767,7 @@ EditorSummary::set_editor (double const x, double const y)
as it also means that we won't change these variables if an idle handler
is merely pending but not executing. But c'est la vie.
*/
return;
}
@ -854,12 +854,12 @@ EditorSummary::set_editor_x (pair<double, double> x)
set_dirty ();
} else {
_editor->reset_x_origin (x.first / _x_scale + _start);
double const nx = (
((x.second - x.first) / _x_scale) /
_editor->sample_to_pixel (_editor->current_page_samples())
);
if (nx != _editor->get_current_zoom ()) {
_editor->reset_zoom (nx);
}

View File

@ -133,12 +133,12 @@ Editor::redisplay_tempo (bool immediate_redraw)
if (immediate_redraw) {
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_samples(),
current_bbt_points_begin, current_bbt_points_end);
draw_measures (current_bbt_points_begin, current_bbt_points_end);
update_tempo_based_rulers (current_bbt_points_begin, current_bbt_points_end); // redraw rulers and measures
} else {
Glib::signal_idle().connect (sigc::bind_return (sigc::bind (sigc::mem_fun (*this, &Editor::redisplay_tempo), true), false));
}

View File

@ -161,7 +161,7 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
do_timefx ();
return 0;
}
switch (current_timefx->run ()) {
case RESPONSE_ACCEPT:
break;

View File

@ -566,7 +566,7 @@ EngineControl::build_full_control_notebook ()
basic_packer.attach (input_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
++row;
}
output_channels.set_name ("OutputChannels");
output_channels.set_flags (Gtk::CAN_FOCUS);
output_channels.set_digits (0);
@ -579,7 +579,7 @@ EngineControl::build_full_control_notebook ()
basic_packer.attach (output_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
++row;
}
input_latency.set_name ("InputLatency");
input_latency.set_flags (Gtk::CAN_FOCUS);
input_latency.set_digits (0);
@ -1023,7 +1023,7 @@ EngineControl::print_channel_count (Gtk::SpinButton* sb)
if (ARDOUR::Profile->get_mixbus()) {
return true;
}
uint32_t cnt = (uint32_t) sb->get_value();
if (cnt == 0) {
sb->set_text (_("all available channels"));
@ -1433,7 +1433,7 @@ EngineControl::device_changed ()
queue_device_changed = true;
}
}
//the device name must be set FIRST so ASIO can populate buffersizes and the control panel button
if (backend->use_separate_input_and_output_devices()) {
backend->set_input_device_name (device_name_in);

View File

@ -158,7 +158,7 @@ ExportDialog::init_gui ()
export_notebook.append_page (*file_format_selector, _("File format"));
export_notebook.append_page (*timespan_selector, _("Time Span"));
export_notebook.append_page (*channel_selector, _("Channels"));
get_vbox()->pack_start (export_notebook, true, true, 0);
get_vbox()->pack_end (warning_widget, false, false, 0);
get_vbox()->pack_end (progress_widget, false, false, 0);
@ -325,7 +325,7 @@ ExportDialog::show_progress ()
if (!status->aborted()) {
NagScreen* ns = NagScreen::maybe_nag (_("export"));
if (ns) {
ns->nag ();
delete ns;

View File

@ -301,7 +301,7 @@ ExportFileNotebook::FilePage::update_example_filename()
example = profile_manager->get_sample_filename_for_format (
filename_state->filename, format_state->format);
}
if (example != "") {
filename_selector.set_example_filename(Glib::path_get_basename (example));
} else {

View File

@ -328,10 +328,10 @@ ExportFilenameSelector::open_browse_dialog ()
while (true) {
int result = dialog.run();
if (result == Gtk::RESPONSE_OK) {
std::string filename = dialog.get_filename();
if (!Glib::file_test (filename, Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n\
The filename will be chosen from the information just above the folder selector."), filename));

View File

@ -180,7 +180,7 @@ class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList
AudioClock silence_end_clock;
/* Post-export hook */
Gtk::Label command_label;
Gtk::Entry command_entry;

View File

@ -55,7 +55,7 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
)
);
option_hbox.pack_start (*b, false, false, 6);
b = Gtk::manage (new Gtk::Button (_("Deselect All")));
b->signal_clicked().connect (
sigc::bind (

View File

@ -34,7 +34,7 @@ FloatingTextEntry::FloatingTextEntry (const std::string& initial_contents)
set_name (X_("FloatingTextEntry"));
set_position (Gtk::WIN_POS_MOUSE);
set_border_width (0);
if (!initial_contents.empty()) {
entry.set_text (initial_contents);
}

View File

@ -133,7 +133,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
max_peak = minus_infinity();
peak_display.set_text (_("-inf"));
peak_display.set_alignment(0.5);
/* stuff related to the fact that the peak display is not, in
fact, supposed to be a text entry.
*/
@ -282,7 +282,7 @@ GainMeterBase::setup_gain_adjustment ()
ignore_toggle = false;
effective_gain_display ();
_previous_amp_output_streams = _amp->output_streams ();
}
@ -529,7 +529,7 @@ GainMeterBase::gain_adjusted ()
} else {
value = gain_adjustment.get_value();
}
if (!ignore_toggle) {
if (_route && _route->amp() == _amp) {
_route->set_gain (value, this);

View File

@ -96,7 +96,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
smaller_hbox->pack_start (delete_button, false, false);
smaller_hbox->pack_start (reset_button, false, false, 4);
smaller_hbox->pack_start (bypass_button, false, true, 4);
automation_manual_all_button.set_text(_("Manual"));
automation_manual_all_button.set_name (X_("generic button"));
automation_play_all_button.set_text(_("Play"));
@ -105,7 +105,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
automation_write_all_button.set_name (X_("generic button"));
automation_touch_all_button.set_text(_("Touch"));
automation_touch_all_button.set_name (X_("generic button"));
Label* l = manage (new Label (_("All Automation")));
l->set_alignment (1.0, 0.5);
automation_hbox->pack_start (*l, true, true);
@ -183,7 +183,7 @@ int value = -1;
static int match_or_digit(char c1, char c2) {
return c1 == c2 || (isdigit(c1) && isdigit(c2));
}
}
static std::size_t matching_chars_at_head(const string s1, const string s2) {
std::size_t length, n = 0;
@ -374,13 +374,13 @@ GenericPluginUI::build ()
// Iterate over the list of controls to find which adjacent controls
// are similar enough to be grouped together.
string label, previous_label = "";
std::vector<int> numbers_in_labels(cui_controls_list.size());
std::vector<float> similarity_scores(cui_controls_list.size());
float most_similar = 0.0, least_similar = 1.0;
i = 0;
for (vector<ControlUI*>::iterator cuip = cui_controls_list.begin(); cuip != cui_controls_list.end(); ++cuip, ++i) {
label = (*cuip)->label.get_text();
@ -406,32 +406,32 @@ GenericPluginUI::build ()
}
// cerr << "label: " << label << " sim: " << fixed << setprecision(3) << similarity_scores[i] << " num: " << numbers_in_labels[i] << endl;
previous_label = label;
previous_label = label;
}
// cerr << "most similar: " << most_similar << ", least similar: " << least_similar << endl;
float similarity_threshold;
if (most_similar > 1.0) {
similarity_threshold = default_similarity_threshold;
} else {
similarity_threshold = most_similar - (1 - default_similarity_threshold);
}
// Now iterate over the list of controls to display them, placing an
// HSeparator between controls of less than a certain similarity, and
// starting a new column when necessary.
i = 0;
for (vector<ControlUI*>::iterator cuip = cui_controls_list.begin(); cuip != cui_controls_list.end(); ++cuip, ++i) {
ControlUI* cui = *cuip;
if (!is_scrollable) {
x++;
}
if (x > max_controls_per_column || similarity_scores[i] <= similarity_threshold) {
if (x > min_controls_per_column) {
frame = manage (new Frame);
@ -477,7 +477,7 @@ GenericPluginUI::build ()
output_table.show_all ();
button_table.show_all ();
automation_manual_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Off));
automation_play_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Play));
automation_write_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Write));
@ -601,7 +601,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
int const steps = desc.integer_step ? (desc.upper - desc.lower + 1) / desc.step : 0;
if (control_ui->scale_points && ((steps && int (control_ui->scale_points->size()) == steps) || desc.enumeration)) {
/* Either:
* a) There is a label for each possible value of this input, or
* b) This port is marked as being an enumeration.
@ -612,7 +612,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
ARDOUR::ScalePoints::const_iterator i = control_ui->scale_points->begin();
i != control_ui->scale_points->end();
++i) {
labels.push_back(i->first);
}

View File

@ -75,7 +75,7 @@ public:
public:
GhostEvent(::NoteBase *, ArdourCanvas::Container *);
virtual ~GhostEvent ();
NoteBase* event;
ArdourCanvas::Item* item;
};

View File

@ -69,7 +69,7 @@ GroupTabs::set_session (Session* s)
_session->RouteRemovedFromRouteGroup.connect (
_session_connections, invalidator (*this), boost::bind (&GroupTabs::route_removed_from_route_group, this, _1, _2), gui_context()
);
_session->route_group_removed.connect (_session_connections, invalidator (*this), boost::bind (&GroupTabs::set_dirty, this), gui_context());
}
}
@ -138,7 +138,7 @@ GroupTabs::on_button_press_event (GdkEventButton* ev)
} else if (ev->button == 3) {
RouteGroup* g = t ? t->group : 0;
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier) && g) {
/* edit */
RouteGroupDialog d (g, false);
@ -191,18 +191,18 @@ GroupTabs::on_button_release_event (GdkEventButton*)
if (_dragging == 0) {
return false;
}
if (!_drag_moved) {
if (_dragging->group) {
/* toggle active state */
_dragging->group->set_active (!_dragging->group->is_active (), this);
}
} else {
/* finish drag */
RouteList routes = routes_for_tab (_dragging);
if (!routes.empty()) {
if (_dragging_new_tab) {
RouteGroup* g = create_and_add_group ();
@ -214,13 +214,13 @@ GroupTabs::on_button_release_event (GdkEventButton*)
} else {
boost::shared_ptr<RouteList> r = _session->get_routes ();
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
bool const was_in_tab = find (
_initial_dragging_routes.begin(), _initial_dragging_routes.end(), *i
) != _initial_dragging_routes.end ();
bool const now_in_tab = find (routes.begin(), routes.end(), *i) != routes.end();
if (was_in_tab && !now_in_tab) {
_dragging->group->remove (*i);
} else if (!was_in_tab && now_in_tab) {
@ -229,11 +229,11 @@ GroupTabs::on_button_release_event (GdkEventButton*)
}
}
}
set_dirty ();
queue_draw ();
}
_dragging = 0;
_initial_dragging_routes.clear ();
@ -254,7 +254,7 @@ GroupTabs::render (cairo_t* cr, cairo_rectangle_t*)
cairo_set_source_rgb (cr, c.get_red_p(), c.get_green_p(), c.get_blue_p());
cairo_rectangle (cr, 0, 0, get_width(), get_height());
cairo_fill (cr);
/* tabs */
for (list<Tab>::const_iterator i = _tabs.begin(); i != _tabs.end(); ++i) {
@ -551,20 +551,20 @@ GroupTabs::set_group_color (RouteGroup* group, uint32_t color)
g = 25;
b = 25;
}
GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
char buf[64];
/* for historical reasons the colors must be stored as 16 bit color
* values. Ugh.
*/
snprintf (buf, sizeof (buf), "%d:%d:%d", (r<<8), (g<<8), (b<<8));
gui_state.set_property (group_gui_id (group), "color", buf);
/* the group color change notification */
PBD::PropertyChange change;
change.add (Properties::color);
group->PropertyChanged (change);
@ -594,7 +594,7 @@ uint32_t
GroupTabs::group_color (RouteGroup* group)
{
assert (group);
GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
string const gui_id = group_gui_id (group);
bool empty;
@ -630,7 +630,7 @@ GroupTabs::route_group_property_changed (RouteGroup* rg)
*/
emit_gui_changed_for_members (rg);
set_dirty ();
}

View File

@ -67,7 +67,7 @@ protected:
private:
static void emit_gui_changed_for_members (ARDOUR::RouteGroup *);
/** Compute all the tabs for this widget.
* @return Tabs.
*/

View File

@ -157,4 +157,4 @@ GUIObjectState::all_ids () const
return ids;
}

View File

@ -55,7 +55,7 @@ public:
static XMLNode* get_or_add_node (XMLNode *, const std::string &);
void remove_node (const std::string& id);
private:
XMLNode _state;
};

View File

@ -259,7 +259,7 @@ void
IOSelectorWindow::io_name_changed (void*)
{
ENSURE_GUI_THREAD (*this, &IOSelectorWindow::io_name_changed, src)
std::string title;
if (!_selector.find_inputs_for_io_outputs()) {

View File

@ -93,10 +93,10 @@ KeyEditor::KeyEditor ()
unbind_button.show ();
}
reset_button.add (reset_label);
reset_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Reset Bindings to Defaults")));
reset_box.pack_start (reset_button, true, false);
reset_box.show ();
reset_button.show ();

View File

@ -74,7 +74,7 @@ bool LXVST_xerror;
int TempErrorHandler(Display *display, XErrorEvent *e)
{
LXVST_xerror = true;
return 0;
}
@ -89,14 +89,14 @@ int getXWindowProperty(Window window, Atom atom)
unsigned char *data;
Atom userType;
LXVST_xerror = false;
/*Use our own Xerror handler while we're in here - in an
attempt to stop the brain dead default Xerror behaviour of
qutting the entire application because of e.g. an invalid
window ID*/
XErrorHandler olderrorhandler = XSetErrorHandler(TempErrorHandler);
XGetWindowProperty( LXVST_XDisplay, //The display
window, //The Window
atom, //The property
@ -109,14 +109,14 @@ int getXWindowProperty(Window window, Atom atom)
&userCount, //Actual number of items stored in the returned data
&bytes, //Number of bytes remaining if a partial read
&data); //The actual data read
if(LXVST_xerror == false && userCount == 1)
result = *(int*)data;
XSetErrorHandler(olderrorhandler);
/*Hopefully this will return zero if the property is not set*/
return result;
}
@ -138,14 +138,14 @@ long getXWindowProperty(Window window, Atom atom)
unsigned char *data;
Atom userType;
LXVST_xerror = false;
/*Use our own Xerror handler while we're in here - in an
attempt to stop the brain dead default Xerror behaviour of
qutting the entire application because of e.g. an invalid
window ID*/
XErrorHandler olderrorhandler = XSetErrorHandler(TempErrorHandler);
XGetWindowProperty( LXVST_XDisplay,
window,
atom,
@ -158,14 +158,14 @@ long getXWindowProperty(Window window, Atom atom)
&userCount,
&bytes,
&data);
if(LXVST_xerror == false && userCount == 1)
result = *(long*)data;
XSetErrorHandler(olderrorhandler);
/*Hopefully this will return zero if the property is not set*/
return result;
}
@ -178,70 +178,70 @@ static void
dispatch_x_events (XEvent* event, VSTState* vstfx)
{
/*Handle some of the Events we might be interested in*/
switch(event->type)
{
/*Configure event - when the window is resized or first drawn*/
case ConfigureNotify:
{
Window window = event->xconfigure.event;
int width = event->xconfigure.width;
int height = event->xconfigure.height;
/*If we get a config notify on the parent window XID then we need to see
if the size has been changed - some plugins re-size their UI window e.g.
when opening a preset manager (you might think that should be spawned as a new window...) */
/*if the size has changed, we flag this so that in lxvst_pluginui.cc we can make the
change to the GTK parent window in ardour, from its UI thread*/
if (window == (Window) (vstfx->linux_window)) {
if (width != vstfx->width || height!=vstfx->height) {
vstfx->width = width;
vstfx->height = height;
vstfx->want_resize = 1;
/*QUIRK : Loomer plugins not only resize the UI but throw it into some random
position at the same time. We need to re-position the window at the origin of
the parent window*/
if (vstfx->linux_plugin_ui_window) {
XMoveWindow (LXVST_XDisplay, vstfx->linux_plugin_ui_window, 0, 0);
}
}
}
break;
}
/*Reparent Notify - when the plugin UI is reparented into
our Host Window we will get an event here... probably... */
case ReparentNotify:
{
Window ParentWindow = event->xreparent.parent;
/*If the ParentWindow matches the window for the vstfx instance then
the Child window must be the XID of the pluginUI window created by the
plugin, so we need to see if it has a callback stuck to it, and if so
set that up in the vstfx */
/***********************************************************/
/* 64Bit --- This mechanism is not 64Bit compatible at the */
/* present time */
/***********************************************************/
if (ParentWindow == (Window) (vstfx->linux_window)) {
Window PluginUIWindowID = event->xreparent.window;
vstfx->linux_plugin_ui_window = PluginUIWindowID;
#ifdef LXVST_32BIT
int result = getXWindowProperty(PluginUIWindowID, XInternAtom(LXVST_XDisplay, "_XEventProc", false));
if (result == 0) {
vstfx->eventProc = NULL;
} else {
@ -250,7 +250,7 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
#endif
#ifdef LXVST_64BIT
long result = getXWindowProperty(PluginUIWindowID, XInternAtom(LXVST_XDisplay, "_XEventProc", false));
if(result == 0)
vstfx->eventProc = NULL;
else
@ -259,47 +259,47 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
}
break;
}
case ClientMessage:
{
Window window = event->xany.window;
Atom message_type = event->xclient.message_type;
/*The only client message we are interested in is to signal
that the plugin parent window is now valid and can be passed
to effEditOpen when the editor is launched*/
if (window == (Window) (vstfx->linux_window)) {
char* message = XGetAtomName(LXVST_XDisplay, message_type);
if (strcmp(message,"LaunchEditor") == 0) {
if (event->xclient.data.l[0] == 0x0FEEDBAC) {
vstfx_launch_editor (vstfx);
}
}
XFree(message);
}
break;
}
default:
break;
}
/* Some VSTs built with toolkits e.g. JUCE will manager their own UI
autonomously in the plugin, running the UI in its own thread, so once
we have created a parent window for the plugin, its UI takes care of
itself.*/
/*Other types register a callback as an Xwindow property on the plugin
UI window after they create it. If that is the case, we need to call it
here, passing the XEvent into it*/
if (vstfx->eventProc == NULL) {
return;
}
vstfx->eventProc((void*)event);
}
@ -312,11 +312,11 @@ maybe_set_program (VSTState* vstfx)
}
vstfx->plugin->dispatcher (vstfx->plugin, effSetProgram, 0, vstfx->want_program, NULL, 0);
if (vstfx->vst_version >= 2) {
vstfx->plugin->dispatcher (vstfx->plugin, 68 /* effEndSetProgram */, 0, 0, NULL, 0);
}
vstfx->want_program = -1;
}
@ -336,10 +336,10 @@ void* gui_event_loop (void* ptr)
int LXVST_sched_timer_interval = 40; //ms, 25fps
XEvent event;
uint64_t clock1, clock2;
clock1 = g_get_monotonic_time();
/*The 'Forever' loop - runs the plugin UIs etc - based on the FST gui event loop*/
while (!gui_quit)
{
/* handle window creation requests, destroy requests,
@ -347,37 +347,37 @@ void* gui_event_loop (void* ptr)
/*Look at the XEvent queue - if there are any XEvents we need to handle them,
including passing them to all the plugin (eventProcs) we are currently managing*/
bool may_sleep = true;
if(LXVST_XDisplay)
{
/*See if there are any events in the queue*/
int num_events = XPending(LXVST_XDisplay);
if (num_events > 0) {
// keep dispatching events as fast as possible
may_sleep = false;
}
/*process them if there are any*/
while(num_events)
{
XNextEvent(LXVST_XDisplay, &event);
/*Call dispatch events, with the event, for each plugin in the linked list*/
for (vstfx = vstfx_first; vstfx; vstfx = vstfx->next)
{
{
pthread_mutex_lock(&vstfx->lock);
dispatch_x_events(&event, vstfx);
pthread_mutex_unlock(&vstfx->lock);
}
num_events--;
}
}
@ -385,7 +385,7 @@ void* gui_event_loop (void* ptr)
/*We don't want to use all the CPU.. */
Glib::usleep(1000);
/*See if its time for us to do a scheduled event pass on all the plugins*/
clock2 = g_get_monotonic_time();
@ -395,34 +395,34 @@ void* gui_event_loop (void* ptr)
{
//printf("elapsed %d ms ^= %.2f Hz\n", elapsed_time_ms, 1000.0/(double)elapsed_time_ms); // DEBUG
pthread_mutex_lock (&plugin_mutex);
again:
/*Parse through the linked list of plugins*/
for (vstfx = vstfx_first; vstfx; vstfx = vstfx->next)
{
{
pthread_mutex_lock (&vstfx->lock);
/*Window scheduled for destruction*/
if (vstfx->destroy) {
if (vstfx->linux_window) {
vstfx->plugin->dispatcher (vstfx->plugin, effEditClose, 0, 0, NULL, 0.0);
XDestroyWindow (LXVST_XDisplay, vstfx->linux_window);
/* FIXME - probably safe to assume we never have an XID of 0 but not explicitly true */
vstfx->linux_window = 0;
vstfx->destroy = FALSE;
}
vstfx_event_loop_remove_plugin (vstfx);
vstfx->been_activated = FALSE;
pthread_cond_signal (&vstfx->window_status_change);
pthread_mutex_unlock (&vstfx->lock);
goto again;
}
/*Window does not yet exist - scheduled for creation*/
/* FIXME - probably safe to assume 0 is not a valid XID but not explicitly true */
@ -441,9 +441,9 @@ again:
maybe_set_program (vstfx);
vstfx->want_program = -1;
vstfx->want_chunk = 0;
/*scheduled call to dispatcher*/
if (vstfx->dispatcher_wantcall) {
vstfx->dispatcher_retval = vstfx->plugin->dispatcher (
vstfx->plugin,
@ -453,18 +453,18 @@ again:
vstfx->dispatcher_ptr,
vstfx->dispatcher_opt
);
vstfx->dispatcher_wantcall = 0;
pthread_cond_signal (&vstfx->plugin_dispatcher_called);
}
/*Call the editor Idle function in the plugin*/
vstfx->plugin->dispatcher (vstfx->plugin, effEditIdle, 0, 0, NULL, 0);
if(vstfx->wantIdle)
vstfx->plugin->dispatcher (vstfx->plugin, 53, 0, 0, NULL, 0);
pthread_mutex_unlock (&vstfx->lock);
}
pthread_mutex_unlock (&plugin_mutex);
@ -490,54 +490,54 @@ int vstfx_init (void* ptr)
{
int thread_create_result;
pthread_attr_t thread_attributes;
/*Init the attribs to defaults*/
pthread_attr_init(&thread_attributes);
/*Make sure the thread is joinable - this should be the default anyway -
so we can join to it on vstfx_exit*/
pthread_attr_setdetachstate(&thread_attributes, PTHREAD_CREATE_JOINABLE);
/*This is where we need to open a connection to X, and start the GUI thread*/
/*Open our connection to X - all linuxVST plugin UIs handled by the LXVST engine
will talk to X down this connection - X cannot handle multi-threaded access via
the same Display* */
if(LXVST_XDisplay==NULL)
LXVST_XDisplay = XOpenDisplay(NULL); //We might be able to make this open a specific screen etc
/*Drop out and report the error if we fail to connect to X */
if(LXVST_XDisplay==NULL)
{
vstfx_error ("** ERROR ** VSTFX: Failed opening connection to X");
return -1;
}
/*We have a connection to X - so start the gui event loop*/
/*Create the thread - use default attrs for now, don't think we need anything special*/
thread_create_result = pthread_create(&LXVST_gui_event_thread, NULL, gui_event_loop, NULL);
if(thread_create_result!=0)
{
/*There was a problem starting the GUI event thread*/
vstfx_error ("** ERROR ** VSTFX: Failed starting GUI event thread");
XCloseDisplay(LXVST_XDisplay);
return -1;
}
return 0;
}
@ -546,10 +546,10 @@ int vstfx_init (void* ptr)
void vstfx_exit()
{
gui_quit = 1;
/*We need to pthread_join the gui_thread here so
we know when it has stopped*/
pthread_join(LXVST_gui_event_thread, NULL);
}
@ -565,14 +565,14 @@ int vstfx_run_editor (VSTState* vstfx)
vstfx_first = vstfx;
} else {
VSTState* p = vstfx_first;
while (p->next) {
p = p->next;
}
p->next = vstfx;
/* Mark the new end of the list */
vstfx->next = NULL;
}
@ -581,11 +581,11 @@ int vstfx_run_editor (VSTState* vstfx)
/* wait for the plugin editor window to be created (or not) */
pthread_mutex_lock (&vstfx->lock);
if (!vstfx->linux_window) {
pthread_cond_wait (&vstfx->window_status_change, &vstfx->lock);
}
pthread_mutex_unlock (&vstfx->lock);
if (!vstfx->linux_window) {
@ -602,7 +602,7 @@ after run_editor has added the plugin (editor) to the linked list*/
int vstfx_create_editor (VSTState* vstfx)
{
Window parent_window;
int x_size = 1;
int y_size = 1;
@ -613,10 +613,10 @@ int vstfx_create_editor (VSTState* vstfx)
vstfx_error ("** ERROR ** VSTFX: Plugin \"%s\" has no editor", vstfx->handle->name);
return -1;
}
/*Create an XWindow for the plugin to inhabit*/
parent_window = XCreateSimpleWindow (
LXVST_XDisplay,
DefaultRootWindow(LXVST_XDisplay),
@ -628,35 +628,35 @@ int vstfx_create_editor (VSTState* vstfx)
0,
0
);
/*Select the events we are interested in receiving - we need Substructure notify so that
if the plugin resizes its window - e.g. Loomer Manifold then we get a message*/
XSelectInput(LXVST_XDisplay,
parent_window,
SubstructureNotifyMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | ExposureMask);
vstfx->linux_window = parent_window;
vstfx->xid = parent_window; //vstfx->xid will be referenced to connect to GTK UI in ardour later
/*Because the plugin may be operating on a different Display* to us, and therefore
the two event queues can be asynchronous, although we have created the window on
our display, we can't guarantee it exists in the server yet, which will
cause BadWindow crashes if the plugin tries to use it.
It would be nice to use CreateNotify events here, but they don't get
through on all window managers, so instead we pass a client message
into out queue, after the XCreateWindow. When this message pops out
in our event handler, it will trigger the second stage of plugin
Editor instantiation, and by then the Window should be valid...*/
XClientMessageEvent event;
/*Create an atom to identify our message (only if it doesn't already exist)*/
Atom WindowActiveAtom = XInternAtom(LXVST_XDisplay, "LaunchEditor", false);
event.type = ClientMessage;
event.send_event = true;
event.window = parent_window;
@ -664,9 +664,9 @@ int vstfx_create_editor (VSTState* vstfx)
event.format = 32; //Data format
event.data.l[0] = 0x0FEEDBAC; //Something we can recognize later
/*Push the event into the queue on our Display*/
XSendEvent(LXVST_XDisplay, parent_window, FALSE, NoEventMask, (XEvent*)&event);
return 0;
@ -681,22 +681,22 @@ vstfx_launch_editor (VSTState* vstfx)
is now valid in the XServer and can be passed to the plugin in effEditOpen
without generating BadWindow errors when the plugin reparents itself into our
parent window*/
if(vstfx->been_activated)
return 0;
Window parent_window;
struct ERect* er;
int x_size = 1;
int y_size = 1;
parent_window = vstfx->linux_window;
/*Open the editor - Bah! we have to pass the int windowID as a void pointer - yuck
it gets cast back to an int as the parent window XID in the plugin - and we have to pass the
Display* as a long */
/**************************************************************/
/* 64Bit --- parent window is an int passed as a void* so */
/* that should be ok for 64Bit machines */
@ -709,36 +709,36 @@ vstfx_launch_editor (VSTState* vstfx)
/* */
/* linuxDSP VSTs don't use the host Display* at all */
/**************************************************************/
vstfx->plugin->dispatcher (vstfx->plugin, effEditOpen, 0, (long)LXVST_XDisplay, (void*)(parent_window), 0 );
/*QUIRK - some plugins need a slight delay after opening the editor before you can
ask the window size or they might return zero - specifically discoDSP */
Glib::usleep(100000);
/*Now we can find out how big the parent window should be (and try) to resize it*/
vstfx->plugin->dispatcher (vstfx->plugin, effEditGetRect, 0, 0, &er, 0 );
x_size = er->right - er->left;
y_size = er->bottom - er->top;
vstfx->width = x_size;
vstfx->height = y_size;
XResizeWindow(LXVST_XDisplay, parent_window, x_size, y_size);
XFlush (LXVST_XDisplay);
/*Not sure if we need to map the window or if the plugin will do it for us
it should be ok because XReparentWindow generates a Map event*/
/*mark the editor as activated - mainly so that vstfx_get_XID
will know it is valid*/
vstfx->been_activated = TRUE;
pthread_cond_signal (&vstfx->window_status_change);
return 0;
}
@ -765,10 +765,10 @@ vstfx_event_loop_remove_plugin (VSTState* vstfx)
so we don't need to lock here - if we did there would be
a deadlock anyway
*/
VSTState* p;
VSTState* prev;
for (p = vstfx_first, prev = NULL; p; prev = p, p = p->next) {
if (p == vstfx) {
if (prev) {

View File

@ -323,7 +323,7 @@ LocationEditRow::set_location (Location *loc)
set_tooltip (start_to_playhead_button, _("Set range start from playhead location"));
set_tooltip (end_to_playhead_button, _("Set range end from playhead location"));
} else {
set_tooltip (remove_button, _("Remove this marker"));
@ -903,7 +903,7 @@ LocationUI::location_added (Location* location)
loc.sort (LocationSortByStart ());
LocationEditRow* erow = manage (new LocationEditRow (_session, location));
erow->set_clock_group (*_clock_group);
erow->remove_requested.connect (sigc::mem_fun (*this, &LocationUI::location_remove_requested));
@ -1132,7 +1132,7 @@ LocationUI::clock_mode_from_session_instant_xml () const
if (!p) {
return ARDOUR_UI::instance()->secondary_clock->mode();
}
return (AudioClock::Mode) string_2_enum (p->value (), AudioClock::Mode);
}

View File

@ -38,8 +38,8 @@ LXVSTPluginUI::LXVSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_
LXVSTPluginUI::~LXVSTPluginUI ()
{
_screen_update_connection.disconnect();
_screen_update_connection.disconnect();
// plugin destructor destroys the custom GUI, via the vstfx engine,
// and then our PluginUIWindow does the rest
}
@ -67,35 +67,35 @@ LXVSTPluginUI::resize_callback ()
/* We could maybe use this to resize the plugin GTK parent window
if required
*/
if (!_vst->state()->want_resize) {
return;
}
int new_height = _vst->state()->height;
int new_width = _vst->state()->width;
void* gtk_parent_window = _vst->state()->extra_data;
if (gtk_parent_window) {
((Gtk::Window*) gtk_parent_window)->resize (new_width, new_height + LXVST_H_FIDDLE);
}
_vst->state()->want_resize = 0;
}
int
LXVSTPluginUI::get_preferred_height ()
{
{
/* XXX: FIXME */
/* We have to return the required height of the plugin UI window + a fiddle factor
because we can't know how big the preset menu bar is until the window is realised
and we can't realise it until we have told it how big we would like it to be
which we can't do until it is realised etc
*/
// May not be 40 for all screen res etc
// May not be 40 for all screen res etc
return VSTPluginUI::get_preferred_height () + LXVST_H_FIDDLE;
}
@ -103,9 +103,9 @@ int
LXVSTPluginUI::package (Gtk::Window& win)
{
VSTPluginUI::package (win);
/* Map the UI start and stop updating events to 'Map' events on the Window */
win.signal_map_event().connect (mem_fun (*this, &LXVSTPluginUI::start_updating));
win.signal_unmap_event().connect (mem_fun (*this, &LXVSTPluginUI::stop_updating));
@ -129,9 +129,9 @@ LXVSTPluginUI::get_XID ()
created and we get bad Window errors when trying
to embed it in the GTK UI
*/
pthread_mutex_lock (&(_vst->state()->lock));
/* The Window may be scheduled for creation
but not actually created by the gui_event_loop yet -
spin here until it has been activated. Possible
@ -139,21 +139,21 @@ LXVSTPluginUI::get_XID ()
should not be called here if the window doesn't
exist or will never exist
*/
while (!(_vst->state()->been_activated)) {
Glib::usleep (1000);
}
int const id = _vst->state()->xid;
pthread_mutex_unlock (&(_vst->state()->lock));
/* Finally it might be safe to return the ID -
problems will arise if we return either a zero ID
and GTK tries to socket it or if we return an ID
which hasn't yet become real to the server
*/
return id;
}
@ -166,7 +166,7 @@ static int
gtk_xerror_handler (Display*, XErrorEvent*)
{
std::cerr << "** ERROR ** LXVSTPluginUI : Trapped an X Window System Error" << std::endl;
return 0;
}

View File

@ -37,7 +37,7 @@ class LXVSTPluginUI : public VSTPluginUI
~LXVSTPluginUI ();
int get_preferred_height ();
bool start_updating (GdkEventAny *);
bool stop_updating (GdkEventAny *);

View File

@ -372,7 +372,7 @@ int main (int argc, char *argv[])
error << _("Could not complete pre-GUI initialization") << endmsg;
exit (1);
}
try {
ui = new ARDOUR_UI (&argc, &argv, localedir.c_str());
} catch (failed_constructor& err) {

View File

@ -28,7 +28,7 @@ public:
MainClock (const std::string& clock_name, const std::string& widget_name, bool primary);
private:
// Editor *_editor;
void build_ops_menu ();

View File

@ -261,12 +261,12 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (unit_position, 0));
#ifdef CANVAS_DEBUG
group->name = string_compose ("Marker::group for %1", annotation);
#endif
#endif
_name_background = new ArdourCanvas::Rectangle (group);
#ifdef CANVAS_DEBUG
_name_background->name = string_compose ("Marker::_name_background for %1", annotation);
#endif
#endif
/* adjust to properly locate the tip */
@ -286,7 +286,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
layout->set_font_description (name_font);
Gtkmm2ext::get_ink_pixel_size (layout, width, name_height);
_name_item = new ArdourCanvas::Text (group);
CANVAS_DEBUG_NAME (_name_item, string_compose ("ArdourMarker::_name_item for %1", annotation));
_name_item->set_font_description (name_font);
@ -303,7 +303,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
group->set_data ("marker", this);
mark->set_data ("marker", this);
if (handle_events) {
group->Event.connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), group, this));
}
@ -420,10 +420,10 @@ ArdourMarker::setup_name_display ()
if (label_on_left ()) {
_name_item->set_x_position (-name_width);
}
_name_item->clamp_width (name_width);
_name_item->set (_name);
if (label_on_left ()) {
/* adjust right edge of background to fit text */
_name_background->set_x0 (_name_item->position().x - padding);

View File

@ -142,7 +142,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
void update_button_box ();
void update_name_box ();
void name_changed ();
void route_color_changed ();
bool _suspend_menu_callbacks;

View File

@ -380,15 +380,15 @@ MidiChannelSelectorWindow::build ()
vpacker->pack_start (capture_all_button);
capture_all_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), AllChannels));
vpacker->pack_start (capture_filter_button);
capture_filter_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), FilterChannels));
vpacker->pack_start (capture_force_button);
capture_force_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), ForceChannel));
vpacker->pack_start (capture_mask_box);
capture_controls = manage (new HBox);
capture_controls->set_spacing (6);
@ -416,10 +416,10 @@ MidiChannelSelectorWindow::build ()
vpacker->pack_start (playback_all_button);
playback_all_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), AllChannels));
vpacker->pack_start (playback_filter_button);
playback_filter_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), FilterChannels));
vpacker->pack_start (playback_force_button);
playback_force_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), ForceChannel));
@ -496,7 +496,7 @@ MidiChannelSelectorWindow::invert_capture_mask ()
track->set_capture_channel_mask (~track->get_capture_channel_mask());
}
}
void
MidiChannelSelectorWindow::set_playback_selected_channels (uint16_t mask)
{
@ -510,7 +510,7 @@ MidiChannelSelectorWindow::set_playback_selected_channels (uint16_t mask)
playback_buttons[i]->set_active ((1<<i) & mask);
}
break;
case ForceChannel:
/* only set the lowest set channel in the mask as active */
for (uint16_t i = 0; i < 16; i++) {
@ -533,7 +533,7 @@ MidiChannelSelectorWindow::set_capture_selected_channels (uint16_t mask)
capture_buttons[i]->set_active ((1<<i) & mask);
}
break;
case ForceChannel:
/* only set the lowest set channel in the mask as active */
for (uint16_t i = 0; i < 16; i++) {
@ -605,10 +605,10 @@ MidiChannelSelectorWindow::playback_mode_changed ()
if (playback_buttons.empty()) {
Gtkmm2ext::container_clear (playback_mask_box);
ToggleButton* tb;
RadioButtonGroup group;
for (uint32_t n = 0; n < 16; ++n) {
char buf[3];
snprintf (buf, sizeof (buf), "%d", n+1);
@ -638,7 +638,7 @@ MidiChannelSelectorWindow::playback_mode_changed ()
tb->set_sensitive (false);
}
}
if (mode != ForceChannel) {
set_playback_selected_channels (track->get_playback_channel_mask());
}
@ -703,10 +703,10 @@ MidiChannelSelectorWindow::capture_mode_changed ()
if (capture_buttons.empty()) {
Gtkmm2ext::container_clear (capture_mask_box);
ToggleButton* tb;
RadioButtonGroup group;
for (uint32_t n = 0; n < 16; ++n) {
char buf[3];
snprintf (buf, sizeof (buf), "%d", n+1);
@ -736,7 +736,7 @@ MidiChannelSelectorWindow::capture_mode_changed ()
tb->set_sensitive (false);
}
}
if (mode != ForceChannel) {
set_capture_selected_channels (track->get_capture_channel_mask());
}
@ -803,7 +803,7 @@ MidiChannelSelectorWindow::capture_mode_toggled (ChannelMode mode)
so we take action only if the button is active (i.e it is the one
just clicked on)
*/
switch (mode) {
case AllChannels:
if (capture_all_button.get_active()) {
@ -833,7 +833,7 @@ MidiChannelSelectorWindow::playback_mode_toggled (ChannelMode mode)
so we take action only if the button is active (i.e it is the one
just clicked on)
*/
switch (mode) {
case AllChannels:
if (playback_all_button.get_active()) {
@ -860,7 +860,7 @@ MidiChannelSelectorWindow::set_channel_colors (const uint32_t new_channel_colors
char color_normal[8];
char color_active[8];
snprintf(color_normal, 8, "#%x", UINT_INTERPOLATE(new_channel_colors[n], 0x000000ff, 0.6));
snprintf(color_active, 8, "#%x", new_channel_colors[n]);

View File

@ -67,5 +67,5 @@ std::string
MidiExportDialog::get_path () const
{
return file_chooser.get_filename ();
}

View File

@ -72,7 +72,7 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
if (note_length_map.empty()) {
fill_note_length_map ();
}
/* We do not handle nested sources/regions. Caller should have tackled this */
if (r->max_source_level() > 0) {
@ -90,7 +90,7 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
note_length_model = ListStore::create (note_length_columns);
TreeModel::Row row;
for (std::map<int,string>::iterator i = note_length_map.begin(); i != note_length_map.end(); ++i) {
row = *(note_length_model->append());
row[note_length_columns.ticks] = i->first;
@ -152,7 +152,7 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
buttons.attach (sound_notes_button, 0, 1, 0, 1);
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action ("Editor", "sound-midi-notes");
if (act) {
gtk_activatable_set_related_action (GTK_ACTIVATABLE (sound_notes_button.gobj()), act->gobj());
gtk_activatable_set_related_action (GTK_ACTIVATABLE (sound_notes_button.gobj()), act->gobj());
}
view.show ();
@ -191,7 +191,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
if (!view.get_path_at_pos (ev->x, ev->y, path, col, cellx, celly)) {
return false;
}
if (view.get_selection()->count_selected_rows() == 0) {
was_selected = false;
} else if (view.get_selection()->is_selected (path)) {
@ -199,7 +199,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
} else {
was_selected = false;
}
int colnum = GPOINTER_TO_UINT (col->get_data (X_("colnum")));
switch (colnum) {
@ -274,19 +274,19 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
if (was_selected) {
/* use selection */
TreeView::Selection::ListHandle_Path rows = view.get_selection()->get_selected_rows ();
TreeModel::iterator iter;
boost::shared_ptr<NoteType> note;
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
previous_selection.push_back (*i);
if ((iter = model->get_iter (*i))) {
note = (*iter)[columns._note];
note = (*iter)[columns._note];
switch (prop) {
case MidiModel::NoteDiffCommand::StartTime:
if (note->time() + fdelta >= 0) {
@ -321,7 +321,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
} else {
/* just this row */
TreeModel::iterator iter;
iter = model->get_iter (path);
@ -329,7 +329,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
if (iter) {
boost::shared_ptr<NoteType> note = (*iter)[columns._note];
switch (prop) {
case MidiModel::NoteDiffCommand::StartTime:
if (note->time() + fdelta >= 0) {
@ -364,7 +364,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
m->apply_command (*_session, cmd);
/* reset selection to be as it was before we rebuilt */
for (vector<TreeModel::Path>::iterator i = previous_selection.begin(); i != previous_selection.end(); ++i) {
view.get_selection()->select (*i);
}
@ -401,7 +401,7 @@ MidiListEditor::key_press (GdkEventKey* ev)
ret = true;
}
break;
case GDK_Up:
case GDK_uparrow:
if (edit_column > 0) {
@ -435,7 +435,7 @@ MidiListEditor::key_press (GdkEventKey* ev)
case GDK_Escape:
stop_editing (true);
break;
}
return ret;
@ -486,7 +486,7 @@ MidiListEditor::key_release (GdkEventKey* ev)
ret = true;
}
break;
case GDK_r:
if (_session && Gtkmm2ext::Keyboard::modifier_state_contains (ev->state, Gtkmm2ext::Keyboard::PrimaryModifier)) {
_session->redo (1);
@ -626,7 +626,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
if (sscanf (text.c_str(), "%lf", &fval) == 1) {
/* numeric value entered */
if (text.find ('.') == string::npos && text.find (',') == string::npos) {
/* integral => units are ticks */
fval = fval / BBT_Time::ticks_per_beat;
@ -649,13 +649,13 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
* displaying numeric value ... use new value
* from note length map, and convert to beats.
*/
for (x = note_length_map.begin(); x != note_length_map.end(); ++x) {
if (x->second == text) {
break;
}
}
if (x != note_length_map.end()) {
fval = x->first / BBT_Time::ticks_per_beat;
}
@ -665,7 +665,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
fval = -1.0;
if (text != x->second) {
/* get ticks for the newly selected
* note length
*/
@ -675,7 +675,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
break;
}
}
if (x != note_length_map.end()) {
/* convert to beats */
fval = (double) x->first / BBT_Time::ticks_per_beat;
@ -702,12 +702,12 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
MidiModel::NoteDiffCommand* cmd = m->new_note_diff_command (opname);
TreeView::Selection::ListHandle_Path rows = view.get_selection()->get_selected_rows ();
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
if ((iter = model->get_iter (*i))) {
note = (*iter)[columns._note];
note = (*iter)[columns._note];
switch (prop) {
case MidiModel::NoteDiffCommand::Velocity:
cmd->change (note, prop, (uint8_t) (note->velocity() + idelta));
@ -731,7 +731,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
/* model has been redisplayed by now */
/* keep selected row(s), move cursor there, don't continue editing */
TreeViewColumn* col = view.get_column (edit_column);
view.set_cursor (edit_path, *col, 0);
@ -776,7 +776,7 @@ MidiListEditor::redisplay_model ()
const Evoral::Beats dur = (*i)->end_time() - (*i)->time();
bbt.beats = dur.get_beats ();
bbt.ticks = dur.get_ticks ();
uint64_t len_ticks = (*i)->length().to_ticks();
std::map<int,string>::iterator x = note_length_map.find (len_ticks);
@ -811,7 +811,7 @@ MidiListEditor::selection_changed ()
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
if ((iter = model->get_iter (*i))) {
note = (*iter)[columns._note];
note = (*iter)[columns._note];
player->add (note);
}
}

View File

@ -271,7 +271,7 @@ MidiRegionView::init (bool wfd)
NoteBase::NoteBaseDeleted.connect (note_delete_connection, MISSING_INVALIDATOR,
boost::bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1),
gui_context());
if (wfd) {
Glib::Threads::Mutex::Lock lm(midi_region()->midi_source(0)->mutex());
midi_region()->midi_source(0)->load_model(lm);
@ -502,10 +502,10 @@ MidiRegionView::button_press (GdkEventButton* ev)
}
if (_mouse_state != SelectTouchDragging) {
_pressed_button = ev->button;
_mouse_state = Pressed;
return true;
}
@ -578,7 +578,7 @@ MidiRegionView::button_release (GdkEventButton* ev)
grid snap without it overlapping this one.
*/
beats -= Evoral::Beats::tick();
create_note_at (editor.pixel_to_sample (event_x), event_y, beats, true);
break;
@ -646,9 +646,9 @@ MidiRegionView::motion (GdkEventMotion* ev)
case Pressed:
if (_pressed_button == 1) {
MouseMode m = editor.current_mouse_mode();
if (m == MouseDraw || (m == MouseContent && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier()))) {
editor.drags()->set (new NoteCreateDrag (dynamic_cast<Editor *> (&editor), group, this), (GdkEvent *) ev);
_mouse_state = AddDragging;
@ -677,7 +677,7 @@ MidiRegionView::motion (GdkEventMotion* ev)
case AddDragging:
editor.drags()->motion_handler ((GdkEvent *) ev, false);
break;
case SelectTouchDragging:
return false;
@ -733,7 +733,7 @@ MidiRegionView::key_press (GdkEventKey* ev)
*/
bool unmodified = Keyboard::no_modifier_keys_pressed (ev);
if (unmodified && (ev->keyval == GDK_Alt_L || ev->keyval == GDK_Alt_R)) {
_mouse_state = SelectTouchDragging;
return true;
@ -878,7 +878,7 @@ MidiRegionView::velocity_edit ()
if (_selection.empty()) {
return;
}
/* pick a note somewhat at random (since Selection is a set<>) to
* provide the "current" velocity for the dialog.
*/
@ -1191,7 +1191,7 @@ MidiRegionView::redisplay_model()
bool visible;
if (note_in_region_range (note, visible)) {
if (!empty_when_starting && (cne = find_canvas_note (note)) != 0) {
cne->validate ();
@ -1216,7 +1216,7 @@ MidiRegionView::redisplay_model()
}
} else {
if (!empty_when_starting && (cne = find_canvas_note (note)) != 0) {
cne->validate ();
cne->hide ();
@ -1229,17 +1229,17 @@ MidiRegionView::redisplay_model()
if (!empty_when_starting) {
for (Events::iterator i = _events.begin(); i != _events.end(); ) {
if (!(*i)->valid ()) {
for (vector<GhostRegion*>::iterator j = ghosts.begin(); j != ghosts.end(); ++j) {
MidiGhostRegion* gr = dynamic_cast<MidiGhostRegion*> (*j);
if (gr) {
gr->remove_note (*i);
}
}
delete *i;
i = _events.erase (i);
} else {
++i;
}
@ -1303,7 +1303,7 @@ MidiRegionView::display_sysexes()
for (MidiModel::SysExes::const_iterator i = _model->sysexes().begin(); i != _model->sysexes().end(); ++i) {
const boost::shared_ptr<const Evoral::MIDIEvent<Evoral::Beats> > mev =
boost::static_pointer_cast<const Evoral::MIDIEvent<Evoral::Beats> > (*i);
if (mev) {
if (mev->is_spp() || mev->is_mtc_quarter() || mev->is_mtc_full()) {
have_periodic_system_messages = true;
@ -1311,19 +1311,19 @@ MidiRegionView::display_sysexes()
}
}
}
if (have_periodic_system_messages) {
double zoom = trackview.editor().get_current_zoom (); // frames per pixel
/* get an approximate value for the number of samples per video frame */
double video_frame = trackview.session()->frame_rate() * (1.0/30);
/* if we are zoomed out beyond than the cutoff (i.e. more
* frames per pixel than frames per 4 video frames), don't
* show periodic sysex messages.
*/
if (zoom > (video_frame*4)) {
display_periodic_messages = false;
}
@ -1955,7 +1955,7 @@ patch_applies (const ARDOUR::MidiModel::constPatchChangePtr pc, Evoral::Beats ti
{
return pc->time() <= time && pc->channel() == channel;
}
void
MidiRegionView::get_patch_key_at (Evoral::Beats time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key) const
{
@ -2255,13 +2255,13 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b
uint8_t high_note = 0;
MidiModel::Notes& notes (_model->notes());
_optimization_iterator = _events.begin();
if (extend && !have_selection) {
extend = false;
}
/* scan existing selection to get note range */
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
if ((*i)->note()->note() < low_note) {
low_note = (*i)->note()->note();
@ -2270,7 +2270,7 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b
high_note = (*i)->note()->note();
}
}
if (!add) {
clear_selection ();
@ -2593,7 +2593,7 @@ MidiRegionView::note_dropped(NoteBase *, frameoffset_t dt, int8_t dnote)
start_note_diff_command (_("move notes"));
for (Selection::iterator i = _selection.begin(); i != _selection.end() ; ++i) {
framepos_t new_frames = source_beats_to_absolute_frames ((*i)->note()->time()) + dt;
Evoral::Beats new_time = absolute_frames_to_source_beats (new_frames);
@ -2857,7 +2857,7 @@ MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_
/* Get the new x position for this resize, which is in pixels relative
* to the region position.
*/
double current_x;
if (at_front) {
@ -3711,7 +3711,7 @@ MidiRegionView::update_ghost_note (double x, double y)
_note_group->canvas_to_item (x, y);
PublicEditor& editor = trackview.editor ();
framepos_t const unsnapped_frame = editor.pixel_to_sample (x);
framecnt_t grid_frames;
framepos_t const f = snap_frame_to_grid_underneath (unsnapped_frame, grid_frames);
@ -4084,7 +4084,7 @@ framepos_t
MidiRegionView::snap_frame_to_grid_underneath (framepos_t p, framecnt_t& grid_frames) const
{
PublicEditor& editor = trackview.editor ();
const Evoral::Beats grid_beats = get_grid_beats(p);
grid_frames = region_beats_to_region_frames (grid_beats);

View File

@ -309,7 +309,7 @@ public:
Selection selection () const {
return _selection;
}
void selection_as_notelist (Notes& selected, bool allow_all_if_none_selected = false);
void enable_display (bool);
@ -331,7 +331,7 @@ public:
void clear_selection (bool signal = true) { clear_selection_except (0, signal); }
ARDOUR::InstrumentInfo& instrument_info() const;
protected:
void region_resized (const PBD::PropertyChange&);
@ -401,7 +401,7 @@ private:
uint8_t _current_range_min;
uint8_t _current_range_max;
typedef std::list<NoteBase*> Events;
typedef std::vector< boost::shared_ptr<PatchChange> > PatchChanges;
typedef std::vector< boost::shared_ptr<SysEx> > SysExes;
@ -514,7 +514,7 @@ private:
bool _mouse_changed_selection;
framepos_t snap_frame_to_grid_underneath (framepos_t p, framecnt_t &) const;
PBD::ScopedConnection _mouse_mode_connection;
boost::shared_ptr<CursorContext> _press_cursor_ctx;

View File

@ -75,7 +75,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
can be put below ghost regions from MIDI underlays
*/
_note_lines = new ArdourCanvas::LineSet (_canvas_group, ArdourCanvas::LineSet::Horizontal);
_note_lines->Event.connect(
sigc::bind(sigc::mem_fun(_trackview.editor(),
&PublicEditor::canvas_stream_view_event),
@ -345,7 +345,7 @@ MidiStreamView::draw_note_lines()
double h = y - prev_y;
double mid = y + (h/2.0);
if (height > 1.0) { // XXX ? should that not be h >= 1 ?
_note_lines->add (mid, h, color);
}
@ -647,7 +647,7 @@ void
MidiStreamView::resume_updates ()
{
_updates_suspended = false;
draw_note_lines ();
apply_note_range_to_regions ();

View File

@ -132,7 +132,7 @@ void
MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
{
_route = rt;
_view = new MidiStreamView (*this);
if (is_track ()) {
@ -319,11 +319,11 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
_channel_status_box.set_homogeneous (false);
_channel_status_box.set_spacing (4);
ArdourButton *channel_selector_button = manage (new ArdourButton(_("Chns")));
channel_selector_button->set_name ("route button");
set_tooltip (channel_selector_button, _("Click to edit channel settings"));
// Insert expanding space labels to get full width justification
_channel_status_box.pack_start (_playback_channel_status, false, false, 2);
_channel_status_box.pack_start (*Gtk::manage(new Gtk::Label(" ")), true, true);
@ -333,7 +333,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
_channel_status_box.show_all ();
channel_selector_button->signal_clicked.connect (sigc::mem_fun (*this, &MidiTimeAxisView::toggle_channel_selector));
_midi_controls_box.pack_start (_channel_status_box, false, false, 10);
if (!patch_manager.all_models().empty()) {
@ -483,7 +483,7 @@ MidiTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
} else {
_midi_controls_box.hide();
}
if (h >= KEYBOARD_MIN_HEIGHT) {
if (is_track() && _range_scroomer) {
_range_scroomer->show();
@ -539,7 +539,7 @@ MidiTimeAxisView::append_extra_display_menu_items ()
if (color_mode_menu) {
items.push_back (MenuElem (_("Color Mode"), *color_mode_menu));
}
items.push_back (SeparatorElem ());
}
@ -921,7 +921,7 @@ MidiTimeAxisView::build_controller_menu ()
l != device_names->controls().end(); ++l) {
boost::shared_ptr<ControlNameList> name_list = l->second;
Menu* ctl_menu = NULL;
for (ControlNameList::Controls::const_iterator c = name_list->controls().begin();
c != name_list->controls().end();) {
const uint16_t ctl = c->second->number();
@ -931,7 +931,7 @@ MidiTimeAxisView::build_controller_menu ()
/* Create a new submenu */
ctl_menu = manage (new Menu);
}
MenuList& ctl_items (ctl_menu->items());
if (chn_cnt > 1) {
add_multi_channel_controller_item(ctl_items, ctl, c->second->name());
@ -1069,7 +1069,7 @@ MidiTimeAxisView::set_color_mode (ColorMode mode, bool force, bool redisplay, bo
if (_color_mode == mode && !force) {
return;
}
if (_channel_selector) {
if (mode == ChannelColors) {
_channel_selector->set_channel_colors(NoteBase::midi_channel_colors);
@ -1077,7 +1077,7 @@ MidiTimeAxisView::set_color_mode (ColorMode mode, bool force, bool redisplay, bo
_channel_selector->set_default_channel_color();
}
}
_color_mode = mode;
set_gui_property ("color-mode", enum_2_string(_color_mode));
if (redisplay) {

View File

@ -131,7 +131,7 @@ MidiTracer::ports_changed ()
{
string const c = _port_combo.get_active_text ();
_port_combo.clear ();
ARDOUR::PortManager::PortList pl;
ARDOUR::AudioEngine::instance()->get_ports (ARDOUR::DataType::MIDI, pl);
@ -182,7 +182,7 @@ MidiTracer::port_changed ()
mp->set_trace_on (true);
traced_port = mp;
}
} else {
async->parser()->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3));
}

View File

@ -57,7 +57,7 @@ class MidiTracer : public ArdourWindow
Gtk::Label line_count_label;
Gtk::HBox line_count_box;
struct timeval _last_receipt;
bool autoscroll;
bool show_hex;
bool show_delta_time;

View File

@ -41,7 +41,7 @@ MidiVelocityDialog::MidiVelocityDialog (uint8_t current_velocity)
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::OK, RESPONSE_OK);
spinner.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &MidiVelocityDialog::response), Gtk::RESPONSE_OK));
}

View File

@ -80,7 +80,7 @@ void
MixerActor::load_bindings ()
{
/* XXX move this to a better place */
bindings.set_action_map (myactions);
std::string binding_file;

View File

@ -101,13 +101,13 @@ MixerGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
{
double const arc_radius = get_height();
double r, g, b, a;
if (tab.group && tab.group->is_active()) {
ArdourCanvas::color_to_rgba (tab.color, r, g, b, a);
} else {
ArdourCanvas::color_to_rgba (UIConfiguration::instance().color ("inactive group tab"), r, g, b, a);
}
a = 1.0;
cairo_set_source_rgba (cr, r, g, b, a);
@ -122,7 +122,7 @@ MixerGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
cairo_text_extents_t ext;
cairo_text_extents (cr, tab.group->name().c_str(), &ext);
ArdourCanvas::Color c = ArdourCanvas::contrasting_text_color (ArdourCanvas::rgba_to_color (r, g, b, a));
ArdourCanvas::color_to_rgba (c, r, g, b, a);

View File

@ -154,7 +154,7 @@ MixerStrip::init ()
if (_mixer_owned) {
t += string_compose (_("\n%1-%2-click to toggle the width of all strips."), Keyboard::primary_modifier_name(), Keyboard::tertiary_modifier_name ());
}
width_button.set_icon (ArdourIcon::StripWidth);
set_tooltip (width_button, t);
@ -162,7 +162,7 @@ MixerStrip::init ()
set_tooltip (&hide_button, _("Hide this mixer strip"));
input_button_box.set_spacing(2);
input_button.set_text (_("Input"));
input_button.set_name ("mixer strip button");
input_button_box.pack_start (input_button, true, true);
@ -177,7 +177,7 @@ MixerStrip::init ()
meter_point_button.signal_button_press_event().connect (sigc::mem_fun (gpm, &GainMeter::meter_press), false);
meter_point_button.signal_button_release_event().connect (sigc::mem_fun (gpm, &GainMeter::meter_release), false);
hide_button.set_events (hide_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
solo_isolated_led = manage (new ArdourButton (ArdourButton::led_default_elements));
@ -238,7 +238,7 @@ MixerStrip::init ()
button_size_group->add_widget (*monitor_input_button);
}
}
mute_solo_table.set_homogeneous (true);
mute_solo_table.set_spacings (2);
@ -408,7 +408,7 @@ bool
MixerStrip::mixer_strip_enter_event (GdkEventCrossing* /*ev*/)
{
_entered_mixer_strip = this;
//although we are triggering on the "enter", to the user it will appear that it is happenin on the "leave"
//because the mixerstrip control is a parent that encompasses the strip
deselect_all_processors();
@ -431,7 +431,7 @@ MixerStrip::mixer_strip_leave_event (GdkEventCrossing *ev)
//if we leave this mixer strip we need to clear out any selections
//processor_box.processor_display.select_none(); //but this doesn't work, because it gets triggered when (for example) you open the menu or start a drag
}
return false;
}
@ -456,7 +456,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
if (group_button.get_parent()) {
bottom_button_table.remove (group_button);
}
RouteUI::set_route (rt);
/* ProcessorBox needs access to _route so that it can read
@ -469,7 +469,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
/* unpack these from the parent and stuff them into our own
table
*/
if (gpm.peak_display.get_parent()) {
gpm.peak_display.get_parent()->remove (gpm.peak_display);
}
@ -478,7 +478,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
}
gpm.set_type (rt->meter_type());
mute_solo_table.attach (gpm.gain_display,0,1,1,2, EXPAND|FILL, EXPAND);
mute_solo_table.attach (gpm.peak_display,1,2,1,2, EXPAND|FILL, EXPAND);
@ -798,7 +798,7 @@ MixerStrip::output_release (GdkEventButton *ev)
edit_output_configuration ();
break;
}
return false;
}
@ -869,7 +869,7 @@ MixerStrip::output_press (GdkEventButton *ev)
)
);
}
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Routing Grid"), sigc::mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::edit_output_configuration)));
@ -929,7 +929,7 @@ MixerStrip::input_press (GdkEventButton *ev)
citems.push_back (SeparatorElem());
uint32_t const n_with_separator = citems.size ();
input_menu_bundles.clear ();
ARDOUR::BundleList current = _route->input()->bundles_connected ();
@ -1195,7 +1195,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
ostringstream tooltip;
char * tooltip_cstr;
//to avoid confusion, the button caption should only show connections that match the datatype of the track
DataType dt = DataType::AUDIO;
if ( boost::dynamic_pointer_cast<MidiTrack>(route) != 0 ) {
@ -1220,7 +1220,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
} else {
port = route->output()->nth (io_index);
}
port_connections.clear ();
port->get_connections(port_connections);
@ -1598,7 +1598,7 @@ MixerStrip::build_route_ops_menu ()
if (!selection.selected (rtav)) {
selection.set (rtav);
}
items.push_front (SeparatorElem());
items.push_front (MenuElem (_("Remove"), sigc::mem_fun(PublicEditor::instance(), &PublicEditor::remove_tracks)));
}
@ -1644,7 +1644,7 @@ MixerStrip::number_button_button_press (GdkEventButton* ev)
/* do not allow rename if the track is record-enabled */
rename_menu_item->set_sensitive (!_route->record_enabled());
route_ops_menu->popup (1, ev->time);
return true;
}
@ -1670,7 +1670,7 @@ MixerStrip::set_selected (bool yn)
global_frame.set_name ("MixerStripFrame");
}
global_frame.queue_draw ();
// if (!yn)
// processor_box.deselect_all_processors();
}
@ -1735,7 +1735,7 @@ MixerStrip::width_button_pressed (GdkEventButton* ev)
if (ev->button != 1) {
return false;
}
if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier | Keyboard::TertiaryModifier)) && _mixer_owned) {
switch (_width) {
case Wide:
@ -1880,19 +1880,19 @@ MixerStrip::meter_point_string (MeterPoint mp)
case MeterInput:
return _("In");
break;
case MeterPreFader:
return _("Pre");
break;
case MeterPostFader:
return _("Post");
break;
case MeterOutput:
return _("Out");
break;
case MeterCustom:
default:
return _("Custom");
@ -1904,19 +1904,19 @@ MixerStrip::meter_point_string (MeterPoint mp)
case MeterInput:
return S_("Meter|In");
break;
case MeterPreFader:
return S_("Meter|Pr");
break;
case MeterPostFader:
return S_("Meter|Po");
break;
case MeterOutput:
return S_("Meter|O");
break;
case MeterCustom:
default:
return S_("Meter|C");
@ -2204,7 +2204,7 @@ MixerStrip::override_solo_visibility () const
if (_route && _route->is_master ()) {
return boost::optional<bool> (false);
}
return boost::optional<bool> ();
}
@ -2362,7 +2362,7 @@ MixerStrip::add_level_meter_item_point (Menu_Helpers::MenuList& items,
RadioMenuItem::Group& group, string const & name, MeterPoint point)
{
using namespace Menu_Helpers;
items.push_back (RadioMenuElem (group, name, sigc::bind (sigc::mem_fun (*this, &MixerStrip::set_meter_point), point)));
RadioMenuItem* i = dynamic_cast<RadioMenuItem *> (&items.back ());
i->set_active (_route->meter_point() == point);
@ -2380,7 +2380,7 @@ MixerStrip::add_level_meter_item_type (Menu_Helpers::MenuList& items,
RadioMenuItem::Group& group, string const & name, MeterType type)
{
using namespace Menu_Helpers;
items.push_back (RadioMenuElem (group, name, sigc::bind (sigc::mem_fun (*this, &MixerStrip::set_meter_type), type)));
RadioMenuItem* i = dynamic_cast<RadioMenuItem *> (&items.back ());
i->set_active (_route->meter_type() == type);

View File

@ -299,7 +299,7 @@ Mixer_UI::show_window ()
ms->parameter_changed (X_("mixer-element-visibility"));
}
}
/* force focus into main area */
scroller_base.grab_focus ();
@ -343,44 +343,44 @@ Mixer_UI::add_strips (RouteList& routes)
for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
if (route->is_auditioner()) {
continue;
}
if (route->is_monitor()) {
if (!_monitor_section) {
_monitor_section = new MonitorSection (_session);
XMLNode* mnode = ARDOUR_UI::instance()->tearoff_settings (X_("monitor-section"));
if (mnode) {
_monitor_section->tearoff().set_state (*mnode);
}
}
out_packer.pack_end (_monitor_section->tearoff(), false, false);
_monitor_section->set_session (_session);
_monitor_section->tearoff().show_all ();
route->DropReferences.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::monitor_section_going_away, this), gui_context());
/* no regular strip shown for control out */
continue;
}
strip = new MixerStrip (*this, _session, route);
strips.push_back (strip);
UIConfiguration::instance().get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
if (strip->width_owner() != strip) {
strip->set_width_enum (_strip_width, this);
}
show_strip (strip);
TreeModel::Row row = *(track_model->insert(insert_iter));
row[track_columns.text] = route->name();
row[track_columns.visible] = strip->route()->is_master() ? true : strip->marked_for_display();
@ -390,9 +390,9 @@ Mixer_UI::add_strips (RouteList& routes)
if (!from_scratch) {
_selection.add (strip);
}
route->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::strip_property_changed, this, _1, strip), gui_context());
strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed));
strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip));
}
@ -402,7 +402,7 @@ Mixer_UI::add_strips (RouteList& routes)
no_track_list_redisplay = false;
track_display.set_model (track_model);
sync_order_keys_from_treeview ();
redisplay_track_list ();
}
@ -442,11 +442,11 @@ Mixer_UI::remove_strip (MixerStrip* strip)
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator ri;
list<MixerStrip *>::iterator i;
if ((i = find (strips.begin(), strips.end(), strip)) != strips.end()) {
strips.erase (i);
}
for (ri = rows.begin(); ri != rows.end(); ++ri) {
if ((*ri)[track_columns.strip] == strip) {
PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
@ -464,7 +464,7 @@ Mixer_UI::reset_remote_control_ids ()
}
TreeModel::Children rows = track_model->children();
if (rows.empty()) {
return;
}
@ -479,11 +479,11 @@ Mixer_UI::reset_remote_control_ids ()
for (ri = rows.begin(); ri != rows.end(); ++ri) {
/* skip two special values */
if (rid == Route::MasterBusRemoteControlID) {
rid++;
}
if (rid == Route::MonitorBusRemoteControlID) {
rid++;
}
@ -492,14 +492,14 @@ Mixer_UI::reset_remote_control_ids ()
bool visible = (*ri)[track_columns.visible];
if (!route->is_master() && !route->is_monitor()) {
uint32_t new_rid = (visible ? rid : invisible_key--);
if (new_rid != route->remote_control_id()) {
route->set_remote_control_id_explicit (new_rid);
route->set_remote_control_id_explicit (new_rid);
rid_change = true;
}
if (visible) {
rid++;
}
@ -520,7 +520,7 @@ Mixer_UI::sync_order_keys_from_treeview ()
}
TreeModel::Children rows = track_model->children();
if (rows.empty()) {
return;
}
@ -550,10 +550,10 @@ Mixer_UI::sync_order_keys_from_treeview ()
uint32_t new_rid = (visible ? rid : invisible_key--);
if (new_rid != route->remote_control_id()) {
route->set_remote_control_id_explicit (new_rid);
route->set_remote_control_id_explicit (new_rid);
rid_change = true;
}
if (visible) {
rid++;
}
@ -610,7 +610,7 @@ Mixer_UI::sync_treeview_from_order_keys ()
neworder.assign (sorted_routes.size(), 0);
uint32_t n = 0;
for (OrderKeySortedRoutes::iterator sr = sorted_routes.begin(); sr != sorted_routes.end(); ++sr, ++n) {
neworder[n] = sr->old_display_order;
@ -640,7 +640,7 @@ Mixer_UI::follow_editor_selection ()
_following_editor_selection = true;
_selection.block_routes_changed (true);
TrackSelection& s (PublicEditor::instance().get_selection().tracks);
_selection.clear_routes ();
@ -690,13 +690,13 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::RangeSelectModifier)) {
if (!_selection.selected(strip)) {
/* extend selection */
vector<MixerStrip*> tmp;
bool accumulate = false;
bool found_another = false;
tmp.push_back (strip);
for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
@ -845,15 +845,15 @@ Mixer_UI::update_track_visibility ()
{
Unwinder<bool> uw (no_track_list_redisplay, true);
for (i = rows.begin(); i != rows.end(); ++i) {
MixerStrip *strip = (*i)[track_columns.strip];
(*i)[track_columns.visible] = strip->marked_for_display ();
}
/* force route order keys catch up with visibility changes
*/
sync_order_keys_from_treeview ();
}
@ -926,20 +926,20 @@ Mixer_UI::set_all_strips_visibility (bool yn)
{
Unwinder<bool> uw (no_track_list_redisplay, true);
for (i = rows.begin(); i != rows.end(); ++i) {
TreeModel::Row row = (*i);
MixerStrip* strip = row[track_columns.strip];
if (strip == 0) {
continue;
}
if (strip->route()->is_master() || strip->route()->is_monitor()) {
continue;
}
(*i)[track_columns.visible] = yn;
}
}
@ -956,33 +956,33 @@ Mixer_UI::set_all_audio_midi_visibility (int tracks, bool yn)
{
Unwinder<bool> uw (no_track_list_redisplay, true);
for (i = rows.begin(); i != rows.end(); ++i) {
TreeModel::Row row = (*i);
MixerStrip* strip = row[track_columns.strip];
if (strip == 0) {
continue;
}
if (strip->route()->is_master() || strip->route()->is_monitor()) {
continue;
}
boost::shared_ptr<AudioTrack> at = strip->audio_track();
boost::shared_ptr<MidiTrack> mt = strip->midi_track();
switch (tracks) {
case 0:
(*i)[track_columns.visible] = yn;
break;
case 1:
if (at) { /* track */
(*i)[track_columns.visible] = yn;
}
break;
case 2:
if (!at && !mt) { /* bus */
(*i)[track_columns.visible] = yn;
@ -1077,7 +1077,7 @@ Mixer_UI::redisplay_track_list ()
{
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
if (no_track_list_redisplay) {
return;
}
@ -1176,7 +1176,7 @@ Mixer_UI::initial_track_display ()
track_model->clear ();
add_strips (copy);
}
_session->sync_order_keys ();
redisplay_track_list ();
@ -1792,7 +1792,7 @@ Mixer_UI::on_key_release_event (GdkEventKey* ev)
}
KeyboardKey k (ev->state, ev->keyval);
if (bindings.activate (k, Bindings::Release)) {
return true;
}
@ -1935,7 +1935,7 @@ Mixer_UI::update_title ()
{
if (_session) {
string n;
if (_session->snap_name() != _session->name()) {
n = _session->snap_name ();
} else {
@ -1945,14 +1945,14 @@ Mixer_UI::update_title ()
if (_session->dirty ()) {
n = "*" + n;
}
WindowTitle title (n);
title += S_("Window|Mixer");
title += Glib::get_application_name ();
set_title (title.get_string());
} else {
WindowTitle title (S_("Window|Mixer"));
title += Glib::get_application_name ();
set_title (title.get_string());
@ -2015,7 +2015,7 @@ Mixer_UI::toggle_midi_input_active (bool flip_others)
onoff = !mt->input_active();
}
}
_session->set_exclusive_input_active (rl, onoff, flip_others);
}

View File

@ -237,7 +237,7 @@ void
MonitorSelectorWindow::io_name_changed (void*)
{
ENSURE_GUI_THREAD (*this, &MonitorSelectorWindow::io_name_changed, src)
std::string title;
if (!_selector.find_inputs_for_io_outputs()) {

View File

@ -93,7 +93,7 @@ MonoPanner::MonoPanner (boost::shared_ptr<ARDOUR::PannerShell> p)
MonoPanner::~MonoPanner ()
{
}
void

View File

@ -58,7 +58,7 @@ class MonoPanner : public PannerInterface
private:
PannerEditor* editor ();
boost::shared_ptr<ARDOUR::PannerShell> _panner_shell;
boost::shared_ptr<PBD::Controllable> position_control;
PBD::ScopedConnectionList panvalue_connections;
PBD::ScopedConnectionList panshell_connections;

View File

@ -38,12 +38,12 @@ MonoPannerEditor::MonoPannerEditor (MonoPanner* p)
t->set_spacings (6);
int n = 0;
t->attach (*manage (left_aligned_label (_("Left"))), 0, 1, n, n + 1);
t->attach (_left, 1, 2, n, n + 1);
t->attach (*manage (left_aligned_label (_("%"))), 2, 3, n, n + 1);
++n;
t->attach (*manage (left_aligned_label (_("Right"))), 0, 1, n, n + 1);
t->attach (_right, 1, 2, n, n + 1);
t->attach (*manage (left_aligned_label (_("%"))), 2, 3, n, n + 1);
@ -78,7 +78,7 @@ MonoPannerEditor::update_editor ()
if (!_panner) {
return;
}
float const v = _panner->get_controllable()->get_value();
_ignore_changes = true;
@ -110,7 +110,7 @@ MonoPannerEditor::right_changed ()
}
float const v = _right.get_value () / 100;
_ignore_changes = true;
_left.set_value (100 * (1 - v));
_panner->get_controllable()->set_value (v);

View File

@ -33,7 +33,7 @@ private:
void update_editor ();
void left_changed ();
void right_changed ();
MonoPanner* _panner;
Gtk::SpinButton _left;
Gtk::SpinButton _right;

Some files were not shown because too many files have changed in this diff Show More