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:
parent
bbf028880f
commit
05626747f0
@ -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
|
void
|
||||||
@ -2205,21 +2205,10 @@ ARDOUR_UI::snapshot_session (bool switch_to_it)
|
|||||||
bool do_save = (snapname.length() != 0);
|
bool do_save = (snapname.length() != 0);
|
||||||
|
|
||||||
if (do_save) {
|
if (do_save) {
|
||||||
if (snapname.find ('/') != string::npos) {
|
char illegal = Session::session_name_is_legal(snapname);
|
||||||
MessageDialog msg (_("To ensure compatibility with various systems\n"
|
if (illegal) {
|
||||||
"snapshot names may not contain a '/' character"));
|
MessageDialog msg (string_compose (_("To ensure compatibility with various systems\n"
|
||||||
msg.run ();
|
"snapshot names may not contain a '%1' character"), illegal));
|
||||||
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"));
|
|
||||||
msg.run ();
|
msg.run ();
|
||||||
goto again;
|
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
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user