X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.cc;h=4f237c7c943b9f5ce8f8bfa6a02fb0a1be1720c7;hb=f7bff95fbce75cb0d4c717b1400677edd814f7be;hp=da330c25faca9314a4a1df157044ed30e4b2aec7;hpb=14b0ca31bcb62e5b7e9e77634ef9cd2e8cf65800;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index da330c25fa..4f237c7c94 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -33,7 +33,6 @@ #include #include -#include "ardour/audio_diskstream.h" #include "ardour/audio_track.h" #include "ardour/plugin_manager.h" #include "ardour/route_group.h" @@ -516,6 +515,8 @@ Mixer_UI::set_session (Session* sess) _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()); + Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::parameter_changed, this, _1), gui_context ()); + route_groups_changed (); if (_visible) { @@ -538,7 +539,9 @@ Mixer_UI::session_going_away () delete (*i); } - _monitor_section->tearoff().hide_visible (); + if (_monitor_section) { + _monitor_section->tearoff().hide_visible (); + } strips.clear (); @@ -1202,14 +1205,12 @@ Mixer_UI::remove_selected_route_group () } 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 (*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 */ @@ -1236,7 +1237,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 @@ -1310,7 +1313,7 @@ Mixer_UI::add_route_group (RouteGroup* group) focus = true; } - group->FlagsChanged.connect (*this, invalidator (*this), ui_bind (&Mixer_UI::group_flags_changed, this, _1, group), gui_context()); + 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); @@ -1612,6 +1615,11 @@ Mixer_UI::parameter_changed (string const & p) } 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); + } } }