make RouteGroup gain control work again ; fix what solo button label shows under different conditions; other miscellania
git-svn-id: svn://localhost/ardour2/branches/3.0@5262 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d45dfa5cb6
commit
d13fdaa9d1
|
@ -371,12 +371,12 @@ GainMeterBase::show_gain ()
|
|||
void
|
||||
GainMeterBase::gain_adjusted ()
|
||||
{
|
||||
//cerr << this << " for " << _io->name() << " GAIN ADJUSTED\n";
|
||||
if (!ignore_toggle) {
|
||||
//cerr << "Set GC\n";
|
||||
_gain_control->set_value (slider_position_to_gain (gain_adjustment.get_value()));
|
||||
//cerr << "Set GC OUT\n";
|
||||
if (_route) {
|
||||
_route->set_gain (slider_position_to_gain (gain_adjustment.get_value()), this);
|
||||
}
|
||||
}
|
||||
|
||||
show_gain ();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ int MixerStrip::scrollbar_height = 0;
|
|||
|
||||
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, bool in_mixer)
|
||||
: AxisView(sess)
|
||||
, RouteUI (sess, _("Mute"), _("Solo"), _("Record"))
|
||||
, RouteUI (sess)
|
||||
,_mixer(mx)
|
||||
, _mixer_owned (in_mixer)
|
||||
, pre_processor_box (PreFader, sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
|
||||
|
@ -102,7 +102,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, bool in_mixer)
|
|||
|
||||
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt, bool in_mixer)
|
||||
: AxisView(sess)
|
||||
, RouteUI (sess, _("Mute"), _("Solo"), _("Record"))
|
||||
, RouteUI (sess)
|
||||
,_mixer(mx)
|
||||
, _mixer_owned (in_mixer)
|
||||
, pre_processor_box (PreFader, sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
|
||||
|
@ -117,6 +117,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
|
|||
|
||||
{
|
||||
init ();
|
||||
set_button_names ();
|
||||
set_route (rt);
|
||||
}
|
||||
|
||||
|
@ -1488,6 +1489,25 @@ MixerStrip::revert_to_default_display ()
|
|||
panner_ui().setup_pan ();
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::set_button_names ()
|
||||
{
|
||||
rec_enable_button_label.set_text (_("Rec"));
|
||||
mute_button_label.set_text (_("Mute"));
|
||||
|
||||
switch (Config->get_solo_model()) {
|
||||
case SoloInPlace:
|
||||
solo_button_label.set_text (_("Solo"));
|
||||
break;
|
||||
case SoloAFL:
|
||||
solo_button_label.set_text (_("AFL"));
|
||||
break;
|
||||
case SoloPFL:
|
||||
solo_button_label.set_text (_("PFL"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::set_route_group_to_new ()
|
||||
{
|
||||
|
@ -1504,3 +1524,4 @@ MixerStrip::set_route_group_to_new ()
|
|||
delete g;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
|
||||
ARDOUR::RouteGroup* route_group() const;
|
||||
void set_route (boost::shared_ptr<ARDOUR::Route>);
|
||||
void set_button_names ();
|
||||
|
||||
#ifdef GTKOSX
|
||||
sigc::signal<void> WidthChanged;
|
||||
|
|
|
@ -100,18 +100,20 @@ RouteTimeAxisView::setup_slider_pix ()
|
|||
}
|
||||
|
||||
RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
|
||||
: AxisView(sess),
|
||||
RouteUI(rt, sess, _("m"), _("s"), _("r")), // mute, solo, and record
|
||||
TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas),
|
||||
parent_canvas (canvas),
|
||||
button_table (3, 3),
|
||||
route_group_button (_("g")), // group
|
||||
playlist_button (_("p")),
|
||||
size_button (_("h")), // height
|
||||
automation_button (_("a")),
|
||||
visual_button (_("v")),
|
||||
gm (sess, slider, true)
|
||||
: AxisView(sess)
|
||||
, RouteUI(rt, sess)
|
||||
, TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas)
|
||||
, parent_canvas (canvas)
|
||||
, button_table (3, 3)
|
||||
, route_group_button (_("g"))
|
||||
, playlist_button (_("p"))
|
||||
, size_button (_("h"))
|
||||
, automation_button (_("a"))
|
||||
, visual_button (_("v"))
|
||||
, gm (sess, slider, true)
|
||||
{
|
||||
set_button_names ();
|
||||
|
||||
gm.set_controls (_route, _route->shared_peak_meter(), _route->gain_control(), _route->amp());
|
||||
gm.get_level_meter().set_no_show_all();
|
||||
gm.get_level_meter().setup_meters(50);
|
||||
|
@ -2407,6 +2409,14 @@ RouteTimeAxisView::remove_underlay(StreamView* v)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::set_button_names ()
|
||||
{
|
||||
rec_enable_button_label.set_text (_("r"));
|
||||
solo_button_label.set_text (_("s"));
|
||||
mute_button_label.set_text (_("m"));
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::set_route_group_to_new ()
|
||||
{
|
||||
|
@ -2422,3 +2432,4 @@ RouteTimeAxisView::set_route_group_to_new ()
|
|||
delete g;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
virtual ~RouteTimeAxisView ();
|
||||
|
||||
void show_selection (TimeSelection&);
|
||||
void set_button_names ();
|
||||
|
||||
void set_samples_per_unit (double);
|
||||
void set_height (uint32_t h);
|
||||
|
|
|
@ -62,19 +62,16 @@ using namespace Gtkmm2ext;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
RouteUI::RouteUI (ARDOUR::Session& sess, const char* mute_name, const char* solo_name, const char* rec_name)
|
||||
RouteUI::RouteUI (ARDOUR::Session& sess)
|
||||
: AxisView(sess)
|
||||
{
|
||||
init ();
|
||||
set_button_names (mute_name, solo_name, rec_name);
|
||||
}
|
||||
|
||||
RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt,
|
||||
ARDOUR::Session& sess, const char* mute_name, const char* solo_name, const char* rec_name)
|
||||
RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess)
|
||||
: AxisView(sess)
|
||||
{
|
||||
init ();
|
||||
set_button_names (mute_name, solo_name, rec_name);
|
||||
set_route (rt);
|
||||
}
|
||||
|
||||
|
@ -107,20 +104,26 @@ RouteUI::init ()
|
|||
multiple_mute_change = false;
|
||||
multiple_solo_change = false;
|
||||
|
||||
mute_button = manage (new BindableToggleButton (""));
|
||||
mute_button = manage (new BindableToggleButton ());
|
||||
mute_button->set_self_managed (true);
|
||||
mute_button->set_name ("MuteButton");
|
||||
mute_button->add (mute_button_label);
|
||||
mute_button_label.show ();
|
||||
UI::instance()->set_tip (mute_button, _("Mute this track"), "");
|
||||
|
||||
solo_button = manage (new BindableToggleButton (""));
|
||||
solo_button = manage (new BindableToggleButton ());
|
||||
solo_button->set_self_managed (true);
|
||||
solo_button->set_name ("SoloButton");
|
||||
solo_button->add (solo_button_label);
|
||||
solo_button_label.show ();
|
||||
UI::instance()->set_tip (solo_button, _("Mute other (non-soloed) tracks"), "");
|
||||
solo_button->set_no_show_all (true);
|
||||
|
||||
rec_enable_button = manage (new BindableToggleButton (""));
|
||||
rec_enable_button = manage (new BindableToggleButton ());
|
||||
rec_enable_button->set_name ("RecordEnableButton");
|
||||
rec_enable_button->set_self_managed (true);
|
||||
rec_enable_button->add (rec_enable_button_label);
|
||||
rec_enable_button_label.show ();
|
||||
UI::instance()->set_tip (rec_enable_button, _("Enable recording on this track"), "");
|
||||
|
||||
show_sends_button = manage (new BindableToggleButton (""));
|
||||
|
@ -160,14 +163,6 @@ RouteUI::reset ()
|
|||
denormal_menu_item = 0;
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::set_button_names (const char* mute, const char* solo, const char* rec)
|
||||
{
|
||||
m_name = mute;
|
||||
s_name = solo;
|
||||
r_name = rec;
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::set_route (boost::shared_ptr<Route> rp)
|
||||
{
|
||||
|
@ -188,10 +183,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
}
|
||||
|
||||
mute_button->set_controllable (_route->mute_control());
|
||||
mute_button->set_label (m_name);
|
||||
|
||||
solo_button->set_controllable (_route->solo_control());
|
||||
solo_button->set_label (s_name);
|
||||
|
||||
connections.push_back (_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed)));
|
||||
connections.push_back (_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)));
|
||||
|
@ -207,7 +199,6 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
|
||||
rec_enable_button->show();
|
||||
rec_enable_button->set_controllable (t->rec_enable_control());
|
||||
rec_enable_button->set_label (r_name);
|
||||
|
||||
update_rec_display ();
|
||||
}
|
||||
|
@ -1384,5 +1375,8 @@ RouteUI::parameter_changed (string const & p)
|
|||
|
||||
if (p == "disable-disarm-during-roll") {
|
||||
check_rec_enable_sensitivity ();
|
||||
} else if (p == "solo-model") {
|
||||
set_button_names ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,13 +46,13 @@ class BindableToggleButton;
|
|||
class RouteUI : public virtual AxisView
|
||||
{
|
||||
public:
|
||||
RouteUI(ARDOUR::Session&, const char*, const char*, const char*);
|
||||
RouteUI(boost::shared_ptr<ARDOUR::Route>, ARDOUR::Session&, const char*, const char*, const char*);
|
||||
RouteUI(ARDOUR::Session&);
|
||||
RouteUI(boost::shared_ptr<ARDOUR::Route>, ARDOUR::Session&);
|
||||
|
||||
virtual ~RouteUI();
|
||||
|
||||
virtual void set_route (boost::shared_ptr<ARDOUR::Route>);
|
||||
void set_button_names (const char*, const char*, const char*);
|
||||
virtual void set_button_names () = 0;
|
||||
|
||||
bool is_track() const;
|
||||
bool is_audio_track() const;
|
||||
|
@ -85,6 +85,10 @@ class RouteUI : public virtual AxisView
|
|||
BindableToggleButton* rec_enable_button; /* audio tracks */
|
||||
BindableToggleButton* show_sends_button; /* busses */
|
||||
|
||||
Gtk::Label solo_button_label;
|
||||
Gtk::Label mute_button_label;
|
||||
Gtk::Label rec_enable_button_label;
|
||||
|
||||
void send_blink (bool);
|
||||
sigc::connection send_blink_connection;
|
||||
|
||||
|
@ -184,10 +188,6 @@ class RouteUI : public virtual AxisView
|
|||
|
||||
protected:
|
||||
std::vector<sigc::connection> connections;
|
||||
std::string s_name;
|
||||
std::string m_name;
|
||||
std::string r_name;
|
||||
|
||||
bool self_destruct;
|
||||
|
||||
void init ();
|
||||
|
@ -196,6 +196,7 @@ class RouteUI : public virtual AxisView
|
|||
private:
|
||||
void check_rec_enable_sensitivity ();
|
||||
void parameter_changed (std::string const &);
|
||||
void relabel_solo_button ();
|
||||
};
|
||||
|
||||
#endif /* __ardour_route_ui__ */
|
||||
|
|
|
@ -240,28 +240,13 @@ Amp::set_gain (gain_t val, void *src)
|
|||
//cerr << "set desired gain to " << val << " when curgain = " << _gain_control->get_value () << endl;
|
||||
|
||||
if (src != _gain_control.get()) {
|
||||
_gain_control->set_value(val);
|
||||
_gain_control->set_value (val);
|
||||
// bit twisty, this will come back and call us again
|
||||
// (this keeps control in sync with reality)
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
// Glib::Mutex::Lock dm (declick_lock);
|
||||
_gain_control->set_float(val, false);
|
||||
}
|
||||
|
||||
if (_session.transport_stopped()) {
|
||||
// _gain = val;
|
||||
}
|
||||
|
||||
/*
|
||||
if (_session.transport_stopped() && src != 0 && src != this && _gain_control->automation_write()) {
|
||||
_gain_control->list()->add (_session.transport_frame(), val);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
_gain_control->set_float(val, false);
|
||||
_session.set_dirty();
|
||||
}
|
||||
|
||||
|
|
|
@ -238,15 +238,20 @@ Port::reconnect ()
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** @param n Short name */
|
||||
/** @param n Short or long name */
|
||||
int
|
||||
Port::set_name (std::string const & n)
|
||||
{
|
||||
assert (_name.find_first_of (':') == std::string::npos);
|
||||
if (n == _name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
string const s = _engine->make_port_name_non_relative (n);
|
||||
|
||||
int const r = jack_port_set_name (_jack_port, s.c_str());
|
||||
|
||||
int const r = jack_port_set_name (_jack_port, n.c_str());
|
||||
if (r == 0) {
|
||||
_name = n;
|
||||
_name = n; // short form, probably
|
||||
}
|
||||
|
||||
return r;
|
||||
|
|
|
@ -34,6 +34,7 @@ class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton
|
|||
public:
|
||||
BindableToggleButton (const std::string &label)
|
||||
: Gtkmm2ext::StatefulToggleButton (label) {}
|
||||
BindableToggleButton () {}
|
||||
|
||||
virtual ~BindableToggleButton() {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue