Some HIG and wording improvements to the right-click region context menu. Closes...
[ardour.git] / gtk2_ardour / marker.cc
index bc1ec7fc13c0935779576d1d4b0d1c5530423e50..f4848228f8286ac13e89263ffea60d2e92069fbd 100644 (file)
@@ -40,6 +40,8 @@
 using namespace std;
 using namespace ARDOUR;
 
+PBD::Signal1<void,Marker*> Marker::CatchDeletion;
+
 Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
                Type type, nframes_t frame, bool handle_events)
 
@@ -270,12 +272,12 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
 
        set_name (annotation.c_str());
 
-       editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
+       editor.ZoomChanged.connect (sigc::mem_fun (*this, &Marker::reposition));
 
        mark->set_data ("marker", this);
 
        if (handle_events) {
-               group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+               group->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
        }
 
        line = 0;
@@ -285,7 +287,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
 
 Marker::~Marker ()
 {
-       drop_references ();
+       CatchDeletion (this); /* EMIT SIGNAL */
 
        /* destroying the parent group destroys its contents, namely any polygons etc. that we added */
        delete name_pixbuf;
@@ -324,7 +326,7 @@ Marker::add_line (ArdourCanvas::Group* group, double y_origin, double initial_he
                line->property_x2() = unit_position + shift;
                line->property_y2() = y_origin + initial_height;
 
-               line->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+               line->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
        }
 
        show_line ();
@@ -413,7 +415,7 @@ TempoMarker::TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, gui
          _tempo (temp)
 {
        set_position (_tempo.frame());
-       group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
+       group->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
 }
 
 TempoMarker::~TempoMarker ()
@@ -428,7 +430,7 @@ MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, gui
          _meter (m)
 {
        set_position (_meter.frame());
-       group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
+       group->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
 }
 
 MeterMarker::~MeterMarker ()