mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Assortment of minor changes from 2.0-ongoing.
git-svn-id: svn://localhost/ardour2/branches/3.0@3852 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
21c4721a68
commit
ad4919ce92
15 changed files with 37 additions and 74 deletions
|
|
@ -2377,7 +2377,7 @@ Editor::set_edit_point_preference (EditPoint ep, bool force)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* action;
|
const char* action=NULL;
|
||||||
|
|
||||||
switch (_edit_point) {
|
switch (_edit_point) {
|
||||||
case EditAtPlayhead:
|
case EditAtPlayhead:
|
||||||
|
|
@ -4643,7 +4643,7 @@ Editor::idle_visual_changer ()
|
||||||
}
|
}
|
||||||
if (p & VisualChange::TimeOrigin) {
|
if (p & VisualChange::TimeOrigin) {
|
||||||
|
|
||||||
nframes64_t csf, cef;
|
nframes64_t csf=0, cef=0;
|
||||||
nframes64_t current_time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
|
nframes64_t current_time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
|
|
|
||||||
|
|
@ -1630,7 +1630,6 @@ public:
|
||||||
|
|
||||||
Gtk::ToggleButton editor_mixer_button;
|
Gtk::ToggleButton editor_mixer_button;
|
||||||
Gtk::ToggleButton editor_list_button;
|
Gtk::ToggleButton editor_list_button;
|
||||||
|
|
||||||
void editor_mixer_button_toggled ();
|
void editor_mixer_button_toggled ();
|
||||||
void editor_list_button_toggled ();
|
void editor_list_button_toggled ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,6 @@ Editor::initialize_canvas ()
|
||||||
transport_bar_drag_rect->property_outline_pixels() = 0;
|
transport_bar_drag_rect->property_outline_pixels() = 0;
|
||||||
transport_bar_drag_rect->hide ();
|
transport_bar_drag_rect->hide ();
|
||||||
|
|
||||||
|
|
||||||
transport_punchin_line = new ArdourCanvas::SimpleLine (*_master_group);
|
transport_punchin_line = new ArdourCanvas::SimpleLine (*_master_group);
|
||||||
transport_punchin_line->property_x1() = 0.0;
|
transport_punchin_line->property_x1() = 0.0;
|
||||||
transport_punchin_line->property_y1() = 0.0;
|
transport_punchin_line->property_y1() = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -203,8 +203,8 @@ bool
|
||||||
Editor::track_canvas_motion (GdkEvent *ev)
|
Editor::track_canvas_motion (GdkEvent *ev)
|
||||||
{
|
{
|
||||||
if (verbose_cursor_visible) {
|
if (verbose_cursor_visible) {
|
||||||
verbose_canvas_cursor->property_x() = clamp_verbose_cursor_x (ev->motion.x + 20);
|
verbose_canvas_cursor->property_x() = clamp_verbose_cursor_x (ev->motion.x + 10);
|
||||||
verbose_canvas_cursor->property_y() = clamp_verbose_cursor_y (ev->motion.y + 20);
|
verbose_canvas_cursor->property_y() = clamp_verbose_cursor_y (ev->motion.y + 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1148,7 +1148,6 @@ Editor::update_punch_range_view (bool visibility)
|
||||||
Location* tpl;
|
Location* tpl;
|
||||||
|
|
||||||
if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
|
if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
|
||||||
|
|
||||||
guint track_canvas_width,track_canvas_height;
|
guint track_canvas_width,track_canvas_height;
|
||||||
track_canvas->get_size(track_canvas_width,track_canvas_height);
|
track_canvas->get_size(track_canvas_width,track_canvas_height);
|
||||||
if (Config->get_punch_in()) {
|
if (Config->get_punch_in()) {
|
||||||
|
|
@ -1162,35 +1161,9 @@ Editor::update_punch_range_view (bool visibility)
|
||||||
if (visibility) {
|
if (visibility) {
|
||||||
transport_punch_range_rect->show();
|
transport_punch_range_rect->show();
|
||||||
}
|
}
|
||||||
}
|
} else if (visibility) {
|
||||||
else if (visibility) {
|
|
||||||
transport_punch_range_rect->hide();
|
transport_punch_range_rect->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (session->get_punch_in()) {
|
|
||||||
// double x = frame_to_pixel (transport_punch_location->start());
|
|
||||||
// gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
|
|
||||||
|
|
||||||
// if (visibility) {
|
|
||||||
// gnome_canvas_item_show (transport_punchin_line);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (visibility) {
|
|
||||||
// gnome_canvas_item_hide (transport_punchin_line);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (session->get_punch_out()) {
|
|
||||||
// double x = frame_to_pixel (transport_punch_location->end());
|
|
||||||
|
|
||||||
// gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
|
|
||||||
|
|
||||||
// if (visibility) {
|
|
||||||
// gnome_canvas_item_show (transport_punchout_line);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (visibility) {
|
|
||||||
// gnome_canvas_item_hide (transport_punchout_line);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,12 @@ Editor::show_editor_mixer (bool yn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef GTKOSX
|
||||||
|
/* XXX gtk problem here */
|
||||||
|
ruler_label_event_box.queue_draw ();
|
||||||
|
time_button_event_box.queue_draw ();
|
||||||
|
controls_layout.queue_draw ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -259,10 +265,6 @@ Editor::update_current_screen ()
|
||||||
|
|
||||||
almost_done:
|
almost_done:
|
||||||
last_update_frame = frame;
|
last_update_frame = frame;
|
||||||
#ifdef GTKOSX
|
|
||||||
/*XXX in a perfect world we would not have to do this. */
|
|
||||||
track_canvas->update_now();
|
|
||||||
#endif
|
|
||||||
if (current_mixer_strip) {
|
if (current_mixer_strip) {
|
||||||
current_mixer_strip->fast_update ();
|
current_mixer_strip->fast_update ();
|
||||||
}
|
}
|
||||||
|
|
@ -354,10 +356,6 @@ Editor::session_going_away ()
|
||||||
zoom_range_clock.set_session (0);
|
zoom_range_clock.set_session (0);
|
||||||
nudge_clock.set_session (0);
|
nudge_clock.set_session (0);
|
||||||
|
|
||||||
/* put editor/mixer toggle button in off position and disable until a new session is loaded */
|
|
||||||
|
|
||||||
editor_mixer_button.set_active(false);
|
|
||||||
editor_mixer_button.set_sensitive(false);
|
|
||||||
editor_list_button.set_active(false);
|
editor_list_button.set_active(false);
|
||||||
editor_list_button.set_sensitive(false);
|
editor_list_button.set_sensitive(false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1321,8 +1321,8 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
||||||
at_x = cp->get_x();
|
at_x = cp->get_x();
|
||||||
at_y = cp->get_y ();
|
at_y = cp->get_y ();
|
||||||
cp->item()->i2w (at_x, at_y);
|
cp->item()->i2w (at_x, at_y);
|
||||||
at_x += 20.0;
|
at_x += 10.0;
|
||||||
at_y += 20.0;
|
at_y += 10.0;
|
||||||
|
|
||||||
fraction = 1.0 - (cp->get_y() / cp->line().height());
|
fraction = 1.0 - (cp->get_y() / cp->line().height());
|
||||||
|
|
||||||
|
|
@ -2276,10 +2276,13 @@ Editor::cursor_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||||
|
|
||||||
cursor->set_position (adjusted_frame);
|
cursor->set_position (adjusted_frame);
|
||||||
|
|
||||||
UpdateAllTransportClocks (cursor->current_frame);
|
|
||||||
|
|
||||||
show_verbose_time_cursor (cursor->current_frame, 10);
|
show_verbose_time_cursor (cursor->current_frame, 10);
|
||||||
|
|
||||||
|
#ifdef GTKOSX
|
||||||
|
track_canvas->update_now ();
|
||||||
|
#endif
|
||||||
|
UpdateAllTransportClocks (cursor->current_frame);
|
||||||
|
|
||||||
drag_info.last_pointer_frame = adjusted_frame;
|
drag_info.last_pointer_frame = adjusted_frame;
|
||||||
drag_info.first_move = false;
|
drag_info.first_move = false;
|
||||||
}
|
}
|
||||||
|
|
@ -2310,8 +2313,7 @@ Editor::update_marker_drag_item (Location *location)
|
||||||
marker_drag_line_points.front().set_x(x1);
|
marker_drag_line_points.front().set_x(x1);
|
||||||
marker_drag_line_points.back().set_x(x1);
|
marker_drag_line_points.back().set_x(x1);
|
||||||
marker_drag_line->property_points() = marker_drag_line_points;
|
marker_drag_line->property_points() = marker_drag_line_points;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
range_marker_drag_rect->property_x1() = x1;
|
range_marker_drag_rect->property_x1() = x1;
|
||||||
range_marker_drag_rect->property_x2() = x2;
|
range_marker_drag_rect->property_x2() = x2;
|
||||||
}
|
}
|
||||||
|
|
@ -2418,7 +2420,7 @@ Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
||||||
void
|
void
|
||||||
Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||||
{
|
{
|
||||||
nframes64_t f_delta;
|
nframes64_t f_delta = 0;
|
||||||
nframes64_t newframe;
|
nframes64_t newframe;
|
||||||
bool is_start;
|
bool is_start;
|
||||||
bool move_both = false;
|
bool move_both = false;
|
||||||
|
|
@ -2576,6 +2578,7 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||||
#ifdef GTKOSX
|
#ifdef GTKOSX
|
||||||
track_canvas->update_now ();
|
track_canvas->update_now ();
|
||||||
#endif
|
#endif
|
||||||
|
edit_point_clock.set (copy_location->start());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -2967,7 +2970,7 @@ Editor::start_control_point_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
||||||
|
|
||||||
float fraction = 1.0 - (control_point->get_y() / control_point->line().height());
|
float fraction = 1.0 - (control_point->get_y() / control_point->line().height());
|
||||||
set_verbose_canvas_cursor (control_point->line().get_verbose_cursor_string (fraction),
|
set_verbose_canvas_cursor (control_point->line().get_verbose_cursor_string (fraction),
|
||||||
drag_info.current_pointer_x + 20, drag_info.current_pointer_y + 20);
|
drag_info.current_pointer_x + 10, drag_info.current_pointer_y + 10);
|
||||||
|
|
||||||
show_verbose_canvas_cursor ();
|
show_verbose_canvas_cursor ();
|
||||||
}
|
}
|
||||||
|
|
@ -3119,7 +3122,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
|
||||||
line->start_drag (0, drag_info.grab_frame, fraction);
|
line->start_drag (0, drag_info.grab_frame, fraction);
|
||||||
|
|
||||||
set_verbose_canvas_cursor (line->get_verbose_cursor_string (fraction),
|
set_verbose_canvas_cursor (line->get_verbose_cursor_string (fraction),
|
||||||
drag_info.current_pointer_x + 20, drag_info.current_pointer_y + 20);
|
drag_info.current_pointer_x + 10, drag_info.current_pointer_y + 10);
|
||||||
show_verbose_canvas_cursor ();
|
show_verbose_canvas_cursor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3310,9 +3310,9 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t distance;
|
nframes64_t distance = 0;
|
||||||
nframes64_t pos = 0;
|
nframes64_t pos = 0;
|
||||||
int dir = 0;
|
int dir = 1;
|
||||||
|
|
||||||
list<RegionView*> sorted;
|
list<RegionView*> sorted;
|
||||||
rs.by_position (sorted);
|
rs.by_position (sorted);
|
||||||
|
|
@ -3324,7 +3324,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
||||||
pos = position;
|
pos = position;
|
||||||
if (position > r->position()) {
|
if (position > r->position()) {
|
||||||
distance = position - r->position();
|
distance = position - r->position();
|
||||||
dir = 1;
|
|
||||||
} else {
|
} else {
|
||||||
distance = r->position() - position;
|
distance = r->position() - position;
|
||||||
dir = -1;
|
dir = -1;
|
||||||
|
|
@ -3335,7 +3334,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
||||||
if (position > r->last_frame()) {
|
if (position > r->last_frame()) {
|
||||||
distance = position - r->last_frame();
|
distance = position - r->last_frame();
|
||||||
pos = r->position() + distance;
|
pos = r->position() + distance;
|
||||||
dir = 1;
|
|
||||||
} else {
|
} else {
|
||||||
distance = r->last_frame() - position;
|
distance = r->last_frame() - position;
|
||||||
pos = r->position() - distance;
|
pos = r->position() - distance;
|
||||||
|
|
@ -3347,7 +3345,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
||||||
pos = r->adjust_to_sync (position);
|
pos = r->adjust_to_sync (position);
|
||||||
if (pos > r->position()) {
|
if (pos > r->position()) {
|
||||||
distance = pos - r->position();
|
distance = pos - r->position();
|
||||||
dir = 1;
|
|
||||||
} else {
|
} else {
|
||||||
distance = r->position() - pos;
|
distance = r->position() - pos;
|
||||||
dir = -1;
|
dir = -1;
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,6 @@ Editor::handle_new_route (Session::RouteList& routes)
|
||||||
if (show_editor_mixer_when_tracks_arrive) {
|
if (show_editor_mixer_when_tracks_arrive) {
|
||||||
show_editor_mixer (true);
|
show_editor_mixer (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
editor_mixer_button.set_sensitive(true);
|
|
||||||
editor_list_button.set_sensitive(true);
|
editor_list_button.set_sensitive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,14 +196,7 @@ Editor::remove_route (TimeAxisView *tv)
|
||||||
* button to inactive and untick the menu option
|
* button to inactive and untick the menu option
|
||||||
*/
|
*/
|
||||||
|
|
||||||
editor_mixer_button.set_active(false);
|
|
||||||
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
|
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
|
||||||
|
|
||||||
/* and disable if all tracks and/or routes are gone */
|
|
||||||
|
|
||||||
if (track_views.size() == 0) {
|
|
||||||
editor_mixer_button.set_sensitive(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -785,7 +785,7 @@ Editor::update_ruler_visibility ()
|
||||||
}
|
}
|
||||||
|
|
||||||
gdouble old_canvas_timebars_vsize = canvas_timebars_vsize;
|
gdouble old_canvas_timebars_vsize = canvas_timebars_vsize;
|
||||||
canvas_timebars_vsize = timebar_height * visible_timebars;
|
canvas_timebars_vsize = (timebar_height * visible_timebars) - 1;
|
||||||
gdouble vertical_pos_delta = canvas_timebars_vsize - old_canvas_timebars_vsize;
|
gdouble vertical_pos_delta = canvas_timebars_vsize - old_canvas_timebars_vsize;
|
||||||
|
|
||||||
if (vertical_pos_delta < 0 && (vertical_adjustment.get_value() + canvas_height) >= vertical_adjustment.get_upper()) {
|
if (vertical_pos_delta < 0 && (vertical_adjustment.get_value() + canvas_height) >= vertical_adjustment.get_upper()) {
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,9 @@ Editor::compute_current_bbt_points (nframes_t leftmost, nframes_t rightmost)
|
||||||
}
|
}
|
||||||
|
|
||||||
current_bbt_points = session->tempo_map().get_points (session->tempo_map().frame_time (previous_beat), session->tempo_map().frame_time (next_beat) + 1);
|
current_bbt_points = session->tempo_map().get_points (session->tempo_map().frame_time (previous_beat), session->tempo_map().frame_time (next_beat) + 1);
|
||||||
|
#ifdef GTKOSX
|
||||||
|
lazy_hide_and_draw_measures ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,7 @@ set_color (Gdk::Color& c, int rgb)
|
||||||
c.set_rgb((rgb >> 16)*256, ((rgb & 0xff00) >> 8)*256, (rgb & 0xff)*256);
|
c.set_rgb((rgb >> 16)*256, ((rgb & 0xff00) >> 8)*256, (rgb & 0xff)*256);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTKOSX
|
#ifdef GTKOSX_ARDOUR_EVENTS_PATCH
|
||||||
extern "C" {
|
extern "C" {
|
||||||
gboolean gdk_quartz_possibly_forward (GdkEvent*);
|
gboolean gdk_quartz_possibly_forward (GdkEvent*);
|
||||||
}
|
}
|
||||||
|
|
@ -473,7 +473,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTKOSX
|
#ifdef GTKOSX_ARDOUR_EVENTS_PATCH
|
||||||
int oldval = ev->keyval;
|
int oldval = ev->keyval;
|
||||||
ev->keyval = fakekey;
|
ev->keyval = fakekey;
|
||||||
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
||||||
|
|
@ -497,7 +497,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
||||||
cerr << "\tactivate, then propagate\n";
|
cerr << "\tactivate, then propagate\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef GTKOSX
|
#ifdef GTKOSX_ARDOUR_EVENTS_PATCH
|
||||||
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -532,7 +532,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
||||||
cerr << "\tpropagation didn't handle, so activate\n";
|
cerr << "\tpropagation didn't handle, so activate\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef GTKOSX
|
#ifdef GTKOSX_ARDOUR_EVENTS_PATCH
|
||||||
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -848,7 +848,7 @@ Crossfade::set_follow_overlap (bool yn)
|
||||||
nframes_t
|
nframes_t
|
||||||
Crossfade::set_length (nframes_t len)
|
Crossfade::set_length (nframes_t len)
|
||||||
{
|
{
|
||||||
nframes_t limit;
|
nframes_t limit = 0;
|
||||||
|
|
||||||
switch (_anchor_point) {
|
switch (_anchor_point) {
|
||||||
case StartOfIn:
|
case StartOfIn:
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<Importab
|
||||||
|
|
||||||
/* Initialize the sample rate converter. */
|
/* Initialize the sample rate converter. */
|
||||||
|
|
||||||
int src_type = SRC_LINEAR;
|
int src_type = SRC_SINC_BEST_QUALITY;
|
||||||
|
|
||||||
switch (srcq) {
|
switch (srcq) {
|
||||||
case SrcBest:
|
case SrcBest:
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ TranzportControlProtocol::show_meter ()
|
||||||
|
|
||||||
/* print() requires this */
|
/* print() requires this */
|
||||||
|
|
||||||
buf[21] = '\0';
|
buf[20] = '\0';
|
||||||
|
|
||||||
print (0, 0, buf);
|
print (0, 0, buf);
|
||||||
print (1, 0, buf);
|
print (1, 0, buf);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue