rec-safe GUI
This commit is contained in:
parent
cfee8ac852
commit
ac7df69b49
|
@ -109,6 +109,23 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
rec_state_column->set_expand(false);
|
||||
rec_state_column->set_fixed_width(column_width);
|
||||
|
||||
|
||||
// Record safe toggle
|
||||
CellRendererPixbufMulti* rec_safe_renderer = manage (new CellRendererPixbufMulti ());
|
||||
|
||||
rec_safe_renderer->set_pixbuf (0, ::get_icon("rec-safe-disabled"));
|
||||
rec_safe_renderer->set_pixbuf (1, ::get_icon("rec-safe-enabled"));
|
||||
rec_safe_renderer->signal_changed().connect (sigc::mem_fun (*this, &EditorRoutes::on_tv_rec_safe_toggled));
|
||||
|
||||
TreeViewColumn* rec_safe_column = manage (new TreeViewColumn(_("RS"), *rec_safe_renderer));
|
||||
rec_safe_column->add_attribute(rec_safe_renderer->property_state(), _columns.rec_safe);
|
||||
rec_safe_column->add_attribute(rec_safe_renderer->property_visible(), _columns.is_track);
|
||||
rec_safe_column->set_sizing(TREE_VIEW_COLUMN_FIXED);
|
||||
rec_safe_column->set_alignment(ALIGN_CENTER);
|
||||
rec_safe_column->set_expand(false);
|
||||
rec_safe_column->set_fixed_width(column_width);
|
||||
|
||||
|
||||
// MIDI Input Active
|
||||
|
||||
CellRendererPixbufMulti* input_active_col_renderer = manage (new CellRendererPixbufMulti());
|
||||
|
@ -196,6 +213,7 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
|
||||
_display.append_column (*input_active_column);
|
||||
_display.append_column (*rec_state_column);
|
||||
_display.append_column (*rec_safe_column);
|
||||
_display.append_column (*mute_state_column);
|
||||
_display.append_column (*solo_state_column);
|
||||
_display.append_column (*solo_isolate_state_column);
|
||||
|
@ -211,10 +229,11 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
{ 2, S_("Active|A"), _("Track/Bus active ?") },
|
||||
{ 3, S_("MidiInput|I"), _("MIDI input enabled") },
|
||||
{ 4, S_("Rec|R"), _("Record enabled") },
|
||||
{ 5, S_("Mute|M"), _("Muted") },
|
||||
{ 6, S_("Solo|S"), _("Soloed") },
|
||||
{ 7, S_("SoloIso|SI"), _("Solo Isolated") },
|
||||
{ 8, S_("SoloLock|SS"), _("Solo Safe (Locked)") },
|
||||
{ 5, S_("Rec|RS"), _("Record Safe") },
|
||||
{ 6, S_("Mute|M"), _("Muted") },
|
||||
{ 7, S_("Solo|S"), _("Soloed") },
|
||||
{ 8, S_("SoloIso|SI"), _("Solo Isolated") },
|
||||
{ 9, S_("SoloLock|SS"), _("Solo Safe (Locked)") },
|
||||
{ -1, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -396,7 +415,6 @@ EditorRoutes::on_input_active_changed (std::string const & path_string)
|
|||
void
|
||||
EditorRoutes::on_tv_rec_enable_changed (std::string const & path_string)
|
||||
{
|
||||
DisplaySuspender ds;
|
||||
// Get the model row that has been toggled.
|
||||
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
|
||||
|
||||
|
@ -404,12 +422,29 @@ EditorRoutes::on_tv_rec_enable_changed (std::string const & path_string)
|
|||
RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
|
||||
|
||||
if (rtv && rtv->track()) {
|
||||
DisplaySuspender ds;
|
||||
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||
// TODO check rec-safe and ...
|
||||
rl->push_back (rtv->route());
|
||||
_session->set_record_enabled (rl, !rtv->track()->record_enabled(), Session::rt_cleanup);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditorRoutes::on_tv_rec_safe_toggled (std::string const & path_string)
|
||||
{
|
||||
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
|
||||
TimeAxisView* tv = row[_columns.tv];
|
||||
RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
|
||||
|
||||
if (rtv && rtv->track() && !rtv->track()->record_enabled()) {
|
||||
DisplaySuspender ds;
|
||||
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||
rl->push_back (rtv->route());
|
||||
_session->set_record_safe (rl, !rtv->track()->record_safe(), Session::rt_cleanup);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditorRoutes::on_tv_mute_enable_toggled (std::string const & path_string)
|
||||
{
|
||||
|
@ -1625,9 +1660,7 @@ EditorRoutes::idle_update_mute_rec_solo_etc()
|
|||
(*i)[_columns.rec_state] = 0;
|
||||
}
|
||||
|
||||
// TODO figure out how to make this Cell insensitive
|
||||
// and see RouteUI::check_rec_enable_sensitivity()
|
||||
|
||||
(*i)[_columns.rec_safe] = route->record_safe () ? 1 : 0;
|
||||
(*i)[_columns.name_editable] = !route->record_enabled ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ private:
|
|||
void redisplay_real ();
|
||||
void on_input_active_changed (std::string const &);
|
||||
void on_tv_rec_enable_changed (std::string const &);
|
||||
void on_tv_rec_safe_toggled (std::string const &);
|
||||
void on_tv_mute_enable_toggled (std::string const &);
|
||||
void on_tv_solo_enable_toggled (std::string const &);
|
||||
void on_tv_solo_isolate_toggled (std::string const &);
|
||||
|
@ -119,6 +120,7 @@ private:
|
|||
add (text);
|
||||
add (visible);
|
||||
add (rec_state);
|
||||
add (rec_safe);
|
||||
add (mute_state);
|
||||
add (solo_state);
|
||||
add (solo_visible);
|
||||
|
@ -136,6 +138,7 @@ private:
|
|||
Gtk::TreeModelColumn<std::string> text;
|
||||
Gtk::TreeModelColumn<bool> visible;
|
||||
Gtk::TreeModelColumn<uint32_t> rec_state;
|
||||
Gtk::TreeModelColumn<uint32_t> rec_safe;
|
||||
Gtk::TreeModelColumn<uint32_t> mute_state;
|
||||
Gtk::TreeModelColumn<uint32_t> solo_state;
|
||||
/** true if the solo buttons are visible for this route, otherwise false */
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 192 B |
Binary file not shown.
After Width: | Height: | Size: 184 B |
|
@ -2024,13 +2024,14 @@ MixerStrip::drop_send ()
|
|||
set_invert_sensitive (true);
|
||||
meter_point_button.set_sensitive (true);
|
||||
mute_button->set_sensitive (true);
|
||||
solo_button->set_sensitive (!_route || !_route->solo_safe());
|
||||
solo_button->set_sensitive (true);
|
||||
solo_isolated_led->set_sensitive (true);
|
||||
solo_safe_led->set_sensitive (true);
|
||||
monitor_input_button->set_sensitive (true);
|
||||
monitor_disk_button->set_sensitive (true);
|
||||
_comment_button.set_sensitive (true);
|
||||
RouteUI::check_rec_enable_sensitivity ();
|
||||
set_button_names (); // update solo button visual state
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -109,7 +109,7 @@ RouteUI::~RouteUI()
|
|||
delete solo_menu;
|
||||
delete mute_menu;
|
||||
delete sends_menu;
|
||||
delete record_menu;
|
||||
delete record_menu;
|
||||
delete comment_window;
|
||||
delete input_selector;
|
||||
delete output_selector;
|
||||
|
@ -126,20 +126,21 @@ RouteUI::init ()
|
|||
mute_menu = 0;
|
||||
solo_menu = 0;
|
||||
sends_menu = 0;
|
||||
record_menu = 0;
|
||||
record_menu = 0;
|
||||
_invert_menu = 0;
|
||||
pre_fader_mute_check = 0;
|
||||
post_fader_mute_check = 0;
|
||||
listen_mute_check = 0;
|
||||
main_mute_check = 0;
|
||||
solo_safe_check = 0;
|
||||
solo_isolated_check = 0;
|
||||
solo_isolated_led = 0;
|
||||
solo_safe_led = 0;
|
||||
solo_safe_check = 0;
|
||||
solo_isolated_check = 0;
|
||||
solo_isolated_led = 0;
|
||||
solo_safe_led = 0;
|
||||
_solo_release = 0;
|
||||
_mute_release = 0;
|
||||
denormal_menu_item = 0;
|
||||
step_edit_item = 0;
|
||||
step_edit_item = 0;
|
||||
rec_safe_item = 0;
|
||||
multiple_mute_change = false;
|
||||
multiple_solo_change = false;
|
||||
_i_am_the_modifier = 0;
|
||||
|
@ -886,29 +887,30 @@ RouteUI::monitor_release (GdkEventButton* ev, MonitorChoice monitor_choice)
|
|||
void
|
||||
RouteUI::build_record_menu ()
|
||||
{
|
||||
if (record_menu) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* no rec-button context menu for non-MIDI tracks
|
||||
*/
|
||||
|
||||
if (is_midi_track()) {
|
||||
if (!record_menu) {
|
||||
record_menu = new Menu;
|
||||
record_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
using namespace Menu_Helpers;
|
||||
MenuList& items = record_menu->items();
|
||||
|
||||
items.push_back (CheckMenuElem (_("Step Entry"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
|
||||
step_edit_item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
items.push_back (CheckMenuElem (_("Rec-Safe"), sigc::mem_fun (*this, &RouteUI::toggle_rec_safe)));
|
||||
rec_safe_item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
|
||||
if (_route->record_enabled()) {
|
||||
step_edit_item->set_sensitive (false);
|
||||
if (is_midi_track()) {
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (CheckMenuElem (_("Step Entry"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
|
||||
step_edit_item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
}
|
||||
}
|
||||
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_sensitive (!_route->record_enabled());
|
||||
step_edit_item->set_active (midi_track()->step_editing());
|
||||
}
|
||||
if (rec_safe_item) {
|
||||
rec_safe_item->set_sensitive (!_route->record_enabled());
|
||||
rec_safe_item->set_active (_route->record_safe());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -921,6 +923,18 @@ RouteUI::toggle_step_edit ()
|
|||
midi_track()->set_step_editing (step_edit_item->get_active());
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::toggle_rec_safe ()
|
||||
{
|
||||
if (_route->record_enabled()) {
|
||||
return;
|
||||
}
|
||||
DisplaySuspender ds;
|
||||
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||
rl->push_back (_route);
|
||||
_session->set_record_safe (rl, rec_safe_item->get_active (), Session::rt_cleanup);
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::step_edit_changed (bool yn)
|
||||
{
|
||||
|
@ -1927,24 +1941,16 @@ RouteUI::check_rec_enable_sensitivity ()
|
|||
|
||||
if (_session->transport_rolling() && rec_enable_button->active_state() && Config->get_disable_disarm_during_roll()) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
} else if (_route && _route->record_safe ()) {
|
||||
} else if (is_audio_track () && track()->freeze_state() == AudioTrack::Frozen) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
} else {
|
||||
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(_route);
|
||||
if (at) {
|
||||
switch (at->freeze_state()) {
|
||||
case AudioTrack::Frozen:
|
||||
rec_enable_button->set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
rec_enable_button->set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
rec_enable_button->set_sensitive (true);
|
||||
}
|
||||
rec_enable_button->set_sensitive (true);
|
||||
}
|
||||
if (_route && _route->record_safe ()) {
|
||||
rec_enable_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
|
||||
} else {
|
||||
rec_enable_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
|
||||
}
|
||||
|
||||
update_monitoring_display ();
|
||||
}
|
||||
|
||||
|
|
|
@ -223,6 +223,9 @@ class RouteUI : public virtual AxisView
|
|||
void toggle_step_edit ();
|
||||
virtual void step_edit_changed (bool);
|
||||
|
||||
Gtk::CheckMenuItem *rec_safe_item;
|
||||
void toggle_rec_safe ();
|
||||
|
||||
virtual void polarity_changed ();
|
||||
|
||||
Gtk::CheckMenuItem *denormal_menu_item;
|
||||
|
|
Loading…
Reference in New Issue