From b23e13b3317e0f02dcf8324170bc78132feb80f9 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Sun, 27 Jun 2021 22:02:26 -0500 Subject: [PATCH] Playlist UI Tweaks: when prompting user for a playlist name: remind them if it is a Copy or a New (empty) playlist --- gtk2_ardour/editor.cc | 16 ++++++++++------ gtk2_ardour/editor.h | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 8390aa0bf8..19cb1d61de 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -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 > 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 > 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 > 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 > playlists; _session->playlists()->get (playlists); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 531e5ed4a1..80ece3cd34 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -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 */