13
0

Plugin GUI activate/enable update (prefer enable)

This commit is contained in:
Robin Gareus 2016-07-05 21:25:31 +02:00
parent 6cff31c878
commit 412fcafda0
3 changed files with 15 additions and 28 deletions

View File

@ -152,7 +152,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
pi->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&GenericPluginUI::processor_active_changed, this, boost::weak_ptr<Processor>(pi)), gui_context());
bypass_button.set_active (!pi->active());
bypass_button.set_active (!pi->enabled());
prefheight = 0;
build ();

View File

@ -456,7 +456,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
bypass_button.set_name ("plugin bypass button");
bypass_button.set_text (_("Bypass"));
bypass_button.set_active (!pi->active());
bypass_button.set_active (!pi->enabled ());
bypass_button.signal_button_release_event().connect (sigc::mem_fun(*this, &PlugUIBase::bypass_button_release), false);
focus_button.add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
@ -550,7 +550,7 @@ PlugUIBase::processor_active_changed (boost::weak_ptr<Processor> weak_p)
boost::shared_ptr<Processor> p (weak_p.lock());
if (p) {
bypass_button.set_active (!p->active());
bypass_button.set_active (!p->enabled ());
}
}
@ -663,12 +663,8 @@ PlugUIBase::bypass_button_release (GdkEventButton*)
{
bool view_says_bypassed = (bypass_button.active_state() != 0);
if (view_says_bypassed != insert->active()) {
if (view_says_bypassed) {
insert->activate ();
} else {
insert->deactivate ();
}
if (view_says_bypassed != insert->enabled ()) {
insert->enable (view_says_bypassed);
}
return false;

View File

@ -198,7 +198,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
_vbox.pack_end (output_routing_icon);
_vbox.pack_end (output_icon);
_button.set_active (_processor->active());
_button.set_active (_processor->enabled ());
input_icon.set_no_show_all(true);
routing_icon.set_no_show_all(true);
@ -440,11 +440,11 @@ ProcessorEntry::led_clicked(GdkEventButton *ev)
_parent->all_visible_processors_active(false);
if (_position == Fader) {
_processor->deactivate ();
_processor->enable (false);
}
}
else {
_processor->deactivate ();
_processor->enable (false);
}
} else {
@ -452,11 +452,11 @@ ProcessorEntry::led_clicked(GdkEventButton *ev)
_parent->all_visible_processors_active(true);
if (_position == Fader) {
_processor->activate ();
_processor->enable (true);
}
}
else {
_processor->activate ();
_processor->enable (true);
}
}
}
@ -466,7 +466,7 @@ void
ProcessorEntry::processor_active_changed ()
{
if (_processor) {
_button.set_active (_processor->active());
_button.set_active (_processor->enabled ());
}
}
@ -1875,7 +1875,7 @@ ProcessorBox::_drop_plugin_preset (Gtk::SelectionData const &data, Route::Proces
boost::shared_ptr<Processor> processor (new PluginInsert (*_session, p));
if (Config->get_new_plugins_active ()) {
processor->activate ();
processor->enable (true);
}
pl.push_back (processor);
}
@ -1898,7 +1898,7 @@ ProcessorBox::_drop_plugin (Gtk::SelectionData const &data, Route::ProcessorList
}
boost::shared_ptr<Processor> processor (new PluginInsert (*_session, p));
if (Config->get_new_plugins_active ()) {
processor->activate ();
processor->enable (true);
}
pl.push_back (processor);
}
@ -2247,11 +2247,7 @@ ProcessorBox::processor_operation (ProcessorOperation op)
case ProcessorsToggleActive:
for (ProcSelection::iterator i = targets.begin(); i != targets.end(); ++i) {
if ((*i)->active()) {
(*i)->deactivate ();
} else {
(*i)->activate ();
}
(*i)->enable (!(*i)->enabled ());
}
break;
@ -2343,12 +2339,7 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev, ProcessorEntry
) {
/* button2-click with no/appropriate modifiers */
if (processor->active()) {
processor->deactivate ();
} else {
processor->activate ();
}
processor->enable (!processor->enabled ());
}
return false;