Use sys::path and SessionDirectory in Session::find_all_sources for portability
[ardour.git] / gtk2_ardour / marker_time_axis_view.cc
index 53e0aa87584be3fab70e52c3976708bde1b3de38..34acf51fbf75fc382b3ed36e3d39cdbe67e12f80 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <algorithm>
@@ -57,7 +56,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
        canvas_rect =  new ArdourCanvas::SimpleRect (*canvas_group);
        canvas_rect->property_x1() = 0.0;
        canvas_rect->property_y1() = 0.0;
-       canvas_rect->property_x2() = 1000000.0;
+       canvas_rect->property_x2() = max_frames;
        canvas_rect->property_y2() = (double)20;
        canvas_rect->property_outline_color_rgba() = color_map[cMarkerTrackOutline];
        canvas_rect->property_fill_color_rgba() = stream_base_color;
@@ -116,16 +115,14 @@ MarkerTimeAxisView::~MarkerTimeAxisView()
 int
 MarkerTimeAxisView::set_height(gdouble h)
 {
-       if (h < 10.0 || h > 1000.0)
-       {
-               return -1 ;
+       if (h < 10.0 || h > 1000.0) {
+               return -1;
        }
        
        canvas_rect->property_y2() = h;
 
-       for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
-       {
-               (*i)->set_height(h) ;
+       for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i) {
+               (*i)->set_y_position_and_height(0, h);
        }
 
        return 0;
@@ -199,7 +196,7 @@ MarkerTimeAxisView::apply_color(Gdk::Color& color)
  * @param src the identity of the object that initiated the change
  */     
 MarkerView*
-MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, jack_nframes_t start, jack_nframes_t dur, void* src)
+MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
 {
        if(ifv->has_marker_view_item(mark_id))
        {
@@ -345,7 +342,7 @@ MarkerTimeAxisView::set_marker_duration_sec(double sec)
 {
   if(get_selected_time_axis_item() != 0)
   {
-         get_selected_time_axis_item()->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+         get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
   }
 }