Remove old destructive API (non layered is a dynamic mode) 1/2
authorRobin Gareus <robin@gareus.org>
Fri, 18 Aug 2017 18:59:52 +0000 (20:59 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 18 Aug 2017 18:59:52 +0000 (20:59 +0200)
gtk2_ardour/add_route_dialog.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_time_axis.h
gtk2_ardour/route_ui.cc

index 433cd6e43695d5cc16f274730dff61188eb17fcd..263d684c9e3a6908820f08ae3a696fa2eff7e463 100644 (file)
@@ -337,11 +337,6 @@ AddRouteDialog::trk_template_row_selected ()
                                        case ARDOUR::Normal:
                                                mode_combo.set_active_text (_("Normal"));
                                                break;
-#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
-                                       case ARDOUR::NonLayered:
-                                               mode_combo.set_active_text (_("Nn Layered"));
-                                               break;
-#endif
                                        case ARDOUR::Destructive:
                                                if (!ARDOUR::Profile->get_mixbus ()) {
                                                        mode_combo.set_active_text (_("Tape"));
@@ -612,9 +607,6 @@ AddRouteDialog::refill_track_modes ()
        vector<string> s;
 
        s.push_back (_("Normal"));
-#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
-       s.push_back (_("Non Layered"));
-#endif
        if (!ARDOUR::Profile->get_mixbus ()) {
                s.push_back (_("Tape"));
        }
index 8b5b17739fb7eed57c4634fffed397c5a7f2f555..0f7ef1b8f79ff72d904032fb781d6030a73814ea 100644 (file)
@@ -788,57 +788,6 @@ RouteTimeAxisView::build_display_menu ()
                        /* show nothing */
                }
 
-#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
-               Menu* mode_menu = manage (new Menu);
-               MenuList& mode_items = mode_menu->items ();
-               mode_menu->set_name ("ArdourContextMenu");
-
-               RadioMenuItem::Group mode_group;
-
-               int normal = 0;
-               int tape = 0;
-               int non_layered = 0;
-
-               for (TrackSelection::const_iterator t = s.begin(); t != s.end(); ++t) {
-                       RouteTimeAxisView* r = dynamic_cast<RouteTimeAxisView*> (*t);
-                       if (!r || !r->is_track ()) {
-                               continue;
-                       }
-
-                       switch (r->track()->mode()) {
-                       case Normal:
-                               ++normal;
-                               break;
-                       case Destructive:
-                               ++tape;
-                               break;
-                       case NonLayered:
-                               ++non_layered;
-                               break;
-                       }
-               }
-
-               mode_items.push_back (RadioMenuElem (mode_group, _("Normal Mode")));
-               i = dynamic_cast<RadioMenuItem*> (&mode_items.back ());
-               i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Normal, true));
-               i->set_active (normal != 0 && tape == 0 && non_layered == 0);
-               i->set_inconsistent (normal != 0 && (tape != 0 || non_layered != 0));
-
-               mode_items.push_back (RadioMenuElem (mode_group, _("Tape Mode")));
-               i = dynamic_cast<RadioMenuItem*> (&mode_items.back ());
-               i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Destructive, true));
-               i->set_active (normal == 0 && tape != 0 && non_layered == 0);
-               i->set_inconsistent (tape != 0 && (normal != 0 || non_layered != 0));
-
-               mode_items.push_back (RadioMenuElem (mode_group, _("Non-Layered Mode")));
-               i = dynamic_cast<RadioMenuItem*> (&mode_items.back ());
-               i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::NonLayered, true));
-               i->set_active (normal == 0 && tape == 0 && non_layered != 0);
-               i->set_inconsistent (non_layered != 0 && (normal != 0 || tape != 0));
-
-               items.push_back (MenuElem (_("Record Mode"), *mode_menu));
-#endif
-
                items.push_back (SeparatorElem());
 
                build_playlist_menu ();
@@ -908,32 +857,6 @@ RouteTimeAxisView::build_display_menu ()
        items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks)));
 }
 
-#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
-void
-RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
-{
-       if (apply_to_selection) {
-               _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_track_mode, _1, mode, false));
-       } else {
-
-               bool needs_bounce = false;
-
-               if (!track()->can_use_mode (mode, needs_bounce)) {
-
-                       if (!needs_bounce) {
-                               /* cannot be done */
-                               return;
-                       } else {
-                               cerr << "would bounce this one\n";
-                               return;
-                       }
-               }
-
-               track()->set_mode (mode);
-       }
-}
-#endif
-
 void
 RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end, int layers, int layer)
 {
index 237f0b023fbe842034ef448e984affc9be199843..84c5469d9390684cc6f8bcb8bfdf45b36a18a620 100644 (file)
@@ -264,10 +264,6 @@ protected:
 
        ArdourCanvas::Rectangle* timestretch_rect;
 
-#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
-       void set_track_mode (ARDOUR::TrackMode, bool apply_to_selection = false);
-#endif
-
        /** Information about all automatable processor parameters that apply to
         *  this route.  The Amp processor is not included in this list.
         */
index d2707f5476f35e13d21a8a35d48e05a68163b395..eb1d4b58cf7204cf6ffffdfad620f9015cd67468 100644 (file)
@@ -328,9 +328,6 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
 
        if (is_track()) {
                track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteUI::map_frozen, this), gui_context());
-#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
-               track()->TrackModeChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::track_mode_changed, this), gui_context());
-#endif
                track_mode_changed();
        }