From 505ff17d43d0823376d7f741f5cba3e6f929ff5e Mon Sep 17 00:00:00 2001 From: Chris--A Date: Fri, 19 Jun 2015 16:10:43 +1000 Subject: [PATCH] =?UTF-8?q?This=20commit=20increases=20the=20number=20of?= =?UTF-8?q?=20sketches=20able=20to=20be=20spawned=20from=20within=20the=20?= =?UTF-8?q?IDE.=20It=20now=20allows=20676=20sketches=20rather=20than=2026?= =?UTF-8?q?=20('a'=20to=20'zz'=20rather=20than=20'a'=20to=20=20'z').?= =?UTF-8?q?=EF=BB=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/processing/app/Base.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index c10fa824c..15acb588a 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -723,9 +723,10 @@ public class Base { int day = cal.get(Calendar.DAY_OF_MONTH); // 1..31 int month = cal.get(Calendar.MONTH); // 0..11 String purty = months[month] + PApplet.nf(day, 2); + do { - if (index == 26) { - // In 0159, avoid running past z by sending people outdoors. + if (index == 26*26) { + // In 0166, avoid running past zz by sending people outdoors. if (!breakTime) { showWarning(_("Time for a Break"), _("You've reached the limit for auto naming of new sketches\n" + @@ -737,7 +738,15 @@ public class Base { } return null; } - newbieName = "sketch_" + purty + ((char) ('a' + index)); + + int multiples = index / 26; + + if(multiples > 0){ + newbieName = ((char) ('a' + (multiples-1))) + "" + ((char) ('a' + (index % 26))) + ""; + }else{ + newbieName = ((char) ('a' + index)) + ""; + } + newbieName = "sketch_" + purty + newbieName; newbieDir = new File(newbieParentDir, newbieName); index++; // Make sure it's not in the temp folder *and* it's not in the sketchbook