Fixed some valgrind errors from using uninitialized variables in
[ardour.git] / gtk2_ardour / marker_view.cc
index 7ee74cc4d1a61ffe844b05b6b37cadad78739042..d73440ad540a7f3e8a2fd8ce18127620d315e7fa 100644 (file)
@@ -47,16 +47,16 @@ sigc::signal<void,MarkerView*> MarkerView::GoingAway;
  * @param start the start time of this item
  * @param duration the duration of this item
  */
-MarkerView::MarkerView(GnomeCanvasGroup *parent,
-       TimeAxisView* tv,
-       ImageFrameView* marked,
-       double spu,
-       Gdk::Color& basic_color,
-       std::string mark_type,
-       std::string mark_id,
-       jack_nframes_t start,
-       jack_nframes_t duration)
-  : TimeAxisViewItem(mark_id, parent,*tv,spu,basic_color,start,duration)
+MarkerView::MarkerView(ArdourCanvas::Group *parent,
+                      TimeAxisView* tv,
+                      ImageFrameView* marked,
+                      double spu,
+                      Gdk::Color& basic_color,
+                      std::string mark_type,
+                      std::string mark_id,
+                      jack_nframes_t start,
+                      jack_nframes_t duration)
+  : TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
 {
        mark_type_text = mark_type ;
        marked_item = marked ;
@@ -64,21 +64,14 @@ MarkerView::MarkerView(GnomeCanvasGroup *parent,
        // set the canvas item text to the marker type, not the id
        set_name_text(mark_type_text) ;
 
-       // hoo up our canvas events
-       gtk_signal_connect (GTK_OBJECT(frame_handle_start), "event",
-               (GtkSignalFunc) PublicEditor::canvas_markerview_start_handle_event,
-               this);
-       
-       gtk_signal_connect (GTK_OBJECT(frame_handle_end), "event",
-               (GtkSignalFunc) PublicEditor::canvas_markerview_end_handle_event,
-               this);
-               
-       gtk_signal_connect (GTK_OBJECT(group), "event",
-               (GtkSignalFunc) PublicEditor::canvas_markerview_item_view_event,        this);
+       // hook up our canvas events
+
+       frame_handle_start->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_start_handle_event), frame_handle_start, this));
+       frame_handle_end->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_end_handle_event), frame_handle_end, this));
+       group->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_item_view_event), group, this));
        
-    /* handle any specific details required by the initial start end duration values */
-    set_position(start, this) ;
-    set_duration(duration, this) ;
+       set_position(start, this) ;
+       set_duration(duration, this) ;
 }
 
 /**