remove ill-conceived use-session-timecode-format option
[ardour.git] / gtk2_ardour / mixer_ui.cc
index 5e3c85d40f2efa2204c9ba40867a9d5957bc677d..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
@@ -3154,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));