X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Froute_params_ui.cc;h=82e6f10a15fddc7576898016f497e4879a8fc681;hb=9a4f205b6ef6fec779833ea56a3202c058317ddd;hp=76f3d4e264770fffcdfbaf80faafc78a911cfe04;hpb=f0fcda204444922fc0e1261929aa6fdb84412036;p=ardour.git diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index 76f3d4e264..82e6f10a15 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -25,6 +25,7 @@ #include #include "ardour/audioengine.h" +#include "ardour/audio_track.h" #include "ardour/plugin.h" #include "ardour/plugin_insert.h" #include "ardour/plugin_manager.h" @@ -45,7 +46,7 @@ #include "return_ui.h" #include "route_params_ui.h" #include "send_ui.h" -#include "utils.h" +#include "timers.h" #include "i18n.h" @@ -214,6 +215,25 @@ RouteParams_UI::route_property_changed (const PropertyChange& what_changed, boos } } +void +RouteParams_UI::map_frozen() +{ + ENSURE_GUI_THREAD (*this, &RouteParams_UI::map_frozen) + boost::shared_ptr at = boost::dynamic_pointer_cast(_route); + if (at && insert_box) { + switch (at->freeze_state()) { + case AudioTrack::Frozen: + insert_box->set_sensitive (false); + //hide_redirect_editors (); // TODO hide editor windows + break; + default: + insert_box->set_sensitive (true); + // XXX need some way, maybe, to retoggle redirect editors + break; + } + } +} + void RouteParams_UI::setup_processor_boxes() { @@ -226,9 +246,13 @@ RouteParams_UI::setup_processor_boxes() insert_box = new ProcessorBox (_session, boost::bind (&RouteParams_UI::plugin_selector, this), _rr_selection, 0); insert_box->set_route (_route); + boost::shared_ptr at = boost::dynamic_pointer_cast(_route); + if (at) { + at->FreezeChange.connect (route_connections, invalidator (*this), boost::bind (&RouteParams_UI::map_frozen, this), gui_context()); + } redir_hpane.pack1 (*insert_box); - insert_box->ProcessorSelected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected)); + insert_box->ProcessorSelected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected)); //note: this indicates a double-click activation, not just a "selection" insert_box->ProcessorUnselected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected)); redir_hpane.show_all(); @@ -619,7 +643,7 @@ RouteParams_UI::update_title () void RouteParams_UI::start_updating () { - update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect + update_connection = Timers::rapid_connect (sigc::mem_fun(*this, &RouteParams_UI::update_views)); }