first compilable version of tabbable design.
[ardour.git] / gtk2_ardour / processor_box.cc
index 29e230920c1c876a887fb7ac31ba739ae743e167..4271f313fd127bc948a3bd5cd7e3a1869679cc42 100644 (file)
@@ -2002,7 +2002,7 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
        const XMLNode* ui_xml = _session->extra_xml (X_("UI"));
 
        if (ui_xml) {
-               wp->set_state (*ui_xml);
+               wp->set_state (*ui_xml, 0);
        }
 
         void* existing_ui = p->get_ui ();
@@ -2027,7 +2027,8 @@ ProcessorBox::help_count_visible_prefader_processors (boost::weak_ptr<Processor>
                         )
           ) {
 
-               if (boost::dynamic_pointer_cast<Amp>(processor) && boost::dynamic_pointer_cast<Amp>(processor)->type() == X_("amp")) {
+               if (boost::dynamic_pointer_cast<Amp>(processor) && 
+                   boost::dynamic_pointer_cast<Amp>(processor)->gain_control()->parameter().type() == GainAutomation) {
                        *amp_seen = true;
                } else {
                        if (!*amp_seen) {
@@ -2117,7 +2118,8 @@ ProcessorBox::setup_entry_positions ()
 
        uint32_t num = 0;
        for (list<ProcessorEntry*>::iterator i = children.begin(); i != children.end(); ++i) {
-               if (boost::dynamic_pointer_cast<Amp>((*i)->processor()) && boost::dynamic_pointer_cast<Amp>((*i)->processor())->type() == X_("amp")) {
+               if (boost::dynamic_pointer_cast<Amp>((*i)->processor()) && 
+                   boost::dynamic_pointer_cast<Amp>((*i)->processor())->gain_control()->parameter().type() == GainAutomation) {
                        pre_fader = false;
                        (*i)->set_position (ProcessorEntry::Fader, num++);
                } else {
@@ -2689,7 +2691,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
                }
        }
 
-       if (boost::dynamic_pointer_cast<Amp> (processor) && boost::dynamic_pointer_cast<Amp> (processor)->type() == X_("amp")) {
+       if (boost::dynamic_pointer_cast<Amp> (processor) && boost::dynamic_pointer_cast<Amp> (processor)->gain_control()->parameter().type() == GainAutomation) {
 
                if (_parent_strip) {
                        _parent_strip->revert_to_default_display ();
@@ -3303,7 +3305,7 @@ ProcessorWindowProxy::session_handle()
 }
 
 XMLNode&
-ProcessorWindowProxy::get_state () const
+ProcessorWindowProxy::get_state ()
 {
        XMLNode *node;
        node = &ProxyBase::get_state();
@@ -3311,8 +3313,8 @@ ProcessorWindowProxy::get_state () const
        return *node;
 }
 
-void
-ProcessorWindowProxy::set_state (const XMLNode& node)
+int
+ProcessorWindowProxy::set_state (const XMLNode& node, int /*version*/)
 {
        XMLNodeList children = node.children ();
        XMLNodeList::const_iterator i = children.begin ();
@@ -3331,7 +3333,7 @@ ProcessorWindowProxy::set_state (const XMLNode& node)
                }
        }
 
-       ProxyBase::set_state(node);
+       return ProxyBase::set_state (node, 0);
 }
 
 Gtk::Window*