13
0

Patch from colinf to use session_name_is_legal for snapshots too (#4548).

git-svn-id: svn://localhost/ardour2/branches/3.0@10945 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-12-09 15:20:14 +00:00
parent bbf028880f
commit 05626747f0

View File

@ -2171,7 +2171,7 @@ ARDOUR_UI::stop_blinking ()
}
/** Ask the user for the name of a new shapshot and then take it.
/** Ask the user for the name of a new snapshot and then take it.
*/
void
@ -2205,21 +2205,10 @@ ARDOUR_UI::snapshot_session (bool switch_to_it)
bool do_save = (snapname.length() != 0);
if (do_save) {
if (snapname.find ('/') != string::npos) {
MessageDialog msg (_("To ensure compatibility with various systems\n"
"snapshot names may not contain a '/' character"));
msg.run ();
goto again;
}
if (snapname.find ('\\') != string::npos) {
MessageDialog msg (_("To ensure compatibility with various systems\n"
"snapshot names may not contain a '\\' character"));
msg.run ();
goto again;
}
if (snapname.find (':') != string::npos) {
MessageDialog msg (_("To ensure compatibility with various systems\n"
"snapshot names may not contain a ':' character"));
char illegal = Session::session_name_is_legal(snapname);
if (illegal) {
MessageDialog msg (string_compose (_("To ensure compatibility with various systems\n"
"snapshot names may not contain a '%1' character"), illegal));
msg.run ();
goto again;
}
@ -2253,7 +2242,7 @@ ARDOUR_UI::snapshot_session (bool switch_to_it)
}
}
/** Ask the user for the name of a new shapshot and then take it.
/** Ask the user for a new session name and then rename the session to it.
*/
void