Fix warning.
[ardour.git] / gtk2_ardour / gain_meter.cc
index 26036f6e665f844097df5417f00faedc219f242b..63c86515207f3d49cd766c5ace916f51d4703f88 100644 (file)
@@ -26,6 +26,7 @@
 #include "ardour/session.h"
 #include "ardour/session_route.h"
 #include "ardour/dB.h"
+#include "ardour/utils.h"
 
 #include <gtkmm/style.h>
 #include <gdkmm/color.h>
 
 #include "ardour_ui.h"
 #include "gain_meter.h"
-#include "utils.h"
 #include "logmeter.h"
 #include "gui_thread.h"
 #include "keyboard.h"
 #include "public_editor.h"
+#include "utils.h"
 
 #include "ardour/session.h"
 #include "ardour/route.h"
@@ -131,8 +132,8 @@ GainMeterBase::GainMeterBase (Session* s,
        gain_automation_style_button.set_name ("MixerAutomationModeButton");
        gain_automation_state_button.set_name ("MixerAutomationPlaybackButton");
 
-       ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Fader automation mode"));
-       ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Fader automation type"));
+       ARDOUR_UI::instance()->set_tip (gain_automation_state_button, _("Fader automation mode"));
+       ARDOUR_UI::instance()->set_tip (gain_automation_style_button, _("Fader automation type"));
 
        gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
        gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
@@ -226,13 +227,13 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
 
                boost::shared_ptr<AutomationControl> gc = amp->gain_control();
                
-               model_connections.add_connection (gc->alist()->automation_state_changed.connect (boost::bind (&GainMeter::gain_automation_state_changed, this)));
-               model_connections.add_connection (gc->alist()->automation_style_changed.connect (boost::bind (&GainMeter::gain_automation_style_changed, this)));
+               gc->alist()->automation_state_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_state_changed, this), gui_context());
+               gc->alist()->automation_style_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_style_changed, this), gui_context());
                
                gain_automation_state_changed ();
        }
        
-       model_connections.add_connection (amp->gain_control()->Changed.connect (boost::bind (&GainMeterBase::gain_changed, this)));
+       amp->gain_control()->Changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeterBase::gain_changed, this), gui_context());
 
        gain_changed ();
        show_gain ();
@@ -438,7 +439,7 @@ GainMeterBase::effective_gain_display ()
 void
 GainMeterBase::gain_changed ()
 {
-       Gtkmm2ext::UI::instance()->call_slot (boost::bind (&GainMeterBase::effective_gain_display, this));
+       Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&GainMeterBase::effective_gain_display, this));
 }
 
 void
@@ -538,7 +539,7 @@ GainMeterBase::meter_press(GdkEventButton* ev)
 
                                        // XXX no undo yet
 
-                                       _route->set_meter_point (next_meter_point (_route->meter_point()), this);
+                                       _route->set_meter_point (next_meter_point (_route->meter_point()));
                                }
                        }
                }
@@ -567,7 +568,7 @@ GainMeterBase::meter_release(GdkEventButton*)
 void
 GainMeterBase::set_meter_point (Route& route, MeterPoint mp)
 {
-       route.set_meter_point (mp, this);
+       route.set_meter_point (mp);
 }
 
 void
@@ -576,9 +577,9 @@ GainMeterBase::set_mix_group_meter_point (Route& route, MeterPoint mp)
        RouteGroup* mix_group;
 
        if((mix_group = route.route_group()) != 0){
-               mix_group->apply (&Route::set_meter_point, mp, this);
+               mix_group->apply (&Route::set_meter_point, mp);
        } else {
-               route.set_meter_point (mp, this);
+               route.set_meter_point (mp);
        }
 }
 
@@ -801,8 +802,8 @@ GainMeter::GainMeter (Session* s, int fader_length)
        gain_automation_style_button.set_name ("MixerAutomationModeButton");
        gain_automation_state_button.set_name ("MixerAutomationPlaybackButton");
 
-       ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Fader automation mode"));
-       ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Fader automation type"));
+       ARDOUR_UI::instance()->set_tip (gain_automation_state_button, _("Fader automation mode"));
+       ARDOUR_UI::instance()->set_tip (gain_automation_style_button, _("Fader automation type"));
 
        gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
        gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS);