replace rather than append to SUIL_MODULE_DIR
[ardour.git] / gtk2_ardour / ardour_ui_mixer.cc
index aacffa9d203fc7dc6356fe74a3aa63f5fb400ed9..a2669f968d92bf86c4fc94f3a13443ad4efceaa9 100644 (file)
    is to cut down on the nasty compile times for these classes.
 */
 
+#include "actions.h"
 #include "ardour_ui.h"
 #include "mixer_ui.h"
+#include "meterbridge.h"
+
 #include "i18n.h"
 
 using namespace ARDOUR;
@@ -48,3 +51,22 @@ ARDOUR_UI::create_mixer ()
        return 0;
 }
 
+
+int
+ARDOUR_UI::create_meterbridge ()
+
+{
+       try {
+               meterbridge = Meterbridge::instance ();
+       }
+
+       catch (failed_constructor& err) {
+               return -1;
+       }
+
+       meterbridge->signal_window_state_event().connect (sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::main_window_state_event_handler), false));
+       meterbridge->signal_unmap().connect (sigc::bind (sigc::ptr_fun (&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/toggle-meterbridge")));
+
+       return 0;
+}
+