User toggling of editor region/route/etc list, ala editor mixer.
Canvas, from sea to shining sea. git-svn-id: svn://localhost/ardour2/trunk@1983 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
13151b43f0
commit
f878576f2d
|
@ -214,6 +214,7 @@
|
|||
<menuitem action='ToggleMeasureVisibility'/>
|
||||
<separator/>
|
||||
<menuitem action='show-editor-mixer'/>
|
||||
<menuitem action='show-editor-list'/>
|
||||
</menu>
|
||||
<menu name='JACK' action='JACK'>
|
||||
<menuitem action='JACKDisconnect'/>
|
||||
|
|
|
@ -628,10 +628,10 @@ Editor::Editor ()
|
|||
|
||||
nlabel = manage (new Label (_("Regions")));
|
||||
nlabel->set_angle (-90);
|
||||
the_notebook.append_page (region_list_scroller, *nlabel);
|
||||
the_notebook.append_page (region_list_scroller, *nlabel);
|
||||
nlabel = manage (new Label (_("Tracks/Busses")));
|
||||
nlabel->set_angle (-90);
|
||||
the_notebook.append_page (route_list_scroller, *nlabel);
|
||||
the_notebook.append_page (route_list_scroller, *nlabel);
|
||||
nlabel = manage (new Label (_("Snapshots")));
|
||||
nlabel->set_angle (-90);
|
||||
the_notebook.append_page (snapshot_display_scroller, *nlabel);
|
||||
|
@ -812,6 +812,9 @@ Editor::show_window ()
|
|||
{
|
||||
show_all ();
|
||||
present ();
|
||||
|
||||
/* re-hide editor list if necessary */
|
||||
editor_list_button_toggled ();
|
||||
|
||||
/* now reset all audio_time_axis heights, because widgets might need
|
||||
to be re-hidden
|
||||
|
@ -1966,6 +1969,22 @@ Editor::set_state (const XMLNode& node)
|
|||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
if ((prop = node.property ("show-editor-list"))) {
|
||||
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
|
||||
assert(act);
|
||||
if (act) {
|
||||
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
bool yn = (prop->value() == X_("yes"));
|
||||
|
||||
/* do it twice to force the change */
|
||||
|
||||
tact->set_active (!yn);
|
||||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -2037,6 +2056,12 @@ Editor::get_state ()
|
|||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
node->add_property (X_("show-editor-mixer"), tact->get_active() ? "yes" : "no");
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
|
||||
if (act) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
node->add_property (X_("show-editor-list"), tact->get_active() ? "yes" : "no");
|
||||
}
|
||||
|
||||
return *node;
|
||||
}
|
||||
|
|
|
@ -268,6 +268,7 @@ class Editor : public PublicEditor
|
|||
Width editor_mixer_strip_width;
|
||||
void maybe_add_mixer_strip_width (XMLNode&);
|
||||
void show_editor_mixer (bool yn);
|
||||
void show_editor_list (bool yn);
|
||||
void set_selected_mixer_strip (TimeAxisView&);
|
||||
void hide_track_in_display (TimeAxisView& tv);
|
||||
void show_track_in_display (TimeAxisView& tv);
|
||||
|
@ -721,7 +722,6 @@ class Editor : public PublicEditor
|
|||
|
||||
Gtk::Menu *region_list_menu;
|
||||
Gtk::ScrolledWindow region_list_scroller;
|
||||
Gtk::Frame region_list_frame;
|
||||
|
||||
bool region_list_display_key_press (GdkEventKey *);
|
||||
bool region_list_display_key_release (GdkEventKey *);
|
||||
|
@ -1291,9 +1291,11 @@ class Editor : public PublicEditor
|
|||
|
||||
/* toolbar */
|
||||
|
||||
Gtk::ToggleButton editor_mixer_button;
|
||||
Gtk::ToggleButton editor_mixer_button;
|
||||
Gtk::ToggleButton editor_list_button;
|
||||
|
||||
void editor_mixer_button_toggled ();
|
||||
void editor_list_button_toggled ();
|
||||
|
||||
AudioClock edit_cursor_clock;
|
||||
AudioClock zoom_range_clock;
|
||||
|
|
|
@ -69,6 +69,8 @@ Editor::register_actions ()
|
|||
|
||||
act = ActionManager::register_toggle_action (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), mem_fun (*this, &Editor::editor_mixer_button_toggled));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (editor_actions, "show-editor-list", _("Show Editor List"), mem_fun (*this, &Editor::editor_list_button_toggled));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
RadioAction::Group crossfade_model_group;
|
||||
|
||||
|
|
|
@ -47,6 +47,16 @@ Editor::editor_mixer_button_toggled ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::editor_list_button_toggled ()
|
||||
{
|
||||
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
|
||||
if (act) {
|
||||
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
|
||||
show_editor_list (tact->get_active());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::cms_deleted ()
|
||||
{
|
||||
|
@ -130,6 +140,16 @@ Editor::show_editor_mixer (bool yn)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::show_editor_list (bool yn)
|
||||
{
|
||||
if (yn) {
|
||||
the_notebook.show();
|
||||
} else {
|
||||
the_notebook.hide();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_selected_mixer_strip (TimeAxisView& view)
|
||||
{
|
||||
|
@ -335,6 +355,9 @@ Editor::session_going_away ()
|
|||
|
||||
editor_mixer_button.set_active(false);
|
||||
editor_mixer_button.set_sensitive(false);
|
||||
editor_list_button.set_active(false);
|
||||
editor_list_button.set_sensitive(false);
|
||||
|
||||
/* clear tempo/meter rulers */
|
||||
|
||||
remove_metric_marks ();
|
||||
|
|
|
@ -124,6 +124,7 @@ Editor::handle_new_route (Session::RouteList& routes)
|
|||
}
|
||||
|
||||
editor_mixer_button.set_sensitive(true);
|
||||
editor_list_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -167,6 +168,10 @@ Editor::remove_route (TimeAxisView *tv)
|
|||
|
||||
if (track_views.size() == 0) {
|
||||
editor_mixer_button.set_sensitive(false);
|
||||
|
||||
editor_list_button.set_active(false);
|
||||
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-list");
|
||||
editor_list_button.set_sensitive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue