Rudimentary ghost note when adding MIDI notes to a region, as per #3180.
[ardour.git] / gtk2_ardour / mixer_ui.cc
index da330c25faca9314a4a1df157044ed30e4b2aec7..4f237c7c943b9f5ce8f8bfa6a02fb0a1be1720c7 100644 (file)
@@ -33,7 +33,6 @@
 #include <gtkmm2ext/tearoff.h>
 #include <gtkmm2ext/window_title.h>
 
-#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<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
+                       (*i)->set_width_enum (s ? Narrow : Wide, this);
+               }
        }
 }