bundled LV2 plugin build and deployment
[ardour.git] / gtk2_ardour / region_view.cc
index 1c9b8fe67bf2e16a9ccc4d2fad54534b26a39cee..3f20353ee550e3d5c82e3656ce47811795f321e4 100644 (file)
@@ -26,8 +26,6 @@
 #include <gtkmm2ext/gtk_ui.h>
 
 #include "ardour/playlist.h"
-#include "ardour/audioregion.h"
-#include "ardour/audiosource.h"
 #include "ardour/session.h"
 
 #include "ardour_ui.h"
@@ -388,6 +386,10 @@ RegionView::region_changed (const PropertyChange& what_changed)
        if (what_changed.contains (ARDOUR::Properties::locked)) {
                region_locked ();
        }
+       if (what_changed.contains (ARDOUR::Properties::locked)) {
+               /* name will show locked status */
+               region_renamed ();
+       }
 }
 
 void
@@ -580,6 +582,10 @@ RegionView::make_name () const
                str += '{';
                str += _region->name();
                str += '}';
+       } else if (_region->video_locked()) {
+               str += '[';
+               str += _region->name();
+               str += ']';
        } else {
                str = _region->name();
        }
@@ -781,7 +787,7 @@ RegionView::update_coverage_frames (LayerDisplay d)
        bool me = false;
 
        /* the color that will be used to show parts of regions that will not be heard */
-       uint32_t non_playing_color = RGBA_TO_UINT (32, 32, 32, 192);
+       uint32_t const non_playing_color = ARDOUR_UI::config()->canvasvar_CoveredRegion.get ();
 
        while (t < end) {
 
@@ -836,11 +842,11 @@ RegionView::update_coverage_frames (LayerDisplay d)
        }
 }
 
-void
+bool
 RegionView::trim_front (framepos_t new_bound, bool no_overlap)
 {
        if (_region->locked()) {
-               return;
+               return false;
        }
 
        RouteTimeAxisView& rtv = dynamic_cast<RouteTimeAxisView&> (trackview);
@@ -868,13 +874,15 @@ RegionView::trim_front (framepos_t new_bound, bool no_overlap)
        }
 
        region_changed (ARDOUR::bounds_change);
+
+       return (pre_trim_first_frame != _region->first_frame());  //return true if we actually changed something
 }
 
-void
+bool
 RegionView::trim_end (framepos_t new_bound, bool no_overlap)
 {
        if (_region->locked()) {
-               return;
+               return false;
        }
 
        RouteTimeAxisView& rtv = dynamic_cast<RouteTimeAxisView&> (trackview);
@@ -905,6 +913,8 @@ RegionView::trim_end (framepos_t new_bound, bool no_overlap)
        } else {
                region_changed (PropertyChange (ARDOUR::Properties::length));
        }
+
+       return (pre_trim_last_frame != _region->last_frame());  //return true if we actually changed something
 }