remove ill-conceived use-session-timecode-format option
[ardour.git] / gtk2_ardour / mixer_ui.cc
index b56ed4d601a1b8affb8a7d595886cd0e343ad3d0..2f5c1b160b2294d6127a26006755335357af809d 100644 (file)
@@ -483,6 +483,12 @@ Mixer_UI::masters_scroller_button_release (GdkEventButton* ev)
        return false;
 }
 
+void
+Mixer_UI::new_masters_created ()
+{
+       ActionManager::get_toggle_action ("Mixer", "ToggleVCAPane")->set_active (true);
+}
+
 void
 Mixer_UI::add_masters (VCAList& vlist)
 {
@@ -1059,6 +1065,7 @@ Mixer_UI::set_session (Session* sess)
        _session->StateSaved.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::update_title, this), gui_context());
 
        _session->vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::add_masters, this, _1), gui_context());
+       _session->vca_manager().VCACreated.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::new_masters_created, this), gui_context());
 
        Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::parameter_changed, this, _1), gui_context ());
 
@@ -2192,7 +2199,9 @@ Mixer_UI::set_state (const XMLNode& node, int version)
 
        node.get_property ("show-mixer", _visible);
 
-       if (node.get_property ("maximised", yn)) {
+       yn = false;
+       node.get_property ("maximised", yn);
+       {
                Glib::RefPtr<ToggleAction> act = ActionManager::get_toggle_action (X_("Common"), X_("ToggleMaximalMixer"));
                bool fs = act && act->get_active();
                if (yn ^ fs) {
@@ -2200,22 +2209,27 @@ Mixer_UI::set_state (const XMLNode& node, int version)
                }
        }
 
-       if (node.get_property ("show-mixer-list", yn)) {
+       yn = true;
+       node.get_property ("show-mixer-list", yn);
+       {
                Glib::RefPtr<ToggleAction> act = ActionManager::get_toggle_action (X_("Mixer"), X_("ToggleMixerList"));
-
                /* do it twice to force the change */
                act->set_active (!yn);
                act->set_active (yn);
        }
 
-       if (node.get_property ("monitor-section-visible", yn)) {
+       yn = true;
+       node.get_property ("monitor-section-visible", yn);
+       {
                Glib::RefPtr<ToggleAction> act = ActionManager::get_toggle_action (X_("Mixer"), X_("ToggleMonitorSection"));
                /* do it twice to force the change */
                act->set_active (!yn);
                act->set_active (yn);
        }
 
-       if (node.get_property ("show-vca-pane", yn)) {
+       yn = true;
+       node.get_property ("show-vca-pane", yn);
+       {
                Glib::RefPtr<ToggleAction> act = ActionManager::get_toggle_action (X_("Mixer"), X_("ToggleVCAPane"));
                /* do it twice to force the change */
                act->set_active (!yn);
@@ -2223,13 +2237,14 @@ Mixer_UI::set_state (const XMLNode& node, int version)
        }
 
 #ifdef MIXBUS
-       if (node.get_property ("show-mixbus-pane", yn)) {
+       yn = true;
+       node.get_property ("show-mixbus-pane", yn);
+       {
                Glib::RefPtr<ToggleAction> act = ActionManager::get_toggle_action (X_("Mixer"), X_("ToggleMixbusPane"));
                /* do it twice to force the change */
                act->set_active (!yn);
                act->set_active (yn);
        }
-
 #endif
 
        //check for the user's plugin_order file
@@ -2839,6 +2854,9 @@ Mixer_UI::sync_treeview_from_favorite_order ()
 
                vector<ARDOUR::Plugin::PresetRecord> presets = (*i)->get_presets (true);
                for (vector<ARDOUR::Plugin::PresetRecord>::const_iterator j = presets.begin(); j != presets.end(); ++j) {
+                       if (!(*j).user) {
+                               continue;
+                       }
                        Gtk::TreeModel::Row child_row = *(favorite_plugins_model->append (newrow.children()));
                        child_row[favorite_plugins_columns.name] = (*j).label;
                        child_row[favorite_plugins_columns.plugin] = PluginPresetPtr (new PluginPreset(pip, &(*j)));
@@ -3151,7 +3169,7 @@ Mixer_UI::register_actions ()
        ActionManager::register_toggle_action (group, X_("ToggleVCAPane"), _("Mixer: Show VCAs"), sigc::mem_fun (*this, &Mixer_UI::toggle_vcas));
 
 #ifdef MIXBUS
-       ActionManager::register_toggle_action (group, X_("ToggleMixbusPane"), _("Mixer: Show Mixbuses"), sigc::mem_fun (*this, &Mixer_UI::toggle_mixbuses));
+       ActionManager::register_toggle_action (group, X_("ToggleMixbusPane"), _("Mixer: Show Mixbusses"), sigc::mem_fun (*this, &Mixer_UI::toggle_mixbuses));
 #endif
 
        ActionManager::register_toggle_action (group, X_("ToggleMonitorSection"), _("Mixer: Show Monitor Section"), sigc::mem_fun (*this, &Mixer_UI::toggle_monitor_section));