found. Also made the "New" button sensitive by default as the default
new name for the playlist will be legal.
git-svn-id: svn://localhost/ardour2/trunk@1175
d708f5d6-7413-0410-9779-
e7cbd77b26cf
- name = Playlist::bump_name (pl->name(), _session);
+ name = pl->name();
+
+ do {
+ name = Playlist::bump_name (name, _session);
+ } while (_session.playlist_by_name(name));
+
+ // TODO: The prompter "new" button should be de-activated if the user
+ // specifies a playlist name which already exists in the session.
prompter.set_prompt (_("Name for Playlist"));
prompter.set_initial_text (name);
prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
prompter.set_prompt (_("Name for Playlist"));
prompter.set_initial_text (name);
prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
- prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
+ prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, true);
prompter.show_all ();
switch (prompter.run ()) {
prompter.show_all ();
switch (prompter.run ()) {