A possible method for correctly sizing the editor controls, and a couple buttons...
[ardour.git] / gtk2_ardour / automation_line.cc
index bf75edb461e2198d65eeff455e31f04fab86a2b6..37244956927c7a419da05ec8d56512617b100c47 100644 (file)
@@ -105,7 +105,7 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool dummy_arg_to_force_s
 
 ControlPoint::~ControlPoint ()
 {
-       gtk_object_destroy (GTK_OBJECT(item));
+       delete item;
 }
 
 bool
@@ -217,7 +217,7 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
 
 /*****/
 
-AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Group& parent, AutomationList& al)
+AutomationLine::AutomationLine (stringcr_t name, TimeAxisView& tv, ArdourCanvas::Group& parent, AutomationList& al)
        : trackview (tv),
          _name (name),
          alist (al),
@@ -237,6 +237,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Gro
 
        line = new ArdourCanvas::Line (*group);
        line->property_width_pixels() = (guint)1;
+       line->set_data ("line", this);
 
        line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler));
 
@@ -246,8 +247,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Gro
 AutomationLine::~AutomationLine ()
 {
        vector_delete (&control_points);
-
-       gtk_object_destroy (GTK_OBJECT(group));
+       delete group;
 }
 
 bool