diff --git a/libs/surfaces/push2/layout.cc b/libs/surfaces/push2/layout.cc index 1f5078135f..db4721b4cb 100644 --- a/libs/surfaces/push2/layout.cc +++ b/libs/surfaces/push2/layout.cc @@ -28,10 +28,9 @@ using namespace ARDOUR; using namespace ArdourSurface; using namespace ArdourCanvas; -Push2Layout::Push2Layout (Push2& p, Session& s, std::string const & name) +Push2Layout::Push2Layout (Push2& p, std::string const & name) : Container (p.canvas()) , p2 (p) - , session (s) , _name (name) { } diff --git a/libs/surfaces/push2/layout.h b/libs/surfaces/push2/layout.h index 386322c002..54b24cb3bc 100644 --- a/libs/surfaces/push2/layout.h +++ b/libs/surfaces/push2/layout.h @@ -27,10 +27,6 @@ #include "canvas/container.h" -namespace ARDOUR { - class Session; -} - namespace ArdourSurface { class Push2; @@ -38,7 +34,7 @@ class Push2; class Push2Layout : public sigc::trackable, public ArdourCanvas::Container { public: - Push2Layout (Push2& p, ARDOUR::Session& s, std::string const & name); + Push2Layout (Push2& p, std::string const & name); virtual ~Push2Layout (); int display_width () const; @@ -67,7 +63,6 @@ class Push2Layout : public sigc::trackable, public ArdourCanvas::Container protected: Push2& p2; - ARDOUR::Session& session; std::string _name; }; diff --git a/libs/surfaces/push2/mix.cc b/libs/surfaces/push2/mix.cc index 1684c045cd..79c0085ebe 100644 --- a/libs/surfaces/push2/mix.cc +++ b/libs/surfaces/push2/mix.cc @@ -75,7 +75,8 @@ using namespace Gtkmm2ext; using namespace ArdourCanvas; MixLayout::MixLayout (Push2& p, Session & s, std::string const & name) - : Push2Layout (p, s, name) + : Push2Layout (p, name) + , session (s) , bank_start (0) , vpot_mode (Volume) { diff --git a/libs/surfaces/push2/mix.h b/libs/surfaces/push2/mix.h index 7f6e63cbb0..83b3610a8f 100644 --- a/libs/surfaces/push2/mix.h +++ b/libs/surfaces/push2/mix.h @@ -63,6 +63,7 @@ class MixLayout : public Push2Layout void update_meters (); private: + ARDOUR::Session& session; ArdourCanvas::Rectangle* bg; ArdourCanvas::Line* upper_line; std::vector upper_text; diff --git a/libs/surfaces/push2/push2.cc b/libs/surfaces/push2/push2.cc index ca75f70a10..7205fe594b 100644 --- a/libs/surfaces/push2/push2.cc +++ b/libs/surfaces/push2/push2.cc @@ -114,9 +114,9 @@ Push2::Push2 (ARDOUR::Session& s) _canvas = new Push2Canvas (*this, 960, 160); mix_layout = new MixLayout (*this, *_session, "globalmix"); - scale_layout = new ScaleLayout (*this, *_session, "scale"); + scale_layout = new ScaleLayout (*this, "scale"); track_mix_layout = new TrackMixLayout (*this, *_session, "trackmix"); - splash_layout = new SplashLayout (*this, *_session, "splash"); + splash_layout = new SplashLayout (*this, "splash"); run_event_loop (); diff --git a/libs/surfaces/push2/scale.cc b/libs/surfaces/push2/scale.cc index 3c6c2556cc..66350c4ee3 100644 --- a/libs/surfaces/push2/scale.cc +++ b/libs/surfaces/push2/scale.cc @@ -43,8 +43,8 @@ using namespace ArdourCanvas; static double unselected_root_alpha = 0.5; -ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name) - : Push2Layout (p, s, name) +ScaleLayout::ScaleLayout (Push2& p, std::string const & name) + : Push2Layout (p, name) , last_vpot (-1) , vpot_delta_cnt (0) { diff --git a/libs/surfaces/push2/scale.h b/libs/surfaces/push2/scale.h index cb1e35eb9c..b36e71e3ea 100644 --- a/libs/surfaces/push2/scale.h +++ b/libs/surfaces/push2/scale.h @@ -32,7 +32,7 @@ namespace ArdourSurface { class ScaleLayout : public Push2Layout { public: - ScaleLayout (Push2& p, ARDOUR::Session&, std::string const &); + ScaleLayout (Push2& p, std::string const &); ~ScaleLayout (); void render (ArdourCanvas::Rect const &, Cairo::RefPtr) const; diff --git a/libs/surfaces/push2/splash.cc b/libs/surfaces/push2/splash.cc index 0c4954b499..f1b7f8264e 100644 --- a/libs/surfaces/push2/splash.cc +++ b/libs/surfaces/push2/splash.cc @@ -40,8 +40,8 @@ using namespace std; using namespace ArdourSurface; using namespace ArdourCanvas; -SplashLayout::SplashLayout (Push2& p, Session& s, std::string const & name) - : Push2Layout (p, s, name) +SplashLayout::SplashLayout (Push2& p, std::string const & name) + : Push2Layout (p, name) { std::string splash_file; diff --git a/libs/surfaces/push2/splash.h b/libs/surfaces/push2/splash.h index 4f3440154f..1a49ae3fd8 100644 --- a/libs/surfaces/push2/splash.h +++ b/libs/surfaces/push2/splash.h @@ -29,7 +29,7 @@ namespace ArdourSurface { class SplashLayout : public Push2Layout { public: - SplashLayout (Push2& p, ARDOUR::Session&, std::string const &); + SplashLayout (Push2& p, std::string const &); ~SplashLayout (); void render (ArdourCanvas::Rect const &, Cairo::RefPtr) const; diff --git a/libs/surfaces/push2/track_mix.cc b/libs/surfaces/push2/track_mix.cc index d96c728c91..f4c16f1b06 100644 --- a/libs/surfaces/push2/track_mix.cc +++ b/libs/surfaces/push2/track_mix.cc @@ -80,7 +80,8 @@ using namespace ArdourSurface; using namespace ArdourCanvas; TrackMixLayout::TrackMixLayout (Push2& p, Session & s, std::string const & name) - : Push2Layout (p, s, name) + : Push2Layout (p, name) + , session (s) { Pango::FontDescription fd ("Sans 10"); diff --git a/libs/surfaces/push2/track_mix.h b/libs/surfaces/push2/track_mix.h index 133ea7e5dd..08b98c6525 100644 --- a/libs/surfaces/push2/track_mix.h +++ b/libs/surfaces/push2/track_mix.h @@ -67,6 +67,7 @@ class TrackMixLayout : public Push2Layout boost::shared_ptr current_stripable() const { return stripable; } private: + ARDOUR::Session& session; boost::shared_ptr stripable; PBD::ScopedConnectionList stripable_connections;