summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-04-04 03:26:08 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-04-04 03:26:08 +0000
commitf7c82c69113419a8db083f0095044af5ad4c872c (patch)
tree158067acc6c957b2f973802c089878812134b2b0 /gtk2_ardour
parentaf5815e79bcd2a17edbdf5d45f1c7df02af546d8 (diff)
a) start at creating ControlProtocol objects
b) basic support for Frontier Design Tranzport c) probably broke some aspect of existing generic MIDI feedback git-svn-id: svn://localhost/trunk/ardour2@441 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/SConscript1
-rw-r--r--gtk2_ardour/ardour_ui.cc8
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc2
-rw-r--r--gtk2_ardour/audio_time_axis.cc16
-rw-r--r--gtk2_ardour/audio_time_axis.h1
-rw-r--r--gtk2_ardour/editor_ops.cc50
6 files changed, 40 insertions, 38 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index 38cac52b40..0ca9def5fe 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -24,6 +24,7 @@ gtkardour.Append(POTFILE=domain + '.pot')
gtkardour.Merge ([
libraries['ardour'],
+ libraries['usb'],
libraries['gtkmm2ext'],
# libraries['flowcanvas'],
libraries['midi++2'],
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 2b7b87f93b..79c81992dc 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1261,14 +1261,6 @@ ARDOUR_UI::map_transport_state ()
}
void
-ARDOUR_UI::send_all_midi_feedback ()
-{
- if (session) {
- session->send_all_midi_feedback();
- }
-}
-
-void
ARDOUR_UI::allow_local_only ()
{
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 9c1ae4c45f..e658aa23e9 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -286,8 +286,6 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleTimeMaster"), _("Time\nmaster"), mem_fun(*this, &ARDOUR_UI::toggle_time_master));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (common_actions, X_("SendAllMidiFeedback"), _("Send All Midi Feedback"), mem_fun(*this, &ARDOUR_UI::send_all_midi_feedback));
- ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack1"), _("Toggle Record Enable Track1"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0U));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack2"), _("Toggle Record Enable Track2"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 1U));
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index b4a5413d04..6bb6fc45ce 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -141,6 +141,15 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
_route.panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
+ solo_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ mute_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ rec_enable_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ playlist_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ automation_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ size_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ visual_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ hide_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+
solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press), false);
solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release), false);
mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press), false);
@@ -1960,3 +1969,10 @@ AudioTimeAxisView::color_handler (ColorID id, uint32_t val)
break;
}
}
+
+bool
+AudioTimeAxisView::select_me (GdkEventButton* ev)
+{
+ editor.get_selection().add (this);
+ return false;
+}
diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h
index 0e2eab66c9..d1fbde3e9c 100644
--- a/gtk2_ardour/audio_time_axis.h
+++ b/gtk2_ardour/audio_time_axis.h
@@ -315,6 +315,7 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
void map_frozen ();
void color_handler (ColorID, uint32_t);
+ bool select_me (GdkEventButton*);
};
#endif /* __ardour_trackview_h__ */
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index f78ecbbcbe..03ea5ac456 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1394,10 +1394,6 @@ Editor::set_selection_from_loop()
void
Editor::set_selection_from_range (Location& loc)
{
- if (clicked_trackview == 0) {
- return;
- }
-
begin_reversible_command (_("set selection from range"));
selection->set (0, loc.start(), loc.end());
commit_reversible_command ();
@@ -1408,13 +1404,8 @@ Editor::set_selection_from_range (Location& loc)
void
Editor::select_all_selectables_using_time_selection ()
{
-
list<Selectable *> touched;
- if (clicked_trackview == 0) {
- return;
- }
-
if (selection->time.empty()) {
return;
}
@@ -1432,10 +1423,10 @@ Editor::select_all_selectables_using_time_selection ()
}
(*iter)->get_selectables (start, end - 1, 0, DBL_MAX, touched);
}
+
begin_reversible_command (_("select all from range"));
selection->set (touched);
commit_reversible_command ();
-
}
@@ -1491,18 +1482,19 @@ Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
list<Selectable *> touched;
if (after) {
- begin_reversible_command (_("select all after cursor"));
- start = cursor->current_frame ;
- end = session->current_end_frame();
+ begin_reversible_command (_("select all after cursor"));
+ start = cursor->current_frame ;
+ end = session->current_end_frame();
} else {
- if (cursor->current_frame > 0) {
- begin_reversible_command (_("select all before cursor"));
- start = 0;
- end = cursor->current_frame - 1;
- } else {
- return;
- }
+ if (cursor->current_frame > 0) {
+ begin_reversible_command (_("select all before cursor"));
+ start = 0;
+ end = cursor->current_frame - 1;
+ } else {
+ return;
+ }
}
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
@@ -1520,19 +1512,21 @@ Editor::select_all_selectables_between_cursors (Cursor *cursor, Cursor *other_cu
jack_nframes_t end;
list<Selectable *> touched;
bool other_cursor_is_first = cursor->current_frame > other_cursor->current_frame;
+
if (cursor->current_frame == other_cursor->current_frame) {
- return;
+ return;
}
- begin_reversible_command (_("select all between cursors"));
- if ( other_cursor_is_first) {
- start = other_cursor->current_frame;
- end = cursor->current_frame - 1;
+ begin_reversible_command (_("select all between cursors"));
+ if (other_cursor_is_first) {
+ start = other_cursor->current_frame;
+ end = cursor->current_frame - 1;
+
} else {
- start = cursor->current_frame;
- end = other_cursor->current_frame - 1;
+ start = cursor->current_frame;
+ end = other_cursor->current_frame - 1;
}
-
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;