diff --git a/diylc/diylc-core/.classpath b/diylc/diylc-core/.classpath
index b52b9a355..4905130d1 100644
--- a/diylc/diylc-core/.classpath
+++ b/diylc/diylc-core/.classpath
@@ -8,7 +8,7 @@
-
+
diff --git a/diylc/diylc-core/lib/app-framework.jar b/diylc/diylc-core/lib/app-framework.jar
index e8515ab12..ad805805a 100644
Binary files a/diylc/diylc-core/lib/app-framework.jar and b/diylc/diylc-core/lib/app-framework.jar differ
diff --git a/diylc/diylc-core/lib/java-http-proxy.jar b/diylc/diylc-core/lib/java-http-proxy.jar
index 05f39078e..9295029e9 100644
Binary files a/diylc/diylc-core/lib/java-http-proxy.jar and b/diylc/diylc-core/lib/java-http-proxy.jar differ
diff --git a/diylc/diylc-core/lib/xstream-1.4.19.jar b/diylc/diylc-core/lib/xstream-1.4.19.jar
new file mode 100644
index 000000000..95d1c6a64
Binary files /dev/null and b/diylc/diylc-core/lib/xstream-1.4.19.jar differ
diff --git a/diylc/diylc-core/lib/xstream-1.4.3.jar b/diylc/diylc-core/lib/xstream-1.4.3.jar
deleted file mode 100644
index 815ed039b..000000000
Binary files a/diylc/diylc-core/lib/xstream-1.4.3.jar and /dev/null differ
diff --git a/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java b/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java
index e2fd94562..61349b069 100644
--- a/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java
+++ b/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java
@@ -50,7 +50,7 @@ public interface IDIYComponent extends Serializable, Cloneable {
public static final int CHASSIS = 1;
public static final int BOARD = 2;
- public static final int TRACE = 3;
+ public static final int WIRING = 3;
public static final int COMPONENT = 4;
public static final int TEXT = 5;
diff --git a/diylc/diylc-core/src/org/diylc/presenter/Presenter.java b/diylc/diylc-core/src/org/diylc/presenter/Presenter.java
index 86c7133f5..254e466c3 100644
--- a/diylc/diylc-core/src/org/diylc/presenter/Presenter.java
+++ b/diylc/diylc-core/src/org/diylc/presenter/Presenter.java
@@ -98,6 +98,7 @@
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
+import com.thoughtworks.xstream.security.AnyTypePermission;
/**
* The main presenter class, contains core app logic and drawing routines.
@@ -143,6 +144,7 @@ public class Presenter implements IPlugInPort {
if (resource != null) {
BufferedInputStream in = new BufferedInputStream(resource.openStream());
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
@SuppressWarnings("unchecked")
List allVersions = (List) xStream.fromXML(in);
CURRENT_VERSION = allVersions.get(allVersions.size() - 1).getVersionNumber();
@@ -2593,6 +2595,7 @@ public void saveSelectedComponentAsVariant(String variantName) {
try {
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("variants.xml"));
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
xStream.toXML(defaultVariantMap, out);
out.close();
// no more user variants
@@ -2615,6 +2618,7 @@ private void importDefaultVariants() {
if (resource != null) {
BufferedInputStream in = new BufferedInputStream(resource.openStream());
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
Map> defaults = (Map>) xStream.fromXML(in);
in.close();
@@ -2654,6 +2658,7 @@ private void importDefaultBlocks() {
if (resource != null) {
BufferedInputStream in = new BufferedInputStream(resource.openStream());
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
Map>> defaults = (Map>>) xStream.fromXML(in);
in.close();
@@ -2937,6 +2942,7 @@ public int compare(IDIYComponent> o1, IDIYComponent> o2) {
try {
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("blocks.xml"));
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
xStream.toXML(defaultBlockMap, out);
out.close();
// no more user variants
@@ -3015,6 +3021,7 @@ public int importVariants(String fileName) throws IOException {
LOG.debug(String.format("importVariants(%s)", fileName));
BufferedInputStream in = new BufferedInputStream(new FileInputStream(fileName));
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
VariantPackage pkg;
@@ -3064,6 +3071,7 @@ public int importBlocks(String fileName) throws IOException {
LOG.debug(String.format("importBlocks(%s)", fileName));
BufferedInputStream in = new BufferedInputStream(new FileInputStream(fileName));
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
BuildingBlockPackage pkg;
diff --git a/diylc/diylc-core/src/org/diylc/presenter/update.xml b/diylc/diylc-core/src/org/diylc/presenter/update.xml
index 96bc84118..d9ffff2f8 100644
--- a/diylc/diylc-core/src/org/diylc/presenter/update.xml
+++ b/diylc/diylc-core/src/org/diylc/presenter/update.xml
@@ -3605,5 +3605,37 @@
https://github.com/bancika/diy-layout-creator/releases
+
+
+ 4
+ 21
+ 0
+
+ 2022-02-16 00:00:00.000 CET
+
+
+
+ BUG_FIX
+ Fixed compatibility issues with Java version 16 and above
+
+
+ NEW_FEATURE
+ Added 'Gray' theme
+
+
+ IMPROVEMENT
+ Add shabang to run.sh for *nix systems
+
+
+ IMPROVEMENT
+ Prevent the donation label from wrapping into several lines
+
+
+ IMPROVEMENT
+ Use Backspace key to delete selection in Mac OS
+
+
+ https://github.com/bancika/diy-layout-creator/releases
+
diff --git a/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java b/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java
index 0d710608e..0114b0ba8 100644
--- a/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java
+++ b/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java
@@ -58,6 +58,7 @@ DIY Layout Creator (DIYLC).
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import com.thoughtworks.xstream.mapper.MapperWrapper;
+import com.thoughtworks.xstream.security.AnyTypePermission;
public class ProjectFileManager {
@@ -97,7 +98,8 @@ public boolean shouldSerializeMember(Class definedIn, String fieldName) {
}
};
configure(xStream);
- this.xStreamOld = new XStream(new DomDriver());
+ this.xStreamOld = new XStream(new DomDriver());
+ this.xStreamOld.addPermission(AnyTypePermission.ANY);
xStreamOld.autodetectAnnotations(true);
this.messageDispatcher = messageDispatcher;
}
@@ -126,6 +128,7 @@ public static void configure(XStream xStream) {
xStream.addImmutableType(org.diylc.core.measures.Power.class);
xStream.addImmutableType(org.diylc.core.measures.Inductance.class);
xStream.addImmutableType(org.diylc.core.measures.Size.class);
+ xStream.addPermission(AnyTypePermission.ANY);
}
public void startNewFile() {
diff --git a/diylc/diylc-core/src/org/diylc/utils/VersionReader.java b/diylc/diylc-core/src/org/diylc/utils/VersionReader.java
index a11fae018..133f3e371 100644
--- a/diylc/diylc-core/src/org/diylc/utils/VersionReader.java
+++ b/diylc/diylc-core/src/org/diylc/utils/VersionReader.java
@@ -12,6 +12,7 @@
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
+import com.thoughtworks.xstream.security.AnyTypePermission;
public class VersionReader {
public static void main(String[] args) {
@@ -20,6 +21,7 @@ public static void main(String[] args) {
if (resource != null) {
BufferedInputStream in = new BufferedInputStream(resource.openStream());
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
@SuppressWarnings("unchecked")
List allVersions = (List) xStream.fromXML(in);
Version latest = allVersions.get(allVersions.size() - 1);
diff --git a/diylc/diylc-library/.classpath b/diylc/diylc-library/.classpath
index 0b3ed2f46..a84d409de 100644
--- a/diylc/diylc-library/.classpath
+++ b/diylc/diylc-library/.classpath
@@ -7,8 +7,8 @@
+
-
diff --git a/diylc/diylc-library/lib/app-framework.jar b/diylc/diylc-library/lib/app-framework.jar
index e8515ab12..ad805805a 100644
Binary files a/diylc/diylc-library/lib/app-framework.jar and b/diylc/diylc-library/lib/app-framework.jar differ
diff --git a/diylc/diylc-library/lib/diylc-core.jar b/diylc/diylc-library/lib/diylc-core.jar
index dbaf43ff8..1cd82f6de 100644
Binary files a/diylc/diylc-library/lib/diylc-core.jar and b/diylc/diylc-library/lib/diylc-core.jar differ
diff --git a/diylc/diylc-library/lib/xstream-1.4.19.jar b/diylc/diylc-library/lib/xstream-1.4.19.jar
new file mode 100644
index 000000000..95d1c6a64
Binary files /dev/null and b/diylc/diylc-library/lib/xstream-1.4.19.jar differ
diff --git a/diylc/diylc-library/lib/xstream-1.4.3.jar b/diylc/diylc-library/lib/xstream-1.4.3.jar
deleted file mode 100644
index 815ed039b..000000000
Binary files a/diylc/diylc-library/lib/xstream-1.4.3.jar and /dev/null differ
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java b/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java
index 94356dfa9..0506f7cff 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java
@@ -38,7 +38,7 @@
@ComponentDescriptor(name = "Copper Trace", author = "Branislav Stojkovic", category = "Connectivity",
creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "Trace",
- description = "Straight copper trace", zOrder = IDIYComponent.TRACE, bomPolicy = BomPolicy.NEVER_SHOW,
+ description = "Straight copper trace", zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW,
autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TAG, keywordTag = "PCB",
transformer = SimpleComponentTransformer.class)
public class CopperTrace extends AbstractLeadedComponent {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java b/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java
index c73c05c87..340e8dd07 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java
@@ -38,7 +38,7 @@
@ComponentDescriptor(name = "Curved Trace", author = "Branislav Stojkovic", category = "Connectivity",
instanceNamePrefix = "Trace", description = "Curved copper trace with two control points",
- zOrder = IDIYComponent.TRACE, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
+ zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
keywordPolicy = KeywordPolicy.SHOW_TAG, keywordTag = "PCB", transformer = SimpleComponentTransformer.class,
enableCache = true)
public class CurvedTrace extends AbstractCurvedComponent {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java b/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java
index 38cc77d17..b51f1bdf0 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java
@@ -46,7 +46,7 @@ DIY Layout Creator (DIYLC).
@ComponentDescriptor(name = "Eyelet", category = "Connectivity", author = "Branislav Stojkovic",
description = "Eyelet or turret terminal", instanceNamePrefix = "Eyelet",
- zOrder = IDIYComponent.TRACE + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
+ zOrder = IDIYComponent.WIRING + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, transformer = SimpleComponentTransformer.class,
enableCache = true)
public class Eyelet extends AbstractComponent {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java b/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java
index a81c79cc6..9406acd5b 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java
@@ -42,7 +42,7 @@ DIY Layout Creator (DIYLC).
import org.diylc.core.measures.SizeUnit;
@ComponentDescriptor(name = "Ground Fill", author = "Branislav Stojkovic", category = "Connectivity",
- instanceNamePrefix = "GF", description = "Polygonal ground fill area", zOrder = IDIYComponent.TRACE,
+ instanceNamePrefix = "GF", description = "Polygonal ground fill area", zOrder = IDIYComponent.WIRING,
bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, transformer = SimpleComponentTransformer.class)
public class GroundFill extends AbstractComponent {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java b/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java
index 3d2c1d372..59dbf9aef 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java
@@ -39,7 +39,7 @@
import org.diylc.utils.Constants;
@ComponentDescriptor(name = "Hookup Wire", author = "Branislav Stojkovic", category = "Connectivity",
- instanceNamePrefix = "W", description = "Flexible wire with two control points", zOrder = IDIYComponent.COMPONENT,
+ instanceNamePrefix = "W", description = "Flexible wire with two control points", zOrder = IDIYComponent.WIRING,
flexibleZOrder = true, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
transformer = SimpleComponentTransformer.class, enableCache = true)
public class HookupWire extends AbstractCurvedComponent implements IContinuity {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java b/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java
index 0392d5154..4e0609aef 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java
@@ -41,7 +41,7 @@ DIY Layout Creator (DIYLC).
@ComponentDescriptor(name = "Jumper", author = "Branislav Stojkovic", category = "Connectivity",
creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "J", description = "",
- zOrder = IDIYComponent.COMPONENT, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
+ zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
transformer = SimpleComponentTransformer.class)
public class Jumper extends AbstractLeadedComponent implements IContinuity {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java b/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java
index 04f4727dc..b5aa610ef 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java
@@ -43,7 +43,7 @@
@ComponentDescriptor(name = "Solder Pad", category = "Connectivity", author = "Branislav Stojkovic",
description = "Copper solder pad, round or square", instanceNamePrefix = "Pad",
- zOrder = IDIYComponent.TRACE + 0.1, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
+ zOrder = IDIYComponent.WIRING + 0.1, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
keywordPolicy = KeywordPolicy.SHOW_TAG, keywordTag = "PCB", transformer = SimpleComponentTransformer.class, enableCache = true)
public class SolderPad extends AbstractComponent {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java b/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java
index f33b5b8a8..aa9039e4c 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java
@@ -44,7 +44,7 @@ DIY Layout Creator (DIYLC).
@ComponentDescriptor(name = "Turret Lug", category = "Connectivity", author = "Branislav Stojkovic",
description = "Turret terminal lug", instanceNamePrefix = "Turret",
- zOrder = IDIYComponent.TRACE + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
+ zOrder = IDIYComponent.WIRING + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, transformer = SimpleComponentTransformer.class,
enableCache = true)
public class Turret extends AbstractComponent {
diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java b/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java
index 1343a8e43..a411a74f6 100644
--- a/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java
+++ b/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java
@@ -46,7 +46,7 @@
import org.diylc.utils.Constants;
@ComponentDescriptor(name = "Twisted Leads", author = "Branislav Stojkovic", category = "Connectivity",
- instanceNamePrefix = "W", description = "A pair of flexible leads twisted tighly together", zOrder = IDIYComponent.COMPONENT,
+ instanceNamePrefix = "W", description = "A pair of flexible leads twisted tighly together", zOrder = IDIYComponent.WIRING,
flexibleZOrder = true, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false,
transformer = SimpleComponentTransformer.class, enableCache = true)
public class TwistedWire extends AbstractCurvedComponent implements IContinuity {
diff --git a/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java b/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java
index 89bdf695f..d0964888b 100644
--- a/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java
+++ b/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java
@@ -45,7 +45,7 @@ DIY Layout Creator (DIYLC).
import org.diylc.core.annotations.EditableProperty;
@ComponentDescriptor(name = "PCB Text", author = "Branislav Stojkovic", category = "Misc",
- description = "Mirrored text for PCB artwork", instanceNamePrefix = "L", zOrder = IDIYComponent.TRACE,
+ description = "Mirrored text for PCB artwork", instanceNamePrefix = "L", zOrder = IDIYComponent.WIRING,
flexibleZOrder = false, bomPolicy = BomPolicy.NEVER_SHOW, transformer = TextTransformer.class)
public class PCBText extends AbstractComponent {
diff --git a/diylc/diylc-swing/.classpath b/diylc/diylc-swing/.classpath
index e9e694485..6886c6074 100644
--- a/diylc/diylc-swing/.classpath
+++ b/diylc/diylc-swing/.classpath
@@ -17,10 +17,10 @@
-
+
-
+
diff --git a/diylc/diylc-swing/DIYLCStarter.launch b/diylc/diylc-swing/DIYLCStarter.launch
index b0eed7ab2..e9b88586a 100644
--- a/diylc/diylc-swing/DIYLCStarter.launch
+++ b/diylc/diylc-swing/DIYLCStarter.launch
@@ -9,8 +9,10 @@
+
+
-
+
diff --git a/diylc/diylc-swing/build.xml b/diylc/diylc-swing/build.xml
index 384b9c195..d282e3500 100644
--- a/diylc/diylc-swing/build.xml
+++ b/diylc/diylc-swing/build.xml
@@ -10,7 +10,7 @@
-
+
@@ -116,6 +116,11 @@
+
+
+
+
+
diff --git a/diylc/diylc-swing/buildFX.xml b/diylc/diylc-swing/buildFX.xml
deleted file mode 100644
index 972b8efce..000000000
--- a/diylc/diylc-swing/buildFX.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Compile with JDK ${java.runtime.version}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/diylc/diylc-swing/dict.txt b/diylc/diylc-swing/dict.txt
index 592775bce..e4df4a23b 100644
--- a/diylc/diylc-swing/dict.txt
+++ b/diylc/diylc-swing/dict.txt
@@ -50,6 +50,7 @@ G-D-S JFET
G-D-S MOSFET
G-S-D JFET
G-S-D MOSFET
+Gray
Import Netlist
Italiano
Lin
@@ -82,6 +83,7 @@ SPST
Srpski
Tick Width
Ticks
+Wiring
Xnor
Xor
cm
diff --git a/diylc/diylc-swing/diylc-swing.iml b/diylc/diylc-swing/diylc-swing.iml
index 046d01ff8..57ab27f30 100644
--- a/diylc/diylc-swing/diylc-swing.iml
+++ b/diylc/diylc-swing/diylc-swing.iml
@@ -16,7 +16,7 @@
-
+
diff --git a/diylc/diylc-swing/diylc.l4j.ini b/diylc/diylc-swing/diylc.l4j.ini
index 1ae2d02e1..cb5770b71 100644
--- a/diylc/diylc-swing/diylc.l4j.ini
+++ b/diylc/diylc-swing/diylc.l4j.ini
@@ -1 +1 @@
--Xms512m -Xmx1024m -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8
\ No newline at end of file
+-Xms512m -Xmx1024m -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED
\ No newline at end of file
diff --git a/diylc/diylc-swing/diylc.sh b/diylc/diylc-swing/diylc.sh
index d0f0c6fe2..0522a9f99 100644
--- a/diylc/diylc-swing/diylc.sh
+++ b/diylc/diylc-swing/diylc.sh
@@ -46,4 +46,4 @@ echo SNAP_USER_DATA
echo $SNAP_USER_DATA
echo =============================================
-java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -Duser.dir=$SNAP_USER_DATA -Dfile.encoding=UTF-8 -cp $SNAP/diylc.jar:lib org.diylc.DIYLCStarter
+java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -Duser.dir=$SNAP_USER_DATA -Dfile.encoding=UTF-8 -cp $SNAP/diylc.jar:lib --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED org.diylc.DIYLCStarter
diff --git a/diylc/diylc-swing/flatpak/com.diy_fever.DIYLayoutCreator.metainfo.xml b/diylc/diylc-swing/flatpak/com.diy_fever.DIYLayoutCreator.metainfo.xml
index 21e7e8fd3..2046bdc2a 100644
--- a/diylc/diylc-swing/flatpak/com.diy_fever.DIYLayoutCreator.metainfo.xml
+++ b/diylc/diylc-swing/flatpak/com.diy_fever.DIYLayoutCreator.metainfo.xml
@@ -37,6 +37,18 @@
nbenitezl_AT_gmail.com
+
+
+
+ - [Bug Fix] Fixed compatibility issues with Java version 16 and above
+ - [New Feature] Added 'Gray' theme
+ - [Improvement] Add shabang to run.sh for *nix systems
+ - [Improvement] Prevent the donation label from wrapping into several lines
+ - [Improvement] Use Backspace key to delete selection in Mac OS
+
+
+ https://github.com/bancika/diy-layout-creator/releases/tag/v4.21.0
+
diff --git a/diylc/diylc-swing/launch4j.xml b/diylc/diylc-swing/launch4j.xml
index ac225d0f7..cf96fadb5 100644
--- a/diylc/diylc-swing/launch4j.xml
+++ b/diylc/diylc-swing/launch4j.xml
@@ -31,5 +31,9 @@
-Dorg.diylc.scriptRun=true
-Dfile.encoding=UTF-8
-javaagent:lib/jar-loader.jar
+ --add-opens java.base/java.util=ALL-UNNAMED
+ --add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.text=ALL-UNNAMED
+ --add-opens java.desktop/java.awt=ALL-UNNAMED
\ No newline at end of file
diff --git a/diylc/diylc-swing/lib/app-framework.jar b/diylc/diylc-swing/lib/app-framework.jar
index e8515ab12..ad805805a 100644
Binary files a/diylc/diylc-swing/lib/app-framework.jar and b/diylc/diylc-swing/lib/app-framework.jar differ
diff --git a/diylc/diylc-swing/lib/diylc-core.jar b/diylc/diylc-swing/lib/diylc-core.jar
index dbaf43ff8..1cd82f6de 100644
Binary files a/diylc/diylc-swing/lib/diylc-core.jar and b/diylc/diylc-swing/lib/diylc-core.jar differ
diff --git a/diylc/diylc-swing/lib/java-http-proxy.jar b/diylc/diylc-swing/lib/java-http-proxy.jar
index 05f39078e..9295029e9 100644
Binary files a/diylc/diylc-swing/lib/java-http-proxy.jar and b/diylc/diylc-swing/lib/java-http-proxy.jar differ
diff --git a/diylc/diylc-swing/lib/xstream-1.4.19.jar b/diylc/diylc-swing/lib/xstream-1.4.19.jar
new file mode 100644
index 000000000..95d1c6a64
Binary files /dev/null and b/diylc/diylc-swing/lib/xstream-1.4.19.jar differ
diff --git a/diylc/diylc-swing/lib/xstream-1.4.3.jar b/diylc/diylc-swing/lib/xstream-1.4.3.jar
deleted file mode 100644
index 815ed039b..000000000
Binary files a/diylc/diylc-swing/lib/xstream-1.4.3.jar and /dev/null differ
diff --git a/diylc/diylc-swing/library/main.jar b/diylc/diylc-swing/library/main.jar
index fb23531d3..b0ee2d902 100644
Binary files a/diylc/diylc-swing/library/main.jar and b/diylc/diylc-swing/library/main.jar differ
diff --git a/diylc/diylc-swing/run.sh b/diylc/diylc-swing/run.sh
index 1a5423dde..373d69dc8 100644
--- a/diylc/diylc-swing/run.sh
+++ b/diylc/diylc-swing/run.sh
@@ -1 +1,2 @@
-java -Xms512m -Xmx2048m -javaagent:lib/jar-loader.jar -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib org.diylc.DIYLCStarter
\ No newline at end of file
+#!/bin/bash
+exec java -Xms512m -Xmx2048m -javaagent:lib/jar-loader.jar -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED org.diylc.DIYLCStarter "$@"
\ No newline at end of file
diff --git a/diylc/diylc-swing/src/org/diylc/DIYLCStarter.java b/diylc/diylc-swing/src/org/diylc/DIYLCStarter.java
index 6e087b3fb..60d222e72 100644
--- a/diylc/diylc-swing/src/org/diylc/DIYLCStarter.java
+++ b/diylc/diylc-swing/src/org/diylc/DIYLCStarter.java
@@ -18,13 +18,8 @@
package org.diylc;
import java.io.File;
-import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URL;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
import java.util.List;
import java.util.Properties;
@@ -63,201 +58,190 @@
*/
public class DIYLCStarter {
- private static final Logger LOG = Logger.getLogger(DIYLCStarter.class);
-
- private static final String SCRIPT_RUN = "org.diylc.scriptRun";
-
- /**
- * @param args
- * @throws InvalidActivityException
- */
- public static void main(String[] args) {
- try {
- runDIYLC(args);
- } catch (Throwable t) {
- LOG.error("Major error while starting DIYLC", t);
- System.out.println("Major error while starting DIYLC");
- t.printStackTrace(System.out);
- }
- }
-
- public static void runDIYLC(String[] args) {
- // Initialize splash screen
- DIYLCSplash splash = null;
- Exception splashException = null;
-
- try {
- splash = new DIYLCSplash();
- } catch (Exception e) {
- System.out.println("Splash screen could not be initialized: " + e.getMessage());
- splashException = e;
- }
-
- URL url = DIYLCStarter.class.getResource("log4j.properties");
- Properties properties = new Properties();
- try {
- properties.load(url.openStream());
- PropertyConfigurator.configure(properties);
- } catch (Exception e) {
- LOG.error("Could not initialize log4j configuration", e);
- }
-
- initializeConfiguration();
-
- // disable HIGHLIGHT_CONTINUITY_AREA config, keep it transient
- ConfigurationManager.getInstance().writeValue(IPlugInPort.HIGHLIGHT_CONTINUITY_AREA, false);
-
- LOG.info("JarLoader strategy: " + JarLoader.getStrategy());
-
- LOG.info("Loading languages...");
-
- LangUtil.configure();
-
- LOG.debug("Java version: " + System.getProperty("java.runtime.version") + " by "
- + System.getProperty("java.vm.vendor"));
- LOG.debug("Java home: " + System.getProperty("java.home"));
- LOG.debug("OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
-
- LOG.info("Starting DIYLC with working directory " + System.getProperty("user.dir"));
-
- LOG.info("Configuration dump start.");
- // log configuration
- Field[] fields = IPlugInPort.class.getFields();
- for (Field f : fields) {
- if (f.getType() != String.class || !f.getName().toUpperCase().equals(f.getName()))
- continue;
- try {
- String key = (String) f.get(null);
- Object configValue = ConfigurationManager.getInstance().readObject(key, null);
- if (configValue != null && (configValue.getClass() == Boolean.class || configValue.getClass() == String.class)) {
- LOG.info(key + " = " + configValue);
- }
- } catch (Exception e) {
- LOG.info("Error logging for field: " + f.getName());
- }
- }
- LOG.info("Configuration dump end.");
-
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (Exception e) {
- LOG.error("Could not set Look&Feel", e);
- }
-
- Thread fontThread = new Thread(new Runnable() {
-
- @Override
- public void run() {
- try {
- FontOptimizer.run(ConfigurationManager.getInstance());
- } catch (Exception e) {
- LOG.error("Could not ", e);
- }
- }
- });
- fontThread.setPriority(Thread.MIN_PRIORITY);
- fontThread.start();
-
- String val = System.getProperty(SCRIPT_RUN);
- if (!"true".equals(val)) {
- LOG.info("Detected no scriptRun setting!");
- int response = JOptionPane.showConfirmDialog(splash,
- "It is not recommended to run DIYLC by clicking on the diylc.jar file.\n"
- + "Please use diylc.exe on Windows or run.sh on OSX/Linux to ensure the best\n"
- + "performance and reliability. Do you want to continue?",
- "DIYLC", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
- if (response != JOptionPane.YES_OPTION) {
- System.exit(0);
- }
- }
-
- LOG.info("Creating the main frame...");
-
- MainFrame mainFrame = new MainFrame();
- Presenter presenter = mainFrame.getPresenter();
-
- LOG.info("Main frame created.");
- // mainFrame.setLocationRelativeTo(null);
-
- if (splash == null) {
- LOG.warn("Splash screen could not be initialized", splashException);
- } else {
- LOG.info("Hiding splash screen...");
- splash.setVisible(false);
- splash.dispose();
- LOG.info("Done hiding splash screen.");
- }
-
- mainFrame.setVisible(true);
-
- // assign open file handler for Mac
- if (Utils.isMac()) {
- LOG.info("Setting up open file handler for Mac...");
- SwingUtilities.invokeLater(() -> {
- Application.getApplication().setOpenFileHandler((AppEvent.OpenFilesEvent ofe) -> {
- List files = ofe.getFiles();
- if (files != null && files.size() > 0) {
- String filePath = files.get(0).getAbsolutePath();
- if (presenter.allowFileAction()) {
- presenter.loadProjectFromFile(filePath);
- }
- }
- LOG.info("Finished setting up open file handler for Mac.");
- });
- });
- }
-
- if (args.length > 0) {
- presenter.loadProjectFromFile(args[0]);
- } else {
- boolean showTemplates =
- ConfigurationManager.getInstance().readBoolean(TemplateDialog.SHOW_TEMPLATES_KEY, false);
- if (showTemplates) {
- TemplateDialog templateDialog = new TemplateDialog(mainFrame, mainFrame.getPresenter());
- if (!templateDialog.getFiles().isEmpty()) {
- templateDialog.setVisible(true);
- }
- }
- }
-
- properties = new Properties();
- try {
- LOG.info("Injecting default properties.");
- URL resource = Presenter.class.getResource("config.properties");
- if (resource != null) {
- properties.load(resource.openStream());
- PropertyInjector.injectProperties(properties);
- }
- } catch (Exception e) {
- LOG.error("Could not read config.properties file", e);
- }
-
- if (ConfigurationManager.getInstance().isFileWithErrors())
- mainFrame.showMessage(""
- + "There was an error reading the configuration file and it was replaced by a default configuration.
"
- + "The backup file is created and placed in user directory under '.diylc' sub-directory with '~' at the end.
"
- + "This can happen when running two versions of DIYLC on the same machine at the same time.
"
- + "Replace the main 'config.xml' file with the backup when running the latest version of DIYLC."
- + "", "Warning", IView.WARNING_MESSAGE);
- }
-
- private static void initializeConfiguration() {
- // migrate config file from old folder path to the new one
- Path oldPath = Paths.get(Utils.getUserDataDirectory(".diylc") + "config.xml");
- Path newPath = Paths.get(Utils.getUserDataDirectory("diylc") + "config.xml");
- try {
- if (oldPath.toFile().exists() && !newPath.toFile().exists()) {
- LOG.info("Copying config file to the new directory");
- Files.copy(oldPath, newPath, StandardCopyOption.REPLACE_EXISTING);
- }
- } catch (IOException e) {
- LOG.error("Failed to copy config file to the new directory", e);
- }
-
- // initialize
- ConfigurationManager configurationManager = ConfigurationManager.getInstance();
- XStream xStream = configurationManager.getSerializer();
- ProjectFileManager.configure(xStream);
- configurationManager.initialize("diylc");
- }
+ private static final Logger LOG = Logger.getLogger(DIYLCStarter.class);
+
+ private static final String SCRIPT_RUN = "org.diylc.scriptRun";
+
+ /**
+ * @param args
+ * @throws InvalidActivityException
+ */
+ public static void main(String[] args) {
+ try {
+ runDIYLC(args);
+ } catch (Throwable t) {
+ LOG.error("Major error while starting DIYLC", t);
+ System.out.println("Major error while starting DIYLC");
+ t.printStackTrace(System.out);
+ }
+ }
+
+ public static void runDIYLC(String[] args) {
+ // Initialize splash screen
+ DIYLCSplash splash = null;
+ Exception splashException = null;
+
+ try {
+ splash = new DIYLCSplash();
+ } catch (Exception e) {
+ System.out.println("Splash screen could not be initialized: " + e.getMessage());
+ splashException = e;
+ }
+
+ URL url = DIYLCStarter.class.getResource("log4j.properties");
+ Properties properties = new Properties();
+ try {
+ properties.load(url.openStream());
+ PropertyConfigurator.configure(properties);
+ } catch (Exception e) {
+ LOG.error("Could not initialize log4j configuration", e);
+ }
+
+ initializeConfiguration();
+
+ // disable HIGHLIGHT_CONTINUITY_AREA config, keep it transient
+ ConfigurationManager.getInstance().writeValue(IPlugInPort.HIGHLIGHT_CONTINUITY_AREA, false);
+
+ LOG.info("JarLoader strategy: " + JarLoader.getStrategy());
+
+ LOG.info("Loading languages...");
+
+ LangUtil.configure();
+
+ LOG.debug("Java version: " + System.getProperty("java.runtime.version") + " by "
+ + System.getProperty("java.vm.vendor"));
+ LOG.debug("Java home: " + System.getProperty("java.home"));
+ LOG.debug("OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
+
+ LOG.info("Starting DIYLC with working directory " + System.getProperty("user.dir"));
+
+ LOG.info("Configuration dump start.");
+ // log configuration
+ Field[] fields = IPlugInPort.class.getFields();
+ for (Field f : fields) {
+ if (f.getType() != String.class || !f.getName().toUpperCase().equals(f.getName()))
+ continue;
+ try {
+ String key = (String) f.get(null);
+ Object configValue = ConfigurationManager.getInstance().readObject(key, null);
+ if (configValue != null
+ && (configValue.getClass() == Boolean.class || configValue.getClass() == String.class)) {
+ LOG.info(key + " = " + configValue);
+ }
+ } catch (Exception e) {
+ LOG.info("Error logging for field: " + f.getName());
+ }
+ }
+ LOG.info("Configuration dump end.");
+
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (Exception e) {
+ LOG.error("Could not set Look&Feel", e);
+ }
+
+ Thread fontThread = new Thread(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ FontOptimizer.run(ConfigurationManager.getInstance());
+ } catch (Exception e) {
+ LOG.error("Could not ", e);
+ }
+ }
+ });
+ fontThread.setPriority(Thread.MIN_PRIORITY);
+ fontThread.start();
+
+ String val = System.getProperty(SCRIPT_RUN);
+ if (!"true".equals(val)) {
+ LOG.info("Detected no scriptRun setting!");
+ int response = JOptionPane.showConfirmDialog(splash,
+ "It is not recommended to run DIYLC by clicking on the diylc.jar file.\n"
+ + "Please use diylc.exe on Windows or run.sh on OSX/Linux to ensure the best\n"
+ + "performance and reliability. Do you want to continue?",
+ "DIYLC", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+ if (response != JOptionPane.YES_OPTION) {
+ System.exit(0);
+ }
+ }
+
+ LOG.info("Creating the main frame...");
+
+ MainFrame mainFrame = new MainFrame();
+ Presenter presenter = mainFrame.getPresenter();
+
+ LOG.info("Main frame created.");
+ // mainFrame.setLocationRelativeTo(null);
+
+ if (splash == null) {
+ LOG.warn("Splash screen could not be initialized", splashException);
+ } else {
+ LOG.info("Hiding splash screen...");
+ splash.setVisible(false);
+ splash.dispose();
+ LOG.info("Done hiding splash screen.");
+ }
+
+ mainFrame.setVisible(true);
+
+ // assign open file handler for Mac
+ if (Utils.isMac()) {
+ LOG.info("Setting up open file handler for Mac...");
+ SwingUtilities.invokeLater(() -> {
+ Application.getApplication().setOpenFileHandler((AppEvent.OpenFilesEvent ofe) -> {
+ List files = ofe.getFiles();
+ if (files != null && files.size() > 0) {
+ String filePath = files.get(0).getAbsolutePath();
+ if (presenter.allowFileAction()) {
+ presenter.loadProjectFromFile(filePath);
+ }
+ }
+ LOG.info("Finished setting up open file handler for Mac.");
+ });
+ });
+ }
+
+ if (args.length > 0) {
+ presenter.loadProjectFromFile(args[0]);
+ } else {
+ boolean showTemplates = ConfigurationManager.getInstance().readBoolean(TemplateDialog.SHOW_TEMPLATES_KEY,
+ false);
+ if (showTemplates) {
+ TemplateDialog templateDialog = new TemplateDialog(mainFrame, mainFrame.getPresenter());
+ if (!templateDialog.getFiles().isEmpty()) {
+ templateDialog.setVisible(true);
+ }
+ }
+ }
+
+ properties = new Properties();
+ try {
+ LOG.info("Injecting default properties.");
+ URL resource = Presenter.class.getResource("config.properties");
+ if (resource != null) {
+ properties.load(resource.openStream());
+ PropertyInjector.injectProperties(properties);
+ }
+ } catch (Exception e) {
+ LOG.error("Could not read config.properties file", e);
+ }
+
+ if (ConfigurationManager.getInstance().isFileWithErrors())
+ mainFrame.showMessage(""
+ + "There was an error reading the configuration file and it was replaced by a default configuration.
"
+ + "The backup file is created and placed in user directory under '.diylc' sub-directory with '~' at the end.
"
+ + "This can happen when running two versions of DIYLC on the same machine at the same time.
"
+ + "Replace the main 'config.xml' file with the backup when running the latest version of DIYLC."
+ + "", "Warning", IView.WARNING_MESSAGE);
+ }
+
+ private static void initializeConfiguration() {
+ // initialize
+ ConfigurationManager configurationManager = ConfigurationManager.getInstance();
+ XStream xStream = configurationManager.getSerializer();
+ ProjectFileManager.configure(xStream);
+ configurationManager.initialize(".diylc");
+ }
}
diff --git a/diylc/diylc-swing/src/org/diylc/swing/ActionFactory.java b/diylc/diylc-swing/src/org/diylc/swing/ActionFactory.java
index 519aaf1c6..8e6920584 100644
--- a/diylc/diylc-swing/src/org/diylc/swing/ActionFactory.java
+++ b/diylc/diylc-swing/src/org/diylc/swing/ActionFactory.java
@@ -46,6 +46,7 @@
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import javax.swing.filechooser.FileFilter;
+import org.diylc.appframework.miscutils.Utils;
import org.apache.log4j.Logger;
import org.diylc.appframework.miscutils.ConfigurationManager;
@@ -1512,7 +1513,11 @@ public DeleteSelectionAction(IPlugInPort plugInPort) {
super();
this.plugInPort = plugInPort;
putValue(AbstractAction.NAME, "Delete Selection");
- putValue(AbstractAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
+ if (Utils.isMac()) {
+ putValue(AbstractAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0));
+ } else {
+ putValue(AbstractAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
+ }
putValue(AbstractAction.SMALL_ICON, IconLoader.Delete.getIcon());
}
diff --git a/diylc/diylc-swing/src/org/diylc/swing/gui/actionbar/ActionBarPlugin.java b/diylc/diylc-swing/src/org/diylc/swing/gui/actionbar/ActionBarPlugin.java
index bd95853a6..5d45c44b8 100644
--- a/diylc/diylc-swing/src/org/diylc/swing/gui/actionbar/ActionBarPlugin.java
+++ b/diylc/diylc-swing/src/org/diylc/swing/gui/actionbar/ActionBarPlugin.java
@@ -26,9 +26,12 @@
import java.awt.event.ComponentEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
+import java.awt.font.TextAttribute;
import java.util.ArrayList;
import java.util.EnumSet;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
@@ -67,8 +70,8 @@ public class ActionBarPlugin implements IPlugIn {
private ConfigToolbar configToolbar;
private JLabel donateLabel;
- private static final String DONATE_HTML = "" + LangUtil.translate("Enjoying DIYLC? Click here to buy me a coffee :)") + "";
- private static final String DONATE_HTML_SHORT = "" + LangUtil.translate("Donate") + "";
+ private static final String DONATE_HTML = LangUtil.translate("Enjoying DIYLC? Click here to buy me a coffee :)");
+ private static final String DONATE_HTML_SHORT = LangUtil.translate("Donate");
public ActionBarPlugin(ISwingUI swingUI) {
this.swingUI = swingUI;
@@ -114,6 +117,9 @@ public Dimension getPreferredSize() {
public JLabel getDonateLabel() {
if (donateLabel == null) {
donateLabel = new JLabel(DONATE_HTML);
+// Map fontAttributes = new HashMap();
+// fontAttributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
+// donateLabel.setFont(donateLabel.getFont().deriveFont(fontAttributes));
donateLabel.setForeground(Color.blue);
donateLabel.setIcon(IconLoader.Donate.getIcon());
donateLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@@ -125,7 +131,7 @@ public void componentShown(ComponentEvent e) {
rootPane.addComponentListener(new ComponentAdapter() {
@Override
public void componentResized(ComponentEvent e) {
- if (rootPane.getWidth() < 920) {
+ if (rootPane.getWidth() < 940) {
if (!DONATE_HTML_SHORT.equals(donateLabel.getText()))
donateLabel.setText(DONATE_HTML_SHORT);
} else {
diff --git a/diylc/diylc-swing/src/org/diylc/swing/plugins/config/ConfigPlugin.java b/diylc/diylc-swing/src/org/diylc/swing/plugins/config/ConfigPlugin.java
index a51d6cb22..1b55d5c6f 100644
--- a/diylc/diylc-swing/src/org/diylc/swing/plugins/config/ConfigPlugin.java
+++ b/diylc/diylc-swing/src/org/diylc/swing/plugins/config/ConfigPlugin.java
@@ -43,6 +43,7 @@
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
+import com.thoughtworks.xstream.security.AnyTypePermission;
/**
* Controls configuration menu.
@@ -168,6 +169,7 @@ public void connect(IPlugInPort plugInPort) {
File[] themeFiles = ResourceLoader.getFiles("themes");
if (themeFiles != null && themeFiles.length > 0) {
XStream xStream = new XStream(new DomDriver());
+ xStream.addPermission(AnyTypePermission.ANY);
swingUI.injectSubmenu(THEME_MENU, IconLoader.Pens.getIcon(), CONFIG_MENU);
for (File file : themeFiles) {
if (file.getName().toLowerCase().endsWith(".xml")) {
diff --git a/diylc/diylc-swing/src/org/diylc/swing/plugins/layers/LayersMenuPlugin.java b/diylc/diylc-swing/src/org/diylc/swing/plugins/layers/LayersMenuPlugin.java
index b5a1c49a7..84a8a56cf 100644
--- a/diylc/diylc-swing/src/org/diylc/swing/plugins/layers/LayersMenuPlugin.java
+++ b/diylc/diylc-swing/src/org/diylc/swing/plugins/layers/LayersMenuPlugin.java
@@ -123,7 +123,7 @@ public void processMessage(EventType eventType, Object... params) {
}
static enum Layer {
- CHASSIS("Chassis", IDIYComponent.CHASSIS), BOARD("Board", IDIYComponent.BOARD), TRACE("Trace", IDIYComponent.TRACE), COMPONENT(
+ CHASSIS("Chassis", IDIYComponent.CHASSIS), BOARD("Board", IDIYComponent.BOARD), WIRING("Wiring", IDIYComponent.WIRING), COMPONENT(
"Component", IDIYComponent.COMPONENT), TEXT("Text", IDIYComponent.TEXT);
String title;
diff --git a/diylc/diylc-swing/themes/Gray.xml b/diylc/diylc-swing/themes/Gray.xml
new file mode 100644
index 000000000..1f5966e0f
--- /dev/null
+++ b/diylc/diylc-swing/themes/Gray.xml
@@ -0,0 +1,27 @@
+
+ Gray
+
+ 170
+ 170
+ 170
+ 255
+
+
+ 150
+ 150
+ 150
+ 255
+
+
+ 100
+ 100
+ 100
+ 255
+
+
+ 0
+ 0
+ 0
+ 255
+
+
\ No newline at end of file