Revision: 9241
http://sourceforge.net/p/vassalengine/svn/9241
Author: uckelman
Date: 2016-11-07 17:28:27 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Merged Brent-3.2-Work@9234.
Fixed Bug 9670: IllegalStateException: Icon Family VASSAL not found in
ServerAddressBook.getCurrentIcon
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
Modified: VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:24:58 UTC (rev 9240)
+++ VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:28:27 UTC (rev 9241)
@@ -41,6 +41,8 @@
// FIXME: check that parentless dialogs get the right icons
public class ApplicationIcons {
+
+ public static final String VASSAL_ICON_LARGE = "VASSAL-256x256.png";
private ApplicationIcons() {}
@@ -97,7 +99,7 @@
dst, // 24x24
ImageUtils.getImageResource("/icons/32x32/VASSAL.png"),
ImageUtils.getImageResource("/icons/48x48/VASSAL.png"),
- ImageUtils.getImageResource("/images/VASSAL-256x256.png")
+ ImageUtils.getImageResource("/images/"+VASSAL_ICON_LARGE)
);
}
else {
Modified: VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:24:58 UTC (rev 9240)
+++ VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:28:27 UTC (rev 9241)
@@ -40,6 +40,7 @@
import VASSAL.build.IllegalBuildException;
import VASSAL.i18n.Resources;
+import VASSAL.tools.ApplicationIcons;
import VASSAL.tools.DataArchive;
import VASSAL.tools.ErrorDialog;
import VASSAL.tools.JarArchive;
@@ -277,7 +278,11 @@
try {
//Build a URL to the Vassal images folder. It is guaranteed to exist
// in any version of Vassal
- imageUrl = jar.getURL(DataArchive.IMAGE_DIR);
+ // 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()));
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
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
|