summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_info_box.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-06-08 19:48:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-06-08 19:48:57 +0000
commita6517a01902370e6c6dfa3e4a153e214b68cf4a7 (patch)
treeaa2cf8aa8465b74d20f7c7d81eea328c2eb13bbe /gtk2_ardour/time_info_box.cc
parent7c6b33e7994741173d095c163832a8b8266a8728 (diff)
move punch in/out buttons into time info box; remove rounded corners on clocks
git-svn-id: svn://localhost/ardour2/branches/3.0@9691 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_info_box.cc')
-rw-r--r--gtk2_ardour/time_info_box.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/gtk2_ardour/time_info_box.cc b/gtk2_ardour/time_info_box.cc
index 750ce9cea7..315767313f 100644
--- a/gtk2_ardour/time_info_box.cc
+++ b/gtk2_ardour/time_info_box.cc
@@ -23,6 +23,8 @@
#include "gtkmm2ext/cairocell.h"
#include "gtkmm2ext/gui_thread.h"
#include "gtkmm2ext/utils.h"
+#include "gtkmm2ext/stateful_button.h"
+#include "gtkmm2ext/actions.h"
#include "ardour/location.h"
#include "ardour/session.h"
@@ -42,6 +44,8 @@ TimeInfoBox::TimeInfoBox ()
: Table (4, 4)
, syncing_selection (false)
, syncing_punch (false)
+ , punch_in_button (_("In"))
+ , punch_out_button (_("Out"))
{
selection_start = new AudioClock ("selection-start", false, "SelectionClockDisplay", false, false, false, false);
selection_end = new AudioClock ("selection-end", false, "SelectionClockDisplay", false, false, false, false);
@@ -117,6 +121,22 @@ TimeInfoBox::TimeInfoBox ()
attach (*l, 2, 3, 2, 3, FILL);
attach (*punch_end, 3, 4, 2, 3);
+ punch_in_button.set_name ("TimeInfoPunchButton");
+ punch_out_button.set_name ("TimeInfoPunchButton");
+ punch_button_box.set_homogeneous (true);
+ punch_button_box.set_spacing (6);
+ punch_button_box.set_border_width (2);
+ punch_button_box.pack_start (punch_in_button, true, true);
+ punch_button_box.pack_start (punch_out_button, true, true);
+
+ ActionManager::get_action ("Transport", "TogglePunchIn")->connect_proxy (punch_in_button);
+ ActionManager::get_action ("Transport", "TogglePunchOut")->connect_proxy (punch_out_button);
+
+ Gtkmm2ext::UI::instance()->set_tip (punch_in_button, _("Start recording at auto-punch start"));
+ Gtkmm2ext::UI::instance()->set_tip (punch_out_button, _("Stop recording at auto-punch end"));
+
+ attach (punch_button_box, 2, 4, 3, 4, FILL, FILL);
+
show_all ();
selection_start->mode_changed.connect (sigc::bind (sigc::mem_fun (*this, &TimeInfoBox::sync_selection_mode), selection_start));