diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-19 17:40:32 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 13:16:27 +0200 |
commit | 7c94499aeca8a67ee5f0fe51fb4f957d6618fef4 (patch) | |
tree | 94fa3d66ad0414226aba274bfc77bf7f451e297e /gtk2_ardour | |
parent | 31c6f66d9b75c70a4b02dfa78d5b45b357e18fe8 (diff) |
Remove Cruft -- AutomationStyle never did anything.
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.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 68 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.h | 9 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/panner_ui.cc | 65 | ||||
-rw-r--r-- | gtk2_ardour/panner_ui.h | 7 |
5 files changed, 0 insertions, 158 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index c7c44c5915..f03a001b1a 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -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); diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index fb87b1b5de..f9753187ca 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -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; diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 2a9012a42f..21212ddb56 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -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. diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 0818833767..bc9da1b215 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -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 () { diff --git a/gtk2_ardour/panner_ui.h b/gtk2_ardour/panner_ui.h index 0c0b7cfc66..e6372f3486 100644 --- a/gtk2_ardour/panner_ui.h +++ b/gtk2_ardour/panner_ui.h @@ -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>); |