13
0

Playlist UI Tweaks: when prompting user for a playlist name: remind them if it is a Copy or a New (empty) playlist

This commit is contained in:
Ben Loftis 2021-06-27 22:02:26 -05:00 committed by Robin Gareus
parent 6380b74211
commit b23e13b331
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 11 additions and 7 deletions

View File

@ -4341,7 +4341,7 @@ Editor::restore_editing_space ()
}
bool
Editor::stamp_new_playlist (string &name, string &pgroup)
Editor::stamp_new_playlist (string &name, string &pgroup, bool copy)
{
time_t now;
time (&now);
@ -4357,7 +4357,11 @@ Editor::stamp_new_playlist (string &name, string &pgroup)
}
Prompter prompter (true);
prompter.set_title (_("New Playlist"));
if (copy) {
prompter.set_title (_("Copy Playlist(s)"));
} else {
prompter.set_title (_("New (Empty) Playlist(s)"));
}
prompter.set_prompt (_("Name for new playlist:"));
prompter.set_initial_text (name);
prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
@ -4413,7 +4417,7 @@ void
Editor::new_playlists_for_all_tracks (bool copy)
{
string name, gid;
stamp_new_playlist(name,gid);
stamp_new_playlist(name,gid,copy);
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists);
@ -4424,7 +4428,7 @@ void
Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy)
{
string name, gid;
stamp_new_playlist(name,gid);
stamp_new_playlist(name,gid,copy);
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists);
@ -4435,7 +4439,7 @@ void
Editor::new_playlists_for_selected_tracks (bool copy)
{
string name, gid;
stamp_new_playlist(name,gid);
stamp_new_playlist(name,gid,copy);
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists);
@ -4446,7 +4450,7 @@ void
Editor::new_playlists_for_armed_tracks (bool copy)
{
string name, gid;
stamp_new_playlist(name,gid);
stamp_new_playlist(name,gid,copy);
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists);

View File

@ -1692,7 +1692,7 @@ private:
/* playlist internal ops */
bool stamp_new_playlist (std::string &name, std::string &pgroup);
bool stamp_new_playlist (std::string &name, std::string &pgroup, bool copy);
/* display control */