X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.cc;h=4d6f7119cc72b9ac5528a7ed7a1de675165aee5c;hb=fe85a922ec4a3e0cf1107adadfa50ad7b8417aa3;hp=299c9fc4f331266ba16435bbdb397485b91cd671;hpb=ce8bd8948e794377697fdc9e0f3674cf7593c725;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 299c9fc4f3..4d6f7119cc 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -29,10 +29,9 @@ #include #include -#include +#include #include -#include "ardour/audio_diskstream.h" #include "ardour/audio_track.h" #include "ardour/plugin_manager.h" #include "ardour/route_group.h" @@ -42,6 +41,7 @@ #include "keyboard.h" #include "mixer_ui.h" #include "mixer_strip.h" +#include "monitor_section.h" #include "plugin_selector.h" #include "ardour_ui.h" #include "prompter.h" @@ -57,7 +57,6 @@ using namespace PBD; using namespace Gtk; using namespace Glib; using namespace Gtkmm2ext; -using namespace sigc; using namespace std; using PBD::atoi; @@ -65,9 +64,9 @@ using PBD::atoi; Mixer_UI::Mixer_UI () : Window (Gtk::WINDOW_TOPLEVEL) { - session = 0; _strip_width = Config->get_default_narrow_ms() ? Narrow : Wide; track_menu = 0; + _monitor_section = 0; route_group_context_menu = 0; no_track_list_redisplay = false; in_group_row_change = false; @@ -76,11 +75,11 @@ Mixer_UI::Mixer_UI () strip_redisplay_does_not_sync_order_keys = false; ignore_sync = false; - Route::SyncOrderKeys.connect (mem_fun (*this, &Mixer_UI::sync_order_keys)); + Route::SyncOrderKeys.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::sync_order_keys, this, _1), gui_context()); scroller_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); scroller_base.set_name ("MixerWindow"); - scroller_base.signal_button_release_event().connect (mem_fun(*this, &Mixer_UI::strip_scroller_button_release)); + scroller_base.signal_button_release_event().connect (sigc::mem_fun(*this, &Mixer_UI::strip_scroller_button_release)); // add as last item of strip packer strip_packer.pack_end (scroller_base, true, true); @@ -106,15 +105,15 @@ Mixer_UI::Mixer_UI () track_display.set_reorderable (true); track_display.set_headers_visible (true); - track_model->signal_row_deleted().connect (mem_fun (*this, &Mixer_UI::track_list_delete)); - track_model->signal_row_changed().connect (mem_fun (*this, &Mixer_UI::track_list_change)); - track_model->signal_rows_reordered().connect (mem_fun (*this, &Mixer_UI::track_list_reorder)); + track_model->signal_row_deleted().connect (sigc::mem_fun (*this, &Mixer_UI::track_list_delete)); + track_model->signal_row_changed().connect (sigc::mem_fun (*this, &Mixer_UI::track_list_change)); + track_model->signal_rows_reordered().connect (sigc::mem_fun (*this, &Mixer_UI::track_list_reorder)); CellRendererToggle* track_list_visible_cell = dynamic_cast(track_display.get_column_cell_renderer (1)); track_list_visible_cell->property_activatable() = true; track_list_visible_cell->property_radio() = false; - track_display.signal_button_press_event().connect (mem_fun (*this, &Mixer_UI::track_display_button_press), false); + track_display.signal_button_press_event().connect (sigc::mem_fun (*this, &Mixer_UI::track_display_button_press), false); track_display_scroller.add (track_display); track_display_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -137,7 +136,7 @@ Mixer_UI::Mixer_UI () CellRendererText* name_cell = dynamic_cast(group_display.get_column_cell_renderer (0)); name_cell->property_editable() = true; - name_cell->signal_edited().connect (mem_fun (*this, &Mixer_UI::route_group_name_edit)); + name_cell->signal_edited().connect (sigc::mem_fun (*this, &Mixer_UI::route_group_name_edit)); /* use checkbox for the active column */ @@ -145,9 +144,9 @@ Mixer_UI::Mixer_UI () active_cell->property_activatable() = true; active_cell->property_radio() = false; - group_model->signal_row_changed().connect (mem_fun (*this, &Mixer_UI::route_group_row_change)); + group_model->signal_row_changed().connect (sigc::mem_fun (*this, &Mixer_UI::route_group_row_change)); - group_display.signal_button_press_event().connect (mem_fun (*this, &Mixer_UI::group_display_button_press), false); + group_display.signal_button_press_event().connect (sigc::mem_fun (*this, &Mixer_UI::group_display_button_press), false); group_display_scroller.add (group_display); group_display_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -169,8 +168,8 @@ Mixer_UI::Mixer_UI () route_group_display_button_box->set_homogeneous (true); - route_group_add_button->signal_clicked().connect (mem_fun (*this, &Mixer_UI::new_route_group)); - route_group_remove_button->signal_clicked().connect (mem_fun (*this, &Mixer_UI::remove_selected_route_group)); + route_group_add_button->signal_clicked().connect (sigc::mem_fun (*this, &Mixer_UI::new_route_group)); + route_group_remove_button->signal_clicked().connect (sigc::mem_fun (*this, &Mixer_UI::remove_selected_route_group)); route_group_display_button_box->add (*route_group_remove_button); route_group_display_button_box->add (*route_group_add_button); @@ -201,9 +200,9 @@ Mixer_UI::Mixer_UI () list_hpane.add1(list_vpacker); list_hpane.add2(global_hpacker); - rhs_pane1.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), + rhs_pane1.signal_size_allocate().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::pane_allocation_handler), static_cast (&rhs_pane1))); - list_hpane.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), + list_hpane.signal_size_allocate().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::pane_allocation_handler), static_cast (&list_hpane))); global_vpacker.pack_start (list_hpane, true, true); @@ -219,12 +218,12 @@ Mixer_UI::Mixer_UI () add_accel_group (ActionManager::ui_manager->get_accel_group()); - signal_delete_event().connect (mem_fun (*this, &Mixer_UI::hide_window)); + signal_delete_event().connect (sigc::mem_fun (*this, &Mixer_UI::hide_window)); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK); - signal_configure_event().connect (mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); + signal_configure_event().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); - _selection.RoutesChanged.connect (mem_fun(*this, &Mixer_UI::follow_strip_selection)); + _selection.RoutesChanged.connect (sigc::mem_fun(*this, &Mixer_UI::follow_strip_selection)); route_group_display_button_box->show(); route_group_add_button->show(); @@ -253,7 +252,13 @@ Mixer_UI::Mixer_UI () auto_rebinding = FALSE; + MixerStrip::CatchDeletion.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::remove_strip, this, _1), gui_context()); + + MonitorSection::setup_knob_images (); + +#ifndef DEFER_PLUGIN_SELECTOR_LOAD _plugin_selector = new PluginSelector (PluginManager::the_manager ()); +#endif } Mixer_UI::~Mixer_UI () @@ -300,7 +305,7 @@ Mixer_UI::hide_window (GdkEventAny *ev) void Mixer_UI::add_strip (RouteList& routes) { - ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), routes)); + ENSURE_GUI_THREAD (*this, &Mixer_UI::add_strip, routes) MixerStrip* strip; @@ -311,10 +316,30 @@ Mixer_UI::add_strip (RouteList& routes) boost::shared_ptr route = (*x); if (route->is_hidden()) { - return; + continue; } - strip = new MixerStrip (*this, *session, route); + if (route->is_monitor()) { + if (!_monitor_section) { + _monitor_section = new MonitorSection (_session); + out_packer.pack_end (_monitor_section->tearoff(), false, false); + } else { + _monitor_section->set_session (_session); + } + + _monitor_section->tearoff().show_all (); + + XMLNode* mnode = ARDOUR_UI::instance()->tearoff_settings (X_("monitor-section")); + if (mnode) { + _monitor_section->tearoff().set_state (*mnode); + } + + /* no regular strip shown for control out */ + + continue; + } + + strip = new MixerStrip (*this, _session, route); strips.push_back (strip); Config->get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide; @@ -335,11 +360,10 @@ Mixer_UI::add_strip (RouteList& routes) route->set_order_key (N_("signal"), track_model->children().size()-1); } - route->NameChanged.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip)); + route->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::strip_property_changed, this, _1, strip), gui_context()); - strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip)); - strip->WidthChanged.connect (mem_fun(*this, &Mixer_UI::strip_width_changed)); - strip->signal_button_release_event().connect (bind (mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); + strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed)); + strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); } no_track_list_redisplay = false; @@ -352,7 +376,14 @@ Mixer_UI::add_strip (RouteList& routes) void Mixer_UI::remove_strip (MixerStrip* strip) { - ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::remove_strip), strip)); + if (_session && _session->deletion_in_progress()) { + /* its all being taken care of */ + return; + } + + ENSURE_GUI_THREAD (*this, &Mixer_UI::remove_strip, strip); + + cerr << "Mixer UI removing strip for " << strip << endl; TreeModel::Children rows = track_model->children(); TreeModel::Children::iterator ri; @@ -380,7 +411,7 @@ Mixer_UI::sync_order_keys (string const & src) TreeModel::Children rows = track_model->children(); TreeModel::Children::iterator ri; - if (src == N_("signal") || !session || (session->state_of_the_state() & Session::Loading) || rows.empty()) { + if (src == N_("signal") || !_session || (_session->state_of_the_state() & (Session::Loading|Session::Deletion)) || rows.empty()) { return; } @@ -394,10 +425,6 @@ Mixer_UI::sync_order_keys (string const & src) unsigned int old_key = order; unsigned int new_key = route->order_key (N_("signal")); - cerr << route->name() << " old was " << order << " new is " << new_key << " exists ?" - << (keys.find (new_key) != keys.end()) - << endl; - keys[new_key] = old_key; if (new_key != old_key) { @@ -457,14 +484,24 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip) } void -Mixer_UI::connect_to_session (Session* sess) +Mixer_UI::set_session (Session* sess) { - session = sess; + SessionHandlePtr::set_session (sess); + + if (_plugin_selector) { + _plugin_selector->set_session (_session); + } + + _group_tabs->set_session (sess); + + if (!_session) { + return; + } XMLNode* node = ARDOUR_UI::instance()->mixer_settings(); set_state (*node); - WindowTitle title(session->name()); + WindowTitle title(_session->name()); title += _("Mixer"); title += Glib::get_application_name(); @@ -472,39 +509,48 @@ Mixer_UI::connect_to_session (Session* sess) initial_track_display (); - session->GoingAway.connect (mem_fun(*this, &Mixer_UI::disconnect_from_session)); - session->RouteAdded.connect (mem_fun(*this, &Mixer_UI::add_strip)); - session->route_group_added.connect (mem_fun(*this, &Mixer_UI::add_route_group)); - session->route_group_removed.connect (mem_fun(*this, &Mixer_UI::route_groups_changed)); - session->config.ParameterChanged.connect (mem_fun (*this, &Mixer_UI::parameter_changed)); + _session->RouteAdded.connect (_session_connections, invalidator (*this), ui_bind (&Mixer_UI::add_strip, this, _1), gui_context()); + _session->route_group_added.connect (_session_connections, invalidator (*this), ui_bind (&Mixer_UI::add_route_group, this, _1), gui_context()); + _session->route_group_removed.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::route_groups_changed, this), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), ui_bind (&Mixer_UI::parameter_changed, this, _1), gui_context()); - route_groups_changed (); + Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::parameter_changed, this, _1), gui_context ()); - if (_plugin_selector) - _plugin_selector->set_session (session); + route_groups_changed (); if (_visible) { - show_window(); + show_window(); } - _group_tabs->connect_to_session (sess); - start_updating (); } void -Mixer_UI::disconnect_from_session () +Mixer_UI::session_going_away () { - ENSURE_GUI_THREAD(mem_fun(*this, &Mixer_UI::disconnect_from_session)); + ENSURE_GUI_THREAD (*this, &Mixer_UI::session_going_away) group_model->clear (); _selection.clear (); + track_model->clear (); + + for (list::iterator i = strips.begin(); i != strips.end(); ++i) { + delete (*i); + } + + if (_monitor_section) { + _monitor_section->tearoff().hide_visible (); + } + + strips.clear (); WindowTitle title(Glib::get_application_name()); title += _("Mixer"); set_title (title.get_string()); stop_updating (); + + SessionHandlePtr::session_going_away (); } void @@ -542,7 +588,7 @@ Mixer_UI::hide_strip (MixerStrip* ms) gint Mixer_UI::start_updating () { - fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::fast_update_strips)); + fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (sigc::mem_fun(*this, &Mixer_UI::fast_update_strips)); return 0; } @@ -556,7 +602,7 @@ Mixer_UI::stop_updating () void Mixer_UI::fast_update_strips () { - if (is_mapped () && session) { + if (is_mapped () && _session) { for (list::iterator i = strips.begin(); i != strips.end(); ++i) { (*i)->fast_update (); } @@ -580,7 +626,7 @@ Mixer_UI::set_all_strips_visibility (bool yn) continue; } - if (strip->route()->is_master() || strip->route()->is_control()) { + if (strip->route()->is_master() || strip->route()->is_monitor()) { continue; } @@ -608,7 +654,7 @@ Mixer_UI::set_all_audio_visibility (int tracks, bool yn) continue; } - if (strip->route()->is_master() || strip->route()->is_control()) { + if (strip->route()->is_master() || strip->route()->is_monitor()) { continue; } @@ -675,7 +721,7 @@ void Mixer_UI::track_list_reorder (const TreeModel::Path&, const TreeModel::iterator&, int* /*new_order*/) { strip_redisplay_does_not_sync_order_keys = true; - session->set_remote_control_ids(); + _session->set_remote_control_ids(); redisplay_track_list (); strip_redisplay_does_not_sync_order_keys = false; } @@ -685,7 +731,7 @@ Mixer_UI::track_list_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel:: { // never reset order keys because of a property change strip_redisplay_does_not_reset_order_keys = true; - session->set_remote_control_ids(); + _session->set_remote_control_ids(); redisplay_track_list (); strip_redisplay_does_not_reset_order_keys = false; } @@ -694,8 +740,10 @@ void Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&) { /* this could require an order sync */ - session->set_remote_control_ids(); - redisplay_track_list (); + if (_session && !_session->deletion_in_progress()) { + _session->set_remote_control_ids(); + redisplay_track_list (); + } } void @@ -729,7 +777,7 @@ Mixer_UI::redisplay_track_list () if (strip->packed()) { - if (strip->route()->is_master() || strip->route()->is_control()) { + if (strip->route()->is_master() || strip->route()->is_monitor()) { out_packer.reorder_child (*strip, -1); } else { strip_packer.reorder_child (*strip, -1); /* put at end */ @@ -737,7 +785,7 @@ Mixer_UI::redisplay_track_list () } else { - if (strip->route()->is_master() || strip->route()->is_control()) { + if (strip->route()->is_master() || strip->route()->is_monitor()) { out_packer.pack_start (*strip, false, false); } else { strip_packer.pack_start (*strip, false, false); @@ -750,7 +798,7 @@ Mixer_UI::redisplay_track_list () strip->set_marked_for_display (false); - if (strip->route()->is_master() || strip->route()->is_control()) { + if (strip->route()->is_master() || strip->route()->is_monitor()) { /* do nothing, these cannot be hidden */ } else { if (strip->packed()) { @@ -762,10 +810,10 @@ Mixer_UI::redisplay_track_list () } if (!strip_redisplay_does_not_reset_order_keys && !strip_redisplay_does_not_sync_order_keys) { - session->sync_order_keys (N_("signal")); + _session->sync_order_keys (N_("signal")); } - // Rebind all of the midi controls automatically + // Resigc::bind all of the midi controls automatically if (auto_rebinding) auto_rebind_midi_controls (); @@ -892,7 +940,7 @@ struct SignalOrderRouteSorter { void Mixer_UI::initial_track_display () { - boost::shared_ptr routes = session->get_routes(); + boost::shared_ptr routes = _session->get_routes(); RouteList copy (*routes); SignalOrderRouteSorter sorter; @@ -948,7 +996,7 @@ Mixer_UI::track_display_button_press (GdkEventButton* ev) MixerStrip* strip = (*iter)[track_columns.strip]; if (strip) { - if (!strip->route()->is_master() && !strip->route()->is_control()) { + if (!strip->route()->is_master() && !strip->route()->is_monitor()) { bool visible = (*iter)[track_columns.visible]; (*iter)[track_columns.visible] = !visible; } @@ -977,19 +1025,23 @@ Mixer_UI::build_track_menu () track_menu->set_name ("ArdourContextMenu"); MenuList& items = track_menu->items(); - items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Mixer_UI::show_all_routes))); - items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Mixer_UI::hide_all_routes))); - items.push_back (MenuElem (_("Show All Audio Tracks"), mem_fun(*this, &Mixer_UI::show_all_audiotracks))); - items.push_back (MenuElem (_("Hide All Audio Tracks"), mem_fun(*this, &Mixer_UI::hide_all_audiotracks))); - items.push_back (MenuElem (_("Show All Audio Busses"), mem_fun(*this, &Mixer_UI::show_all_audiobus))); - items.push_back (MenuElem (_("Hide All Audio Busses"), mem_fun(*this, &Mixer_UI::hide_all_audiobus))); + items.push_back (MenuElem (_("Show All"), sigc::mem_fun(*this, &Mixer_UI::show_all_routes))); + items.push_back (MenuElem (_("Hide All"), sigc::mem_fun(*this, &Mixer_UI::hide_all_routes))); + items.push_back (MenuElem (_("Show All Audio Tracks"), sigc::mem_fun(*this, &Mixer_UI::show_all_audiotracks))); + items.push_back (MenuElem (_("Hide All Audio Tracks"), sigc::mem_fun(*this, &Mixer_UI::hide_all_audiotracks))); + items.push_back (MenuElem (_("Show All Audio Busses"), sigc::mem_fun(*this, &Mixer_UI::show_all_audiobus))); + items.push_back (MenuElem (_("Hide All Audio Busses"), sigc::mem_fun(*this, &Mixer_UI::hide_all_audiobus))); } void -Mixer_UI::strip_name_changed (MixerStrip* mx) +Mixer_UI::strip_property_changed (const PropertyChange& what_changed, MixerStrip* mx) { - ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::strip_name_changed), mx)); + if (!what_changed.contains (ARDOUR::Properties::name)) { + return; + } + + ENSURE_GUI_THREAD (*this, &Mixer_UI::strip_name_changed, what_changed, mx) TreeModel::Children rows = track_model->children(); TreeModel::Children::iterator i; @@ -1014,10 +1066,10 @@ Mixer_UI::build_route_group_context_menu () route_group_context_menu->set_name ("ArdourContextMenu"); MenuList& items = route_group_context_menu->items(); - items.push_back (MenuElem (_("Activate All"), mem_fun(*this, &Mixer_UI::activate_all_route_groups))); - items.push_back (MenuElem (_("Disable All"), mem_fun(*this, &Mixer_UI::disable_all_route_groups))); + items.push_back (MenuElem (_("Activate All"), sigc::mem_fun(*this, &Mixer_UI::activate_all_route_groups))); + items.push_back (MenuElem (_("Disable All"), sigc::mem_fun(*this, &Mixer_UI::disable_all_route_groups))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Add group"), mem_fun(*this, &Mixer_UI::new_route_group))); + items.push_back (MenuElem (_("Add group"), sigc::mem_fun(*this, &Mixer_UI::new_route_group))); } @@ -1081,19 +1133,19 @@ Mixer_UI::group_display_button_press (GdkEventButton* ev) void Mixer_UI::activate_all_route_groups () { - session->foreach_route_group (bind (mem_fun (*this, &Mixer_UI::set_route_group_activation), true)); + _session->foreach_route_group (sigc::bind (sigc::mem_fun (*this, &Mixer_UI::set_route_group_activation), true)); } void Mixer_UI::disable_all_route_groups () { - session->foreach_route_group (bind (mem_fun (*this, &Mixer_UI::set_route_group_activation), false)); + _session->foreach_route_group (sigc::bind (sigc::mem_fun (*this, &Mixer_UI::set_route_group_activation), false)); } void Mixer_UI::route_groups_changed () { - ENSURE_GUI_THREAD (mem_fun (*this, &Mixer_UI::route_groups_changed)); + ENSURE_GUI_THREAD (*this, &Mixer_UI::route_groups_changed) /* just rebuild the while thing */ @@ -1107,13 +1159,23 @@ Mixer_UI::route_groups_changed () row[group_columns.group] = 0; } - session->foreach_route_group (mem_fun (*this, &Mixer_UI::add_route_group)); + _session->foreach_route_group (sigc::mem_fun (*this, &Mixer_UI::add_route_group)); } void Mixer_UI::new_route_group () { - session->add_route_group (new RouteGroup (*session, "", RouteGroup::Active, (RouteGroup::Property) (RouteGroup::Gain |RouteGroup::Mute | RouteGroup::Solo))); + PropertyList plist; + + plist.add (Properties::active, true); + plist.add (Properties::gain, true); + plist.add (Properties::mute, true); + plist.add (Properties::solo, true); + + RouteGroup* g = new RouteGroup (*_session, ""); + g->set_properties (plist); + + _session->add_route_group (g); } void @@ -1136,27 +1198,25 @@ Mixer_UI::remove_selected_route_group () RouteGroup* rg = (*iter)[group_columns.group]; if (rg) { - session->remove_route_group (*rg); + _session->remove_route_group (*rg); } } } void -Mixer_UI::group_flags_changed (void* src, RouteGroup* group) +Mixer_UI::route_group_property_changed (RouteGroup* group, const PropertyChange& change) { if (in_group_row_change) { return; } - ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::group_flags_changed), src, group)); - /* force an update of any mixer strips that are using this group, otherwise mix group names don't change in mixer strips */ for (list::iterator i = strips.begin(); i != strips.end(); ++i) { if ((*i)->route_group() == group) { - (*i)->route_group_changed(0); + (*i)->route_group_changed(); } } @@ -1176,7 +1236,9 @@ Mixer_UI::group_flags_changed (void* src, RouteGroup* group) in_group_row_change = false; - _group_tabs->set_dirty (); + if (change.contains (Properties::name)) { + _group_tabs->set_dirty (); + } } void @@ -1235,7 +1297,7 @@ Mixer_UI::route_group_row_change (const Gtk::TreeModel::Path&, const Gtk::TreeMo void Mixer_UI::add_route_group (RouteGroup* group) { - ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_route_group), group)); + ENSURE_GUI_THREAD (*this, &Mixer_UI::add_route_group, group) bool focus = false; in_group_row_change = true; @@ -1250,7 +1312,7 @@ Mixer_UI::add_route_group (RouteGroup* group) focus = true; } - group->FlagsChanged.connect (bind (mem_fun(*this, &Mixer_UI::group_flags_changed), group)); + group->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::route_group_property_changed, this, group, _1), gui_context()); if (focus) { TreeViewColumn* col = group_display.get_column (0); @@ -1546,12 +1608,17 @@ void Mixer_UI::parameter_changed (string const & p) { if (p == "show-group-tabs") { - bool const s = session->config.get_show_group_tabs (); + bool const s = _session->config.get_show_group_tabs (); if (s) { _group_tabs->show (); } else { _group_tabs->hide (); } + } else if (p == "default-narrow_ms") { + bool const s = Config->get_default_narrow_ms (); + for (list::iterator i = strips.begin(); i != strips.end(); ++i) { + (*i)->set_width_enum (s ? Narrow : Wide, this); + } } } @@ -1564,5 +1631,10 @@ Mixer_UI::set_route_group_activation (RouteGroup* g, bool a) PluginSelector* Mixer_UI::plugin_selector() { +#ifdef DEFER_PLUGIN_SELECTOR_LOAD + if (!_plugin_selector) + _plugin_selector = new PluginSelector (PluginManager::the_manager ()); +#endif + return _plugin_selector; }