a reverb is a reverb is a reverb
[ardour.git] / gtk2_ardour / ardour_display.cc
index 8a0c2fed743459ed30c72aeea361399a0746fcba..d4c75af7bb5d534513cd6402f2a89e30686cc3d2 100644 (file)
@@ -24,6 +24,7 @@
 #include <pangomm/layout.h>
 
 #include "pbd/compose.h"
+#include "pbd/controllable.h"
 #include "pbd/error.h"
 #include "pbd/stacktrace.h"
 
@@ -35,9 +36,8 @@
 #include "ardour/rc_configuration.h" // for widget prelight preference
 
 #include "ardour_display.h"
-#include "ardour_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace Gtkmm2ext;
 using namespace Gdk;
@@ -51,8 +51,6 @@ using namespace std;
 
 ArdourDisplay::ArdourDisplay (Element e)
 {
-       add_elements(e);
-       add_elements(ArdourButton::Menu);
        add_elements(ArdourButton::Text);
 }
 
@@ -60,12 +58,6 @@ ArdourDisplay::~ArdourDisplay ()
 {
 }
 
-bool
-ArdourDisplay::on_button_press_event (GdkEventButton*)
-{
-       _menu.popup (1, gtk_get_current_event_time());  
-       return true;
-}
 
 bool
 ArdourDisplay::on_scroll_event (GdkEventScroll* ev)
@@ -84,12 +76,12 @@ ArdourDisplay::on_scroll_event (GdkEventScroll* ev)
        boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
        if (c) {
                float val = c->get_interface();
-       
+
                if ( ev->direction == GDK_SCROLL_UP )
                        val += 0.05 * scale;  //by default, we step in 1/20ths of the knob travel
                else
                        val -= 0.05 * scale;
-                       
+
                c->set_interface(val);
        }
 
@@ -101,10 +93,7 @@ void
 ArdourDisplay::add_controllable_preset (const char *txt, float val)
 {
        using namespace Menu_Helpers;
-
-       MenuList& items = _menu.items ();
-
-       items.push_back (MenuElem (txt, sigc::bind (sigc::mem_fun(*this, &ArdourDisplay::handle_controllable_preset), val)));
+       AddMenuElem(MenuElem (txt, sigc::bind (sigc::mem_fun(*this, &ArdourDisplay::handle_controllable_preset), val)));
 }