View Issue Details

IDProjectCategoryView StatusLast Update
0004548ardourfeaturespublic2015-09-18 15:14
Reportercolinf Assigned Tocth103  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Target Version3.0-beta2 
Summary0004548: [PATCH] Use new Session::session_name_is_legal() function for snapshot name too
DescriptionA tiny cleanup: patch attached. Also fixes a couple of comment typos.
TagsNo tags attached.

Activities

2011-12-09 11:53

 

snapshot-use-session_name_is_legal.patch (1,655 bytes)   
Index: gtk2_ardour/ardour_ui.cc
===================================================================
--- gtk2_ardour/ardour_ui.cc	(revision 10943)
+++ gtk2_ardour/ardour_ui.cc	(working copy)
@@ -2171,7 +2171,7 @@
 }
 
 
-/** 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,24 +2205,13 @@
 		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"));
+			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;
 			}
-			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;
-			}
 		}
 
 		vector<sys::path> p;
@@ -2253,7 +2242,7 @@
 	}
 }
 
-/** 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

cth103

2011-12-09 15:20

administrator   ~0012331

Applied to SVN 10945. Thanks!

colinf

2015-09-18 15:14

updater   ~0017267

Closing old issues reported by me: these have long since been fixed.

Issue History

Date Modified Username Field Change
2011-12-09 11:53 colinf New Issue
2011-12-09 11:53 colinf File Added: snapshot-use-session_name_is_legal.patch
2011-12-09 14:12 cth103 cost => 0.00
2011-12-09 14:12 cth103 Target Version => 3.0-beta2
2011-12-09 15:20 cth103 Note Added: 0012331
2011-12-09 15:20 cth103 Status new => resolved
2011-12-09 15:20 cth103 Resolution open => fixed
2011-12-09 15:20 cth103 Assigned To => cth103
2015-09-18 15:14 colinf Note Added: 0017267
2015-09-18 15:14 colinf Status resolved => closed