combobox width fixes from mtaht, backported from 2.X
[ardour.git] / libs / gtkmm2ext / bindable_button.cc
index fcc6093361e954ab47f6e41a75049ea493dfe96c..3c3cad6e46ddd04def011484da23686568cfbe25 100644 (file)
@@ -32,8 +32,7 @@ using namespace Gtkmm2ext;
 using namespace std;
 
 BindableToggleButton::BindableToggleButton (MIDI::Controllable *mc)
-       : ToggleButton (),
-         prompter (Gtk::WIN_POS_MOUSE, 30000, false),
+       : prompter (Gtk::WIN_POS_MOUSE, 30000, false),
          midi_control (mc),
          bind_button (2),
          bind_statemask (Gdk::CONTROL_MASK)
@@ -43,7 +42,7 @@ BindableToggleButton::BindableToggleButton (MIDI::Controllable *mc)
 }
 
 BindableToggleButton::BindableToggleButton(MIDI::Controllable *mc, const string &label)
-       : ToggleButton (label),
+       : StatefulButton (label),
          prompter (Gtk::WIN_POS_MOUSE, 30000, false),
          midi_control (mc),
          bind_button (2),
@@ -90,17 +89,6 @@ BindableToggleButton::midi_learn()
        }
 }
 
-bool
-BindableToggleButton::on_button_press_event (GdkEventButton *ev)
-{
-       if ((ev->state & bind_statemask) && ev->button == bind_button) { 
-               midi_learn ();
-               return true;
-       }
-       
-       return false;
-}
-
 bool
 BindableToggleButton::prompter_hiding (GdkEventAny *ev)
 {