From 3be6eb84b98c9db9ce181a5e4d80848a07b7bee0 Mon Sep 17 00:00:00 2001 From: Georg von Zengen Date: Thu, 27 Feb 2014 14:14:36 +0100 Subject: [PATCH 1/2] added support for '-' and '.' but both not as the first as first character --- app/src/processing/app/Sketch.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 069f552dc..dbe81b3a4 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -2063,9 +2063,10 @@ public class Sketch { for (int i = 0; i < c.length; i++) { if (((c[i] >= '0') && (c[i] <= '9')) || ((c[i] >= 'a') && (c[i] <= 'z')) || - ((c[i] >= 'A') && (c[i] <= 'Z'))) { + ((c[i] >= 'A') && (c[i] <= 'Z')) || + ((i > 0) && (c[i] == '-')) || + ((i > 0) && (c[i] == '.'))) { buffer.append(c[i]); - } else { buffer.append('_'); } From efedfa70495657e371eb51f8398c6e742e5fa3cf Mon Sep 17 00:00:00 2001 From: Georg von Zengen Date: Thu, 27 Feb 2014 14:30:19 +0100 Subject: [PATCH 2/2] cut the filename at the last '.' not at the first in tab-names of the editor --- app/src/processing/app/SketchCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/SketchCode.java b/app/src/processing/app/SketchCode.java index 807d479ea..55b6addca 100644 --- a/app/src/processing/app/SketchCode.java +++ b/app/src/processing/app/SketchCode.java @@ -87,7 +87,7 @@ public class SketchCode { protected void makePrettyName() { prettyName = file.getName(); - int dot = prettyName.indexOf('.'); + int dot = prettyName.lastIndexOf('.'); prettyName = prettyName.substring(0, dot); }