Playlist UI Tweaks: add an action to show playlist selector for selected track

This commit is contained in:
Ben Loftis 2021-06-25 17:03:14 -05:00 committed by Robin Gareus
parent 730a0954d7
commit d7bd87eb13
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
5 changed files with 24 additions and 1 deletions

View File

@ -412,6 +412,8 @@
<menuitem action='track-solo-toggle'/>
<menuitem action='track-mute-toggle'/>
<menu action='TrackPlaylistMenu'>
<menuitem action='show-plist-selector'/>
<separator/>
<menuitem action='new-playlists-for-all-tracks'/>
<menuitem action='new-playlists-for-armed-tracks'/>
<menuitem action='new-playlists-for-selected-tracks'/>

View File

@ -1537,6 +1537,8 @@ private:
void toggle_all_existing_automation ();
void toggle_layer_display ();
void launch_playlist_selector ();
void reverse_selection ();
void edit_envelope ();

View File

@ -262,6 +262,9 @@ Editor::register_actions ()
reg_sens (editor_actions, "toggle-all-existing-automation", _("Toggle All Existing Automation"), sigc::mem_fun (*this, &Editor::toggle_all_existing_automation));
reg_sens (editor_actions, "toggle-layer-display", _("Toggle Layer Display"), sigc::mem_fun (*this, &Editor::toggle_layer_display));
act = reg_sens (editor_actions, "show-plist-selector", _("Show Playlist Selector"), sigc::mem_fun (*this, &Editor::launch_playlist_selector));
ActionManager::stripable_selection_sensitive_actions.push_back (act);
/* these "overlap" with Region/nudge-* and also Common/nudge-* but
* provide a single editor-related action that will nudge a region,
* selected marker or playhead

View File

@ -8669,6 +8669,22 @@ Editor::toggle_layer_display ()
}
void
Editor::launch_playlist_selector ()
{
TrackViewList & tvl (selection->tracks);
TrackViewList::const_iterator t = tvl.begin();
if (t == tvl.end()) {
return;
}
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*t);
if (rtav && rtav->is_track()) {
rtav->show_playlist_selector ();
}
}
vector<MidiRegionView*>
Editor::filter_to_unique_midi_region_views (RegionSelection const & ms) const
{

View File

@ -163,6 +163,7 @@ public:
void clear_playlist ();
void use_playlist (Gtk::RadioMenuItem* item, boost::weak_ptr<ARDOUR::Playlist> wpl);
void show_playlist_selector ();
/* used by EditorRoutes */
static Gtkmm2ext::ActiveState solo_active_state (boost::shared_ptr<ARDOUR::Stripable>);
@ -244,7 +245,6 @@ protected:
void build_playlist_menu ();
Gtk::Menu* playlist_action_menu;
void show_playlist_selector ();
void show_playlist_copy_selector ();
void show_playlist_share_selector ();
void show_playlist_steal_selector ();