try that one on for size (VST build fu)
[ardour.git] / gtk2_ardour / editor_markers.cc
index c4d8f3143fedbcca93ac6ebad1d7df1700679905..6da479bafef17cfba34a9766ed3404bba3d2167f 100644 (file)
@@ -271,8 +271,8 @@ Editor::LocationMarkers::set_name (const string& str)
 }
 
 void
-Editor::LocationMarkers::set_position (jack_nframes_t startf, 
-                                      jack_nframes_t endf) 
+Editor::LocationMarkers::set_position (nframes_t startf, 
+                                      nframes_t endf) 
 {
        start->set_position (startf);
        if (end) { end->set_position (endf); }
@@ -286,7 +286,7 @@ Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
 }
 
 void
-Editor::mouse_add_new_marker (jack_nframes_t where)
+Editor::mouse_add_new_marker (nframes_t where)
 {
        if (session) {
                Location *location = new Location (where, where, "mark", Location::IsMark);
@@ -294,7 +294,7 @@ Editor::mouse_add_new_marker (jack_nframes_t where)
                 XMLNode &before = session->locations()->get_state();
                session->locations()->add (location, true);
                 XMLNode &after = session->locations()->get_state();
-               session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+               session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
                session->commit_reversible_command ();
        }
 }
@@ -334,7 +334,7 @@ Editor::really_remove_marker (Location* loc)
        XMLNode &before = session->locations()->get_state();
        session->locations()->remove (loc);
        XMLNode &after = session->locations()->get_state();
-       session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+       session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
        session->commit_reversible_command ();
        return FALSE;
 }
@@ -717,9 +717,9 @@ Editor::marker_menu_set_from_selection ()
                                }
                        }
                        else {
-                               if (!selection->audio_regions.empty()) {
-                                       l->set_start (selection->audio_regions.start());
-                                       l->set_end (selection->audio_regions.end_frame());
+                               if (!selection->regions.empty()) {
+                                       l->set_start (selection->regions.start());
+                                       l->set_end (selection->regions.end_frame());
                                }
                        }
                }
@@ -745,7 +745,7 @@ Editor::marker_menu_loop_range ()
                        l2->set (l->start(), l->end());
                        
                        // enable looping, reposition and start rolling
-                       session->request_auto_loop(true);
+                       session->request_play_loop(true);
                        session->request_locate (l2->start(), true);
                }
        }
@@ -847,7 +847,7 @@ Editor::marker_menu_rename ()
        loc->set_name (txt);
        
         XMLNode &after = session->locations()->get_state();
-       session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+       session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
        commit_reversible_command ();
 }
 
@@ -876,14 +876,14 @@ Editor::new_transport_marker_menu_set_loop ()
                session->locations()->add (loc, true);
                session->set_auto_loop_location (loc);
                 XMLNode &after = session->locations()->get_state();
-               session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+               session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
        }
        else {
                 XMLNode &before = tll->get_state();
                tll->set_hidden (false, this);
                tll->set (temp_location->start(), temp_location->end());
                 XMLNode &after = tll->get_state();
-                session->add_command (new MementoCommand<Location>(*tll, before, after));
+                session->add_command (new MementoCommand<Location>(*tll, &before, &after));
        }
        
        commit_reversible_command ();
@@ -904,13 +904,13 @@ Editor::new_transport_marker_menu_set_punch ()
                session->locations()->add (tpl, true);
                session->set_auto_punch_location (tpl);
                 XMLNode &after = session->locations()->get_state();
-               session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+               session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
        } else {
                 XMLNode &before = tpl->get_state();
                tpl->set_hidden(false, this);
                tpl->set(temp_location->start(), temp_location->end());
                 XMLNode &after = tpl->get_state();
-                session->add_command (new MementoCommand<Location>(*tpl, before, after));
+                session->add_command (new MementoCommand<Location>(*tpl, &before, &after));
        }
        
        commit_reversible_command ();
@@ -925,7 +925,7 @@ Editor::update_loop_range_view (bool visibility)
 
        Location* tll;
 
-       if (session->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
+       if (session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
 
                double x1 = frame_to_pixel (tll->start());
                double x2 = frame_to_pixel (tll->end());
@@ -951,7 +951,7 @@ Editor::update_punch_range_view (bool visibility)
 
        Location* tpl;
 
-       if ((session->get_punch_in() || session->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
+       if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
 
                double x1 = frame_to_pixel (tpl->start());
                double x2 = frame_to_pixel (tpl->end());