Updated Spanish translation from Pablo_F (#4912).
[ardour.git] / gtk2_ardour / imageframe_time_axis_view.cc
index 60bb6c3e03431e8d8648a941ef9c0471b190d74c..8df7a9161230ff641fb43e31a56414c37647cd74 100644 (file)
@@ -58,14 +58,16 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
        canvas_rect.property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ImageTrack.get();
        canvas_rect.property_fill_color_rgba() = stream_base_color;
 
-       canvas_rect.signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_imageframe_view_event), (ArdourCanvas::Item*) &canvas_rect, &tv));
+       canvas_rect.signal_event().connect (sigc::bind (sigc::mem_fun (_trackview.editor, &PublicEditor::canvas_imageframe_view_event), (ArdourCanvas::Item*) &canvas_rect, &tv));
 
        _samples_per_unit = _trackview.editor.get_current_zoom() ;
 
-       _trackview.editor.ZoomChanged.connect (mem_fun(*this, &ImageFrameTimeAxisView::reset_samples_per_unit)) ;
+       _trackview.editor.ZoomChanged.connect (sigc::mem_fun(*this, &ImageFrameTimeAxisView::reset_samples_per_unit)) ;
 
        selected_imageframe_group = 0 ;
        selected_imageframe_view = 0 ;
+
+       ImageFrameTimeAxisGroup::CatchDeletion.connect (*this, boost::bind (&ImageFrameTimeAxisView::remove_imageframe_group, this, _1), gui_context());
 }
 
 /**
@@ -211,12 +213,8 @@ ImageFrameTimeAxisView::add_imageframe_group(std::string group_id, void* src)
        else
        {
                iftag = new ImageFrameTimeAxisGroup(*this, group_id) ;
-
                imageframe_groups.push_front(iftag) ;
-
-               iftag->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisView::remove_imageframe_group), iftag, (void*)this)) ;
-
-                ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */
+               ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */
        }
 
        return(iftag) ;
@@ -290,7 +288,7 @@ ImageFrameTimeAxisView::remove_named_imageframe_group(std::string group_id, void
 void
 ImageFrameTimeAxisView::remove_imageframe_group(ImageFrameTimeAxisGroup* iftag, void* src)
 {
-       ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxisView::remove_imageframe_group), iftag, src));
+       ENSURE_GUI_THREAD (*this, &ImageFrameTimeAxisView::remove_imageframe_group, iftag, src)
 
        ImageFrameGroupList::iterator i;
        if((i = find (imageframe_groups.begin(), imageframe_groups.end(), iftag)) != imageframe_groups.end())
@@ -408,9 +406,8 @@ ImageFrameTimeAxisView::get_selected_imageframe_view() const
 void
 ImageFrameTimeAxisView::set_imageframe_duration_sec(double sec)
 {
-       if(selected_imageframe_group && selected_imageframe_view)
-       {
-               selected_imageframe_view->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+       if (selected_imageframe_group && selected_imageframe_view) {
+               selected_imageframe_view->set_duration ((sec * _trackview.editor.session()->frame_rate()), this);
        }
 }