<menuitem action='show-editor-mixer'/>
<menuitem action='show-editor-list'/>
+ <menuitem action='ToggleMixerList'/>
<menuitem action='ToggleMeasureVisibility'/>
<menuitem action='ToggleSummary'/>
<menuitem action='ToggleGroupTabs'/>
void new_midi_tracer_window ();
void toggle_editing_space();
void toggle_mixer_space();
+ void toggle_mixer_list();
void toggle_keep_tearoffs();
static PublicEditor* _instance;
}
}
}
+
+void
+ARDOUR_UI::toggle_mixer_list()
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMixerList");
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ mixer->show_mixer_list (tact->get_active());
+ }
+}
act = ActionManager::register_toggle_action (common_actions, X_("KeepTearoffs"), _("Show Toolbars"), mem_fun (*this, &ARDOUR_UI::toggle_keep_tearoffs));
ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
+ ActionManager::session_sensitive_actions.push_back (act);
+
if (Profile->get_mixbus())
ActionManager::register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
, _route_deletion_in_progress (false)
, _following_editor_selection (false)
, _maximised (false)
+ , _show_mixer_list (true)
{
/* allow this window to become the key focus window */
set_flags (CAN_FOCUS);
}
}
+void
+Mixer_UI::show_mixer_list (bool yn)
+{
+ if (yn) {
+ list_vpacker.show ();
+
+ //if user wants to show the pane, we should make sure that it is wide enough to be visible
+ int width = list_hpane.get_position();
+ if (width < 40)
+ list_hpane.set_position(40);
+ } else {
+ list_vpacker.hide ();
+ }
+
+ _show_mixer_list = yn;
+}
+
+
void
Mixer_UI::route_group_name_edit (const std::string& path, const std::string& new_text)
{
}
}
+ if ((prop = node.property ("show-mixer-list"))) {
+ bool yn = string_is_affirmative (prop->value());
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleMixerList"));
+ assert (act);
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ /* do it twice to force the change */
+ tact->set_active (!yn);
+ tact->set_active (yn);
+ }
+
return 0;
}
node->add_property ("show-mixer", _visible ? "yes" : "no");
+ node->add_property ("show-mixer-list", _show_mixer_list ? "yes" : "no");
+
node->add_property ("maximised", _maximised ? "yes" : "no");
return *node;
XMLNode& get_state (void);
int set_state (const XMLNode& );
+ void show_mixer_list (bool yn);
+
void show_window ();
bool hide_window (GdkEventAny *ev);
void show_strip (MixerStrip *);
/// true if we are in fullscreen mode
bool _maximised;
+
+ // true if mixer list is visible
+ bool _show_mixer_list;
};
#endif /* __ardour_mixer_ui_h__ */