Add option to disable blinking alert buttons.
[ardour.git] / gtk2_ardour / editor_summary.cc
index fb2a15773a7da60ae18fd3af770d18beb3ca8233..4a238259efce0a711da272f5c489e2f526df71af 100644 (file)
@@ -59,6 +59,7 @@ EditorSummary::EditorSummary (Editor* e)
          _image (0),
          _background_dirty (true)
 {
+       CairoWidget::use_nsglview ();
        add_events (Gdk::POINTER_MOTION_MASK|Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
        set_flags (get_flags() | Gtk::CAN_FOCUS);
 
@@ -210,8 +211,9 @@ EditorSummary::render_background_image ()
  *  @param cr Context.
  */
 void
-EditorSummary::render (cairo_t* cr, cairo_rectangle_t*)
+EditorSummary::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t*)
 {
+       cairo_t* cr = ctx->cobj();
 
        if (_session == 0) {
                return;
@@ -293,8 +295,10 @@ EditorSummary::render_region (RegionView* r, cairo_t* cr, double y) const
 void
 EditorSummary::set_background_dirty ()
 {
-       _background_dirty = true;
-       set_dirty ();
+       if (!_background_dirty) {
+               _background_dirty = true;
+               set_dirty ();
+       }
 }
 
 /** Set the summary so that just the overlays (viewbox, playhead etc.) will be re-rendered */
@@ -1050,8 +1054,8 @@ void
 EditorSummary::routes_added (list<RouteTimeAxisView*> const & r)
 {
        for (list<RouteTimeAxisView*>::const_iterator i = r.begin(); i != r.end(); ++i) {
-               /* Connect to gui_changed() on the route so that we know when their colour has changed */
-               (*i)->route()->gui_changed.connect (*this, invalidator (*this), boost::bind (&EditorSummary::route_gui_changed, this, _1), gui_context ());
+               /* Connect to the relevant signal for the route so that we know when its colour has changed */
+               (*i)->route()->presentation_info().PropertyChanged.connect (*this, invalidator (*this), boost::bind (&EditorSummary::route_gui_changed, this, _1), gui_context ());
                boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> ((*i)->route ());
                if (tr) {
                        tr->PlaylistChanged.connect (*this, invalidator (*this), boost::bind (&EditorSummary::set_background_dirty, this), gui_context ());
@@ -1062,9 +1066,9 @@ EditorSummary::routes_added (list<RouteTimeAxisView*> const & r)
 }
 
 void
-EditorSummary::route_gui_changed (string c)
+EditorSummary::route_gui_changed (PBD::PropertyChange const& what_changed)
 {
-       if (c == "color") {
+       if (what_changed.contains (Properties::color)) {
                set_background_dirty ();
        }
 }