Remove Cruft -- AutomationStyle never did anything.
authorRobin Gareus <robin@gareus.org>
Mon, 19 Jun 2017 15:40:32 +0000 (17:40 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 21 Jun 2017 11:16:27 +0000 (13:16 +0200)
Trim automation is planned via SlavableAC as normal AutomationMode.
Some of this code have a revival (a special "Trim+Preview" state
before merging Automation but that has to be more general than Pan & Gain.

20 files changed:
gtk2_ardour/gain_meter.cc
gtk2_ardour/gain_meter.h
gtk2_ardour/mixer_strip.cc
gtk2_ardour/panner_ui.cc
gtk2_ardour/panner_ui.h
libs/ardour/ardour/automatable.h
libs/ardour/ardour/automation_control.h
libs/ardour/ardour/automation_list.h
libs/ardour/ardour/pannable.h
libs/ardour/ardour/panner.h
libs/ardour/ardour/types.h
libs/ardour/ardour/types_convert.h
libs/ardour/automatable.cc
libs/ardour/automation_control.cc
libs/ardour/automation_list.cc
libs/ardour/enums.cc
libs/ardour/luabindings.cc
libs/ardour/pannable.cc
libs/ardour/panner.cc
libs/ardour/utils.cc

index c7c44c59158bb1c0f5a14b6f06f0737c5f98a2fb..f03a001b1ad04913bfa6846f41b62ec25f33d82d 100644 (file)
@@ -90,7 +90,6 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
                           1.0,  // upper
                           dB_coeff_step(Config->get_max_gain()) / 10.0,  // step increment
                           dB_coeff_step(Config->get_max_gain()))  // page increment
-       , gain_automation_style_button ("")
        , gain_automation_state_button ("")
        , meter_point_button (_("pre"))
        , gain_astate_propagate (false)
@@ -147,24 +146,16 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
        peak_display.unset_flags (Gtk::CAN_FOCUS);
        peak_display.set_editable (false);
 
-       gain_automation_style_button.set_name ("mixer strip button");
        gain_automation_state_button.set_name ("mixer strip button");
 
        set_tooltip (gain_automation_state_button, _("Fader automation mode"));
-       set_tooltip (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);
 
        gain_automation_state_button.set_size_request(15, 15);
-       gain_automation_style_button.set_size_request(15, 15);
-
-       gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
-       gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
 
        gain_astate_menu.set_name ("ArdourContextMenu");
        gain_astate_menu.set_reserve_toggle_size(false);
-       gain_astyle_menu.set_name ("ArdourContextMenu");
 
        meter_point_button.set_name ("mixer strip button");
 
@@ -268,12 +259,10 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
                gain_astate_menu.items().push_back (MenuElem (_("Touch"),
                                                              sigc::bind (sigc::mem_fun (*this, &GainMeterBase::set_gain_astate), (AutoState) ARDOUR::Touch)));
 
-               connections.push_back (gain_automation_style_button.signal_button_press_event().connect (sigc::mem_fun(*this, &GainMeterBase::gain_automation_style_button_event), false));
                connections.push_back (gain_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false));
                connections.push_back (ChangeGainAutomationState.connect (sigc::mem_fun(*this, &GainMeterBase::set_gain_astate)));
 
                _control->alist()->automation_state_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_state_changed, this), gui_context());
-               _control->alist()->automation_style_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_style_changed, this), gui_context());
 
                gain_automation_state_changed ();
        }
@@ -763,22 +752,6 @@ GainMeterBase::gain_automation_state_button_event (GdkEventButton *ev)
        return TRUE;
 }
 
-gint
-GainMeterBase::gain_automation_style_button_event (GdkEventButton *ev)
-{
-       if (ev->type == GDK_BUTTON_RELEASE) {
-               return TRUE;
-       }
-
-       switch (ev->button) {
-       case 1:
-               gain_astyle_menu.popup (1, ev->time);
-               break;
-       default:
-               break;
-       }
-       return TRUE;
-}
 
 string
 GainMeterBase::astate_string (AutoState state)
@@ -815,43 +788,6 @@ GainMeterBase::_astate_string (AutoState state, bool shrt)
        return sstr;
 }
 
-string
-GainMeterBase::astyle_string (AutoStyle style)
-{
-       return _astyle_string (style, false);
-}
-
-string
-GainMeterBase::short_astyle_string (AutoStyle style)
-{
-       return _astyle_string (style, true);
-}
-
-string
-GainMeterBase::_astyle_string (AutoStyle style, bool shrt)
-{
-       if (style & Trim) {
-               return _("Trim");
-       } else {
-               /* XXX it might different in different languages */
-
-               return (shrt ? _("Abs") : _("Abs"));
-       }
-}
-
-void
-GainMeterBase::gain_automation_style_changed ()
-{
-       switch (_width) {
-       case Wide:
-               gain_automation_style_button.set_text (astyle_string(_control->alist()->automation_style()));
-               break;
-       case Narrow:
-               gain_automation_style_button.set_text  (short_astyle_string(_control->alist()->automation_style()));
-               break;
-       }
-}
-
 void
 GainMeterBase::gain_automation_state_changed ()
 {
@@ -963,17 +899,13 @@ GainMeter::GainMeter (Session* s, int fader_length)
        meter_metric_area.set_name ("AudioTrackMetrics");
        meter_metric_area.set_size_request(PX_SCALE(24, 24), -1);
 
-       gain_automation_style_button.set_name ("mixer strip button");
        gain_automation_state_button.set_name ("mixer strip button");
 
        set_tooltip (gain_automation_state_button, _("Fader automation mode"));
-       set_tooltip (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);
 
        gain_automation_state_button.set_size_request (PX_SCALE(12, 15), PX_SCALE(12, 15));
-       gain_automation_style_button.set_size_request (PX_SCALE(12, 15), PX_SCALE(12, 15));
 
        fader_vbox.set_spacing (0);
        fader_vbox.pack_start (*gain_slider, true, true);
index fb87b1b5de32503694b88b24ddeae08f7f463118..f9753187caf84af1f4f4ab7f2253030bbed2eefa 100644 (file)
@@ -108,10 +108,6 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
        static std::string short_astate_string (ARDOUR::AutoState);
        static std::string _astate_string (ARDOUR::AutoState, bool);
 
-       static std::string astyle_string (ARDOUR::AutoStyle);
-       static std::string short_astyle_string (ARDOUR::AutoStyle);
-       static std::string _astyle_string (ARDOUR::AutoStyle, bool);
-
   protected:
 
        friend class MixerStrip;
@@ -139,11 +135,9 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
 
        sigc::connection gain_watching;
 
-       ArdourButton gain_automation_style_button;
        ArdourButton gain_automation_state_button;
 
        Gtk::Menu gain_astate_menu;
-       Gtk::Menu gain_astyle_menu;
 
        ArdourButton meter_point_button;
 
@@ -153,13 +147,10 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
        bool gain_astate_propagate;
        static sigc::signal<void, ARDOUR::AutoState> ChangeGainAutomationState;
 
-       gint gain_automation_style_button_event (GdkEventButton *);
        gint gain_automation_state_button_event (GdkEventButton *);
-       gint pan_automation_style_button_event (GdkEventButton *);
        gint pan_automation_state_button_event (GdkEventButton *);
 
        void gain_automation_state_changed();
-       void gain_automation_style_changed();
 
        void setup_gain_adjustment ();
        Width _width;
index 2a9012a42fce4c9d2a808c966c30272b22a67884..21212ddb56b97d969dc1576855697fa5a8efac11 100644 (file)
@@ -777,14 +777,10 @@ MixerStrip::set_width_enum (Width w, void* owner)
                        show_sends_button->set_text (_("Aux"));
                }
 
-               gpm.gain_automation_style_button.set_text (
-                               gpm.astyle_string(gain_automation->automation_style()));
                gpm.gain_automation_state_button.set_text (
                                gpm.astate_string(gain_automation->automation_state()));
 
                if (_route->panner()) {
-                       ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (
-                                       panners.astyle_string(_route->panner()->automation_style()));
                        ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (
                                        panners.astate_string(_route->panner()->automation_state()));
                }
@@ -803,15 +799,11 @@ MixerStrip::set_width_enum (Width w, void* owner)
                        show_sends_button->set_text (_("Snd"));
                }
 
-               gpm.gain_automation_style_button.set_text (
-                               gpm.short_astyle_string(gain_automation->automation_style()));
                gpm.gain_automation_state_button.set_text (
                                gpm.short_astate_string(gain_automation->automation_state()));
                gain_meter().setup_meters (); // recalc meter width
 
                if (_route->panner()) {
-                       ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (
-                       panners.short_astyle_string(_route->panner()->automation_style()));
                        ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (
                        panners.short_astate_string(_route->panner()->automation_state()));
                }
@@ -1162,7 +1154,6 @@ MixerStrip::connect_to_pan ()
        boost::shared_ptr<Pannable> p = _route->pannable ();
 
        p->automation_state_changed.connect (panstate_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_state_changed, &panners), gui_context());
-       p->automation_style_changed.connect (panstyle_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_style_changed, &panners), gui_context());
 
        /* This call reduncant, PannerUI::set_panner() connects to _panshell->Changed itself
         * However, that only works a panner was previously set.
index 08188337674612562c65c1ea27454e4d1907b87a..bc9da1b215cd85914dc69ba9897b21d3da533775 100644 (file)
@@ -50,7 +50,6 @@ PannerUI::PannerUI (Session* s)
        , _current_nins (-1)
        , _current_uri ("")
        , _send_mode (false)
-       , pan_automation_style_button ("")
        , pan_automation_state_button ("")
        , _panner_list()
 {
@@ -66,19 +65,14 @@ PannerUI::PannerUI (Session* s)
         _ignore_width_change = false;
         _ignore_position_change = false;
 
-       pan_automation_style_button.set_name ("MixerAutomationModeButton");
        pan_automation_state_button.set_name ("MixerAutomationPlaybackButton");
 
        set_tooltip (pan_automation_state_button, _("Pan automation mode"));
-       set_tooltip (pan_automation_style_button, _("Pan automation type"));
 
        //set_size_request_to_display_given_text (pan_automation_state_button, X_("O"), 2, 2);
-       //set_size_request_to_display_given_text (pan_automation_style_button, X_("0"), 2, 2);
 
-       pan_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
        pan_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
 
-       pan_automation_style_button.signal_button_press_event().connect (sigc::mem_fun(*this, &PannerUI::pan_automation_style_button_event), false);
        pan_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &PannerUI::pan_automation_state_button_event), false);
 
        pan_vbox.set_spacing (2);
@@ -515,41 +509,6 @@ PannerUI::pan_automation_state_button_event (GdkEventButton *ev)
        return TRUE;
 }
 
-gint
-PannerUI::pan_automation_style_button_event (GdkEventButton *ev)
-{
-       if (ev->type == GDK_BUTTON_RELEASE) {
-               return TRUE;
-       }
-
-       switch (ev->button) {
-       case 1:
-               if (pan_astyle_menu == 0) {
-                       build_astyle_menu ();
-               }
-               pan_astyle_menu->popup (1, ev->time);
-               break;
-       default:
-               break;
-       }
-       return TRUE;
-}
-
-void
-PannerUI::pan_automation_style_changed ()
-{
-       ENSURE_GUI_THREAD (*this, &PannerUI::pan_automation_style_changed)
-
-       switch (_width) {
-       case Wide:
-               pan_automation_style_button.set_label (astyle_string(_panner->automation_style()));
-               break;
-       case Narrow:
-               pan_automation_style_button.set_label (short_astyle_string(_panner->automation_style()));
-               break;
-       }
-}
-
 void
 PannerUI::pan_automation_state_changed ()
 {
@@ -618,30 +577,6 @@ PannerUI::_astate_string (AutoState state, bool shrt)
        return sstr;
 }
 
-string
-PannerUI::astyle_string (AutoStyle style)
-{
-       return _astyle_string (style, false);
-}
-
-string
-PannerUI::short_astyle_string (AutoStyle style)
-{
-       return _astyle_string (style, true);
-}
-
-string
-PannerUI::_astyle_string (AutoStyle style, bool shrt)
-{
-       if (style & Trim) {
-               return _("Trim");
-       } else {
-               /* XXX it might different in different languages */
-
-               return (shrt ? _("Abs") : _("Abs"));
-       }
-}
-
 void
 PannerUI::show_width ()
 {
index 0c0b7cfc66f728b5e2418a61630b8fc26e2f2cea..e6372f3486184625a4d0780082c335b91bf03175 100644 (file)
@@ -121,7 +121,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        Gtk::Menu* pan_astate_menu;
        Gtk::Menu* pan_astyle_menu;
 
-       Gtk::Button pan_automation_style_button;
        Gtk::ToggleButton pan_automation_state_button;
 
        void pan_value_changed (uint32_t which);
@@ -147,8 +146,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        void pan_set_custom_type (std::string type);
 
        void pan_automation_state_changed();
-       void pan_automation_style_changed();
-       gint pan_automation_style_button_event (GdkEventButton *);
        gint pan_automation_state_button_event (GdkEventButton *);
        sigc::connection pan_watching;
 
@@ -156,10 +153,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        std::string short_astate_string (ARDOUR::AutoState);
        std::string _astate_string (ARDOUR::AutoState, bool);
 
-       std::string astyle_string (ARDOUR::AutoStyle);
-       std::string short_astyle_string (ARDOUR::AutoStyle);
-       std::string _astyle_string (ARDOUR::AutoStyle, bool);
-
         void start_touch (boost::weak_ptr<ARDOUR::AutomationControl>);
         void stop_touch (boost::weak_ptr<ARDOUR::AutomationControl>);
 
index f23948412f768404d6090cfb8345f3bf06031014..8adfb88aaeea999fce649ac31a8d36e9382f9d8d 100644 (file)
@@ -91,9 +91,6 @@ public:
        AutoState get_parameter_automation_state (Evoral::Parameter param);
        virtual void set_parameter_automation_state (Evoral::Parameter param, AutoState);
 
-       AutoStyle get_parameter_automation_style (Evoral::Parameter param);
-       void set_parameter_automation_style (Evoral::Parameter param, AutoStyle);
-
        void protect_automation ();
 
        const std::set<Evoral::Parameter>& what_can_be_automated() const { return _can_automate_list; }
index 98797678071f21956c9d6392d1966036265e9c44..6787abd87a8c09df91857ed22d35f816d40b4d9a 100644 (file)
@@ -82,12 +82,7 @@ public:
                return alist() ? alist()->automation_state() : Off;
        }
 
-       inline AutoStyle automation_style() const {
-               return alist() ? alist()->automation_style() : Absolute;
-       }
-
        void set_automation_state(AutoState as);
-       void set_automation_style(AutoStyle as);
        void start_touch(double when);
        void stop_touch(bool mark, double when);
 
index 3f4d3f2f525737207e9e1d7edd9deb825d8a783f..34f0a99eb1a0523640c49a772b68d12fabfea82a 100644 (file)
@@ -88,10 +88,6 @@ class LIBARDOUR_API AutomationList : public Evoral::ControlList, public PBD::Sta
        AutoState automation_state() const { return _state; }
        PBD::Signal1<void, AutoState> automation_state_changed;
 
-       void set_automation_style (AutoStyle m);
-       AutoStyle automation_style() const { return _style; }
-       PBD::Signal0<void> automation_style_changed;
-
        bool automation_playback() const {
                return (_state & Play) || ((_state & Touch) && !touching());
        }
@@ -130,7 +126,6 @@ class LIBARDOUR_API AutomationList : public Evoral::ControlList, public PBD::Sta
        void maybe_signal_changed ();
 
        AutoState    _state;
-       AutoStyle    _style;
        gint         _touching;
 
        bool operator== (const AutomationList&) const { /* not called */ abort(); return false; }
index fd8ffe6c28b28e3a4f50b17e76dc030bea975ac5..bdac2708915f04e3e3247dd4244ee19846652914 100644 (file)
@@ -57,10 +57,6 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public
        AutoState automation_state() const { return _auto_state; }
        PBD::Signal1<void, AutoState> automation_state_changed;
 
-       void set_automation_style (AutoStyle m);
-       AutoStyle automation_style() const { return _auto_style; }
-       PBD::Signal0<void> automation_style_changed;
-
        bool automation_playback() const {
                return (_auto_state & Play) || ((_auto_state & Touch) && !touching());
        }
@@ -85,7 +81,6 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public
   protected:
        boost::weak_ptr<Panner> _panner;
        AutoState _auto_state;
-       AutoStyle _auto_style;
        gint      _touching;
        bool      _has_state;
        uint32_t  _responding_to_control_auto_state_change;
index 362a49851a854b838a8580da077ce2a8f1a47b18..07732500949616614ffed2d375932cf54e2e4bbd 100644 (file)
@@ -105,8 +105,6 @@ public:
 
        void      set_automation_state (AutoState);
        AutoState automation_state() const;
-       void      set_automation_style (AutoStyle);
-       AutoStyle automation_style() const;
 
        virtual std::set<Evoral::Parameter> what_can_be_automated() const;
        virtual std::string describe_parameter (Evoral::Parameter);
index 0076a72a1f7e86cd2f1e33e8fe4eb55c996acd5e..ffda1ca42dc249b32368d04c44ac9ba47993e28d 100644 (file)
@@ -184,14 +184,6 @@ namespace ARDOUR {
        std::string auto_state_to_string (AutoState);
        AutoState string_to_auto_state (std::string);
 
-       enum AutoStyle {
-               Absolute = 0x1,
-               Trim = 0x2
-       };
-
-       std::string auto_style_to_string (AutoStyle);
-       AutoStyle string_to_auto_style (std::string);
-
        enum AlignStyle {
                CaptureTime,
                ExistingMaterial
index cee969dd007eb90e4b0d1ac07bab600d5a139183..52cf616c29b7b89dadf314b5026d854c7579bc4d 100644 (file)
@@ -88,20 +88,6 @@ inline bool string_to (const std::string& str, ARDOUR::AutoState& as)
        return true;
 }
 
-template <>
-inline bool to_string (ARDOUR::AutoStyle val, std::string& str)
-{
-       str = ARDOUR::auto_style_to_string (val);
-       return true;
-}
-
-template <>
-inline bool string_to (const std::string& str, ARDOUR::AutoStyle& as)
-{
-       as = ARDOUR::string_to_auto_style (str);
-       return true;
-}
-
 template <>
 inline bool to_string (ARDOUR::DataType val, std::string& str)
 {
index 417110e4331e90a27b7c0b211b708b02eb5ea493..3045e8573c20553c32e660be08c9663dc89d8670 100644 (file)
@@ -313,34 +313,6 @@ Automatable::get_parameter_automation_state (Evoral::Parameter param)
        return result;
 }
 
-void
-Automatable::set_parameter_automation_style (Evoral::Parameter param, AutoStyle s)
-{
-       Glib::Threads::Mutex::Lock lm (control_lock());
-
-       boost::shared_ptr<AutomationControl> c = automation_control(param, true);
-
-       if (c && (s != c->automation_style())) {
-               c->set_automation_style (s);
-               _a_session.set_dirty ();
-       }
-}
-
-AutoStyle
-Automatable::get_parameter_automation_style (Evoral::Parameter param)
-{
-       Glib::Threads::Mutex::Lock lm (control_lock());
-
-       boost::shared_ptr<Evoral::Control> c = control(param);
-       boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(c->list());
-
-       if (c) {
-               return l->automation_style();
-       } else {
-               return Absolute; // whatever
-       }
-}
-
 void
 Automatable::protect_automation ()
 {
index e22379f75c2986d51b0446674b98557dec6f73cf..5da1d14d8b22e4fac157fe88ed9811f1819abc73 100644 (file)
@@ -242,13 +242,6 @@ AutomationControl::set_automation_state (AutoState as)
        }
 }
 
-void
-AutomationControl::set_automation_style (AutoStyle as)
-{
-       if (!_list) return;
-       alist()->set_automation_style (as);
-}
-
 void
 AutomationControl::start_touch(double when)
 {
index 40c924d293a2aad23410d59f8688a038f893f773..fbeb98fa2678db49b7b84329f9110dd45f6e8ef2 100644 (file)
@@ -59,7 +59,6 @@ AutomationList::AutomationList (const Evoral::Parameter& id, const Evoral::Param
        , _before (0)
 {
        _state = Off;
-       _style = Absolute;
        g_atomic_int_set (&_touching, 0);
 
        create_curve_if_necessary();
@@ -73,7 +72,6 @@ AutomationList::AutomationList (const Evoral::Parameter& id)
        , _before (0)
 {
        _state = Off;
-       _style = Absolute;
        g_atomic_int_set (&_touching, 0);
 
        create_curve_if_necessary();
@@ -87,7 +85,6 @@ AutomationList::AutomationList (const AutomationList& other)
        , StatefulDestructible()
        , _before (0)
 {
-       _style = other._style;
        _state = other._state;
        g_atomic_int_set (&_touching, other.touching());
 
@@ -101,7 +98,6 @@ AutomationList::AutomationList (const AutomationList& other, double start, doubl
        : ControlList(other, start, end)
        , _before (0)
 {
-       _style = other._style;
        _state = other._state;
        g_atomic_int_set (&_touching, other.touching());
 
@@ -120,7 +116,6 @@ AutomationList::AutomationList (const XMLNode& node, Evoral::Parameter id)
 {
        g_atomic_int_set (&_touching, 0);
        _state = Off;
-       _style = Absolute;
 
        set_state (node, Stateful::loading_state_version);
 
@@ -173,7 +168,6 @@ AutomationList::operator= (const AutomationList& other)
 
                ControlList::operator= (other);
                _state = other._state;
-               _style = other._style;
                _touching = other._touching;
 
                mark_dirty ();
@@ -208,15 +202,6 @@ AutomationList::set_automation_state (AutoState s)
        }
 }
 
-void
-AutomationList::set_automation_style (AutoStyle s)
-{
-       if (s != _style) {
-               _style = s;
-               automation_style_changed (); /* EMIT SIGNAL */
-       }
-}
-
 void
 AutomationList::start_write_pass (double when)
 {
@@ -359,8 +344,6 @@ AutomationList::state (bool full)
                root->set_property ("state", Off);
        }
 
-       root->set_property ("style", _style);
-
        if (!_events.empty()) {
                root->add_child_nocopy (serialize_events());
        }
@@ -516,10 +499,6 @@ AutomationList::set_state (const XMLNode& node, int version)
                _default_value = 0.0;
        }
 
-       if (!node.get_property (X_("style"), _style)) {
-               _style = Absolute;
-       }
-
        if (node.get_property (X_("state"), _state)) {
                if (_state == Write) {
                        _state = Off;
@@ -564,7 +543,6 @@ AutomationList::operator!= (AutomationList const & other) const
        return (
                static_cast<ControlList const &> (*this) != static_cast<ControlList const &> (other) ||
                _state != other._state ||
-               _style != other._style ||
                _touching != other._touching
                );
 }
index 76d21021a120777ebf9dc1a317b7e03c0317e522..61a7e9a39f68cf87b9745bc88f0355cd14c12cac 100644 (file)
@@ -96,7 +96,6 @@ setup_enum_writer ()
        IOChange _IOChange;
        AutomationType _AutomationType;
        AutoState _AutoState;
-       AutoStyle _AutoStyle;
        AutoConnectOption _AutoConnectOption;
        TracksAutoNamingRule _TracksAutoNamingRule;
        Session::StateOfTheState _Session_StateOfTheState;
@@ -192,10 +191,6 @@ setup_enum_writer ()
        REGISTER_ENUM (Play);
        REGISTER_BITS (_AutoState);
 
-       REGISTER_ENUM (Absolute);
-       REGISTER_ENUM (Trim);
-       REGISTER_BITS (_AutoStyle);
-
        REGISTER_ENUM (CaptureTime);
        REGISTER_ENUM (ExistingMaterial);
        REGISTER (_AlignStyle);
index 3cc88fa4149868f14ef73cae5cabaf061c9ea021..8e3892c871ef75e4c308c2b0c46688355229088d 100644 (file)
@@ -1378,9 +1378,7 @@ LuaBindings::common (lua_State* L)
                .addCast<Evoral::Control> ("to_ctrl")
                .addCast<SlavableAutomationControl> ("to_slavable")
                .addFunction ("automation_state", &AutomationControl::automation_state)
-               .addFunction ("automation_style", &AutomationControl::automation_style)
                .addFunction ("set_automation_state", &AutomationControl::set_automation_state)
-               .addFunction ("set_automation_style", &AutomationControl::set_automation_style)
                .addFunction ("start_touch", &AutomationControl::start_touch)
                .addFunction ("stop_touch", &AutomationControl::stop_touch)
                .addFunction ("get_value", &AutomationControl::get_value)
@@ -1671,11 +1669,6 @@ LuaBindings::common (lua_State* L)
                .endNamespace ()
                .endNamespace ()
 
-               .beginNamespace ("AutoStyle")
-               .addConst ("Absolute", ARDOUR::AutoStyle(Absolute))
-               .addConst ("Trim", ARDOUR::AutoStyle(Trim))
-               .endNamespace ()
-
                .beginNamespace ("AutoState")
                .addConst ("Off", ARDOUR::AutoState(Off))
                .addConst ("Write", ARDOUR::AutoState(Write))
index a32efc74aabdb53701831662ca506d0735adb1cf..6b64a802bcc4b0c18f263be741a06ff609cc5f65 100644 (file)
@@ -45,7 +45,6 @@ Pannable::Pannable (Session& s)
        , pan_frontback_control (new PanControllable (s, "", this, PanFrontBackAutomation))
        , pan_lfe_control (new PanControllable (s, "", this, PanLFEAutomation))
        , _auto_state (Off)
-       , _auto_style (Absolute)
        , _has_state (false)
        , _responding_to_control_auto_state_change (0)
 {
@@ -136,26 +135,6 @@ Pannable::set_automation_state (AutoState state)
        }
 }
 
-void
-Pannable::set_automation_style (AutoStyle style)
-{
-       if (style != _auto_style) {
-               _auto_style = style;
-
-               const Controls& c (controls());
-
-               for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
-                       boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
-                       if (ac) {
-                               ac->alist()->set_automation_style (style);
-                       }
-               }
-
-               session().set_dirty ();
-               automation_style_changed ();
-       }
-}
-
 void
 Pannable::start_touch (double when)
 {
index 59e4e2e977952841f98d7d68601899483597f184..a388b5fdc28ce74f3d7c823f18921f17b59967bd 100644 (file)
@@ -66,12 +66,6 @@ Panner::distribute_automated (BufferSet& ibufs, BufferSet& obufs,
        }
 }
 
-void
-Panner::set_automation_style (AutoStyle style)
-{
-       _pannable->set_automation_style (style);
-}
-
 void
 Panner::set_automation_state (AutoState state)
 {
@@ -84,12 +78,6 @@ Panner::automation_state () const
        return _pannable->automation_state();
 }
 
-AutoStyle
-Panner::automation_style () const
-{
-       return _pannable->automation_style ();
-}
-
 bool
 Panner::touching () const
 {
index 8b891077484e2ea1859ce40a40c39287d13cd916..18f9d247d8faec53a8c98e13b19559a0cd0faeb6 100644 (file)
@@ -590,39 +590,6 @@ ARDOUR::auto_state_to_string (AutoState as)
        return "";
 }
 
-AutoStyle
-ARDOUR::string_to_auto_style (std::string str)
-{
-       if (str == X_("Absolute")) {
-               return Absolute;
-       } else if (str == X_("Trim")) {
-               return Trim;
-       }
-
-       fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle string: ", str) << endmsg;
-       abort(); /*NOTREACHED*/
-       return Trim;
-}
-
-string
-ARDOUR::auto_style_to_string (AutoStyle as)
-{
-       /* to be used only for XML serialization, no i18n done */
-
-       switch (as) {
-       case Absolute:
-               return X_("Absolute");
-               break;
-       case Trim:
-               return X_("Trim");
-               break;
-       }
-
-       fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle type: ", as) << endmsg;
-       abort(); /*NOTREACHED*/
-       return "";
-}
-
 std::string
 bool_as_string (bool yn)
 {