Revision: 9237
http://sourceforge.net/p/vassalengine/svn/9237
Author: uckelman
Date: 2016-11-07 17:21:40 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Reverted previous merge.
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
VASSAL-src/trunk/src/bsh/Primitive.java
Modified: VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 by Brent Easton
+ * Copyright (c) 2011-2013 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -39,7 +39,6 @@
protected GpIdSupport gpIdSupport;
protected int maxId;
protected boolean useName = false;
- protected boolean extensionsLoaded = false;
final HashMap<String, SlotElement> goodSlots = new HashMap<String, SlotElement>();
final ArrayList<SlotElement> errorSlots = new ArrayList<SlotElement>();
@@ -52,11 +51,9 @@
maxId = -1;
}
- // This constructor is used by the GameRefresher to refresh a game with extensions possibly loaded
public GpIdChecker(boolean useName) {
this();
this.useName = useName;
- this.extensionsLoaded = true;
}
/**
@@ -108,16 +105,10 @@
protected void testGpId(String id, SlotElement element) {
/*
* If this has been called from a ModuleExtension, the GpId is prefixed with
- * the Extension Id. Remove the Extension Id and just process the numeric part.
- *
- * NOTE: If GpIdChecker is being used by the GameRefesher, then there may be
- * extensions loaded, so retain the extension prefix to ensure a correct
- * unique slot id check.
+ * the Extension Id. Remove the Extension Id and just process the numerid part.
*/
- if (! extensionsLoaded) {
- if (id.contains(":")) {
- id = id.split(":")[1];
- }
+ if (id.contains(":")) {
+ id = id.split(":")[1];
}
if (id == null || id.length() == 0) { // gpid not generated yet?
@@ -128,17 +119,11 @@
errorSlots.add(element);
}
try {
- if (extensionsLoaded) {
- goodSlots.put(id, element);
- System.out.println("Add Id "+id);
+ final int iid = Integer.parseInt(id);
+ goodSlots.put(id, element); // gpid is good.
+ if (iid >= maxId) {
+ maxId = iid+1;
}
- else {
- final int iid = Integer.parseInt(id);
- goodSlots.put(id, element); // gpid is good.
- if (iid >= maxId) {
- maxId = iid+1;
- }
- }
}
catch (Exception e) {
errorSlots.add(element); // non-numeric gpid?
@@ -353,4 +338,4 @@
return null;
}
}
-}
+}
\ No newline at end of file
Modified: VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -798,9 +798,7 @@
return String.valueOf(isActive());
}
else if (key.equals(Properties.VISIBLE_STATE)) {
- checkPropertyLevel();
String s = String.valueOf(super.getProperty(key));
- s += value;
if (drawUnderneathWhenSelected) {
s += getProperty(Properties.SELECTED);
}
Modified: VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -41,8 +41,6 @@
// FIXME: check that parentless dialogs get the right icons
public class ApplicationIcons {
-
- public static final String VASSAL_ICON_LARGE = "VASSAL-256x256.png";
private ApplicationIcons() {}
@@ -99,7 +97,7 @@
dst, // 24x24
ImageUtils.getImageResource("/icons/32x32/VASSAL.png"),
ImageUtils.getImageResource("/icons/48x48/VASSAL.png"),
- ImageUtils.getImageResource("/images/"+VASSAL_ICON_LARGE)
+ ImageUtils.getImageResource("/images/VASSAL-256x256.png")
);
}
else {
Modified: VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -40,7 +40,6 @@
import VASSAL.build.IllegalBuildException;
import VASSAL.i18n.Resources;
-import VASSAL.tools.ApplicationIcons;
import VASSAL.tools.DataArchive;
import VASSAL.tools.ErrorDialog;
import VASSAL.tools.JarArchive;
@@ -278,11 +277,7 @@
try {
//Build a URL to the Vassal images folder. It is guaranteed to exist
// in any version of Vassal
- // Bug 9670 BUT there may also be an images folder in another Jar file in the Classloader path before the Vengine.jar
- // so look for an Icon we know must exist there.
- // imageUrl = jar.getURL(DataArchive.IMAGE_DIR
- imageUrl = jar.getURL(DataArchive.IMAGE_DIR+ApplicationIcons.VASSAL_ICON_LARGE);
- imageUrl = new URL (imageUrl.toString().substring(0, imageUrl.toString().length() - ApplicationIcons.VASSAL_ICON_LARGE.length()));
+ imageUrl = jar.getURL(DataArchive.IMAGE_DIR);
logger.info("VASSAL images folder found at "+imageUrl);
// Determine if we are running locally under a debugger, or
// from an installation package. If running an installed version
Modified: VASSAL-src/trunk/src/bsh/Primitive.java
===================================================================
--- VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -36,7 +36,6 @@
import java.util.Map;
import java.util.HashMap;
-import java.util.regex.Pattern;
/**
Wrapper for primitive types in Bsh. This is package public because it
@@ -471,9 +470,6 @@
case PLUS:
return lhs + rhs;
- case MATCH:
- return new Boolean(Pattern.matches(rhs, lhs));
-
default:
throw new InterpreterError(
"Unimplemented binary String operator");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|