/*
- Copyright (C) 2000-2004 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2007-2014 David Robillard <d@drobilla.net>
+ * Copyright (C) 2007-2018 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2007 Doug McLain <doug@nostar.net>
+ * Copyright (C) 2008-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2013-2015 John Emmas <john@creativepost.co.uk>
+ * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2014-2015 Ben Loftis <ben@harrisonconsoles.com>
+ * Copyright (C) 2014-2016 Tim Mayberry <mojofunk@gmail.com>
+ * Copyright (C) 2017 Johannes Mueller <github@johannes-mueller.org>
+ * Copyright (C) 2018 Len Ovens <len@ovenwerks.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#ifdef WAF_BUILD
#include "gtk2ardour-config.h"
#include <gtkmm/messagedialog.h>
+#include "pbd/unwind.h"
+
#include "gtkmm2ext/colors.h"
#include "gtkmm2ext/gtk_ui.h"
#include "gtkmm2ext/menu_elems.h"
using namespace ArdourWidgets;
ProcessorBox* ProcessorBox::_current_processor_box = 0;
+bool ProcessorBox::_ignore_disk_io_change = false;
+
RefPtr<Action> ProcessorBox::paste_action;
RefPtr<Action> ProcessorBox::cut_action;
RefPtr<Action> ProcessorBox::copy_action;
set_visible (visible);
}
} else {
- set_visible (false);
+ boost::shared_ptr<AutomationControl> c = _control.lock ();
+ set_visible (c && (c->flags () & Controllable::InlineControl));
}
}
}
void
-ProcessorEntry::PluginInlineDisplay::display_sample (cairo_t* cr, double w, double h)
+ProcessorEntry::PluginInlineDisplay::display_frame (cairo_t* cr, double w, double h)
{
Gtkmm2ext::rounded_rectangle (cr, .5, -1.5, w - 1, h + 1, 7);
}
if (boost::dynamic_pointer_cast<UnknownProcessor> ((*i)->processor())) {
continue;
}
+ if (boost::dynamic_pointer_cast<PortInsert> ((*i)->processor())) {
+ continue;
+ }
procs.push_back ((*i)->processor ());
}
}
manage_pins_action->set_sensitive (pi != 0);
if (boost::dynamic_pointer_cast<Track>(_route)) {
disk_io_action->set_sensitive (true);
+ PBD::Unwinder<bool> uw (_ignore_disk_io_change, true);
+ ActionManager::get_toggle_action (X_("ProcessorMenu"), "disk-io-prefader")->set_active (_route->disk_io_point () == DiskIOPreFader);
+ ActionManager::get_toggle_action (X_("ProcessorMenu"), "disk-io-postfader")->set_active (_route->disk_io_point () == DiskIOPostFader);
+ ActionManager::get_toggle_action (X_("ProcessorMenu"), "disk-io-custom")->set_active (_route->disk_io_point () == DiskIOCustom);
} else {
disk_io_action->set_sensitive (false);
}
boost::shared_ptr<UnknownProcessor> stub = boost::dynamic_pointer_cast<UnknownProcessor> (processor);
//faders and meters are not deletable, copy/paste-able, so they shouldn't be selectable
- if (!send && !plugin_insert && !ext && !stub)
+ if (!send && !plugin_insert && !ext && !stub) {
e->set_selectable(false);
-
- bool mark_send_visible = false;
- if (send && _parent_strip) {
- /* show controls of new sends by default */
- GUIObjectState& st = _parent_strip->gui_object_state ();
- XMLNode* strip = st.get_or_add_node (_parent_strip->state_id ());
- assert (strip);
- /* check if state exists, if not it must be a new send */
- if (!st.get_node(strip, e->state_id())) {
- mark_send_visible = true;
- }
}
/* Set up this entry's state from the GUIObjectState */
e->set_control_state (proc);
}
- if (mark_send_visible) {
- e->show_all_controls ();
- }
-
if (plugin_insert
#ifdef MIXBUS
&& !plugin_insert->plugin(0)->is_channelstrip()
/* Disk IO stuff */
disk_io_action = ActionManager::register_action (processor_box_actions, X_("disk-io-menu"), _("Disk I/O ..."));
- ActionManager::register_action (processor_box_actions, X_("disk-io-prefader"), _("Pre-Fader."), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_set_disk_io_position), DiskIOPreFader));
- ActionManager::register_action (processor_box_actions, X_("disk-io-postfader"), _("Post-Fader."), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_set_disk_io_position), DiskIOPostFader));
- ActionManager::register_action (processor_box_actions, X_("disk-io-custom"), _("Custom."), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_set_disk_io_position), DiskIOCustom));
+ ActionManager::register_toggle_action (processor_box_actions, X_("disk-io-prefader"), _("Pre-Fader"), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_set_disk_io_position), DiskIOPreFader));
+ ActionManager::register_toggle_action (processor_box_actions, X_("disk-io-postfader"), _("Post-Fader"), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_set_disk_io_position), DiskIOPostFader));
+ ActionManager::register_toggle_action (processor_box_actions, X_("disk-io-custom"), _("Custom"), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_set_disk_io_position), DiskIOCustom));
/* show editors */
edit_action = ActionManager::register_action (
if (_current_processor_box == 0) {
return;
}
+ if (_ignore_disk_io_change) {
+ return;
+ }
_current_processor_box->set_disk_io_position (diop);
}