add a hidden option to show hidden processors
authorRobin Gareus <robin@gareus.org>
Sun, 4 Oct 2015 17:39:53 +0000 (19:39 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 4 Oct 2015 17:40:46 +0000 (19:40 +0200)
simplify debugging solo, monitor-processors, etc

gtk2_ardour/opts.cc
gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h

index 9e5cbc6f3f06a62a12d2260167446beba0f6496d..4e03983f853fa9a33d6d9d49181c8c4b76d4b95f 100644 (file)
 #include "ardour/debug.h"
 #include "ardour/session.h"
 
+#ifndef NDEBUG // "-H"
+#include "processor_box.h"
+#endif
+
 #include "opts.h"
 
 #include "i18n.h"
@@ -84,7 +88,7 @@ print_help (const char *execname)
 int
 ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
 {
-       const char *optstring = "abBc:C:dD:hk:E:m:N:nOp:PST:U:vV";
+       const char *optstring = "abBc:C:dD:hHk:E:m:N:nOp:PST:U:vV";
        const char *execname = strrchr (argv[0], '/');
 
        if (getenv ("ARDOUR_SAE")) {
@@ -143,6 +147,11 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
                        print_help (execname);
                        exit (0);
                        break;
+               case 'H':
+#ifndef NDEBUG
+                       ProcessorBox::show_all_processors = true;
+#endif
+                       break;
                case 'a':
                        check_announcements = false;
                        break;
index c7df1113229ba57668d92c3936a595c9b8174cd2..509ffaaa470613d4aa0edbfaf4e0a08e40994f90 100644 (file)
 class AUPluginUI;
 #endif
 
+#ifndef NDEBUG
+bool ProcessorBox::show_all_processors = false;
+#endif
+
 using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
@@ -1794,7 +1798,12 @@ ProcessorBox::help_count_visible_prefader_processors (boost::weak_ptr<Processor>
 {
        boost::shared_ptr<Processor> processor (p.lock ());
 
-       if (processor && processor->display_to_user()) {
+       if (processor && ( processor->display_to_user()
+#ifndef NDEBUG
+                           || show_all_processors
+#endif
+                        )
+          ) {
 
                if (boost::dynamic_pointer_cast<Amp>(processor) && boost::dynamic_pointer_cast<Amp>(processor)->type() == X_("amp")) {
                        *amp_seen = true;
@@ -1811,7 +1820,12 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
 {
        boost::shared_ptr<Processor> processor (p.lock ());
 
-       if (!processor || !processor->display_to_user()) {
+       if (!processor || ( !processor->display_to_user()
+#ifndef NDEBUG
+                           && !show_all_processors
+#endif
+                         )
+          ) {
                return;
        }
 
index fcc70a60748b944c7f8a5ee8f7771ad6f2e55aa6..87ab0dee6c11e348e216851f42603b7a069e2312 100644 (file)
@@ -310,6 +310,9 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
        sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorUnselected;
 
        static void register_actions();
+#ifndef NDEBUG
+       static bool show_all_processors;
+#endif
 
   private: