remove old a-Hi/Low pass
[ardour.git] / gtk2_ardour / ardour_dropdown.cc
index 25338cc62021abcaf8b2e5ab32e2ea2f62c01c59..3b04e1063b8b1a854de648504a0222b8c3be0b8b 100644 (file)
@@ -34,9 +34,8 @@
 #include "ardour/rc_configuration.h" // for widget prelight preference
 
 #include "ardour_dropdown.h"
-#include "ardour_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 #define REFLECTION_HEIGHT 2
 
@@ -50,6 +49,7 @@ using namespace std;
 
 
 ArdourDropdown::ArdourDropdown (Element e)
+       : _scrolling_disabled(false)
 {
 //     signal_button_press_event().connect (sigc::mem_fun(*this, &ArdourDropdown::on_mouse_pressed));
 
@@ -75,6 +75,10 @@ ArdourDropdown::on_scroll_event (GdkEventScroll* ev)
 {
        using namespace Menu_Helpers;
 
+       if (_scrolling_disabled) {
+               return false;
+       }
+
        const MenuItem * current_active = _menu.get_active();
        const MenuList& items = _menu.items ();
        int c = 0;
@@ -139,8 +143,12 @@ ArdourDropdown::AddMenuElem (Menu_Helpers::Element e)
        using namespace Menu_Helpers;
 
        MenuList& items = _menu.items ();
-       
+
        items.push_back (e);
 }
 
-
+void
+ArdourDropdown::disable_scrolling()
+{
+       _scrolling_disabled = true;
+}