French translation update
[ardour.git] / gtk2_ardour / mixer_ui.cc
index e8b88c2f938fe64b1dfad4c0d572e535f53f4d3d..ce6ed294a381fbe6652d1b97c3b59b91503b0392 100644 (file)
@@ -137,6 +137,8 @@ Mixer_UI::Mixer_UI ()
 
        _group_tabs = new MixerGroupTabs (this);
        VBox* b = manage (new VBox);
+       b->set_spacing (0);
+       b->set_border_width (0);
        b->pack_start (*_group_tabs, PACK_SHRINK);
        b->pack_start (strip_packer);
        b->show_all ();
@@ -251,17 +253,7 @@ Mixer_UI::Mixer_UI ()
 
        list_vpacker.pack_start (rhs_pane2, true, true);
 
-       string vca_text = _("Control Masters");
-       Gtk::HBox* vca_top_padding = manage (new Gtk::HBox);
-       vca_top_padding->set_size_request (-1, 2);
-       vca_vpacker.pack_start (*vca_top_padding, false, false);
-
-       vca_label.set_text (vca_text);
-       vca_label_bar.set_size_request (-1, 16); /* must match height in GroupTabs::set_size_request() */
-
-       vca_label_bar.set_name (X_("VCALabelBar"));
-       vca_label_bar.add (vca_label);
-
+       vca_label_bar.set_size_request (-1, 16 + 1); /* must match height in GroupTabs::set_size_request()  + 1 border px*/
        vca_vpacker.pack_start (vca_label_bar, false, false);
 
        vca_scroller_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
@@ -284,6 +276,7 @@ Mixer_UI::Mixer_UI ()
        list_hpane.set_check_divider_position (true);
        list_hpane.add (list_vpacker);
        list_hpane.add (global_hpacker);
+       list_hpane.set_child_minsize (list_vpacker, 1);
 
 
        XMLNode const * settings = ARDOUR_UI::instance()->mixer_settings();
@@ -348,7 +341,6 @@ Mixer_UI::Mixer_UI ()
        rhs_pane2.show();
        strip_packer.show();
        inner_pane.show();
-       vca_top_padding->show ();
        vca_scroller.show();
        vca_vpacker.show();
        vca_hpacker.show();
@@ -621,7 +613,7 @@ Mixer_UI::add_stripables (StripableList& slist)
 
                        (*s)->presentation_info().PropertyChanged.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::stripable_property_changed, this, _1, boost::weak_ptr<Stripable>(*s)), gui_context());
                        (*s)->PropertyChanged.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::stripable_property_changed, this, _1, boost::weak_ptr<Stripable>(*s)), gui_context());
-                                               }
+               }
 
        } catch (const std::exception& e) {
                error << string_compose (_("Error adding GUI elements for new tracks/busses %1"), e.what()) << endmsg;
@@ -757,6 +749,7 @@ Mixer_UI::sync_presentation_info_from_treeview ()
        if (change) {
                DEBUG_TRACE (DEBUG::OrderKeys, "... notify PI change from mixer GUI\n");
                _session->notify_presentation_info_change ();
+               _session->set_dirty();
        }
 }
 
@@ -784,10 +777,11 @@ Mixer_UI::sync_treeview_from_presentation_info ()
        }
 
        OrderingKeys sorted;
+       const size_t cmp_max = rows.size ();
 
        for (TreeModel::Children::iterator ri = rows.begin(); ri != rows.end(); ++ri, ++old_order) {
                boost::shared_ptr<Stripable> stripable = (*ri)[stripable_columns.stripable];
-               sorted.push_back (OrderKeys (old_order, stripable->presentation_info().order()));
+               sorted.push_back (OrderKeys (old_order, stripable, cmp_max));
        }
 
        SortByNewDisplayOrder cmp;
@@ -947,6 +941,10 @@ Mixer_UI::set_session (Session* sess)
 
        _group_tabs->set_session (sess);
 
+       if (_monitor_section) {
+               _monitor_section->set_session (_session);
+       }
+
        if (!_session) {
                return;
        }
@@ -1275,8 +1273,18 @@ void
 Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
 {
        TreeModel::Children rows = track_model->children();
+       std::list<boost::shared_ptr<VCA> > vcas;
+       vcas.push_back (vca);
+
+       for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
+               AxisView* av = (*i)[stripable_columns.strip];
+               VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
+               if (vms && vms->vca()->slaved_to (vca)) {
+                       vcas.push_back (vms->vca());
+               }
+       }
 
-       for (TreeModel::Children::iterator i = rows.begin(); i != rows.end(); ++i) {
+       for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
 
                AxisView* av = (*i)[stripable_columns.strip];
                MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
@@ -1295,7 +1303,15 @@ Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
                        continue;
                }
 
-               if (strip->route()->slaved_to (vca)) {
+               bool slaved = false;
+               for (std::list<boost::shared_ptr<VCA> >::const_iterator m = vcas.begin(); m != vcas.end(); ++m) {
+                       if (strip->route()->slaved_to (*m)) {
+                               slaved = true;
+                               break;
+                       }
+               }
+
+               if (slaved) {
 
                        if (strip->packed()) {
                                strip_packer.reorder_child (*strip, -1); /* put at end */
@@ -1512,6 +1528,14 @@ Mixer_UI::move_stripable_into_view (boost::shared_ptr<ARDOUR::Stripable> s)
        if (!scroller.get_hscrollbar()) {
                return;
        }
+       if (s->presentation_info().special () || s->presentation_info().flag_match (PresentationInfo::VCA)) {
+               return;
+       }
+#ifdef MIXBUS
+       if (s->mixbus ()) {
+               return;
+       }
+#endif
        bool found = false;
        int x0 = 0;
        for (list<MixerStrip *>::const_iterator i = strips.begin(); i != strips.end(); ++i) {
@@ -2479,6 +2503,9 @@ Mixer_UI::refill_favorite_plugins ()
 #ifdef LXVST_SUPPORT
        refiller (plugs, mgr.lxvst_plugin_info ());
 #endif
+#ifdef MACVST_SUPPORT
+       refiller (plugs, mgr.mac_vst_plugin_info ());
+#endif
 #ifdef AUDIOUNIT_SUPPORT
        refiller (plugs, mgr.au_plugin_info ());
 #endif