ensure .ardour directory is created, update build docs
[ardour.git] / gtk2_ardour / marker_time_axis_view.cc
index c1374c4f962f5c0cfe4cf66bd360d46edf9b84e7..e08f5819519ecfbe1d87b0dc56e8875b4bd6b090 100644 (file)
@@ -57,12 +57,12 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
        canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
 
        canvas_rect =  new ArdourCanvas::SimpleRect (*canvas_group);
-       canvas_rect->set_property ("x1", 0.0);
-       canvas_rect->set_property ("y1", 0.0);
-       canvas_rect->set_property ("x2", 1000000.0);
-       canvas_rect->set_property ("y2", (double)20);
-       canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]);
-       canvas_rect->set_property ("fill_color_rgba", stream_base_color);
+       canvas_rect->property_x1() = 0.0;
+       canvas_rect->property_y1() = 0.0;
+       canvas_rect->property_x2() = 1000000.0;
+       canvas_rect->property_y2() = (double)20;
+       canvas_rect->property_outline_color_rgba() = color_map[cMarkerTrackOutline];
+       canvas_rect->property_fill_color_rgba() = stream_base_color;
                   
        canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
 
@@ -95,13 +95,13 @@ MarkerTimeAxisView::~MarkerTimeAxisView()
        
        if(canvas_rect)
        {
-               gtk_object_destroy(GTK_OBJECT(canvas_rect)) ;
+               delete canvas_rect;
                canvas_rect = 0 ;
        }
        
        if(canvas_group)
        {
-               gtk_object_destroy(GTK_OBJECT(canvas_group)) ;
+               delete canvas_group;
                canvas_group = 0 ;
        }
 }
@@ -123,7 +123,7 @@ MarkerTimeAxisView::set_height(gdouble h)
                return -1 ;
        }
        
-       gtk_object_set (GTK_OBJECT(canvas_rect), "y2", h, NULL);
+       canvas_rect->property_y2() = h;
 
        for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
        {
@@ -142,8 +142,8 @@ MarkerTimeAxisView::set_height(gdouble h)
 int
 MarkerTimeAxisView::set_position(gdouble x, gdouble y)
 {
-       canvas_group->set_property ("x", x);
-       canvas_group->set_property ("y", y);
+       canvas_group->property_x() = x;
+       canvas_group->property_y() = y;
        return 0;
 }