fix for vamp-sdk botch in SConstruct; new audio clock focus command; make insert-region pay attention to entered track; different modifier list for gtk/osx; hide ye olde blue arrow on selected marker line
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2718 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
36bb879385
commit
00b409b661
|
@ -438,9 +438,8 @@ def CheckPKGVersion(context, name, version):
|
|||
|
||||
def CheckPKGExists(context, name):
|
||||
context.Message ('Checking for %s...' % name)
|
||||
ret = context.TryAction('pkg-config --exists %s' % name)
|
||||
print ("Result was [%s]" % ret[1])
|
||||
context.Result (ret[0])
|
||||
ret = context.TryAction('pkg-config --exists %s' % name)[0]
|
||||
context.Result (ret)
|
||||
return ret
|
||||
|
||||
conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
|
||||
|
|
|
@ -339,3 +339,5 @@
|
|||
(gtk_accel_path "<Actions>/Editor/goto-mark-9" "KP_9")
|
||||
(gtk_accel_path "<Actions>/Transport/ToggleClick" "5")
|
||||
(gtk_accel_path "<Actions>/Transport/ToggleAutoReturn" "4")
|
||||
(gtk_accel_path "<Actions>/Transport/focus-on-clock" "KP_Divide")
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<separator/>
|
||||
<menuitem action='playhead-to-range-start'/>
|
||||
<menuitem action='playhead-to-range-end'/>
|
||||
<menuitem action='focus-on-clock'/>
|
||||
<separator/>
|
||||
<menuitem action='ToggleTimeMaster'/>
|
||||
<menuitem action='TogglePunchIn'/>
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
<separator/>
|
||||
<menuitem action='playhead-to-range-start'/>
|
||||
<menuitem action='playhead-to-range-end'/>
|
||||
<separator/>
|
||||
<menuitem action='focus-on-clock'/>
|
||||
<separator/>
|
||||
<menuitem action='goto-mark-1'/>
|
||||
<menuitem action='goto-mark-2'/>
|
||||
<menuitem action='goto-mark-3'/>
|
||||
|
|
|
@ -3133,4 +3133,3 @@ ARDOUR_UI::setup_profile ()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -297,6 +297,10 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (transport_actions, X_("focus-on-clock"), _("Focus On Clock"), mem_fun(primary_clock, &AudioClock::focus));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("TogglePunchIn"), _("Punch In"), mem_fun(*this, &ARDOUR_UI::toggle_punch_in));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
|
|
@ -655,6 +655,32 @@ AudioClock::set_session (Session *s)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioClock::focus ()
|
||||
{
|
||||
switch (_mode) {
|
||||
case SMPTE:
|
||||
hours_ebox.grab_focus ();
|
||||
break;
|
||||
|
||||
case BBT:
|
||||
bars_ebox.grab_focus ();
|
||||
break;
|
||||
|
||||
case MinSec:
|
||||
ms_hours_ebox.grab_focus ();
|
||||
break;
|
||||
|
||||
case Frames:
|
||||
frames_ebox.grab_focus ();
|
||||
break;
|
||||
|
||||
case Off:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
AudioClock::field_key_press_event (GdkEventKey *ev, Field field)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,9 @@ class AudioClock : public Gtk::HBox
|
|||
AudioClock (std::string clock_name, bool transient, std::string widget_name, bool editable, bool is_duration = false, bool with_info = false);
|
||||
|
||||
Mode mode() const { return _mode; }
|
||||
|
||||
|
||||
void focus ();
|
||||
|
||||
void set (nframes_t, bool force = false, nframes_t offset = 0, int which = 0);
|
||||
void set_mode (Mode);
|
||||
|
||||
|
|
|
@ -2575,12 +2575,17 @@ Editor::setup_toolbar ()
|
|||
mouse_move_button.add (*(manage (new Image (::get_icon("tool_object")))));
|
||||
mouse_move_button.set_relief(Gtk::RELIEF_NONE);
|
||||
mouse_mode_buttons.push_back (&mouse_move_button);
|
||||
mouse_select_button.add (*(manage (new Image (get_xpm("tool_range.xpm")))));
|
||||
mouse_select_button.set_relief(Gtk::RELIEF_NONE);
|
||||
mouse_mode_buttons.push_back (&mouse_select_button);
|
||||
mouse_gain_button.add (*(manage (new Image (::get_icon("tool_gain")))));
|
||||
mouse_gain_button.set_relief(Gtk::RELIEF_NONE);
|
||||
mouse_mode_buttons.push_back (&mouse_gain_button);
|
||||
|
||||
if (!Profile->get_sae()) {
|
||||
mouse_select_button.add (*(manage (new Image (get_xpm("tool_range.xpm")))));
|
||||
mouse_select_button.set_relief(Gtk::RELIEF_NONE);
|
||||
mouse_mode_buttons.push_back (&mouse_select_button);
|
||||
|
||||
mouse_gain_button.add (*(manage (new Image (::get_icon("tool_gain")))));
|
||||
mouse_gain_button.set_relief(Gtk::RELIEF_NONE);
|
||||
mouse_mode_buttons.push_back (&mouse_gain_button);
|
||||
}
|
||||
|
||||
mouse_zoom_button.add (*(manage (new Image (::get_icon("tool_zoom")))));
|
||||
mouse_zoom_button.set_relief(Gtk::RELIEF_NONE);
|
||||
mouse_mode_buttons.push_back (&mouse_zoom_button);
|
||||
|
@ -2598,9 +2603,13 @@ Editor::setup_toolbar ()
|
|||
mode_box->set_spacing(4);
|
||||
mouse_mode_button_box.set_spacing(1);
|
||||
mouse_mode_button_box.pack_start(mouse_move_button, true, true);
|
||||
mouse_mode_button_box.pack_start(mouse_select_button, true, true);
|
||||
if (!Profile->get_sae()) {
|
||||
mouse_mode_button_box.pack_start(mouse_select_button, true, true);
|
||||
}
|
||||
mouse_mode_button_box.pack_start(mouse_zoom_button, true, true);
|
||||
mouse_mode_button_box.pack_start(mouse_gain_button, true, true);
|
||||
if (!Profile->get_sae()) {
|
||||
mouse_mode_button_box.pack_start(mouse_gain_button, true, true);
|
||||
}
|
||||
mouse_mode_button_box.pack_start(mouse_timefx_button, true, true);
|
||||
mouse_mode_button_box.pack_start(mouse_audition_button, true, true);
|
||||
mouse_mode_button_box.set_homogeneous(true);
|
||||
|
@ -3015,7 +3024,7 @@ Editor::duplicate_dialog (bool with_dialog)
|
|||
|
||||
if (mouse_mode != MouseRange) {
|
||||
|
||||
ensure_entered_selected (true);
|
||||
ensure_entered_region_selected (true);
|
||||
|
||||
if (selection->regions.empty()) {
|
||||
return;
|
||||
|
|
|
@ -1911,7 +1911,8 @@ class Editor : public PublicEditor
|
|||
|
||||
TimeAxisView* entered_track;
|
||||
RegionView* entered_regionview;
|
||||
void ensure_entered_selected (bool op_acts_on_objects = false);
|
||||
void ensure_entered_region_selected (bool op_acts_on_objects = false);
|
||||
void ensure_entered_track_selected (bool op_acts_on_objects = false);
|
||||
bool clear_entered_track;
|
||||
gint left_track_canvas (GdkEventCrossing*);
|
||||
void set_entered_track (TimeAxisView*);
|
||||
|
|
|
@ -236,10 +236,12 @@ Editor::canvas_region_view_event (GdkEvent *event, ArdourCanvas::Item* item, Reg
|
|||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
set_entered_track (&rv->get_time_axis_view ());
|
||||
set_entered_regionview (rv);
|
||||
break;
|
||||
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
set_entered_track (0);
|
||||
set_entered_regionview (0);
|
||||
break;
|
||||
|
||||
|
@ -275,6 +277,11 @@ Editor::canvas_stream_view_event (GdkEvent *event, ArdourCanvas::Item* item, Rou
|
|||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
set_entered_track (tv);
|
||||
break;
|
||||
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
set_entered_track (0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -284,8 +291,6 @@ Editor::canvas_stream_view_event (GdkEvent *event, ArdourCanvas::Item* item, Rou
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
Editor::canvas_automation_track_event (GdkEvent *event, ArdourCanvas::Item* item, AutomationTimeAxisView *atv)
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/region.h>
|
||||
#include <gtkmm/treeview.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "editor.h"
|
||||
|
@ -41,8 +42,6 @@ using namespace sigc;
|
|||
void
|
||||
Editor::keyboard_selection_finish (bool add)
|
||||
{
|
||||
cerr << "here\n";
|
||||
|
||||
if (session && have_pending_keyboard_selection) {
|
||||
|
||||
nframes64_t end;
|
||||
|
@ -89,27 +88,14 @@ Editor::keyboard_selection_begin ()
|
|||
void
|
||||
Editor::keyboard_paste ()
|
||||
{
|
||||
float prefix = 0;
|
||||
bool was_floating;
|
||||
|
||||
if (get_prefix (prefix, was_floating) == 0) {
|
||||
paste (prefix);
|
||||
} else {
|
||||
paste (1);
|
||||
}
|
||||
ensure_entered_track_selected (true);
|
||||
paste (1);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::keyboard_insert_region_list_selection ()
|
||||
{
|
||||
float prefix = 0;
|
||||
bool was_floating;
|
||||
|
||||
if (get_prefix (prefix, was_floating) == 0) {
|
||||
insert_region_list_selection (prefix);
|
||||
} else {
|
||||
insert_region_list_selection (1);
|
||||
}
|
||||
insert_region_list_selection (1);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -356,6 +356,17 @@ Editor::nudge_forward (bool next)
|
|||
|
||||
commit_reversible_command ();
|
||||
|
||||
|
||||
} else if (!selection->markers.empty()) {
|
||||
|
||||
bool ignored;
|
||||
Location* loc = find_location_from_marker (selection->markers.front(), ignored);
|
||||
|
||||
if (loc) {
|
||||
distance = get_nudge_distance (loc->start(), next_distance);
|
||||
loc->set_start (loc->start() + distance);
|
||||
}
|
||||
|
||||
} else {
|
||||
distance = get_nudge_distance (playhead_cursor->current_frame, next_distance);
|
||||
session->request_locate (playhead_cursor->current_frame + distance);
|
||||
|
@ -1777,6 +1788,10 @@ Editor::insert_region_list_selection (float times)
|
|||
if ((tv = dynamic_cast<RouteTimeAxisView*>(selection->tracks.front())) == 0) {
|
||||
return;
|
||||
}
|
||||
} else if (entered_track != 0) {
|
||||
if ((tv = dynamic_cast<RouteTimeAxisView*>(selection->tracks.front())) == 0) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@ -2334,7 +2349,7 @@ Editor::separate_region_from_selection ()
|
|||
|
||||
/* force track selection */
|
||||
|
||||
ensure_entered_selected ();
|
||||
ensure_entered_region_selected ();
|
||||
|
||||
separate_regions_between (ts);
|
||||
}
|
||||
|
@ -2359,7 +2374,7 @@ Editor::separate_regions_using_location (Location& loc)
|
|||
void
|
||||
Editor::crop_region_to_selection ()
|
||||
{
|
||||
ensure_entered_selected (true);
|
||||
ensure_entered_region_selected (true);
|
||||
|
||||
if (!selection->time.empty()) {
|
||||
|
||||
|
@ -2549,7 +2564,7 @@ void
|
|||
Editor::set_region_sync_from_edit_point ()
|
||||
{
|
||||
nframes64_t where = get_preferred_edit_position ();
|
||||
ensure_entered_selected ();
|
||||
ensure_entered_region_selected ();
|
||||
set_sync_point (where, selection->regions);
|
||||
}
|
||||
|
||||
|
@ -2615,7 +2630,7 @@ Editor::naturalize ()
|
|||
void
|
||||
Editor::align (RegionPoint what)
|
||||
{
|
||||
ensure_entered_selected ();
|
||||
ensure_entered_region_selected ();
|
||||
|
||||
nframes64_t where = get_preferred_edit_position();
|
||||
|
||||
|
@ -2781,7 +2796,7 @@ Editor::trim_region_to_punch ()
|
|||
void
|
||||
Editor::trim_region_to_location (const Location& loc, const char* str)
|
||||
{
|
||||
ensure_entered_selected ();
|
||||
ensure_entered_region_selected ();
|
||||
|
||||
RegionSelection& rs (get_regions_for_action ());
|
||||
|
||||
|
@ -3351,7 +3366,7 @@ Editor::paste_internal (nframes_t position, float times)
|
|||
{
|
||||
bool commit = false;
|
||||
|
||||
if (cut_buffer->empty() || selection->tracks.empty()) {
|
||||
if (cut_buffer->empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3361,14 +3376,21 @@ Editor::paste_internal (nframes_t position, float times)
|
|||
|
||||
begin_reversible_command (_("paste"));
|
||||
|
||||
TrackSelection ts;
|
||||
TrackSelection::iterator i;
|
||||
size_t nth;
|
||||
|
||||
/* get everything in the correct order */
|
||||
|
||||
sort_track_selection ();
|
||||
|
||||
for (nth = 0, i = selection->tracks.begin(); i != selection->tracks.end(); ++i, ++nth) {
|
||||
if (!selection->tracks.empty()) {
|
||||
sort_track_selection ();
|
||||
ts = selection->tracks;
|
||||
} else if (entered_track) {
|
||||
ts.push_back (entered_track);
|
||||
}
|
||||
|
||||
for (nth = 0, i = ts.begin(); i != ts.end(); ++i, ++nth) {
|
||||
|
||||
/* undo/redo is handled by individual tracks */
|
||||
|
||||
|
@ -3888,7 +3910,7 @@ Editor::toggle_region_opaque ()
|
|||
void
|
||||
Editor::set_fade_length (bool in)
|
||||
{
|
||||
ensure_entered_selected ();
|
||||
ensure_entered_region_selected ();
|
||||
|
||||
/* we need a region to measure the offset from the start */
|
||||
|
||||
|
@ -4114,7 +4136,7 @@ Editor::set_playhead_cursor ()
|
|||
void
|
||||
Editor::split ()
|
||||
{
|
||||
ensure_entered_selected ();
|
||||
ensure_entered_region_selected ();
|
||||
|
||||
nframes64_t where = get_preferred_edit_position();
|
||||
|
||||
|
@ -4131,7 +4153,25 @@ Editor::split ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::ensure_entered_selected (bool op_really_wants_one_region_if_none_are_selected)
|
||||
Editor::ensure_entered_track_selected (bool op_really_wants_one_track_if_none_are_selected)
|
||||
{
|
||||
if (entered_track && mouse_mode == MouseObject) {
|
||||
if (!selection->tracks.empty()) {
|
||||
if (!selection->selected (entered_track)) {
|
||||
selection->add (entered_track);
|
||||
}
|
||||
} else {
|
||||
/* there is no selection, but this operation requires/prefers selected objects */
|
||||
|
||||
if (op_really_wants_one_track_if_none_are_selected) {
|
||||
selection->set (entered_track);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::ensure_entered_region_selected (bool op_really_wants_one_region_if_none_are_selected)
|
||||
{
|
||||
if (entered_regionview && mouse_mode == MouseObject) {
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <string>
|
||||
|
||||
#include <ardour/tempo.h>
|
||||
#include <ardour/profile.h>
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
|
||||
#include "editor.h"
|
||||
|
@ -414,11 +415,13 @@ Editor::popup_ruler_menu (nframes_t where, ItemType t)
|
|||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("Range Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_range_marker)));
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_range_marker]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
if (!Profile->get_sae()) {
|
||||
ruler_items.push_back (CheckMenuElem (_("Range Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_range_marker)));
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_time_range_marker]) {
|
||||
mitem->set_active(true);
|
||||
}
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (_("CD Markers"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_time_cd_marker)));
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
|
@ -535,6 +538,7 @@ Editor::restore_ruler_visibility ()
|
|||
else
|
||||
ruler_shown[ruler_time_range_marker] = false;
|
||||
}
|
||||
|
||||
if ((prop = node->property ("transportmarker")) != 0) {
|
||||
if (prop->value() == "yes")
|
||||
ruler_shown[ruler_time_transport_marker] = true;
|
||||
|
@ -689,7 +693,7 @@ Editor::update_ruler_visibility ()
|
|||
tempo_group->hide();
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_time_range_marker]) {
|
||||
if (!Profile->get_sae() && ruler_shown[ruler_time_range_marker]) {
|
||||
lab_children.push_back (Element(range_mark_label, PACK_SHRINK, PACK_START));
|
||||
old_unit_pos = range_marker_group->property_y();
|
||||
if (tbpos != old_unit_pos) {
|
||||
|
@ -698,8 +702,7 @@ Editor::update_ruler_visibility ()
|
|||
range_marker_group->show();
|
||||
tbpos += timebar_height;
|
||||
visible_timebars++;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
range_marker_group->hide();
|
||||
}
|
||||
|
||||
|
|
|
@ -306,12 +306,13 @@ Marker::add_line (ArdourCanvas::Group* group, double initial_height)
|
|||
line->property_width_pixels() = 1;
|
||||
line->property_points() = *line_points;
|
||||
line->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_EditPoint.get();
|
||||
#if 0
|
||||
line->property_first_arrowhead() = TRUE;
|
||||
line->property_last_arrowhead() = TRUE;
|
||||
line->property_arrow_shape_a() = 11.0;
|
||||
line->property_arrow_shape_b() = 0.0;
|
||||
line->property_arrow_shape_c() = 9.0;
|
||||
|
||||
#endif
|
||||
line->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
|
||||
}
|
||||
|
||||
|
|
|
@ -1078,6 +1078,23 @@ static const struct {
|
|||
const char *name;
|
||||
guint modifier;
|
||||
} modifiers[] = {
|
||||
|
||||
#ifdef GTKOSX
|
||||
|
||||
/* Command = Mod1
|
||||
Option/Alt = Mod5
|
||||
*/
|
||||
|
||||
{ "Shift", GDK_SHIFT_MASK },
|
||||
{ "Command", GDK_MOD1_MASK },
|
||||
{ "Control", GDK_CONTROL_MASK },
|
||||
{ "Option", GDK_MOD5_MASK },
|
||||
{ "Command-Shift", GDK_MOD1_MASK|GDK_SHIFT_MASK },
|
||||
{ "Command-Option", GDK_MOD1_MASK|GDK_MOD5_MASK },
|
||||
{ "Shift-Option", GDK_SHIFT_MASK|GDK_MOD5_MASK },
|
||||
{ "Shift-Command-Option", GDK_MOD5_MASK|GDK_SHIFT_MASK|GDK_MOD1_MASK },
|
||||
|
||||
#else
|
||||
{ "Shift", GDK_SHIFT_MASK },
|
||||
{ "Control", GDK_CONTROL_MASK },
|
||||
{ "Alt (Mod1)", GDK_MOD1_MASK },
|
||||
|
@ -1089,6 +1106,7 @@ static const struct {
|
|||
{ "Mod3", GDK_MOD3_MASK },
|
||||
{ "Mod4", GDK_MOD4_MASK },
|
||||
{ "Mod5", GDK_MOD5_MASK },
|
||||
#endif
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue