summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-02-13 22:59:51 +0100
committerRobin Gareus <robin@gareus.org>2017-02-13 23:01:11 +0100
commit65b38322db994462358318c7a3a2ba1a002351bd (patch)
treea783f5e3eb4dc2bff3263db16f20f89db81de234 /gtk2_ardour
parent7946967270a1a3def300bba6d05c87bfd65e6900 (diff)
GUI action Transport/RecordCountIn
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour.menus.in1
-rw-r--r--gtk2_ardour/ardour_ui.cc9
-rw-r--r--gtk2_ardour/ardour_ui.h1
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc4
-rw-r--r--gtk2_ardour/editor.h1
-rw-r--r--gtk2_ardour/editor_ops.cc5
-rw-r--r--gtk2_ardour/public_editor.h1
7 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in
index b579e7d2a1..5c43175f20 100644
--- a/gtk2_ardour/ardour.menus.in
+++ b/gtk2_ardour/ardour.menus.in
@@ -75,6 +75,7 @@
<menuitem action='ToggleRollForgetCapture'/>
<menuitem action='Record'/>
<menuitem action='RecordPreroll'/>
+ <menuitem action='RecordCountIn'/>
#if 0
<menuitem action='toggle-skip-playback'/>
#endif
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index b0feef3686..8700f59d4f 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2398,6 +2398,15 @@ ARDOUR_UI::transport_rec_preroll ()
}
void
+ARDOUR_UI::transport_rec_count_in ()
+{
+ if (!_session) {
+ return;
+ }
+ editor->rec_with_count_in ();
+}
+
+void
ARDOUR_UI::transport_rewind (int option)
{
float current_transport_speed;
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 27bdf4bcc4..170dbe9948 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -666,6 +666,7 @@ private:
void transport_play_selection();
void transport_play_preroll();
void transport_rec_preroll();
+ void transport_rec_count_in();
void transport_forward (int option);
void transport_rewind (int option);
void transport_loop ();
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 1b14cba012..1cca283900 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -474,6 +474,10 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
+ act = global_actions.register_action (transport_actions, X_("RecordCountIn"), _("Record w/Count-In"), sigc::mem_fun(*this, &ARDOUR_UI::transport_rec_count_in));
+ ActionManager::session_sensitive_actions.push_back (act);
+ ActionManager::write_sensitive_actions.push_back (act);
+
act = global_actions.register_action (transport_actions, X_("Record"), _("Enable Record"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), false));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index fa5ed9057a..46562a76b8 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -263,6 +263,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void maybe_locate_with_edit_preroll (framepos_t);
void play_with_preroll ();
void rec_with_preroll ();
+ void rec_with_count_in ();
void select_all_in_track (Selection::Operation op);
void select_all_objects (Selection::Operation op);
void invert_selection_in_track ();
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 93a4571d89..1db9ce4423 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -2670,6 +2670,11 @@ Editor::rec_with_preroll ()
_session->request_preroll_record_trim (ph, preroll);
}
+void
+Editor::rec_with_count_in ()
+{
+ _session->request_count_in_record ();
+}
void
Editor::play_location (Location& location)
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index 7516d48099..38b977171b 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -211,6 +211,7 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
virtual void play_selection () = 0;
virtual void play_with_preroll () = 0;
virtual void rec_with_preroll () = 0;
+ virtual void rec_with_count_in () = 0;
virtual void maybe_locate_with_edit_preroll (framepos_t location) = 0;
virtual void goto_nth_marker (int nth) = 0;
virtual void trigger_script (int nth) = 0;