diff options
author | Robin Gareus <robin@gareus.org> | 2016-12-11 17:24:30 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-12-17 02:43:42 +0100 |
commit | 1a25b906b3ad73b8636909ab6562b0c97374aa14 (patch) | |
tree | d9a8127c589f544a80798ebb44ec37ce3ccd4197 /gtk2_ardour/time_info_box.cc | |
parent | a6317060599e7a17eddc6172eab28bfed4cb1b97 (diff) |
Commence transport tool bar re-layout
Diffstat (limited to 'gtk2_ardour/time_info_box.cc')
-rw-r--r-- | gtk2_ardour/time_info_box.cc | 68 |
1 files changed, 22 insertions, 46 deletions
diff --git a/gtk2_ardour/time_info_box.cc b/gtk2_ardour/time_info_box.cc index d0d6871cbb..f8118cbf64 100644 --- a/gtk2_ardour/time_info_box.cc +++ b/gtk2_ardour/time_info_box.cc @@ -44,8 +44,7 @@ using std::min; using std::max; TimeInfoBox::TimeInfoBox () - : left (2, 4) - , right (2, 4) + : table (3, 4) , syncing_selection (false) , syncing_punch (false) { @@ -65,67 +64,44 @@ TimeInfoBox::TimeInfoBox () set_spacing (0); set_border_width (2); - pack_start (left, true, true); - if (!ARDOUR::Profile->get_trx()) { - pack_start (right, true, true); - } - - left.set_homogeneous (false); - left.set_spacings (0); - left.set_border_width (2); - left.set_col_spacings (2); + pack_start (table, false, false); - right.set_homogeneous (false); - right.set_spacings (0); - right.set_border_width (2); - right.set_col_spacings (2); + table.set_homogeneous (false); + table.set_spacings (0); + table.set_border_width (2); + table.set_col_spacings (2); Gtk::Label* l; selection_title.set_name ("TimeInfoSelectionTitle"); - left.attach (selection_title, 1, 2, 0, 1); + table.attach (selection_title, 1, 2, 0, 1); l = manage (new Label); l->set_text (_("Start")); l->set_alignment (1.0, 0.5); l->set_name (X_("TimeInfoSelectionLabel")); - left.attach (*l, 0, 1, 1, 2, FILL); - left.attach (*selection_start, 1, 2, 1, 2); + table.attach (*l, 0, 1, 1, 2, FILL); + table.attach (*selection_start, 1, 2, 1, 2); l = manage (new Label); l->set_text (_("End")); l->set_alignment (1.0, 0.5); l->set_name (X_("TimeInfoSelectionLabel")); - left.attach (*l, 0, 1, 2, 3, FILL); - left.attach (*selection_end, 1, 2, 2, 3); + table.attach (*l, 0, 1, 2, 3, FILL); + table.attach (*selection_end, 1, 2, 2, 3); l = manage (new Label); l->set_text (_("Length")); l->set_alignment (1.0, 0.5); l->set_name (X_("TimeInfoSelectionLabel")); - left.attach (*l, 0, 1, 3, 4, FILL); - left.attach (*selection_length, 1, 2, 3, 4); - - punch_in_button.set_name ("punch button"); - punch_out_button.set_name ("punch button"); - punch_in_button.set_text (_("In")); - punch_out_button.set_text (_("Out")); - - Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "TogglePunchIn"); - punch_in_button.set_related_action (act); - act = ActionManager::get_action ("Transport", "TogglePunchOut"); - punch_out_button.set_related_action (act); - - 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")); + table.attach (*l, 0, 1, 3, 4, FILL); + table.attach (*selection_length, 1, 2, 3, 4); punch_title.set_name ("TimeInfoSelectionTitle"); - right.attach (punch_title, 3, 4, 0, 1); - right.attach (punch_in_button, 2, 3, 1, 2, FILL, SHRINK); - right.attach (*punch_start, 3, 4, 1, 2); - right.attach (punch_out_button, 2, 3, 2, 3, FILL, SHRINK); - right.attach (*punch_end, 3, 4, 2, 3); + table.attach (punch_title, 2, 3, 0, 1); + table.attach (*punch_start, 2, 3, 1, 2); + table.attach (*punch_end, 2, 3, 2, 3); - show_all (); + show_all (); selection_start->mode_changed.connect (sigc::bind (sigc::mem_fun (*this, &TimeInfoBox::sync_selection_mode), selection_start)); selection_end->mode_changed.connect (sigc::bind (sigc::mem_fun (*this, &TimeInfoBox::sync_selection_mode), selection_end)); @@ -149,12 +125,12 @@ TimeInfoBox::TimeInfoBox () TimeInfoBox::~TimeInfoBox () { - delete selection_length; - delete selection_end; - delete selection_start; + delete selection_length; + delete selection_end; + delete selection_start; - delete punch_start; - delete punch_end; + delete punch_start; + delete punch_end; } void |