Heuraka! Nightmarish rework of DnD code.
[ardour.git] / gtk2_ardour / mixer_actor.cc
index 437da39babeab9cf6db98b30a6cdac1498c61140..073f4f8c11bd8b75caca488a4f6d5381c7b52368 100644 (file)
@@ -23,9 +23,7 @@
 
 #include <boost/foreach.hpp>
 
-#include "pbd/filesystem.h"
 #include "pbd/file_utils.h"
-#include "pbd/search_path.h"
 #include "pbd/error.h"
 
 #include "ardour/filesystem_paths.h"
@@ -69,10 +67,13 @@ MixerActor::register_actions ()
        myactions.register_action ("Mixer", "select-all-processors", _("Select All (visible) Processors"), sigc::mem_fun (*this, &MixerActor::select_all_processors));
        myactions.register_action ("Mixer", "toggle-processors", _("Toggle Selected Processors"), sigc::mem_fun (*this, &MixerActor::toggle_processors));
        myactions.register_action ("Mixer", "ab-plugins", _("Toggle Selected Plugins"), sigc::mem_fun (*this, &MixerActor::ab_plugins));
-
+       myactions.register_action ("Mixer", "select-none", _("Deselect all strips and processors"), sigc::mem_fun (*this, &MixerActor::select_none));
 
        myactions.register_action ("Mixer", "scroll-left", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_left));
        myactions.register_action ("Mixer", "scroll-right", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_right));
+
+       myactions.register_action ("Mixer", "toggle-midi-input-active", _("Toggle MIDI Input Active for Mixer-Selected Tracks/Busses"), 
+                                  sigc::bind (sigc::mem_fun (*this, &MixerActor::toggle_midi_input_active), false));
 }
 
 void
@@ -82,11 +83,11 @@ MixerActor::load_bindings ()
        
         bindings.set_action_map (myactions);
 
-       sys::path binding_file;
+       std::string binding_file;
 
-       if (find_file_in_search_path (ardour_config_search_path(), "mixer.bindings", binding_file)) {
-                bindings.load (binding_file.to_string());
-               info << string_compose (_("Loaded mixer bindings from %1"), binding_file.to_string()) << endmsg;
+       if (find_file (ardour_config_search_path(), "mixer.bindings", binding_file)) {
+                bindings.load (binding_file);
+               info << string_compose (_("Loaded mixer bindings from %1"), binding_file) << endmsg;
         } else {
                error << string_compose (_("Could not find mixer.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg;
        }
@@ -171,6 +172,7 @@ MixerActor::unity_gain_action ()
 {
        set_route_targets_for_operation ();
 
+printf("setting gain to unity (?)");
        BOOST_FOREACH(RouteUI* r, _route_targets) {
                boost::shared_ptr<Route> rp = r->route();
                if (rp) {
@@ -228,18 +230,6 @@ MixerActor::select_all_processors ()
        }
 }
 void
-MixerActor::delete_processors ()
-{
-       set_route_targets_for_operation ();
-
-       BOOST_FOREACH(RouteUI* r, _route_targets) {
-               MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
-               if (ms) {
-                       ms->delete_processors ();
-               }
-       }
-}
-void
 MixerActor::toggle_processors ()
 {
        set_route_targets_for_operation ();
@@ -263,3 +253,4 @@ MixerActor::ab_plugins ()
                }
        }
 }
+