diff options
author | Robin Gareus <robin@gareus.org> | 2019-02-28 22:56:35 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-02-28 23:54:13 +0100 |
commit | 00934aec0db8c9fbf0361cdbc4472ae909f1212d (patch) | |
tree | ec76385bc2abf8771eeacdd8386d9b5c282101ba /gtk2_ardour/mixer_ui.cc | |
parent | 9f571b91d34aef559ce8a73c4dbda7a9a094f53d (diff) |
Initialize per session instant state
Per session (instant.xml) GUI options do not have a sigc::slot<> backed
configuration interface to initialize the Actions.
This fixes a first-time start issue (no instant.xml) where GUI panes
may be visible (default) while the actions are "off" (default).
This is a tentative solution, instant.xml backed ToggleAction
initialization needs to be consolidated somehow.
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 2990744cd1..b7a8dd4126 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -2192,7 +2192,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 +2202,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 +2230,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 |